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

package com.azure.resourcemanager.notificationhubs.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.notificationhubs.fluent.models.AdmCredentialProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Description of a NotificationHub AdmCredential. */
@Fluent
public final class AdmCredential {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(AdmCredential.class);

    /*
     * Properties of NotificationHub AdmCredential.
     */
    @JsonProperty(value = "properties")
    private AdmCredentialProperties innerProperties;

    /**
     * Get the innerProperties property: Properties of NotificationHub AdmCredential.
     *
     * @return the innerProperties value.
     */
    private AdmCredentialProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the clientId property: The client identifier.
     *
     * @return the clientId value.
     */
    public String clientId() {
        return this.innerProperties() == null ? null : this.innerProperties().clientId();
    }

    /**
     * Set the clientId property: The client identifier.
     *
     * @param clientId the clientId value to set.
     * @return the AdmCredential object itself.
     */
    public AdmCredential withClientId(String clientId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AdmCredentialProperties();
        }
        this.innerProperties().withClientId(clientId);
        return this;
    }

    /**
     * Get the clientSecret property: The credential secret access key.
     *
     * @return the clientSecret value.
     */
    public String clientSecret() {
        return this.innerProperties() == null ? null : this.innerProperties().clientSecret();
    }

    /**
     * Set the clientSecret property: The credential secret access key.
     *
     * @param clientSecret the clientSecret value to set.
     * @return the AdmCredential object itself.
     */
    public AdmCredential withClientSecret(String clientSecret) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AdmCredentialProperties();
        }
        this.innerProperties().withClientSecret(clientSecret);
        return this;
    }

    /**
     * Get the authTokenUrl property: The URL of the authorization token.
     *
     * @return the authTokenUrl value.
     */
    public String authTokenUrl() {
        return this.innerProperties() == null ? null : this.innerProperties().authTokenUrl();
    }

    /**
     * Set the authTokenUrl property: The URL of the authorization token.
     *
     * @param authTokenUrl the authTokenUrl value to set.
     * @return the AdmCredential object itself.
     */
    public AdmCredential withAuthTokenUrl(String authTokenUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AdmCredentialProperties();
        }
        this.innerProperties().withAuthTokenUrl(authTokenUrl);
        return this;
    }

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