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

com.pulumi.kubernetes.coordination.v1.inputs.LeaseSpecPatchArgs 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.coordination.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;


/**
 * LeaseSpec is a specification of a Lease.
 * 
 */
public final class LeaseSpecPatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final LeaseSpecPatchArgs Empty = new LeaseSpecPatchArgs();

    /**
     * acquireTime is a time when the current lease was acquired.
     * 
     */
    @Import(name="acquireTime")
    private @Nullable Output acquireTime;

    /**
     * @return acquireTime is a time when the current lease was acquired.
     * 
     */
    public Optional> acquireTime() {
        return Optional.ofNullable(this.acquireTime);
    }

    /**
     * holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
     * 
     */
    @Import(name="holderIdentity")
    private @Nullable Output holderIdentity;

    /**
     * @return holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
     * 
     */
    public Optional> holderIdentity() {
        return Optional.ofNullable(this.holderIdentity);
    }

    /**
     * leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
     * 
     */
    @Import(name="leaseDurationSeconds")
    private @Nullable Output leaseDurationSeconds;

    /**
     * @return leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
     * 
     */
    public Optional> leaseDurationSeconds() {
        return Optional.ofNullable(this.leaseDurationSeconds);
    }

    /**
     * leaseTransitions is the number of transitions of a lease between holders.
     * 
     */
    @Import(name="leaseTransitions")
    private @Nullable Output leaseTransitions;

    /**
     * @return leaseTransitions is the number of transitions of a lease between holders.
     * 
     */
    public Optional> leaseTransitions() {
        return Optional.ofNullable(this.leaseTransitions);
    }

    /**
     * PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
     * 
     */
    @Import(name="preferredHolder")
    private @Nullable Output preferredHolder;

    /**
     * @return PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
     * 
     */
    public Optional> preferredHolder() {
        return Optional.ofNullable(this.preferredHolder);
    }

    /**
     * renewTime is a time when the current holder of a lease has last updated the lease.
     * 
     */
    @Import(name="renewTime")
    private @Nullable Output renewTime;

    /**
     * @return renewTime is a time when the current holder of a lease has last updated the lease.
     * 
     */
    public Optional> renewTime() {
        return Optional.ofNullable(this.renewTime);
    }

    /**
     * Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
     * 
     */
    @Import(name="strategy")
    private @Nullable Output strategy;

    /**
     * @return Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
     * 
     */
    public Optional> strategy() {
        return Optional.ofNullable(this.strategy);
    }

    private LeaseSpecPatchArgs() {}

    private LeaseSpecPatchArgs(LeaseSpecPatchArgs $) {
        this.acquireTime = $.acquireTime;
        this.holderIdentity = $.holderIdentity;
        this.leaseDurationSeconds = $.leaseDurationSeconds;
        this.leaseTransitions = $.leaseTransitions;
        this.preferredHolder = $.preferredHolder;
        this.renewTime = $.renewTime;
        this.strategy = $.strategy;
    }

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

    public static final class Builder {
        private LeaseSpecPatchArgs $;

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

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

        /**
         * @param acquireTime acquireTime is a time when the current lease was acquired.
         * 
         * @return builder
         * 
         */
        public Builder acquireTime(@Nullable Output acquireTime) {
            $.acquireTime = acquireTime;
            return this;
        }

        /**
         * @param acquireTime acquireTime is a time when the current lease was acquired.
         * 
         * @return builder
         * 
         */
        public Builder acquireTime(String acquireTime) {
            return acquireTime(Output.of(acquireTime));
        }

        /**
         * @param holderIdentity holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
         * 
         * @return builder
         * 
         */
        public Builder holderIdentity(@Nullable Output holderIdentity) {
            $.holderIdentity = holderIdentity;
            return this;
        }

        /**
         * @param holderIdentity holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
         * 
         * @return builder
         * 
         */
        public Builder holderIdentity(String holderIdentity) {
            return holderIdentity(Output.of(holderIdentity));
        }

        /**
         * @param leaseDurationSeconds leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
         * 
         * @return builder
         * 
         */
        public Builder leaseDurationSeconds(@Nullable Output leaseDurationSeconds) {
            $.leaseDurationSeconds = leaseDurationSeconds;
            return this;
        }

        /**
         * @param leaseDurationSeconds leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
         * 
         * @return builder
         * 
         */
        public Builder leaseDurationSeconds(Integer leaseDurationSeconds) {
            return leaseDurationSeconds(Output.of(leaseDurationSeconds));
        }

        /**
         * @param leaseTransitions leaseTransitions is the number of transitions of a lease between holders.
         * 
         * @return builder
         * 
         */
        public Builder leaseTransitions(@Nullable Output leaseTransitions) {
            $.leaseTransitions = leaseTransitions;
            return this;
        }

        /**
         * @param leaseTransitions leaseTransitions is the number of transitions of a lease between holders.
         * 
         * @return builder
         * 
         */
        public Builder leaseTransitions(Integer leaseTransitions) {
            return leaseTransitions(Output.of(leaseTransitions));
        }

        /**
         * @param preferredHolder PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
         * 
         * @return builder
         * 
         */
        public Builder preferredHolder(@Nullable Output preferredHolder) {
            $.preferredHolder = preferredHolder;
            return this;
        }

        /**
         * @param preferredHolder PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
         * 
         * @return builder
         * 
         */
        public Builder preferredHolder(String preferredHolder) {
            return preferredHolder(Output.of(preferredHolder));
        }

        /**
         * @param renewTime renewTime is a time when the current holder of a lease has last updated the lease.
         * 
         * @return builder
         * 
         */
        public Builder renewTime(@Nullable Output renewTime) {
            $.renewTime = renewTime;
            return this;
        }

        /**
         * @param renewTime renewTime is a time when the current holder of a lease has last updated the lease.
         * 
         * @return builder
         * 
         */
        public Builder renewTime(String renewTime) {
            return renewTime(Output.of(renewTime));
        }

        /**
         * @param strategy Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
         * 
         * @return builder
         * 
         */
        public Builder strategy(@Nullable Output strategy) {
            $.strategy = strategy;
            return this;
        }

        /**
         * @param strategy Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
         * 
         * @return builder
         * 
         */
        public Builder strategy(String strategy) {
            return strategy(Output.of(strategy));
        }

        public LeaseSpecPatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy