com.pulumi.github.outputs.GetBranchProtectionRulesResult 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 com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.github.outputs.GetBranchProtectionRulesRule;
import java.lang.String;
import java.util.List;
import java.util.Objects;
@CustomType
public final class GetBranchProtectionRulesResult {
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
private String id;
private String repository;
/**
* @return Collection of Branch Protection Rules. Each of the results conforms to the following scheme:
*
*/
private List rules;
private GetBranchProtectionRulesResult() {}
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
public String id() {
return this.id;
}
public String repository() {
return this.repository;
}
/**
* @return Collection of Branch Protection Rules. Each of the results conforms to the following scheme:
*
*/
public List rules() {
return this.rules;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetBranchProtectionRulesResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String id;
private String repository;
private List rules;
public Builder() {}
public Builder(GetBranchProtectionRulesResult defaults) {
Objects.requireNonNull(defaults);
this.id = defaults.id;
this.repository = defaults.repository;
this.rules = defaults.rules;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetBranchProtectionRulesResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder repository(String repository) {
if (repository == null) {
throw new MissingRequiredPropertyException("GetBranchProtectionRulesResult", "repository");
}
this.repository = repository;
return this;
}
@CustomType.Setter
public Builder rules(List rules) {
if (rules == null) {
throw new MissingRequiredPropertyException("GetBranchProtectionRulesResult", "rules");
}
this.rules = rules;
return this;
}
public Builder rules(GetBranchProtectionRulesRule... rules) {
return rules(List.of(rules));
}
public GetBranchProtectionRulesResult build() {
final var _resultValue = new GetBranchProtectionRulesResult();
_resultValue.id = id;
_resultValue.repository = repository;
_resultValue.rules = rules;
return _resultValue;
}
}
}