public static final class PolicySpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder> implements PolicySpecOrBuilder
Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.Protobuf type
google.cloud.orgpolicy.v2.PolicySpec| Modifier and Type | Method and Description |
|---|---|
PolicySpec.Builder |
addAllRules(Iterable<? extends PolicySpec.PolicyRule> values)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PolicySpec.Builder |
addRules(int index,
PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
addRules(int index,
PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
addRules(PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
addRules(PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.PolicyRule.Builder |
addRulesBuilder()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.PolicyRule.Builder |
addRulesBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec |
build() |
PolicySpec |
buildPartial() |
PolicySpec.Builder |
clear() |
PolicySpec.Builder |
clearEtag()
An opaque tag indicating the current version of the policySpec, used for
concurrency control.
|
PolicySpec.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
PolicySpec.Builder |
clearInheritFromParent()
Determines the inheritance behavior for this policy.
|
PolicySpec.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
PolicySpec.Builder |
clearReset()
Ignores policies set above this resource and restores the
`constraint_default` enforcement behavior of the specific constraint at
this resource.
|
PolicySpec.Builder |
clearRules()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
clearUpdateTime()
Output only.
|
PolicySpec.Builder |
clone() |
PolicySpec |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getEtag()
An opaque tag indicating the current version of the policySpec, used for
concurrency control.
|
com.google.protobuf.ByteString |
getEtagBytes()
An opaque tag indicating the current version of the policySpec, used for
concurrency control.
|
boolean |
getInheritFromParent()
Determines the inheritance behavior for this policy.
|
boolean |
getReset()
Ignores policies set above this resource and restores the
`constraint_default` enforcement behavior of the specific constraint at
this resource.
|
PolicySpec.PolicyRule |
getRules(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.PolicyRule.Builder |
getRulesBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
List<PolicySpec.PolicyRule.Builder> |
getRulesBuilderList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
int |
getRulesCount()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
List<PolicySpec.PolicyRule> |
getRulesList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.PolicyRuleOrBuilder |
getRulesOrBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
List<? extends PolicySpec.PolicyRuleOrBuilder> |
getRulesOrBuilderList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
com.google.protobuf.Timestamp |
getUpdateTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getUpdateTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
boolean |
hasUpdateTime()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
PolicySpec.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
PolicySpec.Builder |
mergeFrom(com.google.protobuf.Message other) |
PolicySpec.Builder |
mergeFrom(PolicySpec other) |
PolicySpec.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PolicySpec.Builder |
mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only.
|
PolicySpec.Builder |
removeRules(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
setEtag(String value)
An opaque tag indicating the current version of the policySpec, used for
concurrency control.
|
PolicySpec.Builder |
setEtagBytes(com.google.protobuf.ByteString value)
An opaque tag indicating the current version of the policySpec, used for
concurrency control.
|
PolicySpec.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PolicySpec.Builder |
setInheritFromParent(boolean value)
Determines the inheritance behavior for this policy.
|
PolicySpec.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
PolicySpec.Builder |
setReset(boolean value)
Ignores policies set above this resource and restores the
`constraint_default` enforcement behavior of the specific constraint at
this resource.
|
PolicySpec.Builder |
setRules(int index,
PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
setRules(int index,
PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
|
PolicySpec.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PolicySpec.Builder |
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
PolicySpec.Builder |
setUpdateTime(com.google.protobuf.Timestamp value)
Output only.
|
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.Builder>public PolicySpec.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.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.Builder>public PolicySpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic PolicySpec build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic PolicySpec buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic PolicySpec.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.Builder>public PolicySpec.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.Builder>public PolicySpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>public PolicySpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>public PolicySpec.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.Builder>public PolicySpec.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.Builder>public PolicySpec.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PolicySpec.Builder>public PolicySpec.Builder mergeFrom(PolicySpec other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>public PolicySpec.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.Builder>IOExceptionpublic String getEtag()
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
string etag = 1;getEtag in interface PolicySpecOrBuilderpublic com.google.protobuf.ByteString getEtagBytes()
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
string etag = 1;getEtagBytes in interface PolicySpecOrBuilderpublic PolicySpec.Builder setEtag(String value)
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
string etag = 1;value - The etag to set.public PolicySpec.Builder clearEtag()
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
string etag = 1;public PolicySpec.Builder setEtagBytes(com.google.protobuf.ByteString value)
An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
string etag = 1;value - The bytes for etag to set.public boolean hasUpdateTime()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasUpdateTime in interface PolicySpecOrBuilderpublic com.google.protobuf.Timestamp getUpdateTime()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTime in interface PolicySpecOrBuilderpublic PolicySpec.Builder setUpdateTime(com.google.protobuf.Timestamp value)
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public PolicySpec.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public PolicySpec.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public PolicySpec.Builder clearUpdateTime()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTimeOrBuilder in interface PolicySpecOrBuilderpublic List<PolicySpec.PolicyRule> getRulesList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesList in interface PolicySpecOrBuilderpublic int getRulesCount()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesCount in interface PolicySpecOrBuilderpublic PolicySpec.PolicyRule getRules(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRules in interface PolicySpecOrBuilderpublic PolicySpec.Builder setRules(int index, PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder setRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder addRules(PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder addRules(int index, PolicySpec.PolicyRule value)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder addRules(PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder addRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder addAllRules(Iterable<? extends PolicySpec.PolicyRule> values)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder clearRules()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.Builder removeRules(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.PolicyRule.Builder getRulesBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.PolicyRuleOrBuilder getRulesOrBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesOrBuilder in interface PolicySpecOrBuilderpublic List<? extends PolicySpec.PolicyRuleOrBuilder> getRulesOrBuilderList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesOrBuilderList in interface PolicySpecOrBuilderpublic PolicySpec.PolicyRule.Builder addRulesBuilder()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public PolicySpec.PolicyRule.Builder addRulesBuilder(int index)
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public List<PolicySpec.PolicyRule.Builder> getRulesBuilderList()
In policies for boolean constraints, the following requirements apply:
- There must be one and only one policy rule where condition is unset.
- Boolean policy rules with conditions must set `enforced` to the
opposite of the policy rule without a condition.
- During policy evaluation, policy rules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;public boolean getInheritFromParent()
Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
bool inherit_from_parent = 4;getInheritFromParent in interface PolicySpecOrBuilderpublic PolicySpec.Builder setInheritFromParent(boolean value)
Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
bool inherit_from_parent = 4;value - The inheritFromParent to set.public PolicySpec.Builder clearInheritFromParent()
Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
bool inherit_from_parent = 4;public boolean getReset()
Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 5;getReset in interface PolicySpecOrBuilderpublic PolicySpec.Builder setReset(boolean value)
Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 5;value - The reset to set.public PolicySpec.Builder clearReset()
Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 5;public final PolicySpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>public final PolicySpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>Copyright © 2024 Google LLC. All rights reserved.