// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.scvmm.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Defines the virtualMachineUpdate. */
@Fluent
public final class VirtualMachineUpdate {
    /*
     * Defines the resource properties.
     */
    @JsonProperty(value = "properties")
    private VirtualMachineUpdateProperties properties;

    /*
     * Gets or sets the Resource tags.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /**
     * Get the properties property: Defines the resource properties.
     *
     * @return the properties value.
     */
    public VirtualMachineUpdateProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Defines the resource properties.
     *
     * @param properties the properties value to set.
     * @return the VirtualMachineUpdate object itself.
     */
    public VirtualMachineUpdate withProperties(VirtualMachineUpdateProperties properties) {
        this.properties = properties;
        return this;
    }

    /**
     * Get the tags property: Gets or sets the Resource tags.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Gets or sets the Resource tags.
     *
     * @param tags the tags value to set.
     * @return the VirtualMachineUpdate object itself.
     */
    public VirtualMachineUpdate withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (properties() != null) {
            properties().validate();
        }
    }
}
