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

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


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

    public static final ServiceGithubArgs Empty = new ServiceGithubArgs();

    /**
     * ID of the project you want to activate integration on.
     * 
     */
    @Import(name="project", required=true)
    private Output project;

    /**
     * @return ID of the project you want to activate integration on.
     * 
     */
    public Output project() {
        return this.project;
    }

    @Import(name="repositoryUrl", required=true)
    private Output repositoryUrl;

    public Output repositoryUrl() {
        return this.repositoryUrl;
    }

    /**
     * Append instance name instead of branch to the status. Must enable to set a GitLab status check as *required* in GitHub. See [Static / dynamic status check names] to learn more.
     * 
     */
    @Import(name="staticContext")
    private @Nullable Output staticContext;

    /**
     * @return Append instance name instead of branch to the status. Must enable to set a GitLab status check as *required* in GitHub. See [Static / dynamic status check names] to learn more.
     * 
     */
    public Optional> staticContext() {
        return Optional.ofNullable(this.staticContext);
    }

    /**
     * A GitHub personal access token with at least `repo:status` scope.
     * 
     */
    @Import(name="token", required=true)
    private Output token;

    /**
     * @return A GitHub personal access token with at least `repo:status` scope.
     * 
     */
    public Output token() {
        return this.token;
    }

    private ServiceGithubArgs() {}

    private ServiceGithubArgs(ServiceGithubArgs $) {
        this.project = $.project;
        this.repositoryUrl = $.repositoryUrl;
        this.staticContext = $.staticContext;
        this.token = $.token;
    }

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

    public static final class Builder {
        private ServiceGithubArgs $;

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

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

        /**
         * @param project ID of the project you want to activate integration on.
         * 
         * @return builder
         * 
         */
        public Builder project(Output project) {
            $.project = project;
            return this;
        }

        /**
         * @param project ID of the project you want to activate integration on.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        public Builder repositoryUrl(Output repositoryUrl) {
            $.repositoryUrl = repositoryUrl;
            return this;
        }

        public Builder repositoryUrl(String repositoryUrl) {
            return repositoryUrl(Output.of(repositoryUrl));
        }

        /**
         * @param staticContext Append instance name instead of branch to the status. Must enable to set a GitLab status check as *required* in GitHub. See [Static / dynamic status check names] to learn more.
         * 
         * @return builder
         * 
         */
        public Builder staticContext(@Nullable Output staticContext) {
            $.staticContext = staticContext;
            return this;
        }

        /**
         * @param staticContext Append instance name instead of branch to the status. Must enable to set a GitLab status check as *required* in GitHub. See [Static / dynamic status check names] to learn more.
         * 
         * @return builder
         * 
         */
        public Builder staticContext(Boolean staticContext) {
            return staticContext(Output.of(staticContext));
        }

        /**
         * @param token A GitHub personal access token with at least `repo:status` scope.
         * 
         * @return builder
         * 
         */
        public Builder token(Output token) {
            $.token = token;
            return this;
        }

        /**
         * @param token A GitHub personal access token with at least `repo:status` scope.
         * 
         * @return builder
         * 
         */
        public Builder token(String token) {
            return token(Output.of(token));
        }

        public ServiceGithubArgs build() {
            if ($.project == null) {
                throw new MissingRequiredPropertyException("ServiceGithubArgs", "project");
            }
            if ($.repositoryUrl == null) {
                throw new MissingRequiredPropertyException("ServiceGithubArgs", "repositoryUrl");
            }
            if ($.token == null) {
                throw new MissingRequiredPropertyException("ServiceGithubArgs", "token");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy