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

package com.azure.resourcemanager.connectedvmware.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Network Interface model. */
@Fluent
public final class NetworkInterface {
    /*
     * Gets or sets the name of the network interface.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Gets or sets the label of the virtual network in vCenter that the nic is connected to.
     */
    @JsonProperty(value = "label", access = JsonProperty.Access.WRITE_ONLY)
    private String label;

    /*
     * Gets or sets the nic ip addresses.
     */
    @JsonProperty(value = "ipAddresses", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> ipAddresses;

    /*
     * Gets or sets the NIC MAC address.
     */
    @JsonProperty(value = "macAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String macAddress;

    /*
     * Gets or sets the ARM Id of the network resource to connect the virtual machine.
     */
    @JsonProperty(value = "networkId")
    private String networkId;

    /*
     * NIC type
     */
    @JsonProperty(value = "nicType")
    private NicType nicType;

    /*
     * Gets or sets the power on boot.
     */
    @JsonProperty(value = "powerOnBoot")
    private PowerOnBootOption powerOnBoot;

    /*
     * Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network
     * that the nic is connected to.
     */
    @JsonProperty(value = "networkMoRefId", access = JsonProperty.Access.WRITE_ONLY)
    private String networkMoRefId;

    /*
     * Gets or sets the name of the virtual network in vCenter that the nic is connected to.
     */
    @JsonProperty(value = "networkMoName", access = JsonProperty.Access.WRITE_ONLY)
    private String networkMoName;

    /*
     * Gets or sets the device key value.
     */
    @JsonProperty(value = "deviceKey")
    private Integer deviceKey;

    /*
     * Gets or sets the ipsettings.
     */
    @JsonProperty(value = "ipSettings")
    private NicIpSettings ipSettings;

    /**
     * Get the name property: Gets or sets the name of the network interface.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Gets or sets the name of the network interface.
     *
     * @param name the name value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the label property: Gets or sets the label of the virtual network in vCenter that the nic is connected to.
     *
     * @return the label value.
     */
    public String label() {
        return this.label;
    }

    /**
     * Get the ipAddresses property: Gets or sets the nic ip addresses.
     *
     * @return the ipAddresses value.
     */
    public List<String> ipAddresses() {
        return this.ipAddresses;
    }

    /**
     * Get the macAddress property: Gets or sets the NIC MAC address.
     *
     * @return the macAddress value.
     */
    public String macAddress() {
        return this.macAddress;
    }

    /**
     * Get the networkId property: Gets or sets the ARM Id of the network resource to connect the virtual machine.
     *
     * @return the networkId value.
     */
    public String networkId() {
        return this.networkId;
    }

    /**
     * Set the networkId property: Gets or sets the ARM Id of the network resource to connect the virtual machine.
     *
     * @param networkId the networkId value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withNetworkId(String networkId) {
        this.networkId = networkId;
        return this;
    }

    /**
     * Get the nicType property: NIC type.
     *
     * @return the nicType value.
     */
    public NicType nicType() {
        return this.nicType;
    }

    /**
     * Set the nicType property: NIC type.
     *
     * @param nicType the nicType value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withNicType(NicType nicType) {
        this.nicType = nicType;
        return this;
    }

    /**
     * Get the powerOnBoot property: Gets or sets the power on boot.
     *
     * @return the powerOnBoot value.
     */
    public PowerOnBootOption powerOnBoot() {
        return this.powerOnBoot;
    }

    /**
     * Set the powerOnBoot property: Gets or sets the power on boot.
     *
     * @param powerOnBoot the powerOnBoot value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withPowerOnBoot(PowerOnBootOption powerOnBoot) {
        this.powerOnBoot = powerOnBoot;
        return this;
    }

    /**
     * Get the networkMoRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual
     * network that the nic is connected to.
     *
     * @return the networkMoRefId value.
     */
    public String networkMoRefId() {
        return this.networkMoRefId;
    }

    /**
     * Get the networkMoName property: Gets or sets the name of the virtual network in vCenter that the nic is connected
     * to.
     *
     * @return the networkMoName value.
     */
    public String networkMoName() {
        return this.networkMoName;
    }

    /**
     * Get the deviceKey property: Gets or sets the device key value.
     *
     * @return the deviceKey value.
     */
    public Integer deviceKey() {
        return this.deviceKey;
    }

    /**
     * Set the deviceKey property: Gets or sets the device key value.
     *
     * @param deviceKey the deviceKey value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withDeviceKey(Integer deviceKey) {
        this.deviceKey = deviceKey;
        return this;
    }

    /**
     * Get the ipSettings property: Gets or sets the ipsettings.
     *
     * @return the ipSettings value.
     */
    public NicIpSettings ipSettings() {
        return this.ipSettings;
    }

    /**
     * Set the ipSettings property: Gets or sets the ipsettings.
     *
     * @param ipSettings the ipSettings value to set.
     * @return the NetworkInterface object itself.
     */
    public NetworkInterface withIpSettings(NicIpSettings ipSettings) {
        this.ipSettings = ipSettings;
        return this;
    }

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