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.Builder
addAllRules(Iterable<? extends PolicySpec.PolicyRule> values)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
PolicySpec.Builder
addRules(int index, PolicySpec.PolicyRule value)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
addRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
addRules(PolicySpec.PolicyRule value)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
addRules(PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.Builder
addRulesBuilder()
Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.Builder
addRulesBuilder(int index)
Up to 10 PolicyRules are allowed.PolicySpec
build()
PolicySpec
buildPartial()
PolicySpec.Builder
clear()
PolicySpec.Builder
clearEtag()
An opaque tag indicating the current version of the `Policy`, 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()
Up to 10 PolicyRules are allowed.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 `Policy`, used for concurrency control.com.google.protobuf.ByteString
getEtagBytes()
An opaque tag indicating the current version of the `Policy`, 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)
Up to 10 PolicyRules are allowed.PolicySpec.PolicyRule.Builder
getRulesBuilder(int index)
Up to 10 PolicyRules are allowed.List<PolicySpec.PolicyRule.Builder>
getRulesBuilderList()
Up to 10 PolicyRules are allowed.int
getRulesCount()
Up to 10 PolicyRules are allowed.List<PolicySpec.PolicyRule>
getRulesList()
Up to 10 PolicyRules are allowed.PolicySpec.PolicyRuleOrBuilder
getRulesOrBuilder(int index)
Up to 10 PolicyRules are allowed.List<? extends PolicySpec.PolicyRuleOrBuilder>
getRulesOrBuilderList()
Up to 10 PolicyRules are allowed.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(PolicySpec other)
PolicySpec.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
PolicySpec.Builder
mergeFrom(com.google.protobuf.Message other)
PolicySpec.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
PolicySpec.Builder
mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only.PolicySpec.Builder
removeRules(int index)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
setEtag(String value)
An opaque tag indicating the current version of the `Policy`, used for concurrency control.PolicySpec.Builder
setEtagBytes(com.google.protobuf.ByteString value)
An opaque tag indicating the current version of the `Policy`, 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 value)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
setRules(int index, PolicySpec.PolicyRule.Builder builderForValue)
Up to 10 PolicyRules are allowed.PolicySpec.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
PolicySpec.Builder
setUpdateTime(com.google.protobuf.Timestamp value)
Output only.PolicySpec.Builder
setUpdateTime(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clear
public PolicySpec.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
getDefaultInstanceForType
public PolicySpec getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public PolicySpec build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PolicySpec buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PolicySpec.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
setField
public PolicySpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clearField
public PolicySpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
clearOneof
public PolicySpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
setRepeatedField
public PolicySpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
addRepeatedField
public PolicySpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
mergeFrom
public PolicySpec.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PolicySpec.Builder>
-
mergeFrom
public PolicySpec.Builder mergeFrom(PolicySpec other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getEtag
in 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:
getEtagBytes
in 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:
hasUpdateTime
in 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:
getUpdateTime
in 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:
getUpdateTimeOrBuilder
in 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:
getRulesList
in 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:
getRulesCount
in 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:
getRules
in 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:
getRulesOrBuilder
in 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:
getRulesOrBuilderList
in 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:
getInheritFromParent
in 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:
getReset
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
mergeUnknownFields
public final PolicySpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PolicySpec.Builder>
-
-