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

package com.azure.analytics.synapse.artifacts.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
import java.util.Map;

/** Linked service for Zendesk. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Zendesk")
@JsonFlatten
@Fluent
public class ZendeskLinkedService extends LinkedService {
    /*
     * The authentication type to use.
     */
    @JsonProperty(value = "typeProperties.authenticationType", required = true)
    private ZendeskAuthenticationType authenticationType;

    /*
     * The url to connect Zendesk source. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.url", required = true)
    private Object url;

    /*
     * The username of the Zendesk source. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.userName")
    private Object userName;

    /*
     * The password of the Zendesk source.
     */
    @JsonProperty(value = "typeProperties.password")
    private SecretBase password;

    /*
     * The api token for the Zendesk source.
     */
    @JsonProperty(value = "typeProperties.apiToken")
    private SecretBase apiToken;

    /*
     * The encrypted credential used for authentication. Credentials are encrypted using the integration runtime
     * credential manager. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.encryptedCredential")
    private Object encryptedCredential;

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

    /**
     * Get the authenticationType property: The authentication type to use.
     *
     * @return the authenticationType value.
     */
    public ZendeskAuthenticationType getAuthenticationType() {
        return this.authenticationType;
    }

    /**
     * Set the authenticationType property: The authentication type to use.
     *
     * @param authenticationType the authenticationType value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setAuthenticationType(ZendeskAuthenticationType authenticationType) {
        this.authenticationType = authenticationType;
        return this;
    }

    /**
     * Get the url property: The url to connect Zendesk source. Type: string (or Expression with resultType string).
     *
     * @return the url value.
     */
    public Object getUrl() {
        return this.url;
    }

    /**
     * Set the url property: The url to connect Zendesk source. Type: string (or Expression with resultType string).
     *
     * @param url the url value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setUrl(Object url) {
        this.url = url;
        return this;
    }

    /**
     * Get the userName property: The username of the Zendesk source. Type: string (or Expression with resultType
     * string).
     *
     * @return the userName value.
     */
    public Object getUserName() {
        return this.userName;
    }

    /**
     * Set the userName property: The username of the Zendesk source. Type: string (or Expression with resultType
     * string).
     *
     * @param userName the userName value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setUserName(Object userName) {
        this.userName = userName;
        return this;
    }

    /**
     * Get the password property: The password of the Zendesk source.
     *
     * @return the password value.
     */
    public SecretBase getPassword() {
        return this.password;
    }

    /**
     * Set the password property: The password of the Zendesk source.
     *
     * @param password the password value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setPassword(SecretBase password) {
        this.password = password;
        return this;
    }

    /**
     * Get the apiToken property: The api token for the Zendesk source.
     *
     * @return the apiToken value.
     */
    public SecretBase getApiToken() {
        return this.apiToken;
    }

    /**
     * Set the apiToken property: The api token for the Zendesk source.
     *
     * @param apiToken the apiToken value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setApiToken(SecretBase apiToken) {
        this.apiToken = apiToken;
        return this;
    }

    /**
     * Get the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
     * using the integration runtime credential manager. Type: string (or Expression with resultType string).
     *
     * @return the encryptedCredential value.
     */
    public Object getEncryptedCredential() {
        return this.encryptedCredential;
    }

    /**
     * Set the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
     * using the integration runtime credential manager. Type: string (or Expression with resultType string).
     *
     * @param encryptedCredential the encryptedCredential value to set.
     * @return the ZendeskLinkedService object itself.
     */
    public ZendeskLinkedService setEncryptedCredential(Object encryptedCredential) {
        this.encryptedCredential = encryptedCredential;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ZendeskLinkedService setConnectVia(IntegrationRuntimeReference connectVia) {
        super.setConnectVia(connectVia);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ZendeskLinkedService setDescription(String description) {
        super.setDescription(description);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ZendeskLinkedService setParameters(Map<String, ParameterSpecification> parameters) {
        super.setParameters(parameters);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ZendeskLinkedService setAnnotations(List<Object> annotations) {
        super.setAnnotations(annotations);
        return this;
    }
}
