public final class BranchRule extends com.google.protobuf.GeneratedMessageV3 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| Modifier and Type | Class and Description |
|---|---|
static class |
BranchRule.Builder
Metadata of a BranchRule.
|
static class |
BranchRule.Check
Check is a type for status check.
|
static interface |
BranchRule.CheckOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOW_STALE_REVIEWS_FIELD_NUMBER |
static int |
ANNOTATIONS_FIELD_NUMBER |
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
DISABLED_FIELD_NUMBER |
static int |
ETAG_FIELD_NUMBER |
static int |
INCLUDE_PATTERN_FIELD_NUMBER |
static int |
MINIMUM_APPROVALS_COUNT_FIELD_NUMBER |
static int |
MINIMUM_REVIEWS_COUNT_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
REQUIRE_COMMENTS_RESOLVED_FIELD_NUMBER |
static int |
REQUIRE_LINEAR_HISTORY_FIELD_NUMBER |
static int |
REQUIRE_PULL_REQUEST_FIELD_NUMBER |
static int |
REQUIRED_STATUS_CHECKS_FIELD_NUMBER |
static int |
UID_FIELD_NUMBER |
static int |
UPDATE_TIME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAnnotations(String key)
Optional.
|
boolean |
equals(Object obj) |
boolean |
getAllowStaleReviews()
Optional.
|
Map<String,String> |
getAnnotations()
Deprecated.
|
int |
getAnnotationsCount()
Optional.
|
Map<String,String> |
getAnnotationsMap()
Optional.
|
String |
getAnnotationsOrDefault(String key,
String defaultValue)
Optional.
|
String |
getAnnotationsOrThrow(String key)
Optional.
|
com.google.protobuf.Timestamp |
getCreateTime()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
static BranchRule |
getDefaultInstance() |
BranchRule |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getDisabled()
Optional.
|
String |
getEtag()
Optional.
|
com.google.protobuf.ByteString |
getEtagBytes()
Optional.
|
String |
getIncludePattern()
Optional.
|
com.google.protobuf.ByteString |
getIncludePatternBytes()
Optional.
|
int |
getMinimumApprovalsCount()
Optional.
|
int |
getMinimumReviewsCount()
Optional.
|
String |
getName()
Optional.
|
com.google.protobuf.ByteString |
getNameBytes()
Optional.
|
com.google.protobuf.Parser<BranchRule> |
getParserForType() |
boolean |
getRequireCommentsResolved()
Optional.
|
BranchRule.Check |
getRequiredStatusChecks(int index)
Optional.
|
int |
getRequiredStatusChecksCount()
Optional.
|
List<BranchRule.Check> |
getRequiredStatusChecksList()
Optional.
|
BranchRule.CheckOrBuilder |
getRequiredStatusChecksOrBuilder(int index)
Optional.
|
List<? extends BranchRule.CheckOrBuilder> |
getRequiredStatusChecksOrBuilderList()
Optional.
|
boolean |
getRequireLinearHistory()
Optional.
|
boolean |
getRequirePullRequest()
Optional.
|
int |
getSerializedSize() |
String |
getUid()
Output only.
|
com.google.protobuf.ByteString |
getUidBytes()
Output only.
|
com.google.protobuf.Timestamp |
getUpdateTime()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
boolean |
hasCreateTime()
Output only.
|
int |
hashCode() |
boolean |
hasUpdateTime()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static BranchRule.Builder |
newBuilder() |
static BranchRule.Builder |
newBuilder(BranchRule prototype) |
BranchRule.Builder |
newBuilderForType() |
protected BranchRule.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static BranchRule |
parseDelimitedFrom(InputStream input) |
static BranchRule |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static BranchRule |
parseFrom(byte[] data) |
static BranchRule |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static BranchRule |
parseFrom(ByteBuffer data) |
static BranchRule |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static BranchRule |
parseFrom(com.google.protobuf.ByteString data) |
static BranchRule |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static BranchRule |
parseFrom(com.google.protobuf.CodedInputStream input) |
static BranchRule |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static BranchRule |
parseFrom(InputStream input) |
static BranchRule |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<BranchRule> |
parser() |
BranchRule.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int UID_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
public static final int ANNOTATIONS_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
public static final int INCLUDE_PATTERN_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER
public static final int REQUIRE_PULL_REQUEST_FIELD_NUMBER
public static final int MINIMUM_REVIEWS_COUNT_FIELD_NUMBER
public static final int MINIMUM_APPROVALS_COUNT_FIELD_NUMBER
public static final int REQUIRE_COMMENTS_RESOLVED_FIELD_NUMBER
public static final int ALLOW_STALE_REVIEWS_FIELD_NUMBER
public static final int REQUIRE_LINEAR_HISTORY_FIELD_NUMBER
public static final int REQUIRED_STATUS_CHECKS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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];getName in interface BranchRuleOrBuilderpublic com.google.protobuf.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];getNameBytes in interface BranchRuleOrBuilderpublic String getUid()
Output only. Unique identifier of the repository.
string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];getUid in interface BranchRuleOrBuilderpublic com.google.protobuf.ByteString getUidBytes()
Output only. Unique identifier of the repository.
string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];getUidBytes in interface BranchRuleOrBuilderpublic boolean hasCreateTime()
Output only. Create timestamp.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime in interface BranchRuleOrBuilderpublic com.google.protobuf.Timestamp getCreateTime()
Output only. Create timestamp.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime in interface BranchRuleOrBuilderpublic com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Create timestamp.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTimeOrBuilder in interface BranchRuleOrBuilderpublic boolean hasUpdateTime()
Output only. Update timestamp.
.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasUpdateTime in interface BranchRuleOrBuilderpublic com.google.protobuf.Timestamp getUpdateTime()
Output only. Update timestamp.
.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTime in interface BranchRuleOrBuilderpublic com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. Update timestamp.
.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTimeOrBuilder in interface BranchRuleOrBuilderpublic int getAnnotationsCount()
BranchRuleOrBuilderOptional. 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];
getAnnotationsCount in interface BranchRuleOrBuilderpublic 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];
containsAnnotations in interface BranchRuleOrBuilder@Deprecated public Map<String,String> getAnnotations()
getAnnotationsMap() instead.getAnnotations in interface BranchRuleOrBuilderpublic 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];
getAnnotationsMap in interface BranchRuleOrBuilderpublic 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];
getAnnotationsOrDefault in interface BranchRuleOrBuilderpublic 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];
getAnnotationsOrThrow in interface BranchRuleOrBuilderpublic 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];getEtag in interface BranchRuleOrBuilderpublic com.google.protobuf.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];getEtagBytes in interface BranchRuleOrBuilderpublic 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];getIncludePattern in interface BranchRuleOrBuilderpublic com.google.protobuf.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];getIncludePatternBytes in interface BranchRuleOrBuilderpublic boolean getDisabled()
Optional. Determines if the branch rule is disabled or not.
bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL];getDisabled in interface BranchRuleOrBuilderpublic boolean getRequirePullRequest()
Optional. Determines if the branch rule requires a pull request or not.
bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL];getRequirePullRequest in interface BranchRuleOrBuilderpublic 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];getMinimumReviewsCount in interface BranchRuleOrBuilderpublic 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];getMinimumApprovalsCount in interface BranchRuleOrBuilderpublic boolean getRequireCommentsResolved()
Optional. Determines if require comments resolved before merging to the branch.
bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL];getRequireCommentsResolved in interface BranchRuleOrBuilderpublic 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];getAllowStaleReviews in interface BranchRuleOrBuilderpublic boolean getRequireLinearHistory()
Optional. Determines if require linear history before merging to the branch.
bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL];getRequireLinearHistory in interface BranchRuleOrBuilderpublic 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];
getRequiredStatusChecksList in interface BranchRuleOrBuilderpublic 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];
getRequiredStatusChecksOrBuilderList in interface BranchRuleOrBuilderpublic 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];
getRequiredStatusChecksCount in interface BranchRuleOrBuilderpublic 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];
getRequiredStatusChecks in interface BranchRuleOrBuilderpublic 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];
getRequiredStatusChecksOrBuilder in interface BranchRuleOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static BranchRule parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BranchRule parseFrom(InputStream input) throws IOException
IOExceptionpublic static BranchRule parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static BranchRule parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static BranchRule parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static BranchRule parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static BranchRule parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic BranchRule.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static BranchRule.Builder newBuilder()
public static BranchRule.Builder newBuilder(BranchRule prototype)
public BranchRule.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected BranchRule.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static BranchRule getDefaultInstance()
public static com.google.protobuf.Parser<BranchRule> parser()
public com.google.protobuf.Parser<BranchRule> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public BranchRule getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.