// 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 an HTTP source. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("HttpServer")
@JsonFlatten
@Fluent
public class HttpLinkedService extends LinkedService {
    /*
     * The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or Expression with resultType
     * string).
     */
    @JsonProperty(value = "typeProperties.url", required = true)
    private Object url;

    /*
     * The authentication type to be used to connect to the HTTP server.
     */
    @JsonProperty(value = "typeProperties.authenticationType")
    private HttpAuthenticationType authenticationType;

    /*
     * User name for Basic, Digest, or Windows authentication. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.userName")
    private Object userName;

    /*
     * Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData authentication.
     */
    @JsonProperty(value = "typeProperties.password")
    private SecretBase password;

    /*
     * Base64 encoded certificate data for ClientCertificate authentication. For on-premises copy with
     * ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be specified. Type:
     * string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.embeddedCertData")
    private Object embeddedCertData;

    /*
     * Thumbprint of certificate for ClientCertificate authentication. Only valid for on-premises copy. For on-premises
     * copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should be
     * specified. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "typeProperties.certThumbprint")
    private Object certThumbprint;

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

    /*
     * If true, validate the HTTPS server SSL certificate. Default value is true. Type: boolean (or Expression with
     * resultType boolean).
     */
    @JsonProperty(value = "typeProperties.enableServerCertificateValidation")
    private Object enableServerCertificateValidation;

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

    /**
     * Get the url property: The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or
     * Expression with resultType string).
     *
     * @return the url value.
     */
    public Object getUrl() {
        return this.url;
    }

    /**
     * Set the url property: The base URL of the HTTP endpoint, e.g. http://www.microsoft.com. Type: string (or
     * Expression with resultType string).
     *
     * @param url the url value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setUrl(Object url) {
        this.url = url;
        return this;
    }

    /**
     * Get the authenticationType property: The authentication type to be used to connect to the HTTP server.
     *
     * @return the authenticationType value.
     */
    public HttpAuthenticationType getAuthenticationType() {
        return this.authenticationType;
    }

    /**
     * Set the authenticationType property: The authentication type to be used to connect to the HTTP server.
     *
     * @param authenticationType the authenticationType value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setAuthenticationType(HttpAuthenticationType authenticationType) {
        this.authenticationType = authenticationType;
        return this;
    }

    /**
     * Get the userName property: User name for Basic, Digest, or Windows authentication. Type: string (or Expression
     * with resultType string).
     *
     * @return the userName value.
     */
    public Object getUserName() {
        return this.userName;
    }

    /**
     * Set the userName property: User name for Basic, Digest, or Windows authentication. Type: string (or Expression
     * with resultType string).
     *
     * @param userName the userName value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setUserName(Object userName) {
        this.userName = userName;
        return this;
    }

    /**
     * Get the password property: Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData
     * authentication.
     *
     * @return the password value.
     */
    public SecretBase getPassword() {
        return this.password;
    }

    /**
     * Set the password property: Password for Basic, Digest, Windows, or ClientCertificate with EmbeddedCertData
     * authentication.
     *
     * @param password the password value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setPassword(SecretBase password) {
        this.password = password;
        return this;
    }

    /**
     * Get the embeddedCertData property: Base64 encoded certificate data for ClientCertificate authentication. For
     * on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should
     * be specified. Type: string (or Expression with resultType string).
     *
     * @return the embeddedCertData value.
     */
    public Object getEmbeddedCertData() {
        return this.embeddedCertData;
    }

    /**
     * Set the embeddedCertData property: Base64 encoded certificate data for ClientCertificate authentication. For
     * on-premises copy with ClientCertificate authentication, either CertThumbprint or EmbeddedCertData/Password should
     * be specified. Type: string (or Expression with resultType string).
     *
     * @param embeddedCertData the embeddedCertData value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setEmbeddedCertData(Object embeddedCertData) {
        this.embeddedCertData = embeddedCertData;
        return this;
    }

    /**
     * Get the certThumbprint property: Thumbprint of certificate for ClientCertificate authentication. Only valid for
     * on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or
     * EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string).
     *
     * @return the certThumbprint value.
     */
    public Object getCertThumbprint() {
        return this.certThumbprint;
    }

    /**
     * Set the certThumbprint property: Thumbprint of certificate for ClientCertificate authentication. Only valid for
     * on-premises copy. For on-premises copy with ClientCertificate authentication, either CertThumbprint or
     * EmbeddedCertData/Password should be specified. Type: string (or Expression with resultType string).
     *
     * @param certThumbprint the certThumbprint value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setCertThumbprint(Object certThumbprint) {
        this.certThumbprint = certThumbprint;
        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 HttpLinkedService object itself.
     */
    public HttpLinkedService setEncryptedCredential(Object encryptedCredential) {
        this.encryptedCredential = encryptedCredential;
        return this;
    }

    /**
     * Get the enableServerCertificateValidation property: If true, validate the HTTPS server SSL certificate. Default
     * value is true. Type: boolean (or Expression with resultType boolean).
     *
     * @return the enableServerCertificateValidation value.
     */
    public Object getEnableServerCertificateValidation() {
        return this.enableServerCertificateValidation;
    }

    /**
     * Set the enableServerCertificateValidation property: If true, validate the HTTPS server SSL certificate. Default
     * value is true. Type: boolean (or Expression with resultType boolean).
     *
     * @param enableServerCertificateValidation the enableServerCertificateValidation value to set.
     * @return the HttpLinkedService object itself.
     */
    public HttpLinkedService setEnableServerCertificateValidation(Object enableServerCertificateValidation) {
        this.enableServerCertificateValidation = enableServerCertificateValidation;
        return this;
    }

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

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

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

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