// 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.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes a resource type that has been onboarded to private link service. */
@Fluent
public final class ShareablePrivateLinkResourceType {
    /*
     * The name of the resource type that has been onboarded to private link service
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Describes the properties of a resource type that has been onboarded to private link service
     */
    @JsonProperty(value = "properties")
    private ShareablePrivateLinkResourceProperties properties;

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

    /**
     * Get the name property: The name of the resource type that has been onboarded to private link service.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name of the resource type that has been onboarded to private link service.
     *
     * @param name the name value to set.
     * @return the ShareablePrivateLinkResourceType object itself.
     */
    public ShareablePrivateLinkResourceType withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the properties property: Describes the properties of a resource type that has been onboarded to private link
     * service.
     *
     * @return the properties value.
     */
    public ShareablePrivateLinkResourceProperties properties() {
        return this.properties;
    }

    /**
     * Set the properties property: Describes the properties of a resource type that has been onboarded to private link
     * service.
     *
     * @param properties the properties value to set.
     * @return the ShareablePrivateLinkResourceType object itself.
     */
    public ShareablePrivateLinkResourceType withProperties(ShareablePrivateLinkResourceProperties properties) {
        this.properties = properties;
        return this;
    }

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