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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.datacatalog.outputs.TagTemplateFieldTypeEnumType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TagTemplateFieldType {
    /**
     * @return Represents an enum type.
     * Exactly one of `primitive_type` or `enum_type` must be set
     * Structure is documented below.
     * 
     */
    private @Nullable TagTemplateFieldTypeEnumType enumType;
    /**
     * @return Represents primitive types - string, bool etc.
     * Exactly one of `primitive_type` or `enum_type` must be set
     * Possible values are: `DOUBLE`, `STRING`, `BOOL`, `TIMESTAMP`.
     * 
     */
    private @Nullable String primitiveType;

    private TagTemplateFieldType() {}
    /**
     * @return Represents an enum type.
     * Exactly one of `primitive_type` or `enum_type` must be set
     * Structure is documented below.
     * 
     */
    public Optional<TagTemplateFieldTypeEnumType> enumType() {
        return Optional.ofNullable(this.enumType);
    }
    /**
     * @return Represents primitive types - string, bool etc.
     * Exactly one of `primitive_type` or `enum_type` must be set
     * Possible values are: `DOUBLE`, `STRING`, `BOOL`, `TIMESTAMP`.
     * 
     */
    public Optional<String> primitiveType() {
        return Optional.ofNullable(this.primitiveType);
    }

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

    public static Builder builder(TagTemplateFieldType defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable TagTemplateFieldTypeEnumType enumType;
        private @Nullable String primitiveType;
        public Builder() {}
        public Builder(TagTemplateFieldType defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.enumType = defaults.enumType;
    	      this.primitiveType = defaults.primitiveType;
        }

        @CustomType.Setter
        public Builder enumType(@Nullable TagTemplateFieldTypeEnumType enumType) {
            this.enumType = enumType;
            return this;
        }
        @CustomType.Setter
        public Builder primitiveType(@Nullable String primitiveType) {
            this.primitiveType = primitiveType;
            return this;
        }
        public TagTemplateFieldType build() {
            final var o = new TagTemplateFieldType();
            o.enumType = enumType;
            o.primitiveType = primitiveType;
            return o;
        }
    }
}
