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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.cloudfunctions.outputs.GetFunctionEventTrigger;
import com.pulumi.gcp.cloudfunctions.outputs.GetFunctionSecretEnvironmentVariable;
import com.pulumi.gcp.cloudfunctions.outputs.GetFunctionSecretVolume;
import com.pulumi.gcp.cloudfunctions.outputs.GetFunctionSourceRepository;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetFunctionResult {
    /**
     * @return Available memory (in MB) to the function.
     * 
     */
    private Integer availableMemoryMb;
    private Map<String,Object> buildEnvironmentVariables;
    private String buildWorkerPool;
    /**
     * @return Description of the function.
     * 
     */
    private String description;
    private String dockerRegistry;
    private String dockerRepository;
    /**
     * @return Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.
     * 
     */
    private String entryPoint;
    private Map<String,Object> environmentVariables;
    /**
     * @return A source that fires events in response to a condition in another service. Structure is documented below.
     * 
     */
    private List<GetFunctionEventTrigger> eventTriggers;
    private String httpsTriggerSecurityLevel;
    /**
     * @return If function is triggered by HTTP, trigger URL is set here.
     * 
     */
    private String httpsTriggerUrl;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    /**
     * @return Controls what traffic can reach the function.
     * 
     */
    private String ingressSettings;
    private String kmsKeyName;
    /**
     * @return A map of labels applied to this function.
     * 
     */
    private Map<String,Object> labels;
    /**
     * @return The limit on the maximum number of function instances that may coexist at a given time. If unset or set to `0`, the API default will be used.
     * 
     */
    private Integer maxInstances;
    private Integer minInstances;
    /**
     * @return The name of the Cloud Function.
     * 
     */
    private String name;
    private @Nullable String project;
    private @Nullable String region;
    /**
     * @return The runtime in which the function is running.
     * 
     */
    private String runtime;
    private List<GetFunctionSecretEnvironmentVariable> secretEnvironmentVariables;
    private List<GetFunctionSecretVolume> secretVolumes;
    /**
     * @return The service account email to be assumed by the cloud function.
     * 
     */
    private String serviceAccountEmail;
    /**
     * @return The GCS bucket containing the zip archive which contains the function.
     * 
     */
    private String sourceArchiveBucket;
    /**
     * @return The source archive object (file) in archive bucket.
     * 
     */
    private String sourceArchiveObject;
    /**
     * @return The URL of the Cloud Source Repository that the function is deployed from. Structure is documented below.
     * 
     */
    private List<GetFunctionSourceRepository> sourceRepositories;
    private String status;
    /**
     * @return Function execution timeout (in seconds).
     * 
     */
    private Integer timeout;
    /**
     * @return If function is triggered by HTTP, this boolean is set.
     * 
     */
    private Boolean triggerHttp;
    /**
     * @return The VPC Network Connector that this cloud function can connect to.
     * 
     */
    private String vpcConnector;
    /**
     * @return The egress settings for the connector, controlling what traffic is diverted through it.
     * 
     */
    private String vpcConnectorEgressSettings;

    private GetFunctionResult() {}
    /**
     * @return Available memory (in MB) to the function.
     * 
     */
    public Integer availableMemoryMb() {
        return this.availableMemoryMb;
    }
    public Map<String,Object> buildEnvironmentVariables() {
        return this.buildEnvironmentVariables;
    }
    public String buildWorkerPool() {
        return this.buildWorkerPool;
    }
    /**
     * @return Description of the function.
     * 
     */
    public String description() {
        return this.description;
    }
    public String dockerRegistry() {
        return this.dockerRegistry;
    }
    public String dockerRepository() {
        return this.dockerRepository;
    }
    /**
     * @return Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.
     * 
     */
    public String entryPoint() {
        return this.entryPoint;
    }
    public Map<String,Object> environmentVariables() {
        return this.environmentVariables;
    }
    /**
     * @return A source that fires events in response to a condition in another service. Structure is documented below.
     * 
     */
    public List<GetFunctionEventTrigger> eventTriggers() {
        return this.eventTriggers;
    }
    public String httpsTriggerSecurityLevel() {
        return this.httpsTriggerSecurityLevel;
    }
    /**
     * @return If function is triggered by HTTP, trigger URL is set here.
     * 
     */
    public String httpsTriggerUrl() {
        return this.httpsTriggerUrl;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return Controls what traffic can reach the function.
     * 
     */
    public String ingressSettings() {
        return this.ingressSettings;
    }
    public String kmsKeyName() {
        return this.kmsKeyName;
    }
    /**
     * @return A map of labels applied to this function.
     * 
     */
    public Map<String,Object> labels() {
        return this.labels;
    }
    /**
     * @return The limit on the maximum number of function instances that may coexist at a given time. If unset or set to `0`, the API default will be used.
     * 
     */
    public Integer maxInstances() {
        return this.maxInstances;
    }
    public Integer minInstances() {
        return this.minInstances;
    }
    /**
     * @return The name of the Cloud Function.
     * 
     */
    public String name() {
        return this.name;
    }
    public Optional<String> project() {
        return Optional.ofNullable(this.project);
    }
    public Optional<String> region() {
        return Optional.ofNullable(this.region);
    }
    /**
     * @return The runtime in which the function is running.
     * 
     */
    public String runtime() {
        return this.runtime;
    }
    public List<GetFunctionSecretEnvironmentVariable> secretEnvironmentVariables() {
        return this.secretEnvironmentVariables;
    }
    public List<GetFunctionSecretVolume> secretVolumes() {
        return this.secretVolumes;
    }
    /**
     * @return The service account email to be assumed by the cloud function.
     * 
     */
    public String serviceAccountEmail() {
        return this.serviceAccountEmail;
    }
    /**
     * @return The GCS bucket containing the zip archive which contains the function.
     * 
     */
    public String sourceArchiveBucket() {
        return this.sourceArchiveBucket;
    }
    /**
     * @return The source archive object (file) in archive bucket.
     * 
     */
    public String sourceArchiveObject() {
        return this.sourceArchiveObject;
    }
    /**
     * @return The URL of the Cloud Source Repository that the function is deployed from. Structure is documented below.
     * 
     */
    public List<GetFunctionSourceRepository> sourceRepositories() {
        return this.sourceRepositories;
    }
    public String status() {
        return this.status;
    }
    /**
     * @return Function execution timeout (in seconds).
     * 
     */
    public Integer timeout() {
        return this.timeout;
    }
    /**
     * @return If function is triggered by HTTP, this boolean is set.
     * 
     */
    public Boolean triggerHttp() {
        return this.triggerHttp;
    }
    /**
     * @return The VPC Network Connector that this cloud function can connect to.
     * 
     */
    public String vpcConnector() {
        return this.vpcConnector;
    }
    /**
     * @return The egress settings for the connector, controlling what traffic is diverted through it.
     * 
     */
    public String vpcConnectorEgressSettings() {
        return this.vpcConnectorEgressSettings;
    }

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

    public static Builder builder(GetFunctionResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Integer availableMemoryMb;
        private Map<String,Object> buildEnvironmentVariables;
        private String buildWorkerPool;
        private String description;
        private String dockerRegistry;
        private String dockerRepository;
        private String entryPoint;
        private Map<String,Object> environmentVariables;
        private List<GetFunctionEventTrigger> eventTriggers;
        private String httpsTriggerSecurityLevel;
        private String httpsTriggerUrl;
        private String id;
        private String ingressSettings;
        private String kmsKeyName;
        private Map<String,Object> labels;
        private Integer maxInstances;
        private Integer minInstances;
        private String name;
        private @Nullable String project;
        private @Nullable String region;
        private String runtime;
        private List<GetFunctionSecretEnvironmentVariable> secretEnvironmentVariables;
        private List<GetFunctionSecretVolume> secretVolumes;
        private String serviceAccountEmail;
        private String sourceArchiveBucket;
        private String sourceArchiveObject;
        private List<GetFunctionSourceRepository> sourceRepositories;
        private String status;
        private Integer timeout;
        private Boolean triggerHttp;
        private String vpcConnector;
        private String vpcConnectorEgressSettings;
        public Builder() {}
        public Builder(GetFunctionResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.availableMemoryMb = defaults.availableMemoryMb;
    	      this.buildEnvironmentVariables = defaults.buildEnvironmentVariables;
    	      this.buildWorkerPool = defaults.buildWorkerPool;
    	      this.description = defaults.description;
    	      this.dockerRegistry = defaults.dockerRegistry;
    	      this.dockerRepository = defaults.dockerRepository;
    	      this.entryPoint = defaults.entryPoint;
    	      this.environmentVariables = defaults.environmentVariables;
    	      this.eventTriggers = defaults.eventTriggers;
    	      this.httpsTriggerSecurityLevel = defaults.httpsTriggerSecurityLevel;
    	      this.httpsTriggerUrl = defaults.httpsTriggerUrl;
    	      this.id = defaults.id;
    	      this.ingressSettings = defaults.ingressSettings;
    	      this.kmsKeyName = defaults.kmsKeyName;
    	      this.labels = defaults.labels;
    	      this.maxInstances = defaults.maxInstances;
    	      this.minInstances = defaults.minInstances;
    	      this.name = defaults.name;
    	      this.project = defaults.project;
    	      this.region = defaults.region;
    	      this.runtime = defaults.runtime;
    	      this.secretEnvironmentVariables = defaults.secretEnvironmentVariables;
    	      this.secretVolumes = defaults.secretVolumes;
    	      this.serviceAccountEmail = defaults.serviceAccountEmail;
    	      this.sourceArchiveBucket = defaults.sourceArchiveBucket;
    	      this.sourceArchiveObject = defaults.sourceArchiveObject;
    	      this.sourceRepositories = defaults.sourceRepositories;
    	      this.status = defaults.status;
    	      this.timeout = defaults.timeout;
    	      this.triggerHttp = defaults.triggerHttp;
    	      this.vpcConnector = defaults.vpcConnector;
    	      this.vpcConnectorEgressSettings = defaults.vpcConnectorEgressSettings;
        }

        @CustomType.Setter
        public Builder availableMemoryMb(Integer availableMemoryMb) {
            this.availableMemoryMb = Objects.requireNonNull(availableMemoryMb);
            return this;
        }
        @CustomType.Setter
        public Builder buildEnvironmentVariables(Map<String,Object> buildEnvironmentVariables) {
            this.buildEnvironmentVariables = Objects.requireNonNull(buildEnvironmentVariables);
            return this;
        }
        @CustomType.Setter
        public Builder buildWorkerPool(String buildWorkerPool) {
            this.buildWorkerPool = Objects.requireNonNull(buildWorkerPool);
            return this;
        }
        @CustomType.Setter
        public Builder description(String description) {
            this.description = Objects.requireNonNull(description);
            return this;
        }
        @CustomType.Setter
        public Builder dockerRegistry(String dockerRegistry) {
            this.dockerRegistry = Objects.requireNonNull(dockerRegistry);
            return this;
        }
        @CustomType.Setter
        public Builder dockerRepository(String dockerRepository) {
            this.dockerRepository = Objects.requireNonNull(dockerRepository);
            return this;
        }
        @CustomType.Setter
        public Builder entryPoint(String entryPoint) {
            this.entryPoint = Objects.requireNonNull(entryPoint);
            return this;
        }
        @CustomType.Setter
        public Builder environmentVariables(Map<String,Object> environmentVariables) {
            this.environmentVariables = Objects.requireNonNull(environmentVariables);
            return this;
        }
        @CustomType.Setter
        public Builder eventTriggers(List<GetFunctionEventTrigger> eventTriggers) {
            this.eventTriggers = Objects.requireNonNull(eventTriggers);
            return this;
        }
        public Builder eventTriggers(GetFunctionEventTrigger... eventTriggers) {
            return eventTriggers(List.of(eventTriggers));
        }
        @CustomType.Setter
        public Builder httpsTriggerSecurityLevel(String httpsTriggerSecurityLevel) {
            this.httpsTriggerSecurityLevel = Objects.requireNonNull(httpsTriggerSecurityLevel);
            return this;
        }
        @CustomType.Setter
        public Builder httpsTriggerUrl(String httpsTriggerUrl) {
            this.httpsTriggerUrl = Objects.requireNonNull(httpsTriggerUrl);
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            this.id = Objects.requireNonNull(id);
            return this;
        }
        @CustomType.Setter
        public Builder ingressSettings(String ingressSettings) {
            this.ingressSettings = Objects.requireNonNull(ingressSettings);
            return this;
        }
        @CustomType.Setter
        public Builder kmsKeyName(String kmsKeyName) {
            this.kmsKeyName = Objects.requireNonNull(kmsKeyName);
            return this;
        }
        @CustomType.Setter
        public Builder labels(Map<String,Object> labels) {
            this.labels = Objects.requireNonNull(labels);
            return this;
        }
        @CustomType.Setter
        public Builder maxInstances(Integer maxInstances) {
            this.maxInstances = Objects.requireNonNull(maxInstances);
            return this;
        }
        @CustomType.Setter
        public Builder minInstances(Integer minInstances) {
            this.minInstances = Objects.requireNonNull(minInstances);
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        @CustomType.Setter
        public Builder project(@Nullable String project) {
            this.project = project;
            return this;
        }
        @CustomType.Setter
        public Builder region(@Nullable String region) {
            this.region = region;
            return this;
        }
        @CustomType.Setter
        public Builder runtime(String runtime) {
            this.runtime = Objects.requireNonNull(runtime);
            return this;
        }
        @CustomType.Setter
        public Builder secretEnvironmentVariables(List<GetFunctionSecretEnvironmentVariable> secretEnvironmentVariables) {
            this.secretEnvironmentVariables = Objects.requireNonNull(secretEnvironmentVariables);
            return this;
        }
        public Builder secretEnvironmentVariables(GetFunctionSecretEnvironmentVariable... secretEnvironmentVariables) {
            return secretEnvironmentVariables(List.of(secretEnvironmentVariables));
        }
        @CustomType.Setter
        public Builder secretVolumes(List<GetFunctionSecretVolume> secretVolumes) {
            this.secretVolumes = Objects.requireNonNull(secretVolumes);
            return this;
        }
        public Builder secretVolumes(GetFunctionSecretVolume... secretVolumes) {
            return secretVolumes(List.of(secretVolumes));
        }
        @CustomType.Setter
        public Builder serviceAccountEmail(String serviceAccountEmail) {
            this.serviceAccountEmail = Objects.requireNonNull(serviceAccountEmail);
            return this;
        }
        @CustomType.Setter
        public Builder sourceArchiveBucket(String sourceArchiveBucket) {
            this.sourceArchiveBucket = Objects.requireNonNull(sourceArchiveBucket);
            return this;
        }
        @CustomType.Setter
        public Builder sourceArchiveObject(String sourceArchiveObject) {
            this.sourceArchiveObject = Objects.requireNonNull(sourceArchiveObject);
            return this;
        }
        @CustomType.Setter
        public Builder sourceRepositories(List<GetFunctionSourceRepository> sourceRepositories) {
            this.sourceRepositories = Objects.requireNonNull(sourceRepositories);
            return this;
        }
        public Builder sourceRepositories(GetFunctionSourceRepository... sourceRepositories) {
            return sourceRepositories(List.of(sourceRepositories));
        }
        @CustomType.Setter
        public Builder status(String status) {
            this.status = Objects.requireNonNull(status);
            return this;
        }
        @CustomType.Setter
        public Builder timeout(Integer timeout) {
            this.timeout = Objects.requireNonNull(timeout);
            return this;
        }
        @CustomType.Setter
        public Builder triggerHttp(Boolean triggerHttp) {
            this.triggerHttp = Objects.requireNonNull(triggerHttp);
            return this;
        }
        @CustomType.Setter
        public Builder vpcConnector(String vpcConnector) {
            this.vpcConnector = Objects.requireNonNull(vpcConnector);
            return this;
        }
        @CustomType.Setter
        public Builder vpcConnectorEgressSettings(String vpcConnectorEgressSettings) {
            this.vpcConnectorEgressSettings = Objects.requireNonNull(vpcConnectorEgressSettings);
            return this;
        }
        public GetFunctionResult build() {
            final var o = new GetFunctionResult();
            o.availableMemoryMb = availableMemoryMb;
            o.buildEnvironmentVariables = buildEnvironmentVariables;
            o.buildWorkerPool = buildWorkerPool;
            o.description = description;
            o.dockerRegistry = dockerRegistry;
            o.dockerRepository = dockerRepository;
            o.entryPoint = entryPoint;
            o.environmentVariables = environmentVariables;
            o.eventTriggers = eventTriggers;
            o.httpsTriggerSecurityLevel = httpsTriggerSecurityLevel;
            o.httpsTriggerUrl = httpsTriggerUrl;
            o.id = id;
            o.ingressSettings = ingressSettings;
            o.kmsKeyName = kmsKeyName;
            o.labels = labels;
            o.maxInstances = maxInstances;
            o.minInstances = minInstances;
            o.name = name;
            o.project = project;
            o.region = region;
            o.runtime = runtime;
            o.secretEnvironmentVariables = secretEnvironmentVariables;
            o.secretVolumes = secretVolumes;
            o.serviceAccountEmail = serviceAccountEmail;
            o.sourceArchiveBucket = sourceArchiveBucket;
            o.sourceArchiveObject = sourceArchiveObject;
            o.sourceRepositories = sourceRepositories;
            o.status = status;
            o.timeout = timeout;
            o.triggerHttp = triggerHttp;
            o.vpcConnector = vpcConnector;
            o.vpcConnectorEgressSettings = vpcConnectorEgressSettings;
            return o;
        }
    }
}
