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

com.pulumi.gitlab.outputs.GroupDefaultBranchProtectionDefaults Maven / Gradle / Ivy

There is a newer version: 8.4.0
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.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GroupDefaultBranchProtectionDefaults {
    /**
     * @return Allow force push for all users with push access.
     * 
     */
    private @Nullable Boolean allowForcePush;
    /**
     * @return An array of access levels allowed to merge. Valid values are: `developer`, `maintainer`.
     * 
     */
    private @Nullable List allowedToMerges;
    /**
     * @return An array of access levels allowed to push. Valid values are: `developer`, `maintainer`.
     * 
     */
    private @Nullable List allowedToPushes;
    /**
     * @return Allow developers to initial push.
     * 
     */
    private @Nullable Boolean developerCanInitialPush;

    private GroupDefaultBranchProtectionDefaults() {}
    /**
     * @return Allow force push for all users with push access.
     * 
     */
    public Optional allowForcePush() {
        return Optional.ofNullable(this.allowForcePush);
    }
    /**
     * @return An array of access levels allowed to merge. Valid values are: `developer`, `maintainer`.
     * 
     */
    public List allowedToMerges() {
        return this.allowedToMerges == null ? List.of() : this.allowedToMerges;
    }
    /**
     * @return An array of access levels allowed to push. Valid values are: `developer`, `maintainer`.
     * 
     */
    public List allowedToPushes() {
        return this.allowedToPushes == null ? List.of() : this.allowedToPushes;
    }
    /**
     * @return Allow developers to initial push.
     * 
     */
    public Optional developerCanInitialPush() {
        return Optional.ofNullable(this.developerCanInitialPush);
    }

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

    public static Builder builder(GroupDefaultBranchProtectionDefaults defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean allowForcePush;
        private @Nullable List allowedToMerges;
        private @Nullable List allowedToPushes;
        private @Nullable Boolean developerCanInitialPush;
        public Builder() {}
        public Builder(GroupDefaultBranchProtectionDefaults defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowForcePush = defaults.allowForcePush;
    	      this.allowedToMerges = defaults.allowedToMerges;
    	      this.allowedToPushes = defaults.allowedToPushes;
    	      this.developerCanInitialPush = defaults.developerCanInitialPush;
        }

        @CustomType.Setter
        public Builder allowForcePush(@Nullable Boolean allowForcePush) {

            this.allowForcePush = allowForcePush;
            return this;
        }
        @CustomType.Setter
        public Builder allowedToMerges(@Nullable List allowedToMerges) {

            this.allowedToMerges = allowedToMerges;
            return this;
        }
        public Builder allowedToMerges(String... allowedToMerges) {
            return allowedToMerges(List.of(allowedToMerges));
        }
        @CustomType.Setter
        public Builder allowedToPushes(@Nullable List allowedToPushes) {

            this.allowedToPushes = allowedToPushes;
            return this;
        }
        public Builder allowedToPushes(String... allowedToPushes) {
            return allowedToPushes(List.of(allowedToPushes));
        }
        @CustomType.Setter
        public Builder developerCanInitialPush(@Nullable Boolean developerCanInitialPush) {

            this.developerCanInitialPush = developerCanInitialPush;
            return this;
        }
        public GroupDefaultBranchProtectionDefaults build() {
            final var _resultValue = new GroupDefaultBranchProtectionDefaults();
            _resultValue.allowForcePush = allowForcePush;
            _resultValue.allowedToMerges = allowedToMerges;
            _resultValue.allowedToPushes = allowedToPushes;
            _resultValue.developerCanInitialPush = developerCanInitialPush;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy