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

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


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

    public static final CertificateArgs Empty = new CertificateArgs();

    /**
     * The ID of the associated App Service plan. Must be specified when the certificate is used inside an App Service Environment hosted App Service. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="appServicePlanId")
    private @Nullable Output<String> appServicePlanId;

    /**
     * @return The ID of the associated App Service plan. Must be specified when the certificate is used inside an App Service Environment hosted App Service. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> appServicePlanId() {
        return Optional.ofNullable(this.appServicePlanId);
    }

    /**
     * The ID of the Key Vault secret. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keyVaultSecretId")
    private @Nullable Output<String> keyVaultSecretId;

    /**
     * @return The ID of the Key Vault secret. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> keyVaultSecretId() {
        return Optional.ofNullable(this.keyVaultSecretId);
    }

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name of the certificate. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the certificate. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The password to access the certificate&#39;s private key. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="password")
    private @Nullable Output<String> password;

    /**
     * @return The password to access the certificate&#39;s private key. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> password() {
        return Optional.ofNullable(this.password);
    }

    /**
     * The base64-encoded contents of the certificate. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Either `pfx_blob` or `key_vault_secret_id` must be set - but not both.
     * 
     */
    @Import(name="pfxBlob")
    private @Nullable Output<String> pfxBlob;

    /**
     * @return The base64-encoded contents of the certificate. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Either `pfx_blob` or `key_vault_secret_id` must be set - but not both.
     * 
     */
    public Optional<Output<String>> pfxBlob() {
        return Optional.ofNullable(this.pfxBlob);
    }

    /**
     * The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private CertificateArgs() {}

    private CertificateArgs(CertificateArgs $) {
        this.appServicePlanId = $.appServicePlanId;
        this.keyVaultSecretId = $.keyVaultSecretId;
        this.location = $.location;
        this.name = $.name;
        this.password = $.password;
        this.pfxBlob = $.pfxBlob;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private CertificateArgs $;

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

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

        /**
         * @param appServicePlanId The ID of the associated App Service plan. Must be specified when the certificate is used inside an App Service Environment hosted App Service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServicePlanId(@Nullable Output<String> appServicePlanId) {
            $.appServicePlanId = appServicePlanId;
            return this;
        }

        /**
         * @param appServicePlanId The ID of the associated App Service plan. Must be specified when the certificate is used inside an App Service Environment hosted App Service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServicePlanId(String appServicePlanId) {
            return appServicePlanId(Output.of(appServicePlanId));
        }

        /**
         * @param keyVaultSecretId The ID of the Key Vault secret. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultSecretId(@Nullable Output<String> keyVaultSecretId) {
            $.keyVaultSecretId = keyVaultSecretId;
            return this;
        }

        /**
         * @param keyVaultSecretId The ID of the Key Vault secret. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultSecretId(String keyVaultSecretId) {
            return keyVaultSecretId(Output.of(keyVaultSecretId));
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output<String> location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name of the certificate. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the certificate. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param password The password to access the certificate&#39;s private key. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(@Nullable Output<String> password) {
            $.password = password;
            return this;
        }

        /**
         * @param password The password to access the certificate&#39;s private key. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder password(String password) {
            return password(Output.of(password));
        }

        /**
         * @param pfxBlob The base64-encoded contents of the certificate. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Either `pfx_blob` or `key_vault_secret_id` must be set - but not both.
         * 
         * @return builder
         * 
         */
        public Builder pfxBlob(@Nullable Output<String> pfxBlob) {
            $.pfxBlob = pfxBlob;
            return this;
        }

        /**
         * @param pfxBlob The base64-encoded contents of the certificate. Changing this forces a new resource to be created.
         * 
         * &gt; **NOTE:** Either `pfx_blob` or `key_vault_secret_id` must be set - but not both.
         * 
         * @return builder
         * 
         */
        public Builder pfxBlob(String pfxBlob) {
            return pfxBlob(Output.of(pfxBlob));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the certificate. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

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

}
