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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.streamanalytics.models.PrivateLinkServiceConnection;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The properties associated with a private endpoint. */
@Fluent
public final class PrivateEndpointProperties {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointProperties.class);

    /*
     * The date when this private endpoint was created.
     */
    @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY)
    private String createdDate;

    /*
     * A list of connections to the remote resource. Immutable after it is set.
     */
    @JsonProperty(value = "manualPrivateLinkServiceConnections")
    private List<PrivateLinkServiceConnection> manualPrivateLinkServiceConnections;

    /**
     * Get the createdDate property: The date when this private endpoint was created.
     *
     * @return the createdDate value.
     */
    public String createdDate() {
        return this.createdDate;
    }

    /**
     * Get the manualPrivateLinkServiceConnections property: A list of connections to the remote resource. Immutable
     * after it is set.
     *
     * @return the manualPrivateLinkServiceConnections value.
     */
    public List<PrivateLinkServiceConnection> manualPrivateLinkServiceConnections() {
        return this.manualPrivateLinkServiceConnections;
    }

    /**
     * Set the manualPrivateLinkServiceConnections property: A list of connections to the remote resource. Immutable
     * after it is set.
     *
     * @param manualPrivateLinkServiceConnections the manualPrivateLinkServiceConnections value to set.
     * @return the PrivateEndpointProperties object itself.
     */
    public PrivateEndpointProperties withManualPrivateLinkServiceConnections(
        List<PrivateLinkServiceConnection> manualPrivateLinkServiceConnections) {
        this.manualPrivateLinkServiceConnections = manualPrivateLinkServiceConnections;
        return this;
    }

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