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

com.pulumi.gitlab.UserGpgKeyArgs 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;

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


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

    public static final UserGpgKeyArgs Empty = new UserGpgKeyArgs();

    /**
     * The armored GPG public key.
     * 
     */
    @Import(name="key", required=true)
    private Output key;

    /**
     * @return The armored GPG public key.
     * 
     */
    public Output key() {
        return this.key;
    }

    /**
     * The ID of the user to add the GPG key to. If this field is omitted, this resource manages a GPG key for the current user. Otherwise, this resource manages a GPG key for the specified user, and an admin token is required.
     * 
     */
    @Import(name="userId")
    private @Nullable Output userId;

    /**
     * @return The ID of the user to add the GPG key to. If this field is omitted, this resource manages a GPG key for the current user. Otherwise, this resource manages a GPG key for the specified user, and an admin token is required.
     * 
     */
    public Optional> userId() {
        return Optional.ofNullable(this.userId);
    }

    private UserGpgKeyArgs() {}

    private UserGpgKeyArgs(UserGpgKeyArgs $) {
        this.key = $.key;
        this.userId = $.userId;
    }

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

    public static final class Builder {
        private UserGpgKeyArgs $;

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

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

        /**
         * @param key The armored GPG public key.
         * 
         * @return builder
         * 
         */
        public Builder key(Output key) {
            $.key = key;
            return this;
        }

        /**
         * @param key The armored GPG public key.
         * 
         * @return builder
         * 
         */
        public Builder key(String key) {
            return key(Output.of(key));
        }

        /**
         * @param userId The ID of the user to add the GPG key to. If this field is omitted, this resource manages a GPG key for the current user. Otherwise, this resource manages a GPG key for the specified user, and an admin token is required.
         * 
         * @return builder
         * 
         */
        public Builder userId(@Nullable Output userId) {
            $.userId = userId;
            return this;
        }

        /**
         * @param userId The ID of the user to add the GPG key to. If this field is omitted, this resource manages a GPG key for the current user. Otherwise, this resource manages a GPG key for the specified user, and an admin token is required.
         * 
         * @return builder
         * 
         */
        public Builder userId(Integer userId) {
            return userId(Output.of(userId));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy