public static final class PolicySpec.PolicyRule.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder> implements PolicySpec.PolicyRuleOrBuilder
A rule used to express this policy.Protobuf type
google.cloud.orgpolicy.v2.PolicySpec.PolicyRule| Modifier and Type | Method and Description |
|---|---|
PolicySpec.PolicyRule.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PolicySpec.PolicyRule |
build() |
PolicySpec.PolicyRule |
buildPartial() |
PolicySpec.PolicyRule.Builder |
clear() |
PolicySpec.PolicyRule.Builder |
clearAllowAll()
Setting this to true means that all values are allowed.
|
PolicySpec.PolicyRule.Builder |
clearCondition()
A condition which determines whether this rule is used
in the evaluation of the policy.
|
PolicySpec.PolicyRule.Builder |
clearDenyAll()
Setting this to true means that all values are denied.
|
PolicySpec.PolicyRule.Builder |
clearEnforce()
If `true`, then the `Policy` is enforced.
|
PolicySpec.PolicyRule.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
PolicySpec.PolicyRule.Builder |
clearKind() |
PolicySpec.PolicyRule.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
PolicySpec.PolicyRule.Builder |
clearValues()
List of values to be used for this PolicyRule.
|
PolicySpec.PolicyRule.Builder |
clone() |
boolean |
getAllowAll()
Setting this to true means that all values are allowed.
|
com.google.type.Expr |
getCondition()
A condition which determines whether this rule is used
in the evaluation of the policy.
|
com.google.type.Expr.Builder |
getConditionBuilder()
A condition which determines whether this rule is used
in the evaluation of the policy.
|
com.google.type.ExprOrBuilder |
getConditionOrBuilder()
A condition which determines whether this rule is used
in the evaluation of the policy.
|
PolicySpec.PolicyRule |
getDefaultInstanceForType() |
boolean |
getDenyAll()
Setting this to true means that all values are denied.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getEnforce()
If `true`, then the `Policy` is enforced.
|
PolicySpec.PolicyRule.KindCase |
getKindCase() |
PolicySpec.PolicyRule.StringValues |
getValues()
List of values to be used for this PolicyRule.
|
PolicySpec.PolicyRule.StringValues.Builder |
getValuesBuilder()
List of values to be used for this PolicyRule.
|
PolicySpec.PolicyRule.StringValuesOrBuilder |
getValuesOrBuilder()
List of values to be used for this PolicyRule.
|
boolean |
hasAllowAll()
Setting this to true means that all values are allowed.
|
boolean |
hasCondition()
A condition which determines whether this rule is used
in the evaluation of the policy.
|
boolean |
hasDenyAll()
Setting this to true means that all values are denied.
|
boolean |
hasEnforce()
If `true`, then the `Policy` is enforced.
|
boolean |
hasValues()
List of values to be used for this PolicyRule.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
PolicySpec.PolicyRule.Builder |
mergeCondition(com.google.type.Expr value)
A condition which determines whether this rule is used
in the evaluation of the policy.
|
PolicySpec.PolicyRule.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
PolicySpec.PolicyRule.Builder |
mergeFrom(com.google.protobuf.Message other) |
PolicySpec.PolicyRule.Builder |
mergeFrom(PolicySpec.PolicyRule other) |
PolicySpec.PolicyRule.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PolicySpec.PolicyRule.Builder |
mergeValues(PolicySpec.PolicyRule.StringValues value)
List of values to be used for this PolicyRule.
|
PolicySpec.PolicyRule.Builder |
setAllowAll(boolean value)
Setting this to true means that all values are allowed.
|
PolicySpec.PolicyRule.Builder |
setCondition(com.google.type.Expr.Builder builderForValue)
A condition which determines whether this rule is used
in the evaluation of the policy.
|
PolicySpec.PolicyRule.Builder |
setCondition(com.google.type.Expr value)
A condition which determines whether this rule is used
in the evaluation of the policy.
|
PolicySpec.PolicyRule.Builder |
setDenyAll(boolean value)
Setting this to true means that all values are denied.
|
PolicySpec.PolicyRule.Builder |
setEnforce(boolean value)
If `true`, then the `Policy` is enforced.
|
PolicySpec.PolicyRule.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PolicySpec.PolicyRule.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
PolicySpec.PolicyRule.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PolicySpec.PolicyRule.Builder |
setValues(PolicySpec.PolicyRule.StringValues.Builder builderForValue)
List of values to be used for this PolicyRule.
|
PolicySpec.PolicyRule.Builder |
setValues(PolicySpec.PolicyRule.StringValues value)
List of values to be used for this PolicyRule.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic PolicySpec.PolicyRule build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic PolicySpec.PolicyRule buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic PolicySpec.PolicyRule.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder mergeFrom(PolicySpec.PolicyRule other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public PolicySpec.PolicyRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PolicySpec.PolicyRule.Builder>IOExceptionpublic PolicySpec.PolicyRule.KindCase getKindCase()
getKindCase in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder clearKind()
public boolean hasValues()
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;hasValues in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.StringValues getValues()
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;getValues in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder setValues(PolicySpec.PolicyRule.StringValues value)
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;public PolicySpec.PolicyRule.Builder setValues(PolicySpec.PolicyRule.StringValues.Builder builderForValue)
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;public PolicySpec.PolicyRule.Builder mergeValues(PolicySpec.PolicyRule.StringValues value)
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;public PolicySpec.PolicyRule.Builder clearValues()
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;public PolicySpec.PolicyRule.StringValues.Builder getValuesBuilder()
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;public PolicySpec.PolicyRule.StringValuesOrBuilder getValuesOrBuilder()
List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1;getValuesOrBuilder in interface PolicySpec.PolicyRuleOrBuilderpublic boolean hasAllowAll()
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.
bool allow_all = 2;hasAllowAll in interface PolicySpec.PolicyRuleOrBuilderpublic boolean getAllowAll()
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.
bool allow_all = 2;getAllowAll in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder setAllowAll(boolean value)
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.
bool allow_all = 2;value - The allowAll to set.public PolicySpec.PolicyRule.Builder clearAllowAll()
Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.
bool allow_all = 2;public boolean hasDenyAll()
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.
bool deny_all = 3;hasDenyAll in interface PolicySpec.PolicyRuleOrBuilderpublic boolean getDenyAll()
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.
bool deny_all = 3;getDenyAll in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder setDenyAll(boolean value)
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.
bool deny_all = 3;value - The denyAll to set.public PolicySpec.PolicyRule.Builder clearDenyAll()
Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.
bool deny_all = 3;public boolean hasEnforce()
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
bool enforce = 4;hasEnforce in interface PolicySpec.PolicyRuleOrBuilderpublic boolean getEnforce()
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
bool enforce = 4;getEnforce in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder setEnforce(boolean value)
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
bool enforce = 4;value - The enforce to set.public PolicySpec.PolicyRule.Builder clearEnforce()
If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
bool enforce = 4;public boolean hasCondition()
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;hasCondition in interface PolicySpec.PolicyRuleOrBuilderpublic com.google.type.Expr getCondition()
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;getCondition in interface PolicySpec.PolicyRuleOrBuilderpublic PolicySpec.PolicyRule.Builder setCondition(com.google.type.Expr value)
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;public PolicySpec.PolicyRule.Builder setCondition(com.google.type.Expr.Builder builderForValue)
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;public PolicySpec.PolicyRule.Builder mergeCondition(com.google.type.Expr value)
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;public PolicySpec.PolicyRule.Builder clearCondition()
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;public com.google.type.Expr.Builder getConditionBuilder()
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;public com.google.type.ExprOrBuilder getConditionOrBuilder()
A condition which determines whether this rule is used
in the evaluation of the policy. When set, the `expression` field in
the `Expr' must include from 1 to 10 subexpressions, joined by the "||"
or "&&" operators. Each subexpression must be of the form
"resource.matchTag('<ORG_ID>/tag_key_short_name,
'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id',
'tagValues/value_id')". where key_name and value_name are the resource
names for Label Keys and Values. These names are available from the Tag
Manager Service. An example expression is:
"resource.matchTag('123456789/environment,
'prod')". or "resource.matchTagId('tagKeys/123',
'tagValues/456')".
.google.type.Expr condition = 5;getConditionOrBuilder in interface PolicySpec.PolicyRuleOrBuilderpublic final PolicySpec.PolicyRule.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>public final PolicySpec.PolicyRule.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.PolicyRule.Builder>Copyright © 2023 Google LLC. All rights reserved.