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

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


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

    public static final JobTemplateTemplateVolumeCloudSqlInstanceArgs Empty = new JobTemplateTemplateVolumeCloudSqlInstanceArgs();

    /**
     * The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
     * 
     */
    @Import(name="instances")
    private @Nullable Output<List<String>> instances;

    /**
     * @return The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
     * 
     */
    public Optional<Output<List<String>>> instances() {
        return Optional.ofNullable(this.instances);
    }

    private JobTemplateTemplateVolumeCloudSqlInstanceArgs() {}

    private JobTemplateTemplateVolumeCloudSqlInstanceArgs(JobTemplateTemplateVolumeCloudSqlInstanceArgs $) {
        this.instances = $.instances;
    }

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

    public static final class Builder {
        private JobTemplateTemplateVolumeCloudSqlInstanceArgs $;

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

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

        /**
         * @param instances The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
         * 
         * @return builder
         * 
         */
        public Builder instances(@Nullable Output<List<String>> instances) {
            $.instances = instances;
            return this;
        }

        /**
         * @param instances The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
         * 
         * @return builder
         * 
         */
        public Builder instances(List<String> instances) {
            return instances(Output.of(instances));
        }

        /**
         * @param instances The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}
         * 
         * @return builder
         * 
         */
        public Builder instances(String... instances) {
            return instances(List.of(instances));
        }

        public JobTemplateTemplateVolumeCloudSqlInstanceArgs build() {
            return $;
        }
    }

}
