// *** 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.ConnectionProfileMysqlProfileSslConfig;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ConnectionProfileMysqlProfile {
    /**
     * @return Hostname for the MySQL connection.
     * 
     */
    private String hostname;
    /**
     * @return Password for the MySQL connection.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     * 
     */
    private String password;
    /**
     * @return Port for the MySQL connection.
     * 
     */
    private @Nullable Integer port;
    /**
     * @return SSL configuration for the MySQL connection.
     * Structure is documented below.
     * 
     */
    private @Nullable ConnectionProfileMysqlProfileSslConfig sslConfig;
    /**
     * @return Username for the MySQL connection.
     * 
     */
    private String username;

    private ConnectionProfileMysqlProfile() {}
    /**
     * @return Hostname for the MySQL connection.
     * 
     */
    public String hostname() {
        return this.hostname;
    }
    /**
     * @return Password for the MySQL connection.
     * **Note**: This property is sensitive and will not be displayed in the plan.
     * 
     */
    public String password() {
        return this.password;
    }
    /**
     * @return Port for the MySQL connection.
     * 
     */
    public Optional<Integer> port() {
        return Optional.ofNullable(this.port);
    }
    /**
     * @return SSL configuration for the MySQL connection.
     * Structure is documented below.
     * 
     */
    public Optional<ConnectionProfileMysqlProfileSslConfig> sslConfig() {
        return Optional.ofNullable(this.sslConfig);
    }
    /**
     * @return Username for the MySQL connection.
     * 
     */
    public String username() {
        return this.username;
    }

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

    public static Builder builder(ConnectionProfileMysqlProfile defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String hostname;
        private String password;
        private @Nullable Integer port;
        private @Nullable ConnectionProfileMysqlProfileSslConfig sslConfig;
        private String username;
        public Builder() {}
        public Builder(ConnectionProfileMysqlProfile defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.hostname = defaults.hostname;
    	      this.password = defaults.password;
    	      this.port = defaults.port;
    	      this.sslConfig = defaults.sslConfig;
    	      this.username = defaults.username;
        }

        @CustomType.Setter
        public Builder hostname(String hostname) {
            this.hostname = Objects.requireNonNull(hostname);
            return this;
        }
        @CustomType.Setter
        public Builder password(String password) {
            this.password = Objects.requireNonNull(password);
            return this;
        }
        @CustomType.Setter
        public Builder port(@Nullable Integer port) {
            this.port = port;
            return this;
        }
        @CustomType.Setter
        public Builder sslConfig(@Nullable ConnectionProfileMysqlProfileSslConfig sslConfig) {
            this.sslConfig = sslConfig;
            return this;
        }
        @CustomType.Setter
        public Builder username(String username) {
            this.username = Objects.requireNonNull(username);
            return this;
        }
        public ConnectionProfileMysqlProfile build() {
            final var o = new ConnectionProfileMysqlProfile();
            o.hostname = hostname;
            o.password = password;
            o.port = port;
            o.sslConfig = sslConfig;
            o.username = username;
            return o;
        }
    }
}
