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

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

@CustomType
public final class ServiceTemplateSpecContainerEnvValueFromSecretKeyRef {
    /**
     * @return A Cloud Secret Manager secret version. Must be &#39;latest&#39; for the latest
     * version or an integer for a specific version.
     * 
     */
    private String key;
    /**
     * @return The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project.
     * If the secret is in another project, you must define an alias.
     * An alias definition has the form: :projects/{project-id|project-number}/secrets/.
     * If multiple alias definitions are needed, they must be separated by commas.
     * The alias definitions must be set on the run.googleapis.com/secrets annotation.
     * 
     */
    private String name;

    private ServiceTemplateSpecContainerEnvValueFromSecretKeyRef() {}
    /**
     * @return A Cloud Secret Manager secret version. Must be &#39;latest&#39; for the latest
     * version or an integer for a specific version.
     * 
     */
    public String key() {
        return this.key;
    }
    /**
     * @return The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project.
     * If the secret is in another project, you must define an alias.
     * An alias definition has the form: :projects/{project-id|project-number}/secrets/.
     * If multiple alias definitions are needed, they must be separated by commas.
     * The alias definitions must be set on the run.googleapis.com/secrets annotation.
     * 
     */
    public String name() {
        return this.name;
    }

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

    public static Builder builder(ServiceTemplateSpecContainerEnvValueFromSecretKeyRef defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String key;
        private String name;
        public Builder() {}
        public Builder(ServiceTemplateSpecContainerEnvValueFromSecretKeyRef defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.key = defaults.key;
    	      this.name = defaults.name;
        }

        @CustomType.Setter
        public Builder key(String key) {
            this.key = Objects.requireNonNull(key);
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        public ServiceTemplateSpecContainerEnvValueFromSecretKeyRef build() {
            final var o = new ServiceTemplateSpecContainerEnvValueFromSecretKeyRef();
            o.key = key;
            o.name = name;
            return o;
        }
    }
}
