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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.datastream.outputs.StreamSourceConfigMysqlSourceConfig;
import com.pulumi.gcp.datastream.outputs.StreamSourceConfigOracleSourceConfig;
import com.pulumi.gcp.datastream.outputs.StreamSourceConfigPostgresqlSourceConfig;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class StreamSourceConfig {
    /**
     * @return MySQL data source configuration.
     * Structure is documented below.
     * 
     */
    private @Nullable StreamSourceConfigMysqlSourceConfig mysqlSourceConfig;
    /**
     * @return MySQL data source configuration.
     * Structure is documented below.
     * 
     */
    private @Nullable StreamSourceConfigOracleSourceConfig oracleSourceConfig;
    /**
     * @return PostgreSQL data source configuration.
     * Structure is documented below.
     * 
     */
    private @Nullable StreamSourceConfigPostgresqlSourceConfig postgresqlSourceConfig;
    /**
     * @return Source connection profile resource. Format: projects/{project}/locations/{location}/connectionProfiles/{name}
     * 
     */
    private String sourceConnectionProfile;

    private StreamSourceConfig() {}
    /**
     * @return MySQL data source configuration.
     * Structure is documented below.
     * 
     */
    public Optional<StreamSourceConfigMysqlSourceConfig> mysqlSourceConfig() {
        return Optional.ofNullable(this.mysqlSourceConfig);
    }
    /**
     * @return MySQL data source configuration.
     * Structure is documented below.
     * 
     */
    public Optional<StreamSourceConfigOracleSourceConfig> oracleSourceConfig() {
        return Optional.ofNullable(this.oracleSourceConfig);
    }
    /**
     * @return PostgreSQL data source configuration.
     * Structure is documented below.
     * 
     */
    public Optional<StreamSourceConfigPostgresqlSourceConfig> postgresqlSourceConfig() {
        return Optional.ofNullable(this.postgresqlSourceConfig);
    }
    /**
     * @return Source connection profile resource. Format: projects/{project}/locations/{location}/connectionProfiles/{name}
     * 
     */
    public String sourceConnectionProfile() {
        return this.sourceConnectionProfile;
    }

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

    public static Builder builder(StreamSourceConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable StreamSourceConfigMysqlSourceConfig mysqlSourceConfig;
        private @Nullable StreamSourceConfigOracleSourceConfig oracleSourceConfig;
        private @Nullable StreamSourceConfigPostgresqlSourceConfig postgresqlSourceConfig;
        private String sourceConnectionProfile;
        public Builder() {}
        public Builder(StreamSourceConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.mysqlSourceConfig = defaults.mysqlSourceConfig;
    	      this.oracleSourceConfig = defaults.oracleSourceConfig;
    	      this.postgresqlSourceConfig = defaults.postgresqlSourceConfig;
    	      this.sourceConnectionProfile = defaults.sourceConnectionProfile;
        }

        @CustomType.Setter
        public Builder mysqlSourceConfig(@Nullable StreamSourceConfigMysqlSourceConfig mysqlSourceConfig) {
            this.mysqlSourceConfig = mysqlSourceConfig;
            return this;
        }
        @CustomType.Setter
        public Builder oracleSourceConfig(@Nullable StreamSourceConfigOracleSourceConfig oracleSourceConfig) {
            this.oracleSourceConfig = oracleSourceConfig;
            return this;
        }
        @CustomType.Setter
        public Builder postgresqlSourceConfig(@Nullable StreamSourceConfigPostgresqlSourceConfig postgresqlSourceConfig) {
            this.postgresqlSourceConfig = postgresqlSourceConfig;
            return this;
        }
        @CustomType.Setter
        public Builder sourceConnectionProfile(String sourceConnectionProfile) {
            this.sourceConnectionProfile = Objects.requireNonNull(sourceConnectionProfile);
            return this;
        }
        public StreamSourceConfig build() {
            final var o = new StreamSourceConfig();
            o.mysqlSourceConfig = mysqlSourceConfig;
            o.oracleSourceConfig = oracleSourceConfig;
            o.postgresqlSourceConfig = postgresqlSourceConfig;
            o.sourceConnectionProfile = sourceConnectionProfile;
            return o;
        }
    }
}
