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

com.pulumi.gitlab.ProjectMirrorArgs 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 ProjectMirrorArgs extends com.pulumi.resources.ResourceArgs {

    public static final ProjectMirrorArgs Empty = new ProjectMirrorArgs();

    /**
     * Determines if the mirror is enabled.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Determines if the mirror is enabled.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Determines if divergent refs are skipped.
     * 
     */
    @Import(name="keepDivergentRefs")
    private @Nullable Output keepDivergentRefs;

    /**
     * @return Determines if divergent refs are skipped.
     * 
     */
    public Optional> keepDivergentRefs() {
        return Optional.ofNullable(this.keepDivergentRefs);
    }

    /**
     * Determines if only protected branches are mirrored.
     * 
     */
    @Import(name="onlyProtectedBranches")
    private @Nullable Output onlyProtectedBranches;

    /**
     * @return Determines if only protected branches are mirrored.
     * 
     */
    public Optional> onlyProtectedBranches() {
        return Optional.ofNullable(this.onlyProtectedBranches);
    }

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

    /**
     * @return The id of the project.
     * 
     */
    public Output project() {
        return this.project;
    }

    /**
     * The URL of the remote repository to be mirrored.
     * 
     */
    @Import(name="url", required=true)
    private Output url;

    /**
     * @return The URL of the remote repository to be mirrored.
     * 
     */
    public Output url() {
        return this.url;
    }

    private ProjectMirrorArgs() {}

    private ProjectMirrorArgs(ProjectMirrorArgs $) {
        this.enabled = $.enabled;
        this.keepDivergentRefs = $.keepDivergentRefs;
        this.onlyProtectedBranches = $.onlyProtectedBranches;
        this.project = $.project;
        this.url = $.url;
    }

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

    public static final class Builder {
        private ProjectMirrorArgs $;

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

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

        /**
         * @param enabled Determines if the mirror is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Determines if the mirror is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param keepDivergentRefs Determines if divergent refs are skipped.
         * 
         * @return builder
         * 
         */
        public Builder keepDivergentRefs(@Nullable Output keepDivergentRefs) {
            $.keepDivergentRefs = keepDivergentRefs;
            return this;
        }

        /**
         * @param keepDivergentRefs Determines if divergent refs are skipped.
         * 
         * @return builder
         * 
         */
        public Builder keepDivergentRefs(Boolean keepDivergentRefs) {
            return keepDivergentRefs(Output.of(keepDivergentRefs));
        }

        /**
         * @param onlyProtectedBranches Determines if only protected branches are mirrored.
         * 
         * @return builder
         * 
         */
        public Builder onlyProtectedBranches(@Nullable Output onlyProtectedBranches) {
            $.onlyProtectedBranches = onlyProtectedBranches;
            return this;
        }

        /**
         * @param onlyProtectedBranches Determines if only protected branches are mirrored.
         * 
         * @return builder
         * 
         */
        public Builder onlyProtectedBranches(Boolean onlyProtectedBranches) {
            return onlyProtectedBranches(Output.of(onlyProtectedBranches));
        }

        /**
         * @param project The id of the project.
         * 
         * @return builder
         * 
         */
        public Builder project(Output project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The id of the project.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param url The URL of the remote repository to be mirrored.
         * 
         * @return builder
         * 
         */
        public Builder url(Output url) {
            $.url = url;
            return this;
        }

        /**
         * @param url The URL of the remote repository to be mirrored.
         * 
         * @return builder
         * 
         */
        public Builder url(String url) {
            return url(Output.of(url));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy