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

package com.azure.resourcemanager.networkcloud.models;

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

/** StorageAppliancePatchParameters represents the body of the request to patch storage appliance properties. */
@Fluent
public final class StorageAppliancePatchParameters {
    /*
     * StorageAppliancePatchProperties represents the properties of the storage appliance that can be patched.
     *
     * The list of the resource properties.
     */
    @JsonProperty(value = "properties")
    private StorageAppliancePatchProperties innerProperties;

    /*
     * The Azure resource tags that will replace the existing ones.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the innerProperties property: StorageAppliancePatchProperties represents the properties of the storage
     * appliance that can be patched.
     *
     * <p>The list of the resource properties.
     *
     * @return the innerProperties value.
     */
    private StorageAppliancePatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the StorageAppliancePatchParameters object itself.
     */
    public StorageAppliancePatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the serialNumber property: The serial number for the storage appliance.
     *
     * @return the serialNumber value.
     */
    public String serialNumber() {
        return this.innerProperties() == null ? null : this.innerProperties().serialNumber();
    }

    /**
     * Set the serialNumber property: The serial number for the storage appliance.
     *
     * @param serialNumber the serialNumber value to set.
     * @return the StorageAppliancePatchParameters object itself.
     */
    public StorageAppliancePatchParameters withSerialNumber(String serialNumber) {
        if (this.innerProperties() == null) {
            this.innerProperties = new StorageAppliancePatchProperties();
        }
        this.innerProperties().withSerialNumber(serialNumber);
        return this;
    }

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