// 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.BaiduCredentialProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

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

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

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

    /**
     * Get the baiduApiKey property: Baidu Api Key.
     *
     * @return the baiduApiKey value.
     */
    public String baiduApiKey() {
        return this.innerProperties() == null ? null : this.innerProperties().baiduApiKey();
    }

    /**
     * Set the baiduApiKey property: Baidu Api Key.
     *
     * @param baiduApiKey the baiduApiKey value to set.
     * @return the BaiduCredential object itself.
     */
    public BaiduCredential withBaiduApiKey(String baiduApiKey) {
        if (this.innerProperties() == null) {
            this.innerProperties = new BaiduCredentialProperties();
        }
        this.innerProperties().withBaiduApiKey(baiduApiKey);
        return this;
    }

    /**
     * Get the baiduEndPoint property: Baidu Endpoint.
     *
     * @return the baiduEndPoint value.
     */
    public String baiduEndPoint() {
        return this.innerProperties() == null ? null : this.innerProperties().baiduEndPoint();
    }

    /**
     * Set the baiduEndPoint property: Baidu Endpoint.
     *
     * @param baiduEndPoint the baiduEndPoint value to set.
     * @return the BaiduCredential object itself.
     */
    public BaiduCredential withBaiduEndPoint(String baiduEndPoint) {
        if (this.innerProperties() == null) {
            this.innerProperties = new BaiduCredentialProperties();
        }
        this.innerProperties().withBaiduEndPoint(baiduEndPoint);
        return this;
    }

    /**
     * Get the baiduSecretKey property: Baidu Secret Key.
     *
     * @return the baiduSecretKey value.
     */
    public String baiduSecretKey() {
        return this.innerProperties() == null ? null : this.innerProperties().baiduSecretKey();
    }

    /**
     * Set the baiduSecretKey property: Baidu Secret Key.
     *
     * @param baiduSecretKey the baiduSecretKey value to set.
     * @return the BaiduCredential object itself.
     */
    public BaiduCredential withBaiduSecretKey(String baiduSecretKey) {
        if (this.innerProperties() == null) {
            this.innerProperties = new BaiduCredentialProperties();
        }
        this.innerProperties().withBaiduSecretKey(baiduSecretKey);
        return this;
    }

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