// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceRoleTypes;
import com.azure.resourcemanager.managednetworkfabric.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** The NetworkDevice resource definition. */
@Fluent
public final class NetworkDeviceInner extends Resource {
    /*
     * Resource properties.
     */
    @JsonProperty(value = "properties")
    private NetworkDeviceProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Resource properties.
     *
     * @return the innerProperties value.
     */
    private NetworkDeviceProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /** {@inheritDoc} */
    @Override
    public NetworkDeviceInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public NetworkDeviceInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the version property: Current version of the device as defined in SKU.
     *
     * @return the version value.
     */
    public String version() {
        return this.innerProperties() == null ? null : this.innerProperties().version();
    }

    /**
     * Get the networkDeviceSku property: Network Device SKU name.
     *
     * @return the networkDeviceSku value.
     */
    public String networkDeviceSku() {
        return this.innerProperties() == null ? null : this.innerProperties().networkDeviceSku();
    }

    /**
     * Set the networkDeviceSku property: Network Device SKU name.
     *
     * @param networkDeviceSku the networkDeviceSku value to set.
     * @return the NetworkDeviceInner object itself.
     */
    public NetworkDeviceInner withNetworkDeviceSku(String networkDeviceSku) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDeviceProperties();
        }
        this.innerProperties().withNetworkDeviceSku(networkDeviceSku);
        return this;
    }

    /**
     * Get the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR.
     *
     * @return the networkDeviceRole value.
     */
    public NetworkDeviceRoleTypes networkDeviceRole() {
        return this.innerProperties() == null ? null : this.innerProperties().networkDeviceRole();
    }

    /**
     * Set the networkDeviceRole property: networkDeviceRole is the device role: Example: CE | ToR.
     *
     * @param networkDeviceRole the networkDeviceRole value to set.
     * @return the NetworkDeviceInner object itself.
     */
    public NetworkDeviceInner withNetworkDeviceRole(NetworkDeviceRoleTypes networkDeviceRole) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDeviceProperties();
        }
        this.innerProperties().withNetworkDeviceRole(networkDeviceRole);
        return this;
    }

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

    /**
     * Get the networkRackId property: Reference to network rack resource id.
     *
     * @return the networkRackId value.
     */
    public String networkRackId() {
        return this.innerProperties() == null ? null : this.innerProperties().networkRackId();
    }

    /**
     * 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 NetworkDeviceInner object itself.
     */
    public NetworkDeviceInner withHostname(String hostname) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDeviceProperties();
        }
        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 NetworkDeviceInner object itself.
     */
    public NetworkDeviceInner withSerialNumber(String serialNumber) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDeviceProperties();
        }
        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 NetworkDeviceInner object itself.
     */
    public NetworkDeviceInner withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkDeviceProperties();
        }
        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();
        }
    }
}
