All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudfront.outputs.ContinuousDeploymentPolicyTrafficConfig Maven / Gradle / Ivy

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

import com.pulumi.aws.cloudfront.outputs.ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfig;
import com.pulumi.aws.cloudfront.outputs.ContinuousDeploymentPolicyTrafficConfigSingleWeightConfig;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ContinuousDeploymentPolicyTrafficConfig {
    /**
     * @return Determines which HTTP requests are sent to the staging distribution. See `single_header_config`.
     * 
     */
    private @Nullable ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfig singleHeaderConfig;
    /**
     * @return Contains the percentage of traffic to send to the staging distribution. See `single_weight_config`.
     * 
     */
    private @Nullable ContinuousDeploymentPolicyTrafficConfigSingleWeightConfig singleWeightConfig;
    /**
     * @return Type of traffic configuration. Valid values are `SingleWeight` and `SingleHeader`.
     * 
     */
    private String type;

    private ContinuousDeploymentPolicyTrafficConfig() {}
    /**
     * @return Determines which HTTP requests are sent to the staging distribution. See `single_header_config`.
     * 
     */
    public Optional singleHeaderConfig() {
        return Optional.ofNullable(this.singleHeaderConfig);
    }
    /**
     * @return Contains the percentage of traffic to send to the staging distribution. See `single_weight_config`.
     * 
     */
    public Optional singleWeightConfig() {
        return Optional.ofNullable(this.singleWeightConfig);
    }
    /**
     * @return Type of traffic configuration. Valid values are `SingleWeight` and `SingleHeader`.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(ContinuousDeploymentPolicyTrafficConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfig singleHeaderConfig;
        private @Nullable ContinuousDeploymentPolicyTrafficConfigSingleWeightConfig singleWeightConfig;
        private String type;
        public Builder() {}
        public Builder(ContinuousDeploymentPolicyTrafficConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.singleHeaderConfig = defaults.singleHeaderConfig;
    	      this.singleWeightConfig = defaults.singleWeightConfig;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder singleHeaderConfig(@Nullable ContinuousDeploymentPolicyTrafficConfigSingleHeaderConfig singleHeaderConfig) {

            this.singleHeaderConfig = singleHeaderConfig;
            return this;
        }
        @CustomType.Setter
        public Builder singleWeightConfig(@Nullable ContinuousDeploymentPolicyTrafficConfigSingleWeightConfig singleWeightConfig) {

            this.singleWeightConfig = singleWeightConfig;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            if (type == null) {
              throw new MissingRequiredPropertyException("ContinuousDeploymentPolicyTrafficConfig", "type");
            }
            this.type = type;
            return this;
        }
        public ContinuousDeploymentPolicyTrafficConfig build() {
            final var _resultValue = new ContinuousDeploymentPolicyTrafficConfig();
            _resultValue.singleHeaderConfig = singleHeaderConfig;
            _resultValue.singleWeightConfig = singleWeightConfig;
            _resultValue.type = type;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy