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

package com.azure.resourcemanager.networkcloud.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.networkcloud.models.CloudServicesNetworkEnableDefaultEgressEndpoints;
import com.azure.resourcemanager.networkcloud.models.EgressEndpoint;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/**
 * CloudServicesNetworkPatchProperties represents the properties of the cloud services network that can be updated using
 * a patch request.
 */
@Fluent
public final class CloudServicesNetworkPatchProperties {
    /*
     * The list of egress endpoints. This allows for connection from a Hybrid AKS cluster to the specified endpoint.
     */
    @JsonProperty(value = "additionalEgressEndpoints")
    private List<EgressEndpoint> additionalEgressEndpoints;

    /*
     * The indicator of whether the platform default endpoints are allowed for the egress traffic.
     */
    @JsonProperty(value = "enableDefaultEgressEndpoints")
    private CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints;

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

    /**
     * Get the additionalEgressEndpoints property: The list of egress endpoints. This allows for connection from a
     * Hybrid AKS cluster to the specified endpoint.
     *
     * @return the additionalEgressEndpoints value.
     */
    public List<EgressEndpoint> additionalEgressEndpoints() {
        return this.additionalEgressEndpoints;
    }

    /**
     * Set the additionalEgressEndpoints property: The list of egress endpoints. This allows for connection from a
     * Hybrid AKS cluster to the specified endpoint.
     *
     * @param additionalEgressEndpoints the additionalEgressEndpoints value to set.
     * @return the CloudServicesNetworkPatchProperties object itself.
     */
    public CloudServicesNetworkPatchProperties withAdditionalEgressEndpoints(
        List<EgressEndpoint> additionalEgressEndpoints) {
        this.additionalEgressEndpoints = additionalEgressEndpoints;
        return this;
    }

    /**
     * Get the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are
     * allowed for the egress traffic.
     *
     * @return the enableDefaultEgressEndpoints value.
     */
    public CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints() {
        return this.enableDefaultEgressEndpoints;
    }

    /**
     * Set the enableDefaultEgressEndpoints property: The indicator of whether the platform default endpoints are
     * allowed for the egress traffic.
     *
     * @param enableDefaultEgressEndpoints the enableDefaultEgressEndpoints value to set.
     * @return the CloudServicesNetworkPatchProperties object itself.
     */
    public CloudServicesNetworkPatchProperties withEnableDefaultEgressEndpoints(
        CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints) {
        this.enableDefaultEgressEndpoints = enableDefaultEgressEndpoints;
        return this;
    }

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