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

com.pulumi.docker.inputs.ServiceTaskSpecPlacementArgs Maven / Gradle / Ivy

There is a newer version: 4.7.0-alpha.1705607229+34a07055
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.docker.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.docker.inputs.ServiceTaskSpecPlacementPlatformArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServiceTaskSpecPlacementArgs Empty = new ServiceTaskSpecPlacementArgs();

    /**
     * An array of constraints. e.g.: `node.role==manager`
     * 
     */
    @Import(name="constraints")
    private @Nullable Output> constraints;

    /**
     * @return An array of constraints. e.g.: `node.role==manager`
     * 
     */
    public Optional>> constraints() {
        return Optional.ofNullable(this.constraints);
    }

    /**
     * Maximum number of replicas for per node (default value is `0`, which is unlimited)
     * 
     */
    @Import(name="maxReplicas")
    private @Nullable Output maxReplicas;

    /**
     * @return Maximum number of replicas for per node (default value is `0`, which is unlimited)
     * 
     */
    public Optional> maxReplicas() {
        return Optional.ofNullable(this.maxReplicas);
    }

    /**
     * Platforms stores all the platforms that the service's image can run on
     * 
     */
    @Import(name="platforms")
    private @Nullable Output> platforms;

    /**
     * @return Platforms stores all the platforms that the service's image can run on
     * 
     */
    public Optional>> platforms() {
        return Optional.ofNullable(this.platforms);
    }

    /**
     * Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
     * 
     */
    @Import(name="prefs")
    private @Nullable Output> prefs;

    /**
     * @return Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
     * 
     */
    public Optional>> prefs() {
        return Optional.ofNullable(this.prefs);
    }

    private ServiceTaskSpecPlacementArgs() {}

    private ServiceTaskSpecPlacementArgs(ServiceTaskSpecPlacementArgs $) {
        this.constraints = $.constraints;
        this.maxReplicas = $.maxReplicas;
        this.platforms = $.platforms;
        this.prefs = $.prefs;
    }

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

    public static final class Builder {
        private ServiceTaskSpecPlacementArgs $;

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

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

        /**
         * @param constraints An array of constraints. e.g.: `node.role==manager`
         * 
         * @return builder
         * 
         */
        public Builder constraints(@Nullable Output> constraints) {
            $.constraints = constraints;
            return this;
        }

        /**
         * @param constraints An array of constraints. e.g.: `node.role==manager`
         * 
         * @return builder
         * 
         */
        public Builder constraints(List constraints) {
            return constraints(Output.of(constraints));
        }

        /**
         * @param constraints An array of constraints. e.g.: `node.role==manager`
         * 
         * @return builder
         * 
         */
        public Builder constraints(String... constraints) {
            return constraints(List.of(constraints));
        }

        /**
         * @param maxReplicas Maximum number of replicas for per node (default value is `0`, which is unlimited)
         * 
         * @return builder
         * 
         */
        public Builder maxReplicas(@Nullable Output maxReplicas) {
            $.maxReplicas = maxReplicas;
            return this;
        }

        /**
         * @param maxReplicas Maximum number of replicas for per node (default value is `0`, which is unlimited)
         * 
         * @return builder
         * 
         */
        public Builder maxReplicas(Integer maxReplicas) {
            return maxReplicas(Output.of(maxReplicas));
        }

        /**
         * @param platforms Platforms stores all the platforms that the service's image can run on
         * 
         * @return builder
         * 
         */
        public Builder platforms(@Nullable Output> platforms) {
            $.platforms = platforms;
            return this;
        }

        /**
         * @param platforms Platforms stores all the platforms that the service's image can run on
         * 
         * @return builder
         * 
         */
        public Builder platforms(List platforms) {
            return platforms(Output.of(platforms));
        }

        /**
         * @param platforms Platforms stores all the platforms that the service's image can run on
         * 
         * @return builder
         * 
         */
        public Builder platforms(ServiceTaskSpecPlacementPlatformArgs... platforms) {
            return platforms(List.of(platforms));
        }

        /**
         * @param prefs Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
         * 
         * @return builder
         * 
         */
        public Builder prefs(@Nullable Output> prefs) {
            $.prefs = prefs;
            return this;
        }

        /**
         * @param prefs Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
         * 
         * @return builder
         * 
         */
        public Builder prefs(List prefs) {
            return prefs(Output.of(prefs));
        }

        /**
         * @param prefs Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence, e.g.: `spread=node.role.manager`
         * 
         * @return builder
         * 
         */
        public Builder prefs(String... prefs) {
            return prefs(List.of(prefs));
        }

        public ServiceTaskSpecPlacementArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy