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

package com.azure.resourcemanager.managednetworkfabric.models;

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

/** The NetworkDevicePatchParameters resource definition. */
@Fluent
public final class NetworkDevicePatchParameters {
    /*
     * Network Device Patch properties.
     */
    @JsonProperty(value = "properties")
    private NetworkDevicePatchParametersProperties innerProperties;

    /*
     * 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 NetworkDevicePatchParameters class. */
    public NetworkDevicePatchParameters() {
    }

    /**
     * Get the innerProperties property: Network Device Patch properties.
     *
     * @return the innerProperties value.
     */
    private NetworkDevicePatchParametersProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: 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: Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the NetworkDevicePatchParameters object itself.
     */
    public NetworkDevicePatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the hostname property: The host Name of the device.
     *
     * @return the hostname value.
     */
    public String hostname() {
        return this.innerProperties() == null ? null : this.innerProperties().hostname();
    }

    /**
     * Set the hostname property: The host Name of the device.
     *
     * @param hostname the hostname value to set.
     * @return the NetworkDevicePatchParameters object itself.
     */
    public NetworkDevicePatchParameters withHostname(String hostname) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDevicePatchParametersProperties();
        }
        this.innerProperties().withHostname(hostname);
        return this;
    }

    /**
     * Get the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example:
     * Arista;DCS-7280DR3-24;12.05;JPE21116969.
     *
     * @return the serialNumber value.
     */
    public String serialNumber() {
        return this.innerProperties() == null ? null : this.innerProperties().serialNumber();
    }

    /**
     * Set the serialNumber property: serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example:
     * Arista;DCS-7280DR3-24;12.05;JPE21116969.
     *
     * @param serialNumber the serialNumber value to set.
     * @return the NetworkDevicePatchParameters object itself.
     */
    public NetworkDevicePatchParameters withSerialNumber(String serialNumber) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDevicePatchParametersProperties();
        }
        this.innerProperties().withSerialNumber(serialNumber);
        return this;
    }

    /**
     * Get the annotation property: Switch configuration description.
     *
     * @return the annotation value.
     */
    public String annotation() {
        return this.innerProperties() == null ? null : this.innerProperties().annotation();
    }

    /**
     * Set the annotation property: Switch configuration description.
     *
     * @param annotation the annotation value to set.
     * @return the NetworkDevicePatchParameters object itself.
     */
    public NetworkDevicePatchParameters withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDevicePatchParametersProperties();
        }
        this.innerProperties().withAnnotation(annotation);
        return this;
    }

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