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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The SharedPrivateLinkResource model. */
@JsonFlatten
@Fluent
public class SharedPrivateLinkResource {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResource.class);

    /*
     * Unique name of the private link.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * The resource id that private link links to.
     */
    @JsonProperty(value = "properties.privateLinkResourceId")
    private String privateLinkResourceId;

    /*
     * The private link resource group id.
     */
    @JsonProperty(value = "properties.groupId")
    private String groupId;

    /*
     * Request message.
     */
    @JsonProperty(value = "properties.requestMessage")
    private String requestMessage;

    /*
     * Indicates whether the connection has been Approved/Rejected/Removed by
     * the owner of the service.
     */
    @JsonProperty(value = "properties.status")
    private PrivateEndpointServiceConnectionStatus status;

    /**
     * Get the name property: Unique name of the private link.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Unique name of the private link.
     *
     * @param name the name value to set.
     * @return the SharedPrivateLinkResource object itself.
     */
    public SharedPrivateLinkResource withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the privateLinkResourceId property: The resource id that private link links to.
     *
     * @return the privateLinkResourceId value.
     */
    public String privateLinkResourceId() {
        return this.privateLinkResourceId;
    }

    /**
     * Set the privateLinkResourceId property: The resource id that private link links to.
     *
     * @param privateLinkResourceId the privateLinkResourceId value to set.
     * @return the SharedPrivateLinkResource object itself.
     */
    public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) {
        this.privateLinkResourceId = privateLinkResourceId;
        return this;
    }

    /**
     * Get the groupId property: The private link resource group id.
     *
     * @return the groupId value.
     */
    public String groupId() {
        return this.groupId;
    }

    /**
     * Set the groupId property: The private link resource group id.
     *
     * @param groupId the groupId value to set.
     * @return the SharedPrivateLinkResource object itself.
     */
    public SharedPrivateLinkResource withGroupId(String groupId) {
        this.groupId = groupId;
        return this;
    }

    /**
     * Get the requestMessage property: Request message.
     *
     * @return the requestMessage value.
     */
    public String requestMessage() {
        return this.requestMessage;
    }

    /**
     * Set the requestMessage property: Request message.
     *
     * @param requestMessage the requestMessage value to set.
     * @return the SharedPrivateLinkResource object itself.
     */
    public SharedPrivateLinkResource withRequestMessage(String requestMessage) {
        this.requestMessage = requestMessage;
        return this;
    }

    /**
     * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
     * service.
     *
     * @return the status value.
     */
    public PrivateEndpointServiceConnectionStatus status() {
        return this.status;
    }

    /**
     * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
     * service.
     *
     * @param status the status value to set.
     * @return the SharedPrivateLinkResource object itself.
     */
    public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStatus status) {
        this.status = status;
        return this;
    }

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