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

import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyCookiesConfigArgs;
import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyHeadersConfigArgs;
import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyQueryStringsConfigArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class OriginRequestPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final OriginRequestPolicyArgs Empty = new OriginRequestPolicyArgs();

    /**
     * Comment to describe the origin request policy.
     * 
     */
    @Import(name="comment")
    private @Nullable Output<String> comment;

    /**
     * @return Comment to describe the origin request policy.
     * 
     */
    public Optional<Output<String>> comment() {
        return Optional.ofNullable(this.comment);
    }

    /**
     * Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     * 
     */
    @Import(name="cookiesConfig", required=true)
    private Output<OriginRequestPolicyCookiesConfigArgs> cookiesConfig;

    /**
     * @return Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     * 
     */
    public Output<OriginRequestPolicyCookiesConfigArgs> cookiesConfig() {
        return this.cookiesConfig;
    }

    /**
     * Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     * 
     */
    @Import(name="headersConfig", required=true)
    private Output<OriginRequestPolicyHeadersConfigArgs> headersConfig;

    /**
     * @return Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     * 
     */
    public Output<OriginRequestPolicyHeadersConfigArgs> headersConfig() {
        return this.headersConfig;
    }

    /**
     * Unique name to identify the origin request policy.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Unique name to identify the origin request policy.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
     * 
     */
    @Import(name="queryStringsConfig", required=true)
    private Output<OriginRequestPolicyQueryStringsConfigArgs> queryStringsConfig;

    /**
     * @return Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
     * 
     */
    public Output<OriginRequestPolicyQueryStringsConfigArgs> queryStringsConfig() {
        return this.queryStringsConfig;
    }

    private OriginRequestPolicyArgs() {}

    private OriginRequestPolicyArgs(OriginRequestPolicyArgs $) {
        this.comment = $.comment;
        this.cookiesConfig = $.cookiesConfig;
        this.headersConfig = $.headersConfig;
        this.name = $.name;
        this.queryStringsConfig = $.queryStringsConfig;
    }

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

    public static final class Builder {
        private OriginRequestPolicyArgs $;

        public Builder() {
            $ = new OriginRequestPolicyArgs();
        }

        public Builder(OriginRequestPolicyArgs defaults) {
            $ = new OriginRequestPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param comment Comment to describe the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder comment(@Nullable Output<String> comment) {
            $.comment = comment;
            return this;
        }

        /**
         * @param comment Comment to describe the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder comment(String comment) {
            return comment(Output.of(comment));
        }

        /**
         * @param cookiesConfig Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder cookiesConfig(Output<OriginRequestPolicyCookiesConfigArgs> cookiesConfig) {
            $.cookiesConfig = cookiesConfig;
            return this;
        }

        /**
         * @param cookiesConfig Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder cookiesConfig(OriginRequestPolicyCookiesConfigArgs cookiesConfig) {
            return cookiesConfig(Output.of(cookiesConfig));
        }

        /**
         * @param headersConfig Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder headersConfig(Output<OriginRequestPolicyHeadersConfigArgs> headersConfig) {
            $.headersConfig = headersConfig;
            return this;
        }

        /**
         * @param headersConfig Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder headersConfig(OriginRequestPolicyHeadersConfigArgs headersConfig) {
            return headersConfig(Output.of(headersConfig));
        }

        /**
         * @param name Unique name to identify the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Unique name to identify the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param queryStringsConfig Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder queryStringsConfig(Output<OriginRequestPolicyQueryStringsConfigArgs> queryStringsConfig) {
            $.queryStringsConfig = queryStringsConfig;
            return this;
        }

        /**
         * @param queryStringsConfig Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder queryStringsConfig(OriginRequestPolicyQueryStringsConfigArgs queryStringsConfig) {
            return queryStringsConfig(Output.of(queryStringsConfig));
        }

        public OriginRequestPolicyArgs build() {
            $.cookiesConfig = Objects.requireNonNull($.cookiesConfig, "expected parameter 'cookiesConfig' to be non-null");
            $.headersConfig = Objects.requireNonNull($.headersConfig, "expected parameter 'headersConfig' to be non-null");
            $.queryStringsConfig = Objects.requireNonNull($.queryStringsConfig, "expected parameter 'queryStringsConfig' to be non-null");
            return $;
        }
    }

}
