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

package com.azure.resourcemanager.hybridnetwork.models;

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

/** Network interface IP configuration properties. */
@Fluent
public final class NetworkInterfaceIpConfiguration {
    /*
     * IP address allocation method.
     */
    @JsonProperty(value = "ipAllocationMethod")
    private IpAllocationMethod ipAllocationMethod;

    /*
     * The value of the IP address.
     */
    @JsonProperty(value = "ipAddress")
    private String ipAddress;

    /*
     * The value of the subnet.
     */
    @JsonProperty(value = "subnet")
    private String subnet;

    /*
     * The value of the gateway.
     */
    @JsonProperty(value = "gateway")
    private String gateway;

    /*
     * IP address version.
     */
    @JsonProperty(value = "ipVersion")
    private IpVersion ipVersion;

    /*
     * The list of DNS servers IP addresses.
     */
    @JsonProperty(value = "dnsServers")
    private List<String> dnsServers;

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

    /**
     * Get the ipAllocationMethod property: IP address allocation method.
     *
     * @return the ipAllocationMethod value.
     */
    public IpAllocationMethod ipAllocationMethod() {
        return this.ipAllocationMethod;
    }

    /**
     * Set the ipAllocationMethod property: IP address allocation method.
     *
     * @param ipAllocationMethod the ipAllocationMethod value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withIpAllocationMethod(IpAllocationMethod ipAllocationMethod) {
        this.ipAllocationMethod = ipAllocationMethod;
        return this;
    }

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

    /**
     * Set the ipAddress property: The value of the IP address.
     *
     * @param ipAddress the ipAddress value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
        return this;
    }

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

    /**
     * Set the subnet property: The value of the subnet.
     *
     * @param subnet the subnet value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withSubnet(String subnet) {
        this.subnet = subnet;
        return this;
    }

    /**
     * Get the gateway property: The value of the gateway.
     *
     * @return the gateway value.
     */
    public String gateway() {
        return this.gateway;
    }

    /**
     * Set the gateway property: The value of the gateway.
     *
     * @param gateway the gateway value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withGateway(String gateway) {
        this.gateway = gateway;
        return this;
    }

    /**
     * Get the ipVersion property: IP address version.
     *
     * @return the ipVersion value.
     */
    public IpVersion ipVersion() {
        return this.ipVersion;
    }

    /**
     * Set the ipVersion property: IP address version.
     *
     * @param ipVersion the ipVersion value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withIpVersion(IpVersion ipVersion) {
        this.ipVersion = ipVersion;
        return this;
    }

    /**
     * Get the dnsServers property: The list of DNS servers IP addresses.
     *
     * @return the dnsServers value.
     */
    public List<String> dnsServers() {
        return this.dnsServers;
    }

    /**
     * Set the dnsServers property: The list of DNS servers IP addresses.
     *
     * @param dnsServers the dnsServers value to set.
     * @return the NetworkInterfaceIpConfiguration object itself.
     */
    public NetworkInterfaceIpConfiguration withDnsServers(List<String> dnsServers) {
        this.dnsServers = dnsServers;
        return this;
    }

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