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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.webpubsub.models.ProvisioningState;
import com.azure.resourcemanager.webpubsub.models.SharedPrivateLinkResourceStatus;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes a Shared Private Link Resource. */
@Fluent
public final class SharedPrivateLinkResourceInner extends ProxyResource {
    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Describes the properties of an existing Shared Private Link Resource
     */
    @JsonProperty(value = "properties")
    private SharedPrivateLinkResourceProperties innerProperties;

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

    /**
     * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the innerProperties property: Describes the properties of an existing Shared Private Link Resource.
     *
     * @return the innerProperties value.
     */
    private SharedPrivateLinkResourceProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the groupId property: The group id from the provider of resource the shared private link resource is for.
     *
     * @return the groupId value.
     */
    public String groupId() {
        return this.innerProperties() == null ? null : this.innerProperties().groupId();
    }

    /**
     * Set the groupId property: The group id from the provider of resource the shared private link resource is for.
     *
     * @param groupId the groupId value to set.
     * @return the SharedPrivateLinkResourceInner object itself.
     */
    public SharedPrivateLinkResourceInner withGroupId(String groupId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SharedPrivateLinkResourceProperties();
        }
        this.innerProperties().withGroupId(groupId);
        return this;
    }

    /**
     * Get the privateLinkResourceId property: The resource id of the resource the shared private link resource is for.
     *
     * @return the privateLinkResourceId value.
     */
    public String privateLinkResourceId() {
        return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId();
    }

    /**
     * Set the privateLinkResourceId property: The resource id of the resource the shared private link resource is for.
     *
     * @param privateLinkResourceId the privateLinkResourceId value to set.
     * @return the SharedPrivateLinkResourceInner object itself.
     */
    public SharedPrivateLinkResourceInner withPrivateLinkResourceId(String privateLinkResourceId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SharedPrivateLinkResourceProperties();
        }
        this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the requestMessage property: The request message for requesting approval of the shared private link resource.
     *
     * @return the requestMessage value.
     */
    public String requestMessage() {
        return this.innerProperties() == null ? null : this.innerProperties().requestMessage();
    }

    /**
     * Set the requestMessage property: The request message for requesting approval of the shared private link resource.
     *
     * @param requestMessage the requestMessage value to set.
     * @return the SharedPrivateLinkResourceInner object itself.
     */
    public SharedPrivateLinkResourceInner withRequestMessage(String requestMessage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SharedPrivateLinkResourceProperties();
        }
        this.innerProperties().withRequestMessage(requestMessage);
        return this;
    }

    /**
     * Get the status property: Status of the shared private link resource.
     *
     * @return the status value.
     */
    public SharedPrivateLinkResourceStatus status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

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