// 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.management.ProxyResource;
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;

/** Complete information about the private endpoint. */
@Fluent
public final class PrivateEndpointInner extends ProxyResource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointInner.class);

    /*
     * The properties associated with a private endpoint.
     */
    @JsonProperty(value = "properties")
    private PrivateEndpointProperties innerProperties;

    /*
     * Unique opaque string (generally a GUID) that represents the metadata
     * state of the resource (private endpoint) and changes whenever the
     * resource is updated. Required on PUT (CreateOrUpdate) requests.
     */
    @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
    private String etag;

    /**
     * Get the innerProperties property: The properties associated with a private endpoint.
     *
     * @return the innerProperties value.
     */
    private PrivateEndpointProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the etag property: Unique opaque string (generally a GUID) that represents the metadata state of the resource
     * (private endpoint) and changes whenever the resource is updated. Required on PUT (CreateOrUpdate) requests.
     *
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Get the createdDate property: The date when this private endpoint was created.
     *
     * @return the createdDate value.
     */
    public String createdDate() {
        return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().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 PrivateEndpointInner object itself.
     */
    public PrivateEndpointInner withManualPrivateLinkServiceConnections(
        List<PrivateLinkServiceConnection> manualPrivateLinkServiceConnections) {
        if (this.innerProperties() == null) {
            this.innerProperties = new PrivateEndpointProperties();
        }
        this.innerProperties().withManualPrivateLinkServiceConnections(manualPrivateLinkServiceConnections);
        return this;
    }

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