Class PolicySpec

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.orgpolicy.v2.PolicySpec
All Implemented Interfaces:
PolicySpecOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class PolicySpec extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.
    static final class 
    A rule used to express this policy.
    static interface 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    static PolicySpec
     
     
    static final 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.
    com.google.protobuf.Parser<PolicySpec>
     
    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
    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
    int
     
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    int
     
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static PolicySpec
     
    static PolicySpec
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static PolicySpec
    parseFrom(byte[] data)
     
    static PolicySpec
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static PolicySpec
    parseFrom(com.google.protobuf.ByteString data)
     
    static PolicySpec
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static PolicySpec
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static PolicySpec
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static PolicySpec
     
    static PolicySpec
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static PolicySpec
     
    static PolicySpec
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<PolicySpec>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

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

  • 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
    • 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.
    • 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.
    • 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
    • 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
    • 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
    • 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
    • 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.
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static PolicySpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PolicySpec parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PolicySpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static PolicySpec parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static PolicySpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static PolicySpec.Builder newBuilder()
    • newBuilder

      public static PolicySpec.Builder newBuilder(PolicySpec prototype)
    • toBuilder

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

      protected PolicySpec.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static PolicySpec getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<PolicySpec> parser()
    • getParserForType

      public com.google.protobuf.Parser<PolicySpec> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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