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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** InMageRcm NIC input. */
@Fluent
public final class InMageRcmNicInput {
    /*
     * The NIC Id.
     */
    @JsonProperty(value = "nicId", required = true)
    private String nicId;

    /*
     * A value indicating whether this is the primary NIC.
     */
    @JsonProperty(value = "isPrimaryNic", required = true)
    private String isPrimaryNic;

    /*
     * A value indicating whether this NIC is selected for failover.
     */
    @JsonProperty(value = "isSelectedForFailover")
    private String isSelectedForFailover;

    /*
     * Target subnet name.
     */
    @JsonProperty(value = "targetSubnetName")
    private String targetSubnetName;

    /*
     * The target static IP address.
     */
    @JsonProperty(value = "targetStaticIPAddress")
    private String targetStaticIpAddress;

    /*
     * The test subnet name.
     */
    @JsonProperty(value = "testSubnetName")
    private String testSubnetName;

    /*
     * The test static IP address.
     */
    @JsonProperty(value = "testStaticIPAddress")
    private String testStaticIpAddress;

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

    /**
     * Get the nicId property: The NIC Id.
     *
     * @return the nicId value.
     */
    public String nicId() {
        return this.nicId;
    }

    /**
     * Set the nicId property: The NIC Id.
     *
     * @param nicId the nicId value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withNicId(String nicId) {
        this.nicId = nicId;
        return this;
    }

    /**
     * Get the isPrimaryNic property: A value indicating whether this is the primary NIC.
     *
     * @return the isPrimaryNic value.
     */
    public String isPrimaryNic() {
        return this.isPrimaryNic;
    }

    /**
     * Set the isPrimaryNic property: A value indicating whether this is the primary NIC.
     *
     * @param isPrimaryNic the isPrimaryNic value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withIsPrimaryNic(String isPrimaryNic) {
        this.isPrimaryNic = isPrimaryNic;
        return this;
    }

    /**
     * Get the isSelectedForFailover property: A value indicating whether this NIC is selected for failover.
     *
     * @return the isSelectedForFailover value.
     */
    public String isSelectedForFailover() {
        return this.isSelectedForFailover;
    }

    /**
     * Set the isSelectedForFailover property: A value indicating whether this NIC is selected for failover.
     *
     * @param isSelectedForFailover the isSelectedForFailover value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withIsSelectedForFailover(String isSelectedForFailover) {
        this.isSelectedForFailover = isSelectedForFailover;
        return this;
    }

    /**
     * Get the targetSubnetName property: Target subnet name.
     *
     * @return the targetSubnetName value.
     */
    public String targetSubnetName() {
        return this.targetSubnetName;
    }

    /**
     * Set the targetSubnetName property: Target subnet name.
     *
     * @param targetSubnetName the targetSubnetName value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withTargetSubnetName(String targetSubnetName) {
        this.targetSubnetName = targetSubnetName;
        return this;
    }

    /**
     * Get the targetStaticIpAddress property: The target static IP address.
     *
     * @return the targetStaticIpAddress value.
     */
    public String targetStaticIpAddress() {
        return this.targetStaticIpAddress;
    }

    /**
     * Set the targetStaticIpAddress property: The target static IP address.
     *
     * @param targetStaticIpAddress the targetStaticIpAddress value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withTargetStaticIpAddress(String targetStaticIpAddress) {
        this.targetStaticIpAddress = targetStaticIpAddress;
        return this;
    }

    /**
     * Get the testSubnetName property: The test subnet name.
     *
     * @return the testSubnetName value.
     */
    public String testSubnetName() {
        return this.testSubnetName;
    }

    /**
     * Set the testSubnetName property: The test subnet name.
     *
     * @param testSubnetName the testSubnetName value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withTestSubnetName(String testSubnetName) {
        this.testSubnetName = testSubnetName;
        return this;
    }

    /**
     * Get the testStaticIpAddress property: The test static IP address.
     *
     * @return the testStaticIpAddress value.
     */
    public String testStaticIpAddress() {
        return this.testStaticIpAddress;
    }

    /**
     * Set the testStaticIpAddress property: The test static IP address.
     *
     * @param testStaticIpAddress the testStaticIpAddress value to set.
     * @return the InMageRcmNicInput object itself.
     */
    public InMageRcmNicInput withTestStaticIpAddress(String testStaticIpAddress) {
        this.testStaticIpAddress = testStaticIpAddress;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (nicId() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property nicId in model InMageRcmNicInput"));
        }
        if (isPrimaryNic() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property isPrimaryNic in model InMageRcmNicInput"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(InMageRcmNicInput.class);
}
