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

com.pulumi.gitlab.DeployKeyEnableArgs 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.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DeployKeyEnableArgs Empty = new DeployKeyEnableArgs();

    /**
     * Can deploy key push to the project's repository.
     * 
     */
    @Import(name="canPush")
    private @Nullable Output canPush;

    /**
     * @return Can deploy key push to the project's repository.
     * 
     */
    public Optional> canPush() {
        return Optional.ofNullable(this.canPush);
    }

    /**
     * Deploy key.
     * 
     */
    @Import(name="key")
    private @Nullable Output key;

    /**
     * @return Deploy key.
     * 
     */
    public Optional> key() {
        return Optional.ofNullable(this.key);
    }

    /**
     * The Gitlab key id for the pre-existing deploy key
     * 
     */
    @Import(name="keyId", required=true)
    private Output keyId;

    /**
     * @return The Gitlab key id for the pre-existing deploy key
     * 
     */
    public Output keyId() {
        return this.keyId;
    }

    /**
     * The name or id of the project to add the deploy key to.
     * 
     */
    @Import(name="project", required=true)
    private Output project;

    /**
     * @return The name or id of the project to add the deploy key to.
     * 
     */
    public Output project() {
        return this.project;
    }

    /**
     * Deploy key's title.
     * 
     */
    @Import(name="title")
    private @Nullable Output title;

    /**
     * @return Deploy key's title.
     * 
     */
    public Optional> title() {
        return Optional.ofNullable(this.title);
    }

    private DeployKeyEnableArgs() {}

    private DeployKeyEnableArgs(DeployKeyEnableArgs $) {
        this.canPush = $.canPush;
        this.key = $.key;
        this.keyId = $.keyId;
        this.project = $.project;
        this.title = $.title;
    }

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

    public static final class Builder {
        private DeployKeyEnableArgs $;

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

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

        /**
         * @param canPush Can deploy key push to the project's repository.
         * 
         * @return builder
         * 
         */
        public Builder canPush(@Nullable Output canPush) {
            $.canPush = canPush;
            return this;
        }

        /**
         * @param canPush Can deploy key push to the project's repository.
         * 
         * @return builder
         * 
         */
        public Builder canPush(Boolean canPush) {
            return canPush(Output.of(canPush));
        }

        /**
         * @param key Deploy key.
         * 
         * @return builder
         * 
         */
        public Builder key(@Nullable Output key) {
            $.key = key;
            return this;
        }

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

        /**
         * @param keyId The Gitlab key id for the pre-existing deploy key
         * 
         * @return builder
         * 
         */
        public Builder keyId(Output keyId) {
            $.keyId = keyId;
            return this;
        }

        /**
         * @param keyId The Gitlab key id for the pre-existing deploy key
         * 
         * @return builder
         * 
         */
        public Builder keyId(String keyId) {
            return keyId(Output.of(keyId));
        }

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

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

        /**
         * @param title Deploy key's title.
         * 
         * @return builder
         * 
         */
        public Builder title(@Nullable Output title) {
            $.title = title;
            return this;
        }

        /**
         * @param title Deploy key's title.
         * 
         * @return builder
         * 
         */
        public Builder title(String title) {
            return title(Output.of(title));
        }

        public DeployKeyEnableArgs build() {
            if ($.keyId == null) {
                throw new MissingRequiredPropertyException("DeployKeyEnableArgs", "keyId");
            }
            if ($.project == null) {
                throw new MissingRequiredPropertyException("DeployKeyEnableArgs", "project");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy