Class Rule.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
com.google.devtools.artifactregistry.v1.Rule.Builder
- All Implemented Interfaces:
RuleOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Rule
public static final class Rule.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
implements RuleOrBuilder
A rule defines the deny or allow action of the operation it applies to and the conditions required for the rule to apply. You can set one rule for an entire repository and one rule for each package within.Protobuf type
google.devtools.artifactregistry.v1.Rule-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The action this rule takes.Optional.The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`..google.devtools.artifactregistry.v1.Rule.Operation operation = 3;The package ID the rule applies to.The action this rule takes.intThe action this rule takes.Optional.Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetName()The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.com.google.protobuf.ByteStringThe name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`..google.devtools.artifactregistry.v1.Rule.Operation operation = 3;int.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;The package ID the rule applies to.com.google.protobuf.ByteStringThe package ID the rule applies to.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeCondition(Expr value) Optional.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAction(Rule.Action value) The action this rule takes.setActionValue(int value) The action this rule takes.setCondition(Expr value) Optional.setCondition(Expr.Builder builderForValue) Optional.The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.setNameBytes(com.google.protobuf.ByteString value) The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.setOperation(Rule.Operation value) .google.devtools.artifactregistry.v1.Rule.Operation operation = 3;setOperationValue(int value) .google.devtools.artifactregistry.v1.Rule.Operation operation = 3;setPackageId(String value) The package ID the rule applies to.setPackageIdBytes(com.google.protobuf.ByteString value) The package ID the rule applies to.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Rule.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Rule.Builder>
-
mergeFrom
public Rule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Rule.Builder>- Throws:
IOException
-
getName
The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.
string name = 1;- Specified by:
getNamein interfaceRuleOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.
string name = 1;- Specified by:
getNameBytesin interfaceRuleOrBuilder- Returns:
- The bytes for name.
-
setName
The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The name of the rule, for example: `projects/p1/locations/us-central1/repositories/repo1/rules/rule1`.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getActionValue
public int getActionValue()The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;- Specified by:
getActionValuein interfaceRuleOrBuilder- Returns:
- The enum numeric value on the wire for action.
-
setActionValue
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;- Parameters:
value- The enum numeric value on the wire for action to set.- Returns:
- This builder for chaining.
-
getAction
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;- Specified by:
getActionin interfaceRuleOrBuilder- Returns:
- The action.
-
setAction
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;- Parameters:
value- The action to set.- Returns:
- This builder for chaining.
-
clearAction
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;- Returns:
- This builder for chaining.
-
getOperationValue
public int getOperationValue().google.devtools.artifactregistry.v1.Rule.Operation operation = 3;- Specified by:
getOperationValuein interfaceRuleOrBuilder- Returns:
- The enum numeric value on the wire for operation.
-
setOperationValue
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;- Parameters:
value- The enum numeric value on the wire for operation to set.- Returns:
- This builder for chaining.
-
getOperation
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;- Specified by:
getOperationin interfaceRuleOrBuilder- Returns:
- The operation.
-
setOperation
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;- Parameters:
value- The operation to set.- Returns:
- This builder for chaining.
-
clearOperation
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;- Returns:
- This builder for chaining.
-
hasCondition
public boolean hasCondition()Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasConditionin interfaceRuleOrBuilder- Returns:
- Whether the condition field is set.
-
getCondition
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConditionin interfaceRuleOrBuilder- Returns:
- The condition.
-
setCondition
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL]; -
setCondition
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL]; -
mergeCondition
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL]; -
clearCondition
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getConditionBuilder
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getConditionOrBuilder
Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.
.google.type.Expr condition = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getConditionOrBuilderin interfaceRuleOrBuilder
-
getPackageId
The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
string package_id = 5;- Specified by:
getPackageIdin interfaceRuleOrBuilder- Returns:
- The packageId.
-
getPackageIdBytes
public com.google.protobuf.ByteString getPackageIdBytes()The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
string package_id = 5;- Specified by:
getPackageIdBytesin interfaceRuleOrBuilder- Returns:
- The bytes for packageId.
-
setPackageId
The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
string package_id = 5;- Parameters:
value- The packageId to set.- Returns:
- This builder for chaining.
-
clearPackageId
The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
string package_id = 5;- Returns:
- This builder for chaining.
-
setPackageIdBytes
The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
string package_id = 5;- Parameters:
value- The bytes for packageId to set.- Returns:
- This builder for chaining.
-