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

import com.pulumi.azure.containerapp.inputs.EnvironmentDaprComponentMetadataArgs;
import com.pulumi.azure.containerapp.inputs.EnvironmentDaprComponentSecretArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final EnvironmentDaprComponentState Empty = new EnvironmentDaprComponentState();

    /**
     * The Dapr Component Type. For example `state.azure.blobstorage`.
     * 
     */
    @Import(name="componentType")
    private @Nullable Output<String> componentType;

    /**
     * @return The Dapr Component Type. For example `state.azure.blobstorage`.
     * 
     */
    public Optional<Output<String>> componentType() {
        return Optional.ofNullable(this.componentType);
    }

    /**
     * The ID of the Container App Managed Environment for this Dapr Component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="containerAppEnvironmentId")
    private @Nullable Output<String> containerAppEnvironmentId;

    /**
     * @return The ID of the Container App Managed Environment for this Dapr Component. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> containerAppEnvironmentId() {
        return Optional.ofNullable(this.containerAppEnvironmentId);
    }

    /**
     * Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`
     * 
     */
    @Import(name="ignoreErrors")
    private @Nullable Output<Boolean> ignoreErrors;

    /**
     * @return Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`
     * 
     */
    public Optional<Output<Boolean>> ignoreErrors() {
        return Optional.ofNullable(this.ignoreErrors);
    }

    /**
     * The timeout for component initialisation as a `ISO8601` formatted string. e.g. `5s`, `2h`, `1m`. Defaults to `5s`
     * 
     */
    @Import(name="initTimeout")
    private @Nullable Output<String> initTimeout;

    /**
     * @return The timeout for component initialisation as a `ISO8601` formatted string. e.g. `5s`, `2h`, `1m`. Defaults to `5s`
     * 
     */
    public Optional<Output<String>> initTimeout() {
        return Optional.ofNullable(this.initTimeout);
    }

    /**
     * One or more `metadata` blocks as detailed below.
     * 
     */
    @Import(name="metadatas")
    private @Nullable Output<List<EnvironmentDaprComponentMetadataArgs>> metadatas;

    /**
     * @return One or more `metadata` blocks as detailed below.
     * 
     */
    public Optional<Output<List<EnvironmentDaprComponentMetadataArgs>>> metadatas() {
        return Optional.ofNullable(this.metadatas);
    }

    /**
     * The name for this Dapr component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return The name for this Dapr component. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A list of scopes to which this component applies.
     * 
     * &gt; **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes
     * 
     */
    @Import(name="scopes")
    private @Nullable Output<List<String>> scopes;

    /**
     * @return A list of scopes to which this component applies.
     * 
     * &gt; **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes
     * 
     */
    public Optional<Output<List<String>>> scopes() {
        return Optional.ofNullable(this.scopes);
    }

    /**
     * A `secret` block as detailed below.
     * 
     */
    @Import(name="secrets")
    private @Nullable Output<List<EnvironmentDaprComponentSecretArgs>> secrets;

    /**
     * @return A `secret` block as detailed below.
     * 
     */
    public Optional<Output<List<EnvironmentDaprComponentSecretArgs>>> secrets() {
        return Optional.ofNullable(this.secrets);
    }

    /**
     * The version of the component.
     * 
     */
    @Import(name="version")
    private @Nullable Output<String> version;

    /**
     * @return The version of the component.
     * 
     */
    public Optional<Output<String>> version() {
        return Optional.ofNullable(this.version);
    }

    private EnvironmentDaprComponentState() {}

    private EnvironmentDaprComponentState(EnvironmentDaprComponentState $) {
        this.componentType = $.componentType;
        this.containerAppEnvironmentId = $.containerAppEnvironmentId;
        this.ignoreErrors = $.ignoreErrors;
        this.initTimeout = $.initTimeout;
        this.metadatas = $.metadatas;
        this.name = $.name;
        this.scopes = $.scopes;
        this.secrets = $.secrets;
        this.version = $.version;
    }

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

    public static final class Builder {
        private EnvironmentDaprComponentState $;

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

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

        /**
         * @param componentType The Dapr Component Type. For example `state.azure.blobstorage`.
         * 
         * @return builder
         * 
         */
        public Builder componentType(@Nullable Output<String> componentType) {
            $.componentType = componentType;
            return this;
        }

        /**
         * @param componentType The Dapr Component Type. For example `state.azure.blobstorage`.
         * 
         * @return builder
         * 
         */
        public Builder componentType(String componentType) {
            return componentType(Output.of(componentType));
        }

        /**
         * @param containerAppEnvironmentId The ID of the Container App Managed Environment for this Dapr Component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder containerAppEnvironmentId(@Nullable Output<String> containerAppEnvironmentId) {
            $.containerAppEnvironmentId = containerAppEnvironmentId;
            return this;
        }

        /**
         * @param containerAppEnvironmentId The ID of the Container App Managed Environment for this Dapr Component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder containerAppEnvironmentId(String containerAppEnvironmentId) {
            return containerAppEnvironmentId(Output.of(containerAppEnvironmentId));
        }

        /**
         * @param ignoreErrors Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`
         * 
         * @return builder
         * 
         */
        public Builder ignoreErrors(@Nullable Output<Boolean> ignoreErrors) {
            $.ignoreErrors = ignoreErrors;
            return this;
        }

        /**
         * @param ignoreErrors Should the Dapr sidecar to continue initialisation if the component fails to load. Defaults to `false`
         * 
         * @return builder
         * 
         */
        public Builder ignoreErrors(Boolean ignoreErrors) {
            return ignoreErrors(Output.of(ignoreErrors));
        }

        /**
         * @param initTimeout The timeout for component initialisation as a `ISO8601` formatted string. e.g. `5s`, `2h`, `1m`. Defaults to `5s`
         * 
         * @return builder
         * 
         */
        public Builder initTimeout(@Nullable Output<String> initTimeout) {
            $.initTimeout = initTimeout;
            return this;
        }

        /**
         * @param initTimeout The timeout for component initialisation as a `ISO8601` formatted string. e.g. `5s`, `2h`, `1m`. Defaults to `5s`
         * 
         * @return builder
         * 
         */
        public Builder initTimeout(String initTimeout) {
            return initTimeout(Output.of(initTimeout));
        }

        /**
         * @param metadatas One or more `metadata` blocks as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder metadatas(@Nullable Output<List<EnvironmentDaprComponentMetadataArgs>> metadatas) {
            $.metadatas = metadatas;
            return this;
        }

        /**
         * @param metadatas One or more `metadata` blocks as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder metadatas(List<EnvironmentDaprComponentMetadataArgs> metadatas) {
            return metadatas(Output.of(metadatas));
        }

        /**
         * @param metadatas One or more `metadata` blocks as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder metadatas(EnvironmentDaprComponentMetadataArgs... metadatas) {
            return metadatas(List.of(metadatas));
        }

        /**
         * @param name The name for this Dapr component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name for this Dapr component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param scopes A list of scopes to which this component applies.
         * 
         * &gt; **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes
         * 
         * @return builder
         * 
         */
        public Builder scopes(@Nullable Output<List<String>> scopes) {
            $.scopes = scopes;
            return this;
        }

        /**
         * @param scopes A list of scopes to which this component applies.
         * 
         * &gt; **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes
         * 
         * @return builder
         * 
         */
        public Builder scopes(List<String> scopes) {
            return scopes(Output.of(scopes));
        }

        /**
         * @param scopes A list of scopes to which this component applies.
         * 
         * &gt; **NOTE:** See the official docs for more information at https://learn.microsoft.com/en-us/azure/container-apps/dapr-overview?tabs=bicep1%2Cyaml#component-scopes
         * 
         * @return builder
         * 
         */
        public Builder scopes(String... scopes) {
            return scopes(List.of(scopes));
        }

        /**
         * @param secrets A `secret` block as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder secrets(@Nullable Output<List<EnvironmentDaprComponentSecretArgs>> secrets) {
            $.secrets = secrets;
            return this;
        }

        /**
         * @param secrets A `secret` block as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder secrets(List<EnvironmentDaprComponentSecretArgs> secrets) {
            return secrets(Output.of(secrets));
        }

        /**
         * @param secrets A `secret` block as detailed below.
         * 
         * @return builder
         * 
         */
        public Builder secrets(EnvironmentDaprComponentSecretArgs... secrets) {
            return secrets(List.of(secrets));
        }

        /**
         * @param version The version of the component.
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output<String> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The version of the component.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public EnvironmentDaprComponentState build() {
            return $;
        }
    }

}
