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

com.pulumi.kubernetes.batch.v1.outputs.SuccessPolicy 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.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.batch.v1.outputs.SuccessPolicyRule;
import java.util.List;
import java.util.Objects;

@CustomType
public final class SuccessPolicy {
    /**
     * @return rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
     * 
     */
    private List rules;

    private SuccessPolicy() {}
    /**
     * @return rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
     * 
     */
    public List rules() {
        return this.rules;
    }

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

    public static Builder builder(SuccessPolicy defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List rules;
        public Builder() {}
        public Builder(SuccessPolicy defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.rules = defaults.rules;
        }

        @CustomType.Setter
        public Builder rules(List rules) {
            if (rules == null) {
              throw new MissingRequiredPropertyException("SuccessPolicy", "rules");
            }
            this.rules = rules;
            return this;
        }
        public Builder rules(SuccessPolicyRule... rules) {
            return rules(List.of(rules));
        }
        public SuccessPolicy build() {
            final var _resultValue = new SuccessPolicy();
            _resultValue.rules = rules;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy