// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.networkcloud.fluent.models.CloudServicesNetworkPatchProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** CloudServicesNetworkPatchParameters represents the body of the request to patch the cloud services network. */
@Fluent
public final class CloudServicesNetworkPatchParameters {
    /*
     * CloudServicesNetworkPatchProperties represents the properties of the cloud services network that can be updated
     * using a patch request.
     *
     * The list of the resource properties.
     */
    @JsonProperty(value = "properties")
    private CloudServicesNetworkPatchProperties innerProperties;

    /*
     * The Azure resource tags that will replace the existing ones.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

    /**
     * Get the innerProperties property: CloudServicesNetworkPatchProperties represents the properties of the cloud
     * services network that can be updated using a patch request.
     *
     * <p>The list of the resource properties.
     *
     * @return the innerProperties value.
     */
    private CloudServicesNetworkPatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: The Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the CloudServicesNetworkPatchParameters object itself.
     */
    public CloudServicesNetworkPatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * 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.innerProperties() == null ? null : this.innerProperties().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 CloudServicesNetworkPatchParameters object itself.
     */
    public CloudServicesNetworkPatchParameters withAdditionalEgressEndpoints(
        List<EgressEndpoint> additionalEgressEndpoints) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CloudServicesNetworkPatchProperties();
        }
        this.innerProperties().withAdditionalEgressEndpoints(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.innerProperties() == null ? null : this.innerProperties().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 CloudServicesNetworkPatchParameters object itself.
     */
    public CloudServicesNetworkPatchParameters withEnableDefaultEgressEndpoints(
        CloudServicesNetworkEnableDefaultEgressEndpoints enableDefaultEgressEndpoints) {
        if (this.innerProperties() == null) {
            this.innerProperties = new CloudServicesNetworkPatchProperties();
        }
        this.innerProperties().withEnableDefaultEgressEndpoints(enableDefaultEgressEndpoints);
        return this;
    }

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