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

package com.azure.resourcemanager.recoveryservices.models;

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

/** Private Endpoint Connection Response Properties. */
@Fluent
public final class PrivateEndpointConnection {
    /*
     * Gets or sets provisioning state of the private endpoint connection.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /*
     * The Private Endpoint network resource that is linked to the Private Endpoint connection.
     */
    @JsonProperty(value = "privateEndpoint", access = JsonProperty.Access.WRITE_ONLY)
    private PrivateEndpoint privateEndpoint;

    /*
     * Gets or sets private link service connection state.
     */
    @JsonProperty(value = "privateLinkServiceConnectionState", access = JsonProperty.Access.WRITE_ONLY)
    private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;

    /*
     * Group Ids for the Private Endpoint
     */
    @JsonProperty(value = "groupIds")
    private List<VaultSubResourceType> groupIds;

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

    /**
     * Get the provisioningState property: Gets or sets provisioning state of the private endpoint connection.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the privateEndpoint property: The Private Endpoint network resource that is linked to the Private Endpoint
     * connection.
     *
     * @return the privateEndpoint value.
     */
    public PrivateEndpoint privateEndpoint() {
        return this.privateEndpoint;
    }

    /**
     * Get the privateLinkServiceConnectionState property: Gets or sets private link service connection state.
     *
     * @return the privateLinkServiceConnectionState value.
     */
    public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
        return this.privateLinkServiceConnectionState;
    }

    /**
     * Get the groupIds property: Group Ids for the Private Endpoint.
     *
     * @return the groupIds value.
     */
    public List<VaultSubResourceType> groupIds() {
        return this.groupIds;
    }

    /**
     * Set the groupIds property: Group Ids for the Private Endpoint.
     *
     * @param groupIds the groupIds value to set.
     * @return the PrivateEndpointConnection object itself.
     */
    public PrivateEndpointConnection withGroupIds(List<VaultSubResourceType> groupIds) {
        this.groupIds = groupIds;
        return this;
    }

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