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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;


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

    public static final FunctionServiceConfigSecretEnvironmentVariableArgs Empty = new FunctionServiceConfigSecretEnvironmentVariableArgs();

    /**
     * Name of the environment variable.
     * 
     */
    @Import(name="key", required=true)
    private Output<String> key;

    /**
     * @return Name of the environment variable.
     * 
     */
    public Output<String> key() {
        return this.key;
    }

    /**
     * Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function&#39;s project assuming that the secret exists in the same project as of the function.
     * 
     */
    @Import(name="projectId", required=true)
    private Output<String> projectId;

    /**
     * @return Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function&#39;s project assuming that the secret exists in the same project as of the function.
     * 
     */
    public Output<String> projectId() {
        return this.projectId;
    }

    /**
     * Name of the secret in secret manager (not the full resource name).
     * 
     */
    @Import(name="secret", required=true)
    private Output<String> secret;

    /**
     * @return Name of the secret in secret manager (not the full resource name).
     * 
     */
    public Output<String> secret() {
        return this.secret;
    }

    /**
     * Version of the secret (version number or the string &#39;latest&#39;). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.
     * 
     */
    @Import(name="version", required=true)
    private Output<String> version;

    /**
     * @return Version of the secret (version number or the string &#39;latest&#39;). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.
     * 
     */
    public Output<String> version() {
        return this.version;
    }

    private FunctionServiceConfigSecretEnvironmentVariableArgs() {}

    private FunctionServiceConfigSecretEnvironmentVariableArgs(FunctionServiceConfigSecretEnvironmentVariableArgs $) {
        this.key = $.key;
        this.projectId = $.projectId;
        this.secret = $.secret;
        this.version = $.version;
    }

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

    public static final class Builder {
        private FunctionServiceConfigSecretEnvironmentVariableArgs $;

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

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

        /**
         * @param key Name of the environment variable.
         * 
         * @return builder
         * 
         */
        public Builder key(Output<String> key) {
            $.key = key;
            return this;
        }

        /**
         * @param key Name of the environment variable.
         * 
         * @return builder
         * 
         */
        public Builder key(String key) {
            return key(Output.of(key));
        }

        /**
         * @param projectId Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function&#39;s project assuming that the secret exists in the same project as of the function.
         * 
         * @return builder
         * 
         */
        public Builder projectId(Output<String> projectId) {
            $.projectId = projectId;
            return this;
        }

        /**
         * @param projectId Project identifier (preferrably project number but can also be the project ID) of the project that contains the secret. If not set, it will be populated with the function&#39;s project assuming that the secret exists in the same project as of the function.
         * 
         * @return builder
         * 
         */
        public Builder projectId(String projectId) {
            return projectId(Output.of(projectId));
        }

        /**
         * @param secret Name of the secret in secret manager (not the full resource name).
         * 
         * @return builder
         * 
         */
        public Builder secret(Output<String> secret) {
            $.secret = secret;
            return this;
        }

        /**
         * @param secret Name of the secret in secret manager (not the full resource name).
         * 
         * @return builder
         * 
         */
        public Builder secret(String secret) {
            return secret(Output.of(secret));
        }

        /**
         * @param version Version of the secret (version number or the string &#39;latest&#39;). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.
         * 
         * @return builder
         * 
         */
        public Builder version(Output<String> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version Version of the secret (version number or the string &#39;latest&#39;). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public FunctionServiceConfigSecretEnvironmentVariableArgs build() {
            $.key = Objects.requireNonNull($.key, "expected parameter 'key' to be non-null");
            $.projectId = Objects.requireNonNull($.projectId, "expected parameter 'projectId' to be non-null");
            $.secret = Objects.requireNonNull($.secret, "expected parameter 'secret' to be non-null");
            $.version = Objects.requireNonNull($.version, "expected parameter 'version' to be non-null");
            return $;
        }
    }

}
