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

com.pulumi.azurenative.web.inputs.TrafficWeightArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.web.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Traffic weight assigned to a revision
 * 
 */
public final class TrafficWeightArgs extends com.pulumi.resources.ResourceArgs {

    public static final TrafficWeightArgs Empty = new TrafficWeightArgs();

    /**
     * Indicates that the traffic weight belongs to a latest stable revision
     * 
     */
    @Import(name="latestRevision")
    private @Nullable Output latestRevision;

    /**
     * @return Indicates that the traffic weight belongs to a latest stable revision
     * 
     */
    public Optional> latestRevision() {
        return Optional.ofNullable(this.latestRevision);
    }

    /**
     * Name of a revision
     * 
     */
    @Import(name="revisionName")
    private @Nullable Output revisionName;

    /**
     * @return Name of a revision
     * 
     */
    public Optional> revisionName() {
        return Optional.ofNullable(this.revisionName);
    }

    /**
     * Traffic weight assigned to a revision
     * 
     */
    @Import(name="weight")
    private @Nullable Output weight;

    /**
     * @return Traffic weight assigned to a revision
     * 
     */
    public Optional> weight() {
        return Optional.ofNullable(this.weight);
    }

    private TrafficWeightArgs() {}

    private TrafficWeightArgs(TrafficWeightArgs $) {
        this.latestRevision = $.latestRevision;
        this.revisionName = $.revisionName;
        this.weight = $.weight;
    }

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

    public static final class Builder {
        private TrafficWeightArgs $;

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

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

        /**
         * @param latestRevision Indicates that the traffic weight belongs to a latest stable revision
         * 
         * @return builder
         * 
         */
        public Builder latestRevision(@Nullable Output latestRevision) {
            $.latestRevision = latestRevision;
            return this;
        }

        /**
         * @param latestRevision Indicates that the traffic weight belongs to a latest stable revision
         * 
         * @return builder
         * 
         */
        public Builder latestRevision(Boolean latestRevision) {
            return latestRevision(Output.of(latestRevision));
        }

        /**
         * @param revisionName Name of a revision
         * 
         * @return builder
         * 
         */
        public Builder revisionName(@Nullable Output revisionName) {
            $.revisionName = revisionName;
            return this;
        }

        /**
         * @param revisionName Name of a revision
         * 
         * @return builder
         * 
         */
        public Builder revisionName(String revisionName) {
            return revisionName(Output.of(revisionName));
        }

        /**
         * @param weight Traffic weight assigned to a revision
         * 
         * @return builder
         * 
         */
        public Builder weight(@Nullable Output weight) {
            $.weight = weight;
            return this;
        }

        /**
         * @param weight Traffic weight assigned to a revision
         * 
         * @return builder
         * 
         */
        public Builder weight(Integer weight) {
            return weight(Output.of(weight));
        }

        public TrafficWeightArgs build() {
            $.latestRevision = Codegen.booleanProp("latestRevision").output().arg($.latestRevision).def(false).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy