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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderUpdateContractProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Parameters supplied to the Update OpenID Connect Provider operation. */
@Fluent
public final class OpenidConnectProviderUpdateContract {
    /*
     * OpenId Connect Provider Update contract properties.
     */
    @JsonProperty(value = "properties")
    private OpenidConnectProviderUpdateContractProperties innerProperties;

    /**
     * Get the innerProperties property: OpenId Connect Provider Update contract properties.
     *
     * @return the innerProperties value.
     */
    private OpenidConnectProviderUpdateContractProperties 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 OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        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 OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        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 OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withMetadataEndpoint(String metadataEndpoint) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        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 OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withClientId(String clientId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        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 OpenidConnectProviderUpdateContract object itself.
     */
    public OpenidConnectProviderUpdateContract withClientSecret(String clientSecret) {
        if (this.innerProperties() == null) {
            this.innerProperties = new OpenidConnectProviderUpdateContractProperties();
        }
        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();
        }
    }
}
