com.pulumi.github.outputs.BranchProtectionV3Restrictions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of github Show documentation
Show all versions of github Show documentation
A Pulumi package for creating and managing github cloud resources.
// *** 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.github.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;
@CustomType
public final class BranchProtectionV3Restrictions {
/**
* @return The list of app slugs with push access.
*
* `restrictions` is only available for organization-owned repositories.
*
*/
private @Nullable List apps;
/**
* @return The list of team slugs with push access.
* Always use `slug` of the team, **not** its name. Each team already **has** to have access to the repository.
*
*/
private @Nullable List teams;
/**
* @return The list of user logins with push access.
*
*/
private @Nullable List users;
private BranchProtectionV3Restrictions() {}
/**
* @return The list of app slugs with push access.
*
* `restrictions` is only available for organization-owned repositories.
*
*/
public List apps() {
return this.apps == null ? List.of() : this.apps;
}
/**
* @return The list of team slugs with push access.
* Always use `slug` of the team, **not** its name. Each team already **has** to have access to the repository.
*
*/
public List teams() {
return this.teams == null ? List.of() : this.teams;
}
/**
* @return The list of user logins with push access.
*
*/
public List users() {
return this.users == null ? List.of() : this.users;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(BranchProtectionV3Restrictions defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List apps;
private @Nullable List teams;
private @Nullable List users;
public Builder() {}
public Builder(BranchProtectionV3Restrictions defaults) {
Objects.requireNonNull(defaults);
this.apps = defaults.apps;
this.teams = defaults.teams;
this.users = defaults.users;
}
@CustomType.Setter
public Builder apps(@Nullable List apps) {
this.apps = apps;
return this;
}
public Builder apps(String... apps) {
return apps(List.of(apps));
}
@CustomType.Setter
public Builder teams(@Nullable List teams) {
this.teams = teams;
return this;
}
public Builder teams(String... teams) {
return teams(List.of(teams));
}
@CustomType.Setter
public Builder users(@Nullable List users) {
this.users = users;
return this;
}
public Builder users(String... users) {
return users(List.of(users));
}
public BranchProtectionV3Restrictions build() {
final var _resultValue = new BranchProtectionV3Restrictions();
_resultValue.apps = apps;
_resultValue.teams = teams;
_resultValue.users = users;
return _resultValue;
}
}
}