Package com.google.cloud.orgpolicy.v2
Class PolicySpec.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
- com.google.cloud.orgpolicy.v2.PolicySpec.Builder
-
- All Implemented Interfaces:
PolicySpecOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- PolicySpec
public static final class PolicySpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder> implements PolicySpecOrBuilder
Defines a Cloud Organization `PolicySpec` which is used to specify `Constraints` for configurations of Cloud Platform resources.
Protobuf typegoogle.cloud.orgpolicy.v2.PolicySpec
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicySpec.BuilderaddAllRules(Iterable<? extends PolicySpec.PolicyRule> values)Up to 10 PolicyRules are allowed.PolicySpec.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)PolicySpec.BuilderaddRules(int index, PolicySpec.PolicyRule value)Up to 10 PolicyRules are allowed.PolicySpec.BuilderaddRules(int index, PolicySpec.PolicyRule.Builder builderForValue)Up to 10 PolicyRules are allowed.PolicySpec.BuilderaddRules(PolicySpec.PolicyRule value)Up to 10 PolicyRules are allowed.PolicySpec.BuilderaddRules(PolicySpec.PolicyRule.Builder builderForValue)Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.BuilderaddRulesBuilder()Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.BuilderaddRulesBuilder(int index)Up to 10 PolicyRules are allowed.PolicySpecbuild()PolicySpecbuildPartial()PolicySpec.Builderclear()PolicySpec.BuilderclearEtag()An opaque tag indicating the current version of the `Policy`, used for concurrency control.PolicySpec.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)PolicySpec.BuilderclearInheritFromParent()Determines the inheritance behavior for this `Policy`.PolicySpec.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)PolicySpec.BuilderclearReset()Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource.PolicySpec.BuilderclearRules()Up to 10 PolicyRules are allowed.PolicySpec.BuilderclearUpdateTime()Output only.PolicySpec.Builderclone()PolicySpecgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetEtag()An opaque tag indicating the current version of the `Policy`, used for concurrency control.com.google.protobuf.ByteStringgetEtagBytes()An opaque tag indicating the current version of the `Policy`, used for concurrency control.booleangetInheritFromParent()Determines the inheritance behavior for this `Policy`.booleangetReset()Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource.PolicySpec.PolicyRulegetRules(int index)Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.BuildergetRulesBuilder(int index)Up to 10 PolicyRules are allowed.List<PolicySpec.PolicyRule.Builder>getRulesBuilderList()Up to 10 PolicyRules are allowed.intgetRulesCount()Up to 10 PolicyRules are allowed.List<PolicySpec.PolicyRule>getRulesList()Up to 10 PolicyRules are allowed.PolicySpec.PolicyRuleOrBuildergetRulesOrBuilder(int index)Up to 10 PolicyRules are allowed.List<? extends PolicySpec.PolicyRuleOrBuilder>getRulesOrBuilderList()Up to 10 PolicyRules are allowed.com.google.protobuf.TimestampgetUpdateTime()Output only.com.google.protobuf.Timestamp.BuildergetUpdateTimeBuilder()Output only.com.google.protobuf.TimestampOrBuildergetUpdateTimeOrBuilder()Output only.booleanhasUpdateTime()Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()PolicySpec.BuildermergeFrom(PolicySpec other)PolicySpec.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)PolicySpec.BuildermergeFrom(com.google.protobuf.Message other)PolicySpec.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)PolicySpec.BuildermergeUpdateTime(com.google.protobuf.Timestamp value)Output only.PolicySpec.BuilderremoveRules(int index)Up to 10 PolicyRules are allowed.PolicySpec.BuildersetEtag(String value)An opaque tag indicating the current version of the `Policy`, used for concurrency control.PolicySpec.BuildersetEtagBytes(com.google.protobuf.ByteString value)An opaque tag indicating the current version of the `Policy`, used for concurrency control.PolicySpec.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)PolicySpec.BuildersetInheritFromParent(boolean value)Determines the inheritance behavior for this `Policy`.PolicySpec.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)PolicySpec.BuildersetReset(boolean value)Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource.PolicySpec.BuildersetRules(int index, PolicySpec.PolicyRule value)Up to 10 PolicyRules are allowed.PolicySpec.BuildersetRules(int index, PolicySpec.PolicyRule.Builder builderForValue)Up to 10 PolicyRules are allowed.PolicySpec.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)PolicySpec.BuildersetUpdateTime(com.google.protobuf.Timestamp value)Output only.PolicySpec.BuildersetUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)Output only.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clear
public PolicySpec.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.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.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
getDefaultInstanceForType
public PolicySpec getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public PolicySpec build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PolicySpec buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PolicySpec.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
setField
public PolicySpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clearField
public PolicySpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clearOneof
public PolicySpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
setRepeatedField
public PolicySpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
addRepeatedField
public PolicySpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
mergeFrom
public PolicySpec.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PolicySpec.Builder>
-
mergeFrom
public PolicySpec.Builder mergeFrom(PolicySpec other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
mergeFrom
public PolicySpec.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<PolicySpec.Builder>- Throws:
IOException
-
getEtag
public String getEtag()
An opaque tag indicating the current version of the `Policy`, 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 `Policy` 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;- Specified by:
getEtagin interfacePolicySpecOrBuilder- Returns:
- The etag.
-
getEtagBytes
public com.google.protobuf.ByteString getEtagBytes()
An opaque tag indicating the current version of the `Policy`, 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 `Policy` 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;- Specified by:
getEtagBytesin interfacePolicySpecOrBuilder- Returns:
- The bytes for etag.
-
setEtag
public PolicySpec.Builder setEtag(String value)
An opaque tag indicating the current version of the `Policy`, 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 `Policy` 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;- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
public PolicySpec.Builder clearEtag()
An opaque tag indicating the current version of the `Policy`, 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 `Policy` 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;- Returns:
- This builder for chaining.
-
setEtagBytes
public PolicySpec.Builder setEtagBytes(com.google.protobuf.ByteString value)
An opaque tag indicating the current version of the `Policy`, 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 `Policy` 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;- Parameters:
value- The bytes for etag to set.- Returns:
- This builder for chaining.
-
hasUpdateTime
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];- Specified by:
hasUpdateTimein interfacePolicySpecOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public 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];- Specified by:
getUpdateTimein interfacePolicySpecOrBuilder- Returns:
- The updateTime.
-
setUpdateTime
public 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];
-
setUpdateTime
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];
-
mergeUpdateTime
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];
-
clearUpdateTime
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];
-
getUpdateTimeBuilder
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];
-
getUpdateTimeOrBuilder
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];- Specified by:
getUpdateTimeOrBuilderin interfacePolicySpecOrBuilder
-
getRulesList
public List<PolicySpec.PolicyRule> getRulesList()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;- Specified by:
getRulesListin interfacePolicySpecOrBuilder
-
getRulesCount
public int getRulesCount()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;- Specified by:
getRulesCountin interfacePolicySpecOrBuilder
-
getRules
public PolicySpec.PolicyRule getRules(int index)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;- Specified by:
getRulesin interfacePolicySpecOrBuilder
-
setRules
public PolicySpec.Builder setRules(int index, PolicySpec.PolicyRule value)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
setRules
public PolicySpec.Builder setRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addRules
public PolicySpec.Builder addRules(PolicySpec.PolicyRule value)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addRules
public PolicySpec.Builder addRules(int index, PolicySpec.PolicyRule value)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addRules
public PolicySpec.Builder addRules(PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addRules
public PolicySpec.Builder addRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addAllRules
public PolicySpec.Builder addAllRules(Iterable<? extends PolicySpec.PolicyRule> values)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
clearRules
public PolicySpec.Builder clearRules()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
removeRules
public PolicySpec.Builder removeRules(int index)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
getRulesBuilder
public PolicySpec.PolicyRule.Builder getRulesBuilder(int index)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
getRulesOrBuilder
public PolicySpec.PolicyRuleOrBuilder getRulesOrBuilder(int index)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;- Specified by:
getRulesOrBuilderin interfacePolicySpecOrBuilder
-
getRulesOrBuilderList
public List<? extends PolicySpec.PolicyRuleOrBuilder> getRulesOrBuilderList()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;- Specified by:
getRulesOrBuilderListin interfacePolicySpecOrBuilder
-
addRulesBuilder
public PolicySpec.PolicyRule.Builder addRulesBuilder()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
addRulesBuilder
public PolicySpec.PolicyRule.Builder addRulesBuilder(int index)
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
getRulesBuilderList
public List<PolicySpec.PolicyRule.Builder> getRulesBuilderList()
Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;
-
getInheritFromParent
public boolean getInheritFromParent()
Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules 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;- Specified by:
getInheritFromParentin interfacePolicySpecOrBuilder- Returns:
- The inheritFromParent.
-
setInheritFromParent
public PolicySpec.Builder setInheritFromParent(boolean value)
Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules 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;- Parameters:
value- The inheritFromParent to set.- Returns:
- This builder for chaining.
-
clearInheritFromParent
public PolicySpec.Builder clearInheritFromParent()
Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules 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;- Returns:
- This builder for chaining.
-
getReset
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;- Specified by:
getResetin interfacePolicySpecOrBuilder- Returns:
- The reset.
-
setReset
public 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;- Parameters:
value- The reset to set.- Returns:
- This builder for chaining.
-
clearReset
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;- Returns:
- This builder for chaining.
-
setUnknownFields
public final PolicySpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
mergeUnknownFields
public final PolicySpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
-