Class BranchRule.Builder (0.24.0)

public static final class BranchRule.Builder extends GeneratedMessageV3.Builder<BranchRule.Builder> implements BranchRuleOrBuilder

Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on desginated branches within a repository.

Protobuf type google.cloud.securesourcemanager.v1.BranchRule

Implements

BranchRuleOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRequiredStatusChecks(Iterable<? extends BranchRule.Check> values)

public BranchRule.Builder addAllRequiredStatusChecks(Iterable<? extends BranchRule.Check> values)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.securesourcemanager.v1.BranchRule.Check>
Returns
Type Description
BranchRule.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BranchRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BranchRule.Builder
Overrides

addRequiredStatusChecks(BranchRule.Check value)

public BranchRule.Builder addRequiredStatusChecks(BranchRule.Check value)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value BranchRule.Check
Returns
Type Description
BranchRule.Builder

addRequiredStatusChecks(BranchRule.Check.Builder builderForValue)

public BranchRule.Builder addRequiredStatusChecks(BranchRule.Check.Builder builderForValue)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue BranchRule.Check.Builder
Returns
Type Description
BranchRule.Builder

addRequiredStatusChecks(int index, BranchRule.Check value)

public BranchRule.Builder addRequiredStatusChecks(int index, BranchRule.Check value)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value BranchRule.Check
Returns
Type Description
BranchRule.Builder

addRequiredStatusChecks(int index, BranchRule.Check.Builder builderForValue)

public BranchRule.Builder addRequiredStatusChecks(int index, BranchRule.Check.Builder builderForValue)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue BranchRule.Check.Builder
Returns
Type Description
BranchRule.Builder

addRequiredStatusChecksBuilder()

public BranchRule.Check.Builder addRequiredStatusChecksBuilder()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Check.Builder

addRequiredStatusChecksBuilder(int index)

public BranchRule.Check.Builder addRequiredStatusChecksBuilder(int index)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BranchRule.Check.Builder

build()

public BranchRule build()
Returns
Type Description
BranchRule

buildPartial()

public BranchRule buildPartial()
Returns
Type Description
BranchRule

clear()

public BranchRule.Builder clear()
Returns
Type Description
BranchRule.Builder
Overrides

clearAllowStaleReviews()

public BranchRule.Builder clearAllowStaleReviews()

Optional. Determines if allow stale reviews or approvals before merging to the branch.

bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearAnnotations()

public BranchRule.Builder clearAnnotations()
Returns
Type Description
BranchRule.Builder

clearCreateTime()

public BranchRule.Builder clearCreateTime()

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BranchRule.Builder

clearDisabled()

public BranchRule.Builder clearDisabled()

Optional. Determines if the branch rule is disabled or not.

bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearEtag()

public BranchRule.Builder clearEtag()

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BranchRule.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BranchRule.Builder
Overrides

clearIncludePattern()

public BranchRule.Builder clearIncludePattern()

Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.). Current MVP phase only support . for wildcard.

string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearMinimumApprovalsCount()

public BranchRule.Builder clearMinimumApprovalsCount()

Optional. The minimum number of approvals required for the branch rule to be matched.

int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearMinimumReviewsCount()

public BranchRule.Builder clearMinimumReviewsCount()

Optional. The minimum number of reviews required for the branch rule to be matched.

int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearName()

public BranchRule.Builder clearName()

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BranchRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BranchRule.Builder
Overrides

clearRequireCommentsResolved()

public BranchRule.Builder clearRequireCommentsResolved()

Optional. Determines if require comments resolved before merging to the branch.

bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearRequireLinearHistory()

public BranchRule.Builder clearRequireLinearHistory()

Optional. Determines if require linear history before merging to the branch.

bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearRequirePullRequest()

public BranchRule.Builder clearRequirePullRequest()

Optional. Determines if the branch rule requires a pull request or not.

bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearRequiredStatusChecks()

public BranchRule.Builder clearRequiredStatusChecks()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BranchRule.Builder

clearUid()

public BranchRule.Builder clearUid()

Output only. Unique identifier of the repository.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BranchRule.Builder

This builder for chaining.

clearUpdateTime()

public BranchRule.Builder clearUpdateTime()

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BranchRule.Builder

clone()

public BranchRule.Builder clone()
Returns
Type Description
BranchRule.Builder
Overrides

containsAnnotations(String key)

public boolean containsAnnotations(String key)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAllowStaleReviews()

public boolean getAllowStaleReviews()

Optional. Determines if allow stale reviews or approvals before merging to the branch.

bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The allowStaleReviews.

getAnnotations() (deprecated)

public Map<String,String> getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

public int getAnnotationsCount()

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAnnotationsMap()

public Map<String,String> getAnnotationsMap()

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

public String getAnnotationsOrDefault(String key, String defaultValue)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

public String getAnnotationsOrThrow(String key)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getCreateTime()

public Timestamp getCreateTime()

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public BranchRule getDefaultInstanceForType()
Returns
Type Description
BranchRule

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisabled()

public boolean getDisabled()

Optional. Determines if the branch rule is disabled or not.

bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The disabled.

getEtag()

public String getEtag()

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for etag.

getIncludePattern()

public String getIncludePattern()

Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.). Current MVP phase only support . for wildcard.

string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The includePattern.

getIncludePatternBytes()

public ByteString getIncludePatternBytes()

Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.). Current MVP phase only support . for wildcard.

string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for includePattern.

getMinimumApprovalsCount()

public int getMinimumApprovalsCount()

Optional. The minimum number of approvals required for the branch rule to be matched.

int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The minimumApprovalsCount.

getMinimumReviewsCount()

public int getMinimumReviewsCount()

Optional. The minimum number of reviews required for the branch rule to be matched.

int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The minimumReviewsCount.

getMutableAnnotations() (deprecated)

public Map<String,String> getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for name.

getRequireCommentsResolved()

public boolean getRequireCommentsResolved()

Optional. Determines if require comments resolved before merging to the branch.

bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The requireCommentsResolved.

getRequireLinearHistory()

public boolean getRequireLinearHistory()

Optional. Determines if require linear history before merging to the branch.

bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The requireLinearHistory.

getRequirePullRequest()

public boolean getRequirePullRequest()

Optional. Determines if the branch rule requires a pull request or not.

bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The requirePullRequest.

getRequiredStatusChecks(int index)

public BranchRule.Check getRequiredStatusChecks(int index)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BranchRule.Check

getRequiredStatusChecksBuilder(int index)

public BranchRule.Check.Builder getRequiredStatusChecksBuilder(int index)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BranchRule.Check.Builder

getRequiredStatusChecksBuilderList()

public List<BranchRule.Check.Builder> getRequiredStatusChecksBuilderList()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getRequiredStatusChecksCount()

public int getRequiredStatusChecksCount()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getRequiredStatusChecksList()

public List<BranchRule.Check> getRequiredStatusChecksList()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Check>

getRequiredStatusChecksOrBuilder(int index)

public BranchRule.CheckOrBuilder getRequiredStatusChecksOrBuilder(int index)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BranchRule.CheckOrBuilder

getRequiredStatusChecksOrBuilderList()

public List<? extends BranchRule.CheckOrBuilder> getRequiredStatusChecksOrBuilderList()

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.securesourcemanager.v1.BranchRule.CheckOrBuilder>

getUid()

public String getUid()

Output only. Unique identifier of the repository.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. Unique identifier of the repository.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uid.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public BranchRule.Builder mergeCreateTime(Timestamp value)

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BranchRule.Builder

mergeFrom(BranchRule other)

public BranchRule.Builder mergeFrom(BranchRule other)
Parameter
Name Description
other BranchRule
Returns
Type Description
BranchRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BranchRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BranchRule.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BranchRule.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BranchRule.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BranchRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BranchRule.Builder
Overrides

mergeUpdateTime(Timestamp value)

public BranchRule.Builder mergeUpdateTime(Timestamp value)

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BranchRule.Builder

putAllAnnotations(Map<String,String> values)

public BranchRule.Builder putAllAnnotations(Map<String,String> values)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
BranchRule.Builder

putAnnotations(String key, String value)

public BranchRule.Builder putAnnotations(String key, String value)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
BranchRule.Builder

removeAnnotations(String key)

public BranchRule.Builder removeAnnotations(String key)

Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations.

map<string, string> annotations = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
BranchRule.Builder

removeRequiredStatusChecks(int index)

public BranchRule.Builder removeRequiredStatusChecks(int index)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BranchRule.Builder

setAllowStaleReviews(boolean value)

public BranchRule.Builder setAllowStaleReviews(boolean value)

Optional. Determines if allow stale reviews or approvals before merging to the branch.

bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The allowStaleReviews to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public BranchRule.Builder setCreateTime(Timestamp value)

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BranchRule.Builder

setCreateTime(Timestamp.Builder builderForValue)

public BranchRule.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Create timestamp.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BranchRule.Builder

setDisabled(boolean value)

public BranchRule.Builder setDisabled(boolean value)

Optional. Determines if the branch rule is disabled or not.

bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setEtag(String value)

public BranchRule.Builder setEtag(String value)

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public BranchRule.Builder setEtagBytes(ByteString value)

Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

string etag = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BranchRule.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BranchRule.Builder
Overrides

setIncludePattern(String value)

public BranchRule.Builder setIncludePattern(String value)

Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.). Current MVP phase only support . for wildcard.

string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The includePattern to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setIncludePatternBytes(ByteString value)

public BranchRule.Builder setIncludePatternBytes(ByteString value)

Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.). Current MVP phase only support . for wildcard.

string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for includePattern to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setMinimumApprovalsCount(int value)

public BranchRule.Builder setMinimumApprovalsCount(int value)

Optional. The minimum number of approvals required for the branch rule to be matched.

int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The minimumApprovalsCount to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setMinimumReviewsCount(int value)

public BranchRule.Builder setMinimumReviewsCount(int value)

Optional. The minimum number of reviews required for the branch rule to be matched.

int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The minimumReviewsCount to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setName(String value)

public BranchRule.Builder setName(String value)

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setNameBytes(ByteString value)

public BranchRule.Builder setNameBytes(ByteString value)

Optional. A unique identifier for a BranchRule. The name should be of the format: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BranchRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BranchRule.Builder
Overrides

setRequireCommentsResolved(boolean value)

public BranchRule.Builder setRequireCommentsResolved(boolean value)

Optional. Determines if require comments resolved before merging to the branch.

bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The requireCommentsResolved to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setRequireLinearHistory(boolean value)

public BranchRule.Builder setRequireLinearHistory(boolean value)

Optional. Determines if require linear history before merging to the branch.

bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The requireLinearHistory to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setRequirePullRequest(boolean value)

public BranchRule.Builder setRequirePullRequest(boolean value)

Optional. Determines if the branch rule requires a pull request or not.

bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The requirePullRequest to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setRequiredStatusChecks(int index, BranchRule.Check value)

public BranchRule.Builder setRequiredStatusChecks(int index, BranchRule.Check value)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value BranchRule.Check
Returns
Type Description
BranchRule.Builder

setRequiredStatusChecks(int index, BranchRule.Check.Builder builderForValue)

public BranchRule.Builder setRequiredStatusChecks(int index, BranchRule.Check.Builder builderForValue)

Optional. List of required status checks before merging to the branch.

repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue BranchRule.Check.Builder
Returns
Type Description
BranchRule.Builder

setUid(String value)

public BranchRule.Builder setUid(String value)

Output only. Unique identifier of the repository.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uid to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setUidBytes(ByteString value)

public BranchRule.Builder setUidBytes(ByteString value)

Output only. Unique identifier of the repository.

string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uid to set.

Returns
Type Description
BranchRule.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BranchRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BranchRule.Builder
Overrides

setUpdateTime(Timestamp value)

public BranchRule.Builder setUpdateTime(Timestamp value)

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BranchRule.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public BranchRule.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Update timestamp.

.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BranchRule.Builder