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

package com.azure.resourcemanager.vmwarecloudsimple.models;

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

/** The CustomizationIpSettings model. */
@Fluent
public final class CustomizationIpSettings {
    /*
     * The list of gateways
     */
    @JsonProperty(value = "gateway")
    private List<String> gateway;

    /*
     * Ip address customization settings
     */
    @JsonProperty(value = "ip")
    private CustomizationIpAddress ip;

    /*
     * Adapter subnet mask
     */
    @JsonProperty(value = "subnetMask")
    private String subnetMask;

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

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

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

    /**
     * Get the ip property: Ip address customization settings.
     *
     * @return the ip value.
     */
    public CustomizationIpAddress ip() {
        return this.ip;
    }

    /**
     * Set the ip property: Ip address customization settings.
     *
     * @param ip the ip value to set.
     * @return the CustomizationIpSettings object itself.
     */
    public CustomizationIpSettings withIp(CustomizationIpAddress ip) {
        this.ip = ip;
        return this;
    }

    /**
     * Get the subnetMask property: Adapter subnet mask.
     *
     * @return the subnetMask value.
     */
    public String subnetMask() {
        return this.subnetMask;
    }

    /**
     * Set the subnetMask property: Adapter subnet mask.
     *
     * @param subnetMask the subnetMask value to set.
     * @return the CustomizationIpSettings object itself.
     */
    public CustomizationIpSettings withSubnetMask(String subnetMask) {
        this.subnetMask = subnetMask;
        return this;
    }

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