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

package com.azure.resourcemanager.nginx.models;

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

/** The NginxDeploymentUpdateParameters model. */
@Fluent
public final class NginxDeploymentUpdateParameters {
    /*
     * The identity property.
     */
    @JsonProperty(value = "identity")
    private IdentityProperties identity;

    /*
     * Dictionary of <string>
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * The sku property.
     */
    @JsonProperty(value = "sku")
    private ResourceSku sku;

    /*
     * The location property.
     */
    @JsonProperty(value = "location")
    private String location;

    /*
     * The properties property.
     */
    @JsonProperty(value = "properties")
    private NginxDeploymentUpdateProperties properties;

    /** Creates an instance of NginxDeploymentUpdateParameters class. */
    public NginxDeploymentUpdateParameters() {
    }

    /**
     * Get the identity property: The identity property.
     *
     * @return the identity value.
     */
    public IdentityProperties identity() {
        return this.identity;
    }

    /**
     * Set the identity property: The identity property.
     *
     * @param identity the identity value to set.
     * @return the NginxDeploymentUpdateParameters object itself.
     */
    public NginxDeploymentUpdateParameters withIdentity(IdentityProperties identity) {
        this.identity = identity;
        return this;
    }

    /**
     * Get the tags property: Dictionary of &lt;string&gt;.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Dictionary of &lt;string&gt;.
     *
     * @param tags the tags value to set.
     * @return the NginxDeploymentUpdateParameters object itself.
     */
    public NginxDeploymentUpdateParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the sku property: The sku property.
     *
     * @return the sku value.
     */
    public ResourceSku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: The sku property.
     *
     * @param sku the sku value to set.
     * @return the NginxDeploymentUpdateParameters object itself.
     */
    public NginxDeploymentUpdateParameters withSku(ResourceSku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the location property: The location property.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Set the location property: The location property.
     *
     * @param location the location value to set.
     * @return the NginxDeploymentUpdateParameters object itself.
     */
    public NginxDeploymentUpdateParameters withLocation(String location) {
        this.location = location;
        return this;
    }

    /**
     * Get the properties property: The properties property.
     *
     * @return the properties value.
     */
    public NginxDeploymentUpdateProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: The properties property.
     *
     * @param properties the properties value to set.
     * @return the NginxDeploymentUpdateParameters object itself.
     */
    public NginxDeploymentUpdateParameters withProperties(NginxDeploymentUpdateProperties properties) {
        this.properties = properties;
        return this;
    }

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