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

package com.azure.resourcemanager.maps.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.maps.fluent.models.MapsAccountProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Parameters used to update an existing Maps Account. */
@Fluent
public final class MapsAccountUpdateParameters {
    /*
     * Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and
     * grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag
     * must have a key no greater than 128 characters and value no greater than 256 characters.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

    /*
     * Get or Set Kind property.
     */
    @JsonProperty(value = "kind")
    private Kind kind;

    /*
     * The SKU of this account.
     */
    @JsonProperty(value = "sku")
    private Sku sku;

    /*
     * The map account properties.
     */
    @JsonProperty(value = "properties")
    private MapsAccountProperties innerProperties;

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

    /**
     * Get the tags property: Gets or sets a list of key value pairs that describe the resource. These tags can be used
     * in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a
     * resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Gets or sets a list of key value pairs that describe the resource. These tags can be used
     * in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a
     * resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
     *
     * @param tags the tags value to set.
     * @return the MapsAccountUpdateParameters object itself.
     */
    public MapsAccountUpdateParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the kind property: Get or Set Kind property.
     *
     * @return the kind value.
     */
    public Kind kind() {
        return this.kind;
    }

    /**
     * Set the kind property: Get or Set Kind property.
     *
     * @param kind the kind value to set.
     * @return the MapsAccountUpdateParameters object itself.
     */
    public MapsAccountUpdateParameters withKind(Kind kind) {
        this.kind = kind;
        return this;
    }

    /**
     * Get the sku property: The SKU of this account.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: The SKU of this account.
     *
     * @param sku the sku value to set.
     * @return the MapsAccountUpdateParameters object itself.
     */
    public MapsAccountUpdateParameters withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

    /**
     * Get the innerProperties property: The map account properties.
     *
     * @return the innerProperties value.
     */
    private MapsAccountProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the uniqueId property: A unique identifier for the maps account.
     *
     * @return the uniqueId value.
     */
    public String uniqueId() {
        return this.innerProperties() == null ? null : this.innerProperties().uniqueId();
    }

    /**
     * Get the disableLocalAuth property: Allows toggle functionality on Azure Policy to disable Azure Maps local
     * authentication support. This will disable Shared Keys authentication from any usage.
     *
     * @return the disableLocalAuth value.
     */
    public Boolean disableLocalAuth() {
        return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth();
    }

    /**
     * Set the disableLocalAuth property: Allows toggle functionality on Azure Policy to disable Azure Maps local
     * authentication support. This will disable Shared Keys authentication from any usage.
     *
     * @param disableLocalAuth the disableLocalAuth value to set.
     * @return the MapsAccountUpdateParameters object itself.
     */
    public MapsAccountUpdateParameters withDisableLocalAuth(Boolean disableLocalAuth) {
        if (this.innerProperties() == null) {
            this.innerProperties = new MapsAccountProperties();
        }
        this.innerProperties().withDisableLocalAuth(disableLocalAuth);
        return this;
    }

    /**
     * Get the provisioningState property: the state of the provisioning.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

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