// 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.CreatorProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Parameters used to update an existing Creator resource. */
@Fluent
public final class CreatorUpdateParameters {
    /*
     * 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;

    /*
     * Creator resource properties.
     */
    @JsonProperty(value = "properties")
    private CreatorProperties innerProperties;

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

    /**
     * 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 CreatorUpdateParameters object itself.
     */
    public CreatorUpdateParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: Creator resource properties.
     *
     * @return the innerProperties value.
     */
    private CreatorProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the provisioningState property: The state of the resource provisioning, terminal states: Succeeded, Failed,
     * Canceled.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the storageUnits property: The storage units to be allocated. Integer values from 1 to 100, inclusive.
     *
     * @return the storageUnits value.
     */
    public Integer storageUnits() {
        return this.innerProperties() == null ? null : this.innerProperties().storageUnits();
    }

    /**
     * Set the storageUnits property: The storage units to be allocated. Integer values from 1 to 100, inclusive.
     *
     * @param storageUnits the storageUnits value to set.
     * @return the CreatorUpdateParameters object itself.
     */
    public CreatorUpdateParameters withStorageUnits(Integer storageUnits) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CreatorProperties();
        }
        this.innerProperties().withStorageUnits(storageUnits);
        return this;
    }

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