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

com.pulumi.gitlab.inputs.ProjectAccessTokenRotationConfigurationArgs Maven / Gradle / Ivy

The 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.gitlab.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.util.Objects;


public final class ProjectAccessTokenRotationConfigurationArgs extends com.pulumi.resources.ResourceArgs {

    public static final ProjectAccessTokenRotationConfigurationArgs Empty = new ProjectAccessTokenRotationConfigurationArgs();

    /**
     * The duration (in days) the new token should be valid for.
     * 
     */
    @Import(name="expirationDays", required=true)
    private Output expirationDays;

    /**
     * @return The duration (in days) the new token should be valid for.
     * 
     */
    public Output expirationDays() {
        return this.expirationDays;
    }

    /**
     * The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `pulumi up` is run in that timeframe.
     * 
     */
    @Import(name="rotateBeforeDays", required=true)
    private Output rotateBeforeDays;

    /**
     * @return The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `pulumi up` is run in that timeframe.
     * 
     */
    public Output rotateBeforeDays() {
        return this.rotateBeforeDays;
    }

    private ProjectAccessTokenRotationConfigurationArgs() {}

    private ProjectAccessTokenRotationConfigurationArgs(ProjectAccessTokenRotationConfigurationArgs $) {
        this.expirationDays = $.expirationDays;
        this.rotateBeforeDays = $.rotateBeforeDays;
    }

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

    public static final class Builder {
        private ProjectAccessTokenRotationConfigurationArgs $;

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

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

        /**
         * @param expirationDays The duration (in days) the new token should be valid for.
         * 
         * @return builder
         * 
         */
        public Builder expirationDays(Output expirationDays) {
            $.expirationDays = expirationDays;
            return this;
        }

        /**
         * @param expirationDays The duration (in days) the new token should be valid for.
         * 
         * @return builder
         * 
         */
        public Builder expirationDays(Integer expirationDays) {
            return expirationDays(Output.of(expirationDays));
        }

        /**
         * @param rotateBeforeDays The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `pulumi up` is run in that timeframe.
         * 
         * @return builder
         * 
         */
        public Builder rotateBeforeDays(Output rotateBeforeDays) {
            $.rotateBeforeDays = rotateBeforeDays;
            return this;
        }

        /**
         * @param rotateBeforeDays The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `pulumi up` is run in that timeframe.
         * 
         * @return builder
         * 
         */
        public Builder rotateBeforeDays(Integer rotateBeforeDays) {
            return rotateBeforeDays(Output.of(rotateBeforeDays));
        }

        public ProjectAccessTokenRotationConfigurationArgs build() {
            if ($.expirationDays == null) {
                throw new MissingRequiredPropertyException("ProjectAccessTokenRotationConfigurationArgs", "expirationDays");
            }
            if ($.rotateBeforeDays == null) {
                throw new MissingRequiredPropertyException("ProjectAccessTokenRotationConfigurationArgs", "rotateBeforeDays");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy