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

com.pulumi.kubernetes.coordination.v1beta1.outputs.LeaseSpec Maven / Gradle / Ivy

There is a newer version: 4.19.0
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.v1beta1.outputs;

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

@CustomType
public final class LeaseSpec {
    /**
     * @return acquireTime is a time when the current lease was acquired.
     * 
     */
    private @Nullable String acquireTime;
    /**
     * @return holderIdentity contains the identity of the holder of a current lease.
     * 
     */
    private @Nullable String holderIdentity;
    /**
     * @return leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
     * 
     */
    private @Nullable Integer leaseDurationSeconds;
    /**
     * @return leaseTransitions is the number of transitions of a lease between holders.
     * 
     */
    private @Nullable Integer leaseTransitions;
    /**
     * @return renewTime is a time when the current holder of a lease has last updated the lease.
     * 
     */
    private @Nullable String renewTime;

    private LeaseSpec() {}
    /**
     * @return acquireTime is a time when the current lease was acquired.
     * 
     */
    public Optional acquireTime() {
        return Optional.ofNullable(this.acquireTime);
    }
    /**
     * @return holderIdentity contains the identity of the holder of a current lease.
     * 
     */
    public Optional holderIdentity() {
        return Optional.ofNullable(this.holderIdentity);
    }
    /**
     * @return leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
     * 
     */
    public Optional leaseDurationSeconds() {
        return Optional.ofNullable(this.leaseDurationSeconds);
    }
    /**
     * @return leaseTransitions is the number of transitions of a lease between holders.
     * 
     */
    public Optional leaseTransitions() {
        return Optional.ofNullable(this.leaseTransitions);
    }
    /**
     * @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);
    }

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

    public static Builder builder(LeaseSpec defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String acquireTime;
        private @Nullable String holderIdentity;
        private @Nullable Integer leaseDurationSeconds;
        private @Nullable Integer leaseTransitions;
        private @Nullable String renewTime;
        public Builder() {}
        public Builder(LeaseSpec defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.acquireTime = defaults.acquireTime;
    	      this.holderIdentity = defaults.holderIdentity;
    	      this.leaseDurationSeconds = defaults.leaseDurationSeconds;
    	      this.leaseTransitions = defaults.leaseTransitions;
    	      this.renewTime = defaults.renewTime;
        }

        @CustomType.Setter
        public Builder acquireTime(@Nullable String acquireTime) {

            this.acquireTime = acquireTime;
            return this;
        }
        @CustomType.Setter
        public Builder holderIdentity(@Nullable String holderIdentity) {

            this.holderIdentity = holderIdentity;
            return this;
        }
        @CustomType.Setter
        public Builder leaseDurationSeconds(@Nullable Integer leaseDurationSeconds) {

            this.leaseDurationSeconds = leaseDurationSeconds;
            return this;
        }
        @CustomType.Setter
        public Builder leaseTransitions(@Nullable Integer leaseTransitions) {

            this.leaseTransitions = leaseTransitions;
            return this;
        }
        @CustomType.Setter
        public Builder renewTime(@Nullable String renewTime) {

            this.renewTime = renewTime;
            return this;
        }
        public LeaseSpec build() {
            final var _resultValue = new LeaseSpec();
            _resultValue.acquireTime = acquireTime;
            _resultValue.holderIdentity = holderIdentity;
            _resultValue.leaseDurationSeconds = leaseDurationSeconds;
            _resultValue.leaseTransitions = leaseTransitions;
            _resultValue.renewTime = renewTime;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy