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

com.pulumi.kubernetes.batch.v1.inputs.SuccessPolicyRulePatchArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.batch.v1.inputs;

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


/**
 * SuccessPolicyRule describes rule for declaring a Job as succeeded. Each rule must have at least one of the "succeededIndexes" or "succeededCount" specified.
 * 
 */
public final class SuccessPolicyRulePatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final SuccessPolicyRulePatchArgs Empty = new SuccessPolicyRulePatchArgs();

    /**
     * succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is "1-4", succeededCount is "3", and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded because only "1" and "3" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
     * 
     */
    @Import(name="succeededCount")
    private @Nullable Output succeededCount;

    /**
     * @return succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is "1-4", succeededCount is "3", and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded because only "1" and "3" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
     * 
     */
    public Optional> succeededCount() {
        return Optional.ofNullable(this.succeededCount);
    }

    /**
     * succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to ".spec.completions-1" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". When this field is null, this field doesn't default to any value and is never evaluated at any time.
     * 
     */
    @Import(name="succeededIndexes")
    private @Nullable Output succeededIndexes;

    /**
     * @return succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to ".spec.completions-1" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". When this field is null, this field doesn't default to any value and is never evaluated at any time.
     * 
     */
    public Optional> succeededIndexes() {
        return Optional.ofNullable(this.succeededIndexes);
    }

    private SuccessPolicyRulePatchArgs() {}

    private SuccessPolicyRulePatchArgs(SuccessPolicyRulePatchArgs $) {
        this.succeededCount = $.succeededCount;
        this.succeededIndexes = $.succeededIndexes;
    }

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

    public static final class Builder {
        private SuccessPolicyRulePatchArgs $;

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

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

        /**
         * @param succeededCount succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is "1-4", succeededCount is "3", and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded because only "1" and "3" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
         * 
         * @return builder
         * 
         */
        public Builder succeededCount(@Nullable Output succeededCount) {
            $.succeededCount = succeededCount;
            return this;
        }

        /**
         * @param succeededCount succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is "1-4", succeededCount is "3", and completed indexes are "1", "3", and "5", the Job isn't declared as succeeded because only "1" and "3" indexes are considered in that rules. When this field is null, this doesn't default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
         * 
         * @return builder
         * 
         */
        public Builder succeededCount(Integer succeededCount) {
            return succeededCount(Output.of(succeededCount));
        }

        /**
         * @param succeededIndexes succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to ".spec.completions-1" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". When this field is null, this field doesn't default to any value and is never evaluated at any time.
         * 
         * @return builder
         * 
         */
        public Builder succeededIndexes(@Nullable Output succeededIndexes) {
            $.succeededIndexes = succeededIndexes;
            return this;
        }

        /**
         * @param succeededIndexes succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. The list of indexes must be within 0 to ".spec.completions-1" and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as "1,3-5,7". When this field is null, this field doesn't default to any value and is never evaluated at any time.
         * 
         * @return builder
         * 
         */
        public Builder succeededIndexes(String succeededIndexes) {
            return succeededIndexes(Output.of(succeededIndexes));
        }

        public SuccessPolicyRulePatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy