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

/** Xero Service linked service. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("Xero")
@JsonFlatten
@Fluent
public class XeroLinkedService extends LinkedService {
    /*
     * Properties used to connect to Xero. It is mutually exclusive with any other properties in the linked service.
     * Type: object.
     */
    @JsonProperty(value = "typeProperties.connectionProperties")
    private Object connectionProperties;

    /*
     * The endpoint of the Xero server. (i.e. api.xero.com)
     */
    @JsonProperty(value = "typeProperties.host", required = true)
    private Object host;

    /*
     * The consumer key associated with the Xero application.
     */
    @JsonProperty(value = "typeProperties.consumerKey")
    private SecretBase consumerKey;

    /*
     * The private key from the .pem file that was generated for your Xero private application. You must include all
     * the text from the .pem file, including the Unix line endings(
     * ).
     */
    @JsonProperty(value = "typeProperties.privateKey")
    private SecretBase privateKey;

    /*
     * Specifies whether the data source endpoints are encrypted using HTTPS. The default value is true.
     */
    @JsonProperty(value = "typeProperties.useEncryptedEndpoints")
    private Object useEncryptedEndpoints;

    /*
     * Specifies whether to require the host name in the server's certificate to match the host name of the server when
     * connecting over SSL. The default value is true.
     */
    @JsonProperty(value = "typeProperties.useHostVerification")
    private Object useHostVerification;

    /*
     * Specifies whether to verify the identity of the server when connecting over SSL. The default value is true.
     */
    @JsonProperty(value = "typeProperties.usePeerVerification")
    private Object usePeerVerification;

    /*
     * 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 XeroLinkedService class. */
    public XeroLinkedService() {}

    /**
     * Get the connectionProperties property: Properties used to connect to Xero. It is mutually exclusive with any
     * other properties in the linked service. Type: object.
     *
     * @return the connectionProperties value.
     */
    public Object getConnectionProperties() {
        return this.connectionProperties;
    }

    /**
     * Set the connectionProperties property: Properties used to connect to Xero. It is mutually exclusive with any
     * other properties in the linked service. Type: object.
     *
     * @param connectionProperties the connectionProperties value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setConnectionProperties(Object connectionProperties) {
        this.connectionProperties = connectionProperties;
        return this;
    }

    /**
     * Get the host property: The endpoint of the Xero server. (i.e. api.xero.com).
     *
     * @return the host value.
     */
    public Object getHost() {
        return this.host;
    }

    /**
     * Set the host property: The endpoint of the Xero server. (i.e. api.xero.com).
     *
     * @param host the host value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setHost(Object host) {
        this.host = host;
        return this;
    }

    /**
     * Get the consumerKey property: The consumer key associated with the Xero application.
     *
     * @return the consumerKey value.
     */
    public SecretBase getConsumerKey() {
        return this.consumerKey;
    }

    /**
     * Set the consumerKey property: The consumer key associated with the Xero application.
     *
     * @param consumerKey the consumerKey value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setConsumerKey(SecretBase consumerKey) {
        this.consumerKey = consumerKey;
        return this;
    }

    /**
     * Get the privateKey property: The private key from the .pem file that was generated for your Xero private
     * application. You must include all the text from the .pem file, including the Unix line endings( ).
     *
     * @return the privateKey value.
     */
    public SecretBase getPrivateKey() {
        return this.privateKey;
    }

    /**
     * Set the privateKey property: The private key from the .pem file that was generated for your Xero private
     * application. You must include all the text from the .pem file, including the Unix line endings( ).
     *
     * @param privateKey the privateKey value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setPrivateKey(SecretBase privateKey) {
        this.privateKey = privateKey;
        return this;
    }

    /**
     * Get the useEncryptedEndpoints property: Specifies whether the data source endpoints are encrypted using HTTPS.
     * The default value is true.
     *
     * @return the useEncryptedEndpoints value.
     */
    public Object getUseEncryptedEndpoints() {
        return this.useEncryptedEndpoints;
    }

    /**
     * Set the useEncryptedEndpoints property: Specifies whether the data source endpoints are encrypted using HTTPS.
     * The default value is true.
     *
     * @param useEncryptedEndpoints the useEncryptedEndpoints value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setUseEncryptedEndpoints(Object useEncryptedEndpoints) {
        this.useEncryptedEndpoints = useEncryptedEndpoints;
        return this;
    }

    /**
     * Get the useHostVerification property: Specifies whether to require the host name in the server's certificate to
     * match the host name of the server when connecting over SSL. The default value is true.
     *
     * @return the useHostVerification value.
     */
    public Object getUseHostVerification() {
        return this.useHostVerification;
    }

    /**
     * Set the useHostVerification property: Specifies whether to require the host name in the server's certificate to
     * match the host name of the server when connecting over SSL. The default value is true.
     *
     * @param useHostVerification the useHostVerification value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setUseHostVerification(Object useHostVerification) {
        this.useHostVerification = useHostVerification;
        return this;
    }

    /**
     * Get the usePeerVerification property: Specifies whether to verify the identity of the server when connecting over
     * SSL. The default value is true.
     *
     * @return the usePeerVerification value.
     */
    public Object getUsePeerVerification() {
        return this.usePeerVerification;
    }

    /**
     * Set the usePeerVerification property: Specifies whether to verify the identity of the server when connecting over
     * SSL. The default value is true.
     *
     * @param usePeerVerification the usePeerVerification value to set.
     * @return the XeroLinkedService object itself.
     */
    public XeroLinkedService setUsePeerVerification(Object usePeerVerification) {
        this.usePeerVerification = usePeerVerification;
        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 XeroLinkedService object itself.
     */
    public XeroLinkedService setEncryptedCredential(Object encryptedCredential) {
        this.encryptedCredential = encryptedCredential;
        return this;
    }

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

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

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

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