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

import com.pulumi.aws.route53.outputs.GetTrafficPolicyDocumentEndpoint;
import com.pulumi.aws.route53.outputs.GetTrafficPolicyDocumentRule;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GetTrafficPolicyDocumentResult {
    private @Nullable List<GetTrafficPolicyDocumentEndpoint> endpoints;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    /**
     * @return Standard JSON policy document rendered based on the arguments above.
     * 
     */
    private String json;
    private @Nullable String recordType;
    private @Nullable List<GetTrafficPolicyDocumentRule> rules;
    private @Nullable String startEndpoint;
    private @Nullable String startRule;
    private @Nullable String version;

    private GetTrafficPolicyDocumentResult() {}
    public List<GetTrafficPolicyDocumentEndpoint> endpoints() {
        return this.endpoints == null ? List.of() : this.endpoints;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    /**
     * @return Standard JSON policy document rendered based on the arguments above.
     * 
     */
    public String json() {
        return this.json;
    }
    public Optional<String> recordType() {
        return Optional.ofNullable(this.recordType);
    }
    public List<GetTrafficPolicyDocumentRule> rules() {
        return this.rules == null ? List.of() : this.rules;
    }
    public Optional<String> startEndpoint() {
        return Optional.ofNullable(this.startEndpoint);
    }
    public Optional<String> startRule() {
        return Optional.ofNullable(this.startRule);
    }
    public Optional<String> version() {
        return Optional.ofNullable(this.version);
    }

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

    public static Builder builder(GetTrafficPolicyDocumentResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<GetTrafficPolicyDocumentEndpoint> endpoints;
        private String id;
        private String json;
        private @Nullable String recordType;
        private @Nullable List<GetTrafficPolicyDocumentRule> rules;
        private @Nullable String startEndpoint;
        private @Nullable String startRule;
        private @Nullable String version;
        public Builder() {}
        public Builder(GetTrafficPolicyDocumentResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.endpoints = defaults.endpoints;
    	      this.id = defaults.id;
    	      this.json = defaults.json;
    	      this.recordType = defaults.recordType;
    	      this.rules = defaults.rules;
    	      this.startEndpoint = defaults.startEndpoint;
    	      this.startRule = defaults.startRule;
    	      this.version = defaults.version;
        }

        @CustomType.Setter
        public Builder endpoints(@Nullable List<GetTrafficPolicyDocumentEndpoint> endpoints) {
            this.endpoints = endpoints;
            return this;
        }
        public Builder endpoints(GetTrafficPolicyDocumentEndpoint... endpoints) {
            return endpoints(List.of(endpoints));
        }
        @CustomType.Setter
        public Builder id(String id) {
            this.id = Objects.requireNonNull(id);
            return this;
        }
        @CustomType.Setter
        public Builder json(String json) {
            this.json = Objects.requireNonNull(json);
            return this;
        }
        @CustomType.Setter
        public Builder recordType(@Nullable String recordType) {
            this.recordType = recordType;
            return this;
        }
        @CustomType.Setter
        public Builder rules(@Nullable List<GetTrafficPolicyDocumentRule> rules) {
            this.rules = rules;
            return this;
        }
        public Builder rules(GetTrafficPolicyDocumentRule... rules) {
            return rules(List.of(rules));
        }
        @CustomType.Setter
        public Builder startEndpoint(@Nullable String startEndpoint) {
            this.startEndpoint = startEndpoint;
            return this;
        }
        @CustomType.Setter
        public Builder startRule(@Nullable String startRule) {
            this.startRule = startRule;
            return this;
        }
        @CustomType.Setter
        public Builder version(@Nullable String version) {
            this.version = version;
            return this;
        }
        public GetTrafficPolicyDocumentResult build() {
            final var o = new GetTrafficPolicyDocumentResult();
            o.endpoints = endpoints;
            o.id = id;
            o.json = json;
            o.recordType = recordType;
            o.rules = rules;
            o.startEndpoint = startEndpoint;
            o.startRule = startRule;
            o.version = version;
            return o;
        }
    }
}
