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

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

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

/** OpenId Connect Provider details. */
@Fluent
public final class OpenidConnectProviderContractInner extends ProxyResource {
    /*
     * OpenId Connect Provider contract properties.
     */
    @JsonProperty(value = "properties")
    private OpenidConnectProviderContractProperties innerProperties;

    /**
     * Get the innerProperties property: OpenId Connect Provider contract properties.
     *
     * @return the innerProperties value.
     */
    private OpenidConnectProviderContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: User-friendly OpenID Connect Provider name.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: User-friendly OpenID Connect Provider name.
     *
     * @param displayName the displayName value to set.
     * @return the OpenidConnectProviderContractInner object itself.
     */
    public OpenidConnectProviderContractInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderContractProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the description property: User-friendly description of OpenID Connect Provider.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: User-friendly description of OpenID Connect Provider.
     *
     * @param description the description value to set.
     * @return the OpenidConnectProviderContractInner object itself.
     */
    public OpenidConnectProviderContractInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderContractProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the metadataEndpoint property: Metadata endpoint URI.
     *
     * @return the metadataEndpoint value.
     */
    public String metadataEndpoint() {
        return this.innerProperties() == null ? null : this.innerProperties().metadataEndpoint();
    }

    /**
     * Set the metadataEndpoint property: Metadata endpoint URI.
     *
     * @param metadataEndpoint the metadataEndpoint value to set.
     * @return the OpenidConnectProviderContractInner object itself.
     */
    public OpenidConnectProviderContractInner withMetadataEndpoint(String metadataEndpoint) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderContractProperties();
        }
        this.innerProperties().withMetadataEndpoint(metadataEndpoint);
        return this;
    }

    /**
     * Get the clientId property: Client ID of developer console which is the client application.
     *
     * @return the clientId value.
     */
    public String clientId() {
        return this.innerProperties() == null ? null : this.innerProperties().clientId();
    }

    /**
     * Set the clientId property: Client ID of developer console which is the client application.
     *
     * @param clientId the clientId value to set.
     * @return the OpenidConnectProviderContractInner object itself.
     */
    public OpenidConnectProviderContractInner withClientId(String clientId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderContractProperties();
        }
        this.innerProperties().withClientId(clientId);
        return this;
    }

    /**
     * Get the clientSecret property: Client Secret of developer console which is the client application.
     *
     * @return the clientSecret value.
     */
    public String clientSecret() {
        return this.innerProperties() == null ? null : this.innerProperties().clientSecret();
    }

    /**
     * Set the clientSecret property: Client Secret of developer console which is the client application.
     *
     * @param clientSecret the clientSecret value to set.
     * @return the OpenidConnectProviderContractInner object itself.
     */
    public OpenidConnectProviderContractInner withClientSecret(String clientSecret) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderContractProperties();
        }
        this.innerProperties().withClientSecret(clientSecret);
        return this;
    }

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