Class PolicySpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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
  • Method Summary

    Modifier and Type
    Method
    Description
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    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
    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
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    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
     
     
     
    An opaque tag indicating the current version of the policySpec, used for concurrency control.
    Determines the inheritance behavior for this policy.
    Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource.
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    Output only.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    An opaque tag indicating the current version of the policySpec, used for concurrency control.
    com.google.protobuf.ByteString
    An opaque tag indicating the current version of the policySpec, used for concurrency control.
    boolean
    Determines the inheritance behavior for this policy.
    boolean
    Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource.
    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
    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
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    int
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset
    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
    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
    Output only.
    com.google.protobuf.Timestamp.Builder
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeUpdateTime(com.google.protobuf.Timestamp value)
    Output only.
    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
    setEtag(String value)
    An opaque tag indicating the current version of the policySpec, used for concurrency control.
    setEtagBytes(com.google.protobuf.ByteString value)
    An opaque tag indicating the current version of the policySpec, used for concurrency control.
    setInheritFromParent(boolean value)
    Determines the inheritance behavior for this policy.
    setReset(boolean value)
    Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource.
    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
    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
    setUpdateTime(com.google.protobuf.Timestamp value)
    Output only.
    setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
    Output only.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PolicySpec.Builder>
    • clear

      public PolicySpec.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PolicySpec.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PolicySpec.Builder>
    • getDefaultInstanceForType

      public PolicySpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PolicySpec build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PolicySpec buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PolicySpec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PolicySpec.Builder>
    • mergeFrom

      public PolicySpec.Builder mergeFrom(PolicySpec other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PolicySpec.Builder>
    • mergeFrom

      public PolicySpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PolicySpec.Builder>
      Throws:
      IOException
    • getEtag

      public 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;
      Specified by:
      getEtag in interface PolicySpecOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public 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;
      Specified by:
      getEtagBytes in interface PolicySpecOrBuilder
      Returns:
      The bytes for etag.
    • setEtag

      public 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;
      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 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;
      Returns:
      This builder for chaining.
    • setEtagBytes

      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;
      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 interface PolicySpecOrBuilder
      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 interface PolicySpecOrBuilder
      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 interface PolicySpecOrBuilder
    • getRulesList

      public 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;
      Specified by:
      getRulesList in interface PolicySpecOrBuilder
    • getRulesCount

      public 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;
      Specified by:
      getRulesCount in interface PolicySpecOrBuilder
    • getRules

      public 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;
      Specified by:
      getRules in interface PolicySpecOrBuilder
    • setRules

      public 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;
    • setRules

      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;
    • addRules

      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;
    • addRules

      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;
    • addRules

      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;
    • addRules

      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;
    • addAllRules

      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;
    • clearRules

      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;
    • removeRules

      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;
    • getRulesBuilder

      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;
    • getRulesOrBuilder

      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;
      Specified by:
      getRulesOrBuilder in interface PolicySpecOrBuilder
    • getRulesOrBuilderList

      public 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;
      Specified by:
      getRulesOrBuilderList in interface PolicySpecOrBuilder
    • addRulesBuilder

      public 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;
    • addRulesBuilder

      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;
    • getRulesBuilderList

      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;
    • getInheritFromParent

      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;
      Specified by:
      getInheritFromParent in interface PolicySpecOrBuilder
      Returns:
      The inheritFromParent.
    • setInheritFromParent

      public 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;
      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, 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;
      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 interface PolicySpecOrBuilder
      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.