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

com.pulumi.kubernetes.storage.v1beta1.outputs.TokenRequest 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.storage.v1beta1.outputs;

import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class TokenRequest {
    /**
     * @return Audience is the intended audience of the token in "TokenRequestSpec". It will default to the audiences of kube apiserver.
     * 
     */
    private String audience;
    /**
     * @return ExpirationSeconds is the duration of validity of the token in "TokenRequestSpec". It has the same default value of "ExpirationSeconds" in "TokenRequestSpec"
     * 
     */
    private @Nullable Integer expirationSeconds;

    private TokenRequest() {}
    /**
     * @return Audience is the intended audience of the token in "TokenRequestSpec". It will default to the audiences of kube apiserver.
     * 
     */
    public String audience() {
        return this.audience;
    }
    /**
     * @return ExpirationSeconds is the duration of validity of the token in "TokenRequestSpec". It has the same default value of "ExpirationSeconds" in "TokenRequestSpec"
     * 
     */
    public Optional expirationSeconds() {
        return Optional.ofNullable(this.expirationSeconds);
    }

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

    public static Builder builder(TokenRequest defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String audience;
        private @Nullable Integer expirationSeconds;
        public Builder() {}
        public Builder(TokenRequest defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.audience = defaults.audience;
    	      this.expirationSeconds = defaults.expirationSeconds;
        }

        @CustomType.Setter
        public Builder audience(String audience) {
            if (audience == null) {
              throw new MissingRequiredPropertyException("TokenRequest", "audience");
            }
            this.audience = audience;
            return this;
        }
        @CustomType.Setter
        public Builder expirationSeconds(@Nullable Integer expirationSeconds) {

            this.expirationSeconds = expirationSeconds;
            return this;
        }
        public TokenRequest build() {
            final var _resultValue = new TokenRequest();
            _resultValue.audience = audience;
            _resultValue.expirationSeconds = expirationSeconds;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy