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

com.pulumi.gitlab.DeployTokenArgs Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha.1732772606
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.gitlab;

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


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

    public static final DeployTokenArgs Empty = new DeployTokenArgs();

    /**
     * Time the token will expire it, RFC3339 format. Will not expire per default.
     * 
     */
    @Import(name="expiresAt")
    private @Nullable Output expiresAt;

    /**
     * @return Time the token will expire it, RFC3339 format. Will not expire per default.
     * 
     */
    public Optional> expiresAt() {
        return Optional.ofNullable(this.expiresAt);
    }

    /**
     * The name or id of the group to add the deploy token to.
     * 
     */
    @Import(name="group")
    private @Nullable Output group;

    /**
     * @return The name or id of the group to add the deploy token to.
     * 
     */
    public Optional> group() {
        return Optional.ofNullable(this.group);
    }

    /**
     * A name to describe the deploy token with.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return A name to describe the deploy token with.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name or id of the project to add the deploy token to.
     * 
     */
    @Import(name="project")
    private @Nullable Output project;

    /**
     * @return The name or id of the project to add the deploy token to.
     * 
     */
    public Optional> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
     * 
     */
    @Import(name="scopes", required=true)
    private Output> scopes;

    /**
     * @return Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
     * 
     */
    public Output> scopes() {
        return this.scopes;
    }

    /**
     * A username for the deploy token. Default is `gitlab+deploy-token-{n}`.
     * 
     */
    @Import(name="username")
    private @Nullable Output username;

    /**
     * @return A username for the deploy token. Default is `gitlab+deploy-token-{n}`.
     * 
     */
    public Optional> username() {
        return Optional.ofNullable(this.username);
    }

    private DeployTokenArgs() {}

    private DeployTokenArgs(DeployTokenArgs $) {
        this.expiresAt = $.expiresAt;
        this.group = $.group;
        this.name = $.name;
        this.project = $.project;
        this.scopes = $.scopes;
        this.username = $.username;
    }

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

    public static final class Builder {
        private DeployTokenArgs $;

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

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

        /**
         * @param expiresAt Time the token will expire it, RFC3339 format. Will not expire per default.
         * 
         * @return builder
         * 
         */
        public Builder expiresAt(@Nullable Output expiresAt) {
            $.expiresAt = expiresAt;
            return this;
        }

        /**
         * @param expiresAt Time the token will expire it, RFC3339 format. Will not expire per default.
         * 
         * @return builder
         * 
         */
        public Builder expiresAt(String expiresAt) {
            return expiresAt(Output.of(expiresAt));
        }

        /**
         * @param group The name or id of the group to add the deploy token to.
         * 
         * @return builder
         * 
         */
        public Builder group(@Nullable Output group) {
            $.group = group;
            return this;
        }

        /**
         * @param group The name or id of the group to add the deploy token to.
         * 
         * @return builder
         * 
         */
        public Builder group(String group) {
            return group(Output.of(group));
        }

        /**
         * @param name A name to describe the deploy token with.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A name to describe the deploy token with.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param project The name or id of the project to add the deploy token to.
         * 
         * @return builder
         * 
         */
        public Builder project(@Nullable Output project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The name or id of the project to add the deploy token to.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param scopes Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
         * 
         * @return builder
         * 
         */
        public Builder scopes(Output> scopes) {
            $.scopes = scopes;
            return this;
        }

        /**
         * @param scopes Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
         * 
         * @return builder
         * 
         */
        public Builder scopes(List scopes) {
            return scopes(Output.of(scopes));
        }

        /**
         * @param scopes Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
         * 
         * @return builder
         * 
         */
        public Builder scopes(String... scopes) {
            return scopes(List.of(scopes));
        }

        /**
         * @param username A username for the deploy token. Default is `gitlab+deploy-token-{n}`.
         * 
         * @return builder
         * 
         */
        public Builder username(@Nullable Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username A username for the deploy token. Default is `gitlab+deploy-token-{n}`.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public DeployTokenArgs build() {
            if ($.scopes == null) {
                throw new MissingRequiredPropertyException("DeployTokenArgs", "scopes");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy