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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.dataplex.outputs.DatascanDataProfileResultProfileFieldProfileDoubleProfile;
import com.pulumi.gcp.dataplex.outputs.DatascanDataProfileResultProfileFieldProfileIntegerProfile;
import com.pulumi.gcp.dataplex.outputs.DatascanDataProfileResultProfileFieldProfileStringProfile;
import com.pulumi.gcp.dataplex.outputs.DatascanDataProfileResultProfileFieldProfileTopNValues;
import java.lang.Integer;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class DatascanDataProfileResultProfileFieldProfile {
    /**
     * @return Ratio of rows with distinct values against total scanned rows. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.
     * 
     */
    private @Nullable Integer distinctRatio;
    /**
     * @return (Output)
     * Double type field information.
     * Structure is documented below.
     * 
     */
    private @Nullable List<DatascanDataProfileResultProfileFieldProfileDoubleProfile> doubleProfiles;
    /**
     * @return (Output)
     * Integer type field information.
     * Structure is documented below.
     * 
     */
    private @Nullable List<DatascanDataProfileResultProfileFieldProfileIntegerProfile> integerProfiles;
    /**
     * @return (Output)
     * Ratio of rows with null value against total scanned rows.
     * 
     */
    private @Nullable Integer nullRatio;
    /**
     * @return (Output)
     * String type field information.
     * Structure is documented below.
     * 
     */
    private @Nullable List<DatascanDataProfileResultProfileFieldProfileStringProfile> stringProfiles;
    /**
     * @return The list of top N non-null values and number of times they occur in the scanned data. N is 10 or equal to the number of distinct values in the field, whichever is smaller. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.
     * Structure is documented below.
     * 
     */
    private @Nullable DatascanDataProfileResultProfileFieldProfileTopNValues topNValues;

    private DatascanDataProfileResultProfileFieldProfile() {}
    /**
     * @return Ratio of rows with distinct values against total scanned rows. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.
     * 
     */
    public Optional<Integer> distinctRatio() {
        return Optional.ofNullable(this.distinctRatio);
    }
    /**
     * @return (Output)
     * Double type field information.
     * Structure is documented below.
     * 
     */
    public List<DatascanDataProfileResultProfileFieldProfileDoubleProfile> doubleProfiles() {
        return this.doubleProfiles == null ? List.of() : this.doubleProfiles;
    }
    /**
     * @return (Output)
     * Integer type field information.
     * Structure is documented below.
     * 
     */
    public List<DatascanDataProfileResultProfileFieldProfileIntegerProfile> integerProfiles() {
        return this.integerProfiles == null ? List.of() : this.integerProfiles;
    }
    /**
     * @return (Output)
     * Ratio of rows with null value against total scanned rows.
     * 
     */
    public Optional<Integer> nullRatio() {
        return Optional.ofNullable(this.nullRatio);
    }
    /**
     * @return (Output)
     * String type field information.
     * Structure is documented below.
     * 
     */
    public List<DatascanDataProfileResultProfileFieldProfileStringProfile> stringProfiles() {
        return this.stringProfiles == null ? List.of() : this.stringProfiles;
    }
    /**
     * @return The list of top N non-null values and number of times they occur in the scanned data. N is 10 or equal to the number of distinct values in the field, whichever is smaller. Not available for complex non-groupable field type RECORD and fields with REPEATABLE mode.
     * Structure is documented below.
     * 
     */
    public Optional<DatascanDataProfileResultProfileFieldProfileTopNValues> topNValues() {
        return Optional.ofNullable(this.topNValues);
    }

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

    public static Builder builder(DatascanDataProfileResultProfileFieldProfile defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Integer distinctRatio;
        private @Nullable List<DatascanDataProfileResultProfileFieldProfileDoubleProfile> doubleProfiles;
        private @Nullable List<DatascanDataProfileResultProfileFieldProfileIntegerProfile> integerProfiles;
        private @Nullable Integer nullRatio;
        private @Nullable List<DatascanDataProfileResultProfileFieldProfileStringProfile> stringProfiles;
        private @Nullable DatascanDataProfileResultProfileFieldProfileTopNValues topNValues;
        public Builder() {}
        public Builder(DatascanDataProfileResultProfileFieldProfile defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.distinctRatio = defaults.distinctRatio;
    	      this.doubleProfiles = defaults.doubleProfiles;
    	      this.integerProfiles = defaults.integerProfiles;
    	      this.nullRatio = defaults.nullRatio;
    	      this.stringProfiles = defaults.stringProfiles;
    	      this.topNValues = defaults.topNValues;
        }

        @CustomType.Setter
        public Builder distinctRatio(@Nullable Integer distinctRatio) {
            this.distinctRatio = distinctRatio;
            return this;
        }
        @CustomType.Setter
        public Builder doubleProfiles(@Nullable List<DatascanDataProfileResultProfileFieldProfileDoubleProfile> doubleProfiles) {
            this.doubleProfiles = doubleProfiles;
            return this;
        }
        public Builder doubleProfiles(DatascanDataProfileResultProfileFieldProfileDoubleProfile... doubleProfiles) {
            return doubleProfiles(List.of(doubleProfiles));
        }
        @CustomType.Setter
        public Builder integerProfiles(@Nullable List<DatascanDataProfileResultProfileFieldProfileIntegerProfile> integerProfiles) {
            this.integerProfiles = integerProfiles;
            return this;
        }
        public Builder integerProfiles(DatascanDataProfileResultProfileFieldProfileIntegerProfile... integerProfiles) {
            return integerProfiles(List.of(integerProfiles));
        }
        @CustomType.Setter
        public Builder nullRatio(@Nullable Integer nullRatio) {
            this.nullRatio = nullRatio;
            return this;
        }
        @CustomType.Setter
        public Builder stringProfiles(@Nullable List<DatascanDataProfileResultProfileFieldProfileStringProfile> stringProfiles) {
            this.stringProfiles = stringProfiles;
            return this;
        }
        public Builder stringProfiles(DatascanDataProfileResultProfileFieldProfileStringProfile... stringProfiles) {
            return stringProfiles(List.of(stringProfiles));
        }
        @CustomType.Setter
        public Builder topNValues(@Nullable DatascanDataProfileResultProfileFieldProfileTopNValues topNValues) {
            this.topNValues = topNValues;
            return this;
        }
        public DatascanDataProfileResultProfileFieldProfile build() {
            final var o = new DatascanDataProfileResultProfileFieldProfile();
            o.distinctRatio = distinctRatio;
            o.doubleProfiles = doubleProfiles;
            o.integerProfiles = integerProfiles;
            o.nullRatio = nullRatio;
            o.stringProfiles = stringProfiles;
            o.topNValues = topNValues;
            return o;
        }
    }
}
