Send feedback
Class Rule (1.55.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.55.0 keyboard_arrow_down
public final class Rule extends GeneratedMessageV3 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int ACTION_FIELD_NUMBER
Field Value
Type
Description
int
public static final int CONDITION_FIELD_NUMBER
Field Value
Type
Description
int
public static final int NAME_FIELD_NUMBER
Field Value
Type
Description
int
public static final int OPERATION_FIELD_NUMBER
Field Value
Type
Description
int
public static final int PACKAGE_ID_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
public static Rule getDefaultInstance ()
Returns
Type
Description
Rule
public static final Descriptors . Descriptor getDescriptor ()
public static Rule . Builder newBuilder ()
public static Rule . Builder newBuilder ( Rule prototype )
Parameter
Name
Description
prototype
Rule
public static Rule parseDelimitedFrom ( InputStream input )
Returns
Type
Description
Rule
public static Rule parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Rule parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
Returns
Type
Description
Rule
public static Rule parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Rule parseFrom ( ByteString data )
Returns
Type
Description
Rule
public static Rule parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Rule parseFrom ( CodedInputStream input )
Returns
Type
Description
Rule
public static Rule parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Rule parseFrom ( InputStream input )
Returns
Type
Description
Rule
public static Rule parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Rule parseFrom ( ByteBuffer data )
Returns
Type
Description
Rule
public static Rule parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Rule
public static Parser<Rule> parser ()
Methods
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
public Rule . Action getAction ()
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;
public int getActionValue ()
The action this rule takes.
.google.devtools.artifactregistry.v1.Rule.Action action = 2;
Returns
Type
Description
int
The enum numeric value on the wire for action.
public Expr 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];
Returns
Type
Description
com.google.type.Expr
The condition.
public ExprOrBuilder 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];
Returns
Type
Description
com.google.type.ExprOrBuilder
public Rule getDefaultInstanceForType ()
Returns
Type
Description
Rule
The name of the rule, for example:
projects/p1/locations/us-central1/repositories/repo1/rules/rule1
.
string name = 1;
Returns
Type
Description
String
The name.
public ByteString getNameBytes ()
The name of the rule, for example:
projects/p1/locations/us-central1/repositories/repo1/rules/rule1
.
string name = 1;
Returns
Type
Description
ByteString
The bytes for name.
public Rule . Operation getOperation ()
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;
public int getOperationValue ()
.google.devtools.artifactregistry.v1.Rule.Operation operation = 3;
Returns
Type
Description
int
The enum numeric value on the wire for operation.
public String getPackageId ()
The package ID the rule applies to.
If empty, this rule applies to all packages inside the repository.
string package_id = 5;
Returns
Type
Description
String
The packageId.
public ByteString getPackageIdBytes ()
The package ID the rule applies to.
If empty, this rule applies to all packages inside the repository.
string package_id = 5;
Returns
Type
Description
ByteString
The bytes for packageId.
public Parser<Rule> getParserForType ()
Overrides
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
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];
Returns
Type
Description
boolean
Whether the condition field is set.
Returns
Type
Description
int
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
public final boolean isInitialized ()
Overrides
public Rule . Builder newBuilderForType ()
protected Rule . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
public Rule . Builder toBuilder ()
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[],[]]