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

package com.azure.resourcemanager.cognitiveservices.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.HashMap;
import java.util.Map;

/** The api properties for special APIs. */
@Fluent
public final class ApiProperties {
    /*
     * (QnAMaker Only) The runtime endpoint of QnAMaker.
     */
    @JsonProperty(value = "qnaRuntimeEndpoint")
    private String qnaRuntimeEndpoint;

    /*
     * (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
     */
    @JsonProperty(value = "qnaAzureSearchEndpointKey")
    private String qnaAzureSearchEndpointKey;

    /*
     * (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
     */
    @JsonProperty(value = "qnaAzureSearchEndpointId")
    private String qnaAzureSearchEndpointId;

    /*
     * (Bing Search Only) The flag to enable statistics of Bing Search.
     */
    @JsonProperty(value = "statisticsEnabled")
    private Boolean statisticsEnabled;

    /*
     * (Personalization Only) The flag to enable statistics of Bing Search.
     */
    @JsonProperty(value = "eventHubConnectionString")
    private String eventHubConnectionString;

    /*
     * (Personalization Only) The storage account connection string.
     */
    @JsonProperty(value = "storageAccountConnectionString")
    private String storageAccountConnectionString;

    /*
     * (Metrics Advisor Only) The Azure AD Client Id (Application Id).
     */
    @JsonProperty(value = "aadClientId")
    private String aadClientId;

    /*
     * (Metrics Advisor Only) The Azure AD Tenant Id.
     */
    @JsonProperty(value = "aadTenantId")
    private String aadTenantId;

    /*
     * (Metrics Advisor Only) The super user of Metrics Advisor.
     */
    @JsonProperty(value = "superUser")
    private String superUser;

    /*
     * (Metrics Advisor Only) The website name of Metrics Advisor.
     */
    @JsonProperty(value = "websiteName")
    private String websiteName;

    /*
     * The api properties for special APIs.
     */
    @JsonIgnore private Map<String, Object> additionalProperties;

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

    /**
     * Get the qnaRuntimeEndpoint property: (QnAMaker Only) The runtime endpoint of QnAMaker.
     *
     * @return the qnaRuntimeEndpoint value.
     */
    public String qnaRuntimeEndpoint() {
        return this.qnaRuntimeEndpoint;
    }

    /**
     * Set the qnaRuntimeEndpoint property: (QnAMaker Only) The runtime endpoint of QnAMaker.
     *
     * @param qnaRuntimeEndpoint the qnaRuntimeEndpoint value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withQnaRuntimeEndpoint(String qnaRuntimeEndpoint) {
        this.qnaRuntimeEndpoint = qnaRuntimeEndpoint;
        return this;
    }

    /**
     * Get the qnaAzureSearchEndpointKey property: (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
     *
     * @return the qnaAzureSearchEndpointKey value.
     */
    public String qnaAzureSearchEndpointKey() {
        return this.qnaAzureSearchEndpointKey;
    }

    /**
     * Set the qnaAzureSearchEndpointKey property: (QnAMaker Only) The Azure Search endpoint key of QnAMaker.
     *
     * @param qnaAzureSearchEndpointKey the qnaAzureSearchEndpointKey value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withQnaAzureSearchEndpointKey(String qnaAzureSearchEndpointKey) {
        this.qnaAzureSearchEndpointKey = qnaAzureSearchEndpointKey;
        return this;
    }

    /**
     * Get the qnaAzureSearchEndpointId property: (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
     *
     * @return the qnaAzureSearchEndpointId value.
     */
    public String qnaAzureSearchEndpointId() {
        return this.qnaAzureSearchEndpointId;
    }

    /**
     * Set the qnaAzureSearchEndpointId property: (QnAMaker Only) The Azure Search endpoint id of QnAMaker.
     *
     * @param qnaAzureSearchEndpointId the qnaAzureSearchEndpointId value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withQnaAzureSearchEndpointId(String qnaAzureSearchEndpointId) {
        this.qnaAzureSearchEndpointId = qnaAzureSearchEndpointId;
        return this;
    }

    /**
     * Get the statisticsEnabled property: (Bing Search Only) The flag to enable statistics of Bing Search.
     *
     * @return the statisticsEnabled value.
     */
    public Boolean statisticsEnabled() {
        return this.statisticsEnabled;
    }

    /**
     * Set the statisticsEnabled property: (Bing Search Only) The flag to enable statistics of Bing Search.
     *
     * @param statisticsEnabled the statisticsEnabled value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withStatisticsEnabled(Boolean statisticsEnabled) {
        this.statisticsEnabled = statisticsEnabled;
        return this;
    }

    /**
     * Get the eventHubConnectionString property: (Personalization Only) The flag to enable statistics of Bing Search.
     *
     * @return the eventHubConnectionString value.
     */
    public String eventHubConnectionString() {
        return this.eventHubConnectionString;
    }

    /**
     * Set the eventHubConnectionString property: (Personalization Only) The flag to enable statistics of Bing Search.
     *
     * @param eventHubConnectionString the eventHubConnectionString value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withEventHubConnectionString(String eventHubConnectionString) {
        this.eventHubConnectionString = eventHubConnectionString;
        return this;
    }

    /**
     * Get the storageAccountConnectionString property: (Personalization Only) The storage account connection string.
     *
     * @return the storageAccountConnectionString value.
     */
    public String storageAccountConnectionString() {
        return this.storageAccountConnectionString;
    }

    /**
     * Set the storageAccountConnectionString property: (Personalization Only) The storage account connection string.
     *
     * @param storageAccountConnectionString the storageAccountConnectionString value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withStorageAccountConnectionString(String storageAccountConnectionString) {
        this.storageAccountConnectionString = storageAccountConnectionString;
        return this;
    }

    /**
     * Get the aadClientId property: (Metrics Advisor Only) The Azure AD Client Id (Application Id).
     *
     * @return the aadClientId value.
     */
    public String aadClientId() {
        return this.aadClientId;
    }

    /**
     * Set the aadClientId property: (Metrics Advisor Only) The Azure AD Client Id (Application Id).
     *
     * @param aadClientId the aadClientId value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withAadClientId(String aadClientId) {
        this.aadClientId = aadClientId;
        return this;
    }

    /**
     * Get the aadTenantId property: (Metrics Advisor Only) The Azure AD Tenant Id.
     *
     * @return the aadTenantId value.
     */
    public String aadTenantId() {
        return this.aadTenantId;
    }

    /**
     * Set the aadTenantId property: (Metrics Advisor Only) The Azure AD Tenant Id.
     *
     * @param aadTenantId the aadTenantId value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withAadTenantId(String aadTenantId) {
        this.aadTenantId = aadTenantId;
        return this;
    }

    /**
     * Get the superUser property: (Metrics Advisor Only) The super user of Metrics Advisor.
     *
     * @return the superUser value.
     */
    public String superUser() {
        return this.superUser;
    }

    /**
     * Set the superUser property: (Metrics Advisor Only) The super user of Metrics Advisor.
     *
     * @param superUser the superUser value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withSuperUser(String superUser) {
        this.superUser = superUser;
        return this;
    }

    /**
     * Get the websiteName property: (Metrics Advisor Only) The website name of Metrics Advisor.
     *
     * @return the websiteName value.
     */
    public String websiteName() {
        return this.websiteName;
    }

    /**
     * Set the websiteName property: (Metrics Advisor Only) The website name of Metrics Advisor.
     *
     * @param websiteName the websiteName value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withWebsiteName(String websiteName) {
        this.websiteName = websiteName;
        return this;
    }

    /**
     * Get the additionalProperties property: The api properties for special APIs.
     *
     * @return the additionalProperties value.
     */
    @JsonAnyGetter
    public Map<String, Object> additionalProperties() {
        return this.additionalProperties;
    }

    /**
     * Set the additionalProperties property: The api properties for special APIs.
     *
     * @param additionalProperties the additionalProperties value to set.
     * @return the ApiProperties object itself.
     */
    public ApiProperties withAdditionalProperties(Map<String, Object> additionalProperties) {
        this.additionalProperties = additionalProperties;
        return this;
    }

    @JsonAnySetter
    void withAdditionalProperties(String key, Object value) {
        if (additionalProperties == null) {
            additionalProperties = new HashMap<>();
        }
        additionalProperties.put(key, value);
    }

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