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

package com.azure.media.videoanalyzer.edge.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in
 * transit).
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type")
@JsonTypeName("#Microsoft.VideoAnalyzer.TlsEndpoint")
@Fluent
public final class TlsEndpoint extends EndpointBase {
    /*
     * List of trusted certificate authorities when authenticating a TLS
     * connection. A null list designates that Azure Video Analyzer's list of
     * trusted authorities should be used.
     */
    @JsonProperty(value = "trustedCertificates")
    private CertificateSource trustedCertificates;

    /*
     * Validation options to use when authenticating a TLS connection. By
     * default, strict validation is used.
     */
    @JsonProperty(value = "validationOptions")
    private TlsValidationOptions validationOptions;

    /**
     * Creates an instance of TlsEndpoint class.
     *
     * @param url the url value to set.
     */
    @JsonCreator
    public TlsEndpoint(@JsonProperty(value = "url", required = true) String url) {
        super(url);
    }

    /**
     * Get the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS
     * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used.
     *
     * @return the trustedCertificates value.
     */
    public CertificateSource getTrustedCertificates() {
        return this.trustedCertificates;
    }

    /**
     * Set the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS
     * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used.
     *
     * @param trustedCertificates the trustedCertificates value to set.
     * @return the TlsEndpoint object itself.
     */
    public TlsEndpoint setTrustedCertificates(CertificateSource trustedCertificates) {
        this.trustedCertificates = trustedCertificates;
        return this;
    }

    /**
     * Get the validationOptions property: Validation options to use when authenticating a TLS connection. By default,
     * strict validation is used.
     *
     * @return the validationOptions value.
     */
    public TlsValidationOptions getValidationOptions() {
        return this.validationOptions;
    }

    /**
     * Set the validationOptions property: Validation options to use when authenticating a TLS connection. By default,
     * strict validation is used.
     *
     * @param validationOptions the validationOptions value to set.
     * @return the TlsEndpoint object itself.
     */
    public TlsEndpoint setValidationOptions(TlsValidationOptions validationOptions) {
        this.validationOptions = validationOptions;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public TlsEndpoint setCredentials(CredentialsBase credentials) {
        super.setCredentials(credentials);
        return this;
    }
}
