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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.dataproc.outputs.MetastoreServiceHiveMetastoreConfigAuxiliaryVersion;
import com.pulumi.gcp.dataproc.outputs.MetastoreServiceHiveMetastoreConfigKerberosConfig;
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 MetastoreServiceHiveMetastoreConfig {
    private @Nullable List<MetastoreServiceHiveMetastoreConfigAuxiliaryVersion> auxiliaryVersions;
    /**
     * @return A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml).
     * The mappings override system defaults (some keys cannot be overridden)
     * 
     */
    private @Nullable Map<String,String> configOverrides;
    private @Nullable String endpointProtocol;
    /**
     * @return Information used to configure the Hive metastore service as a service principal in a Kerberos realm.
     * Structure is documented below.
     * 
     */
    private @Nullable MetastoreServiceHiveMetastoreConfigKerberosConfig kerberosConfig;
    /**
     * @return The Hive metastore schema version.
     * 
     */
    private String version;

    private MetastoreServiceHiveMetastoreConfig() {}
    public List<MetastoreServiceHiveMetastoreConfigAuxiliaryVersion> auxiliaryVersions() {
        return this.auxiliaryVersions == null ? List.of() : this.auxiliaryVersions;
    }
    /**
     * @return A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml).
     * The mappings override system defaults (some keys cannot be overridden)
     * 
     */
    public Map<String,String> configOverrides() {
        return this.configOverrides == null ? Map.of() : this.configOverrides;
    }
    public Optional<String> endpointProtocol() {
        return Optional.ofNullable(this.endpointProtocol);
    }
    /**
     * @return Information used to configure the Hive metastore service as a service principal in a Kerberos realm.
     * Structure is documented below.
     * 
     */
    public Optional<MetastoreServiceHiveMetastoreConfigKerberosConfig> kerberosConfig() {
        return Optional.ofNullable(this.kerberosConfig);
    }
    /**
     * @return The Hive metastore schema version.
     * 
     */
    public String version() {
        return this.version;
    }

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

    public static Builder builder(MetastoreServiceHiveMetastoreConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<MetastoreServiceHiveMetastoreConfigAuxiliaryVersion> auxiliaryVersions;
        private @Nullable Map<String,String> configOverrides;
        private @Nullable String endpointProtocol;
        private @Nullable MetastoreServiceHiveMetastoreConfigKerberosConfig kerberosConfig;
        private String version;
        public Builder() {}
        public Builder(MetastoreServiceHiveMetastoreConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.auxiliaryVersions = defaults.auxiliaryVersions;
    	      this.configOverrides = defaults.configOverrides;
    	      this.endpointProtocol = defaults.endpointProtocol;
    	      this.kerberosConfig = defaults.kerberosConfig;
    	      this.version = defaults.version;
        }

        @CustomType.Setter
        public Builder auxiliaryVersions(@Nullable List<MetastoreServiceHiveMetastoreConfigAuxiliaryVersion> auxiliaryVersions) {
            this.auxiliaryVersions = auxiliaryVersions;
            return this;
        }
        public Builder auxiliaryVersions(MetastoreServiceHiveMetastoreConfigAuxiliaryVersion... auxiliaryVersions) {
            return auxiliaryVersions(List.of(auxiliaryVersions));
        }
        @CustomType.Setter
        public Builder configOverrides(@Nullable Map<String,String> configOverrides) {
            this.configOverrides = configOverrides;
            return this;
        }
        @CustomType.Setter
        public Builder endpointProtocol(@Nullable String endpointProtocol) {
            this.endpointProtocol = endpointProtocol;
            return this;
        }
        @CustomType.Setter
        public Builder kerberosConfig(@Nullable MetastoreServiceHiveMetastoreConfigKerberosConfig kerberosConfig) {
            this.kerberosConfig = kerberosConfig;
            return this;
        }
        @CustomType.Setter
        public Builder version(String version) {
            this.version = Objects.requireNonNull(version);
            return this;
        }
        public MetastoreServiceHiveMetastoreConfig build() {
            final var o = new MetastoreServiceHiveMetastoreConfig();
            o.auxiliaryVersions = auxiliaryVersions;
            o.configOverrides = configOverrides;
            o.endpointProtocol = endpointProtocol;
            o.kerberosConfig = kerberosConfig;
            o.version = version;
            return o;
        }
    }
}
