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

package com.azure.resourcemanager.purview.models;

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

/** The account update properties. */
@Fluent
public final class AccountUpdateParameters {
    /*
     * Identity related info to add/remove userAssignedIdentities.
     */
    @JsonProperty(value = "identity")
    private Identity identity;

    /*
     * The account properties.
     */
    @JsonProperty(value = "properties")
    private AccountProperties properties;

    /*
     * Tags on the azure resource.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the identity property: Identity related info to add/remove userAssignedIdentities.
     *
     * @return the identity value.
     */
    public Identity identity() {
        return this.identity;
    }

    /**
     * Set the identity property: Identity related info to add/remove userAssignedIdentities.
     *
     * @param identity the identity value to set.
     * @return the AccountUpdateParameters object itself.
     */
    public AccountUpdateParameters withIdentity(Identity identity) {
        this.identity = identity;
        return this;
    }

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

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

    /**
     * Get the tags property: Tags on the azure resource.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Tags on the azure resource.
     *
     * @param tags the tags value to set.
     * @return the AccountUpdateParameters object itself.
     */
    public AccountUpdateParameters 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 (identity() != null) {
            identity().validate();
        }
        if (properties() != null) {
            properties().validate();
        }
    }
}
