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

package com.azure.resourcemanager.deviceupdate.models;

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

/** Private link service proxy details. */
@Fluent
public final class PrivateLinkServiceProxy {
    /*
     * NRP resource ID.
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * Remote private link service connection state
     */
    @JsonProperty(value = "remotePrivateLinkServiceConnectionState")
    private PrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState;

    /*
     * Remote private endpoint connection details.
     */
    @JsonProperty(value = "remotePrivateEndpointConnection")
    private PrivateLinkServiceProxyRemotePrivateEndpointConnection remotePrivateEndpointConnection;

    /*
     * Group connectivity information.
     */
    @JsonProperty(value = "groupConnectivityInformation")
    private List<GroupConnectivityInformation> groupConnectivityInformation;

    /**
     * Get the id property: NRP resource ID.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: NRP resource ID.
     *
     * @param id the id value to set.
     * @return the PrivateLinkServiceProxy object itself.
     */
    public PrivateLinkServiceProxy withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the remotePrivateLinkServiceConnectionState property: Remote private link service connection state.
     *
     * @return the remotePrivateLinkServiceConnectionState value.
     */
    public PrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState() {
        return this.remotePrivateLinkServiceConnectionState;
    }

    /**
     * Set the remotePrivateLinkServiceConnectionState property: Remote private link service connection state.
     *
     * @param remotePrivateLinkServiceConnectionState the remotePrivateLinkServiceConnectionState value to set.
     * @return the PrivateLinkServiceProxy object itself.
     */
    public PrivateLinkServiceProxy withRemotePrivateLinkServiceConnectionState(
        PrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState) {
        this.remotePrivateLinkServiceConnectionState = remotePrivateLinkServiceConnectionState;
        return this;
    }

    /**
     * Get the remotePrivateEndpointConnection property: Remote private endpoint connection details.
     *
     * @return the remotePrivateEndpointConnection value.
     */
    public PrivateLinkServiceProxyRemotePrivateEndpointConnection remotePrivateEndpointConnection() {
        return this.remotePrivateEndpointConnection;
    }

    /**
     * Set the remotePrivateEndpointConnection property: Remote private endpoint connection details.
     *
     * @param remotePrivateEndpointConnection the remotePrivateEndpointConnection value to set.
     * @return the PrivateLinkServiceProxy object itself.
     */
    public PrivateLinkServiceProxy withRemotePrivateEndpointConnection(
        PrivateLinkServiceProxyRemotePrivateEndpointConnection remotePrivateEndpointConnection) {
        this.remotePrivateEndpointConnection = remotePrivateEndpointConnection;
        return this;
    }

    /**
     * Get the groupConnectivityInformation property: Group connectivity information.
     *
     * @return the groupConnectivityInformation value.
     */
    public List<GroupConnectivityInformation> groupConnectivityInformation() {
        return this.groupConnectivityInformation;
    }

    /**
     * Set the groupConnectivityInformation property: Group connectivity information.
     *
     * @param groupConnectivityInformation the groupConnectivityInformation value to set.
     * @return the PrivateLinkServiceProxy object itself.
     */
    public PrivateLinkServiceProxy withGroupConnectivityInformation(
        List<GroupConnectivityInformation> groupConnectivityInformation) {
        this.groupConnectivityInformation = groupConnectivityInformation;
        return this;
    }

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