- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.7-SNAPSHOT
- 2.2.1
- 2.1.2
- 2.0.10
public static final class PolicySpec.PolicyRule.StringValues.Builder extends GeneratedMessageV3.Builder<PolicySpec.PolicyRule.StringValues.Builder> implements PolicySpec.PolicyRule.StringValuesOrBuilder
A message that holds specific allowed and denied values.
This message can define specific values and subtrees of the Resource
Manager resource hierarchy (Organizations
, Folders
, Projects
) that
are allowed or denied. This is achieved by using the under:
and
optional is:
prefixes.
The under:
prefix is used to denote resource subtree values.
The is:
prefix is used to denote specific values, and is required only
if the value contains a ":". Values prefixed with "is:" are treated the
same as values with no prefix.
Ancestry subtrees must be in one of the following formats:
projects/<project-id>
(for example,projects/tokyo-rain-123
)folders/<folder-id>
(for example,folders/1234
)organizations/<organization-id>
(for example,organizations/1234
)The
supports_under
field of the associatedConstraint
defines whether ancestry prefixes can be used.
Protobuf type google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > PolicySpec.PolicyRule.StringValues.BuilderImplements
PolicySpec.PolicyRule.StringValuesOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllAllowedValues(Iterable<String> values)
public PolicySpec.PolicyRule.StringValues.Builder addAllAllowedValues(Iterable<String> values)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The allowedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addAllDeniedValues(Iterable<String> values)
public PolicySpec.PolicyRule.StringValues.Builder addAllDeniedValues(Iterable<String> values)
List of values denied at this resource.
repeated string denied_values = 2;
Parameter | |
---|---|
Name | Description |
values |
Iterable<String> The deniedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addAllowedValues(String value)
public PolicySpec.PolicyRule.StringValues.Builder addAllowedValues(String value)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameter | |
---|---|
Name | Description |
value |
String The allowedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addAllowedValuesBytes(ByteString value)
public PolicySpec.PolicyRule.StringValues.Builder addAllowedValuesBytes(ByteString value)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the allowedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addDeniedValues(String value)
public PolicySpec.PolicyRule.StringValues.Builder addDeniedValues(String value)
List of values denied at this resource.
repeated string denied_values = 2;
Parameter | |
---|---|
Name | Description |
value |
String The deniedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addDeniedValuesBytes(ByteString value)
public PolicySpec.PolicyRule.StringValues.Builder addDeniedValuesBytes(ByteString value)
List of values denied at this resource.
repeated string denied_values = 2;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes of the deniedValues to add. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PolicySpec.PolicyRule.StringValues.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
build()
public PolicySpec.PolicyRule.StringValues build()
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues |
buildPartial()
public PolicySpec.PolicyRule.StringValues buildPartial()
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues |
clear()
public PolicySpec.PolicyRule.StringValues.Builder clear()
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
clearAllowedValues()
public PolicySpec.PolicyRule.StringValues.Builder clearAllowedValues()
List of values allowed at this resource.
repeated string allowed_values = 1;
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
clearDeniedValues()
public PolicySpec.PolicyRule.StringValues.Builder clearDeniedValues()
List of values denied at this resource.
repeated string denied_values = 2;
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public PolicySpec.PolicyRule.StringValues.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public PolicySpec.PolicyRule.StringValues.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
clone()
public PolicySpec.PolicyRule.StringValues.Builder clone()
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
getAllowedValues(int index)
public String getAllowedValues(int index)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The allowedValues at the given index. |
getAllowedValuesBytes(int index)
public ByteString getAllowedValuesBytes(int index)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the allowedValues at the given index. |
getAllowedValuesCount()
public int getAllowedValuesCount()
List of values allowed at this resource.
repeated string allowed_values = 1;
Returns | |
---|---|
Type | Description |
int |
The count of allowedValues. |
getAllowedValuesList()
public ProtocolStringList getAllowedValuesList()
List of values allowed at this resource.
repeated string allowed_values = 1;
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the allowedValues. |
getDefaultInstanceForType()
public PolicySpec.PolicyRule.StringValues getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues |
getDeniedValues(int index)
public String getDeniedValues(int index)
List of values denied at this resource.
repeated string denied_values = 2;
Parameter | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String |
The deniedValues at the given index. |
getDeniedValuesBytes(int index)
public ByteString getDeniedValuesBytes(int index)
List of values denied at this resource.
repeated string denied_values = 2;
Parameter | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString |
The bytes of the deniedValues at the given index. |
getDeniedValuesCount()
public int getDeniedValuesCount()
List of values denied at this resource.
repeated string denied_values = 2;
Returns | |
---|---|
Type | Description |
int |
The count of deniedValues. |
getDeniedValuesList()
public ProtocolStringList getDeniedValuesList()
List of values denied at this resource.
repeated string denied_values = 2;
Returns | |
---|---|
Type | Description |
ProtocolStringList |
A list containing the deniedValues. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(PolicySpec.PolicyRule.StringValues other)
public PolicySpec.PolicyRule.StringValues.Builder mergeFrom(PolicySpec.PolicyRule.StringValues other)
Parameter | |
---|---|
Name | Description |
other |
PolicySpec.PolicyRule.StringValues |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PolicySpec.PolicyRule.StringValues.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public PolicySpec.PolicyRule.StringValues.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PolicySpec.PolicyRule.StringValues.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
setAllowedValues(int index, String value)
public PolicySpec.PolicyRule.StringValues.Builder setAllowedValues(int index, String value)
List of values allowed at this resource.
repeated string allowed_values = 1;
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The allowedValues to set. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
setDeniedValues(int index, String value)
public PolicySpec.PolicyRule.StringValues.Builder setDeniedValues(int index, String value)
List of values denied at this resource.
repeated string denied_values = 2;
Parameters | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The deniedValues to set. |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public PolicySpec.PolicyRule.StringValues.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PolicySpec.PolicyRule.StringValues.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final PolicySpec.PolicyRule.StringValues.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
PolicySpec.PolicyRule.StringValues.Builder |