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

com.pulumi.kubernetes.meta.v1.inputs.ConditionArgs 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.meta.v1.inputs;

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


/**
 * Condition contains details for one aspect of the current state of this API Resource.
 * 
 */
public final class ConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ConditionArgs Empty = new ConditionArgs();

    /**
     * lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
     * 
     */
    @Import(name="lastTransitionTime", required=true)
    private Output lastTransitionTime;

    /**
     * @return lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
     * 
     */
    public Output lastTransitionTime() {
        return this.lastTransitionTime;
    }

    /**
     * message is a human readable message indicating details about the transition. This may be an empty string.
     * 
     */
    @Import(name="message", required=true)
    private Output message;

    /**
     * @return message is a human readable message indicating details about the transition. This may be an empty string.
     * 
     */
    public Output message() {
        return this.message;
    }

    /**
     * observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
     * 
     */
    @Import(name="observedGeneration")
    private @Nullable Output observedGeneration;

    /**
     * @return observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
     * 
     */
    public Optional> observedGeneration() {
        return Optional.ofNullable(this.observedGeneration);
    }

    /**
     * reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
     * 
     */
    @Import(name="reason", required=true)
    private Output reason;

    /**
     * @return reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
     * 
     */
    public Output reason() {
        return this.reason;
    }

    /**
     * status of the condition, one of True, False, Unknown.
     * 
     */
    @Import(name="status", required=true)
    private Output status;

    /**
     * @return status of the condition, one of True, False, Unknown.
     * 
     */
    public Output status() {
        return this.status;
    }

    /**
     * type of condition in CamelCase or in foo.example.com/CamelCase.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return type of condition in CamelCase or in foo.example.com/CamelCase.
     * 
     */
    public Output type() {
        return this.type;
    }

    private ConditionArgs() {}

    private ConditionArgs(ConditionArgs $) {
        this.lastTransitionTime = $.lastTransitionTime;
        this.message = $.message;
        this.observedGeneration = $.observedGeneration;
        this.reason = $.reason;
        this.status = $.status;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ConditionArgs $;

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

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

        /**
         * @param lastTransitionTime lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
         * 
         * @return builder
         * 
         */
        public Builder lastTransitionTime(Output lastTransitionTime) {
            $.lastTransitionTime = lastTransitionTime;
            return this;
        }

        /**
         * @param lastTransitionTime lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
         * 
         * @return builder
         * 
         */
        public Builder lastTransitionTime(String lastTransitionTime) {
            return lastTransitionTime(Output.of(lastTransitionTime));
        }

        /**
         * @param message message is a human readable message indicating details about the transition. This may be an empty string.
         * 
         * @return builder
         * 
         */
        public Builder message(Output message) {
            $.message = message;
            return this;
        }

        /**
         * @param message message is a human readable message indicating details about the transition. This may be an empty string.
         * 
         * @return builder
         * 
         */
        public Builder message(String message) {
            return message(Output.of(message));
        }

        /**
         * @param observedGeneration observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
         * 
         * @return builder
         * 
         */
        public Builder observedGeneration(@Nullable Output observedGeneration) {
            $.observedGeneration = observedGeneration;
            return this;
        }

        /**
         * @param observedGeneration observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
         * 
         * @return builder
         * 
         */
        public Builder observedGeneration(Integer observedGeneration) {
            return observedGeneration(Output.of(observedGeneration));
        }

        /**
         * @param reason reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
         * 
         * @return builder
         * 
         */
        public Builder reason(Output reason) {
            $.reason = reason;
            return this;
        }

        /**
         * @param reason reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
         * 
         * @return builder
         * 
         */
        public Builder reason(String reason) {
            return reason(Output.of(reason));
        }

        /**
         * @param status status of the condition, one of True, False, Unknown.
         * 
         * @return builder
         * 
         */
        public Builder status(Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status status of the condition, one of True, False, Unknown.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param type type of condition in CamelCase or in foo.example.com/CamelCase.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type type of condition in CamelCase or in foo.example.com/CamelCase.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public ConditionArgs build() {
            if ($.lastTransitionTime == null) {
                throw new MissingRequiredPropertyException("ConditionArgs", "lastTransitionTime");
            }
            if ($.message == null) {
                throw new MissingRequiredPropertyException("ConditionArgs", "message");
            }
            if ($.reason == null) {
                throw new MissingRequiredPropertyException("ConditionArgs", "reason");
            }
            if ($.status == null) {
                throw new MissingRequiredPropertyException("ConditionArgs", "status");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("ConditionArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy