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

import com.pulumi.aws.quicksight.outputs.TemplateSourceEntitySourceAnalysis;
import com.pulumi.aws.quicksight.outputs.TemplateSourceEntitySourceTemplate;
import com.pulumi.core.annotations.CustomType;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TemplateSourceEntity {
    /**
     * @return The source analysis, if it is based on an analysis.. Only one of `source_analysis` or `source_template` should be configured. See source_analysis.
     * 
     */
    private @Nullable TemplateSourceEntitySourceAnalysis sourceAnalysis;
    /**
     * @return The source template, if it is based on an template.. Only one of `source_analysis` or `source_template` should be configured. See source_template.
     * 
     */
    private @Nullable TemplateSourceEntitySourceTemplate sourceTemplate;

    private TemplateSourceEntity() {}
    /**
     * @return The source analysis, if it is based on an analysis.. Only one of `source_analysis` or `source_template` should be configured. See source_analysis.
     * 
     */
    public Optional<TemplateSourceEntitySourceAnalysis> sourceAnalysis() {
        return Optional.ofNullable(this.sourceAnalysis);
    }
    /**
     * @return The source template, if it is based on an template.. Only one of `source_analysis` or `source_template` should be configured. See source_template.
     * 
     */
    public Optional<TemplateSourceEntitySourceTemplate> sourceTemplate() {
        return Optional.ofNullable(this.sourceTemplate);
    }

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

    public static Builder builder(TemplateSourceEntity defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable TemplateSourceEntitySourceAnalysis sourceAnalysis;
        private @Nullable TemplateSourceEntitySourceTemplate sourceTemplate;
        public Builder() {}
        public Builder(TemplateSourceEntity defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.sourceAnalysis = defaults.sourceAnalysis;
    	      this.sourceTemplate = defaults.sourceTemplate;
        }

        @CustomType.Setter
        public Builder sourceAnalysis(@Nullable TemplateSourceEntitySourceAnalysis sourceAnalysis) {
            this.sourceAnalysis = sourceAnalysis;
            return this;
        }
        @CustomType.Setter
        public Builder sourceTemplate(@Nullable TemplateSourceEntitySourceTemplate sourceTemplate) {
            this.sourceTemplate = sourceTemplate;
            return this;
        }
        public TemplateSourceEntity build() {
            final var o = new TemplateSourceEntity();
            o.sourceAnalysis = sourceAnalysis;
            o.sourceTemplate = sourceTemplate;
            return o;
        }
    }
}
