// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.network.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ApplicationGatewayTrustedRootCertificateArgs extends com.pulumi.resources.ResourceArgs {

    public static final ApplicationGatewayTrustedRootCertificateArgs Empty = new ApplicationGatewayTrustedRootCertificateArgs();

    /**
     * The contents of the Trusted Root Certificate which should be used. Required if `key_vault_secret_id` is not set.
     * 
     */
    @Import(name="data")
    private @Nullable Output<String> data;

    /**
     * @return The contents of the Trusted Root Certificate which should be used. Required if `key_vault_secret_id` is not set.
     * 
     */
    public Optional<Output<String>> data() {
        return Optional.ofNullable(this.data);
    }

    /**
     * The ID of the Rewrite Rule Set
     * 
     */
    @Import(name="id")
    private @Nullable Output<String> id;

    /**
     * @return The ID of the Rewrite Rule Set
     * 
     */
    public Optional<Output<String>> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The Secret ID of (base-64 encoded unencrypted pfx) `Secret` or `Certificate` object stored in Azure KeyVault. You need to enable soft delete for the Key Vault to use this feature. Required if `data` is not set.
     * 
     * &gt; **NOTE:** TLS termination with Key Vault certificates is limited to the [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/key-vault-certs).
     * 
     * &gt; **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined.
     * 
     */
    @Import(name="keyVaultSecretId")
    private @Nullable Output<String> keyVaultSecretId;

    /**
     * @return The Secret ID of (base-64 encoded unencrypted pfx) `Secret` or `Certificate` object stored in Azure KeyVault. You need to enable soft delete for the Key Vault to use this feature. Required if `data` is not set.
     * 
     * &gt; **NOTE:** TLS termination with Key Vault certificates is limited to the [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/key-vault-certs).
     * 
     * &gt; **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined.
     * 
     */
    public Optional<Output<String>> keyVaultSecretId() {
        return Optional.ofNullable(this.keyVaultSecretId);
    }

    /**
     * The Name of the Trusted Root Certificate to use.
     * 
     */
    @Import(name="name", required=true)
    private Output<String> name;

    /**
     * @return The Name of the Trusted Root Certificate to use.
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    private ApplicationGatewayTrustedRootCertificateArgs() {}

    private ApplicationGatewayTrustedRootCertificateArgs(ApplicationGatewayTrustedRootCertificateArgs $) {
        this.data = $.data;
        this.id = $.id;
        this.keyVaultSecretId = $.keyVaultSecretId;
        this.name = $.name;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ApplicationGatewayTrustedRootCertificateArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ApplicationGatewayTrustedRootCertificateArgs $;

        public Builder() {
            $ = new ApplicationGatewayTrustedRootCertificateArgs();
        }

        public Builder(ApplicationGatewayTrustedRootCertificateArgs defaults) {
            $ = new ApplicationGatewayTrustedRootCertificateArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param data The contents of the Trusted Root Certificate which should be used. Required if `key_vault_secret_id` is not set.
         * 
         * @return builder
         * 
         */
        public Builder data(@Nullable Output<String> data) {
            $.data = data;
            return this;
        }

        /**
         * @param data The contents of the Trusted Root Certificate which should be used. Required if `key_vault_secret_id` is not set.
         * 
         * @return builder
         * 
         */
        public Builder data(String data) {
            return data(Output.of(data));
        }

        /**
         * @param id The ID of the Rewrite Rule Set
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output<String> id) {
            $.id = id;
            return this;
        }

        /**
         * @param id The ID of the Rewrite Rule Set
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param keyVaultSecretId The Secret ID of (base-64 encoded unencrypted pfx) `Secret` or `Certificate` object stored in Azure KeyVault. You need to enable soft delete for the Key Vault to use this feature. Required if `data` is not set.
         * 
         * &gt; **NOTE:** TLS termination with Key Vault certificates is limited to the [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/key-vault-certs).
         * 
         * &gt; **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultSecretId(@Nullable Output<String> keyVaultSecretId) {
            $.keyVaultSecretId = keyVaultSecretId;
            return this;
        }

        /**
         * @param keyVaultSecretId The Secret ID of (base-64 encoded unencrypted pfx) `Secret` or `Certificate` object stored in Azure KeyVault. You need to enable soft delete for the Key Vault to use this feature. Required if `data` is not set.
         * 
         * &gt; **NOTE:** TLS termination with Key Vault certificates is limited to the [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/key-vault-certs).
         * 
         * &gt; **NOTE:** For TLS termination with Key Vault certificates to work properly existing user-assigned managed identity, which Application Gateway uses to retrieve certificates from Key Vault, should be defined via `identity` block. Additionally, access policies in the Key Vault to allow the identity to be granted *get* access to the secret should be defined.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultSecretId(String keyVaultSecretId) {
            return keyVaultSecretId(Output.of(keyVaultSecretId));
        }

        /**
         * @param name The Name of the Trusted Root Certificate to use.
         * 
         * @return builder
         * 
         */
        public Builder name(Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The Name of the Trusted Root Certificate to use.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        public ApplicationGatewayTrustedRootCertificateArgs build() {
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            return $;
        }
    }

}
