Class Policy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.orgpolicy.v1.Policy
All Implemented Interfaces:
PolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Policy extends com.google.protobuf.GeneratedMessage implements PolicyOrBuilder
 Defines a Cloud Organization `Policy` which is used to specify `Constraints`
 for configurations of Cloud Platform resources.
 
Protobuf type google.cloud.orgpolicy.v1.Policy
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Used in `policy_type` to specify how `boolean_policy` will behave at this resource.
    static interface 
     
    static final class 
    Defines a Cloud Organization `Policy` which is used to specify `Constraints` for configurations of Cloud Platform resources.
    static final class 
    Used in `policy_type` to specify how `list_policy` behaves at this resource.
    static interface 
     
    static enum 
     
    static final class 
    Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource.
    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
     
    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
     
    For boolean `Constraints`, whether to enforce the `Constraint` or not.
    For boolean `Constraints`, whether to enforce the `Constraint` or not.
    The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.
    com.google.protobuf.ByteString
    The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.
    static Policy
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.ByteString
    An opaque tag indicating the current version of the `Policy`, used for concurrency control.
    List of values either allowed or disallowed.
    List of values either allowed or disallowed.
    com.google.protobuf.Parser<Policy>
     
     
    Restores the default behavior of the constraint; independent of `Constraint` type.
    Restores the default behavior of the constraint; independent of `Constraint` type.
    int
     
    com.google.protobuf.Timestamp
    The time stamp the `Policy` was previously updated.
    com.google.protobuf.TimestampOrBuilder
    The time stamp the `Policy` was previously updated.
    int
    Version of the `Policy`.
    boolean
    For boolean `Constraints`, whether to enforce the `Constraint` or not.
    int
     
    boolean
    List of values either allowed or disallowed.
    boolean
    Restores the default behavior of the constraint; independent of `Constraint` type.
    boolean
    The time stamp the `Policy` was previously updated.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Policy prototype)
     
     
    protected Policy.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Policy
     
    static Policy
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Policy
    parseFrom(byte[] data)
     
    static Policy
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Policy
    parseFrom(com.google.protobuf.ByteString data)
     
    static Policy
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Policy
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Policy
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Policy
     
    static Policy
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Policy
     
    static Policy
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Policy>
     
     
    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

    • VERSION_FIELD_NUMBER

      public static final int VERSION_FIELD_NUMBER
      See Also:
    • CONSTRAINT_FIELD_NUMBER

      public static final int CONSTRAINT_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • LIST_POLICY_FIELD_NUMBER

      public static final int LIST_POLICY_FIELD_NUMBER
      See Also:
    • BOOLEAN_POLICY_FIELD_NUMBER

      public static final int BOOLEAN_POLICY_FIELD_NUMBER
      See Also:
    • RESTORE_DEFAULT_FIELD_NUMBER

      public static final int RESTORE_DEFAULT_FIELD_NUMBER
      See Also:
  • 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
    • getPolicyTypeCase

      public Policy.PolicyTypeCase getPolicyTypeCase()
      Specified by:
      getPolicyTypeCase in interface PolicyOrBuilder
    • getVersion

      public int getVersion()
       Version of the `Policy`. Default version is 0;
       
      int32 version = 1;
      Specified by:
      getVersion in interface PolicyOrBuilder
      Returns:
      The version.
    • getConstraint

      public String getConstraint()
       The name of the `Constraint` the `Policy` is configuring, for example,
       `constraints/serviceuser.services`.
      
       Immutable after creation.
       
      string constraint = 2;
      Specified by:
      getConstraint in interface PolicyOrBuilder
      Returns:
      The constraint.
    • getConstraintBytes

      public com.google.protobuf.ByteString getConstraintBytes()
       The name of the `Constraint` the `Policy` is configuring, for example,
       `constraints/serviceuser.services`.
      
       Immutable after creation.
       
      string constraint = 2;
      Specified by:
      getConstraintBytes in interface PolicyOrBuilder
      Returns:
      The bytes for constraint.
    • getEtag

      public com.google.protobuf.ByteString getEtag()
       An opaque tag indicating the current version of the `Policy`, used for
       concurrency control.
      
       When the `Policy` is returned from either a `GetPolicy` or a
       `ListOrgPolicy` 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.
      
       When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
       that was returned from a `GetOrgPolicy` request as part of a
       read-modify-write loop for concurrency control. Not setting the `etag`in a
       `SetOrgPolicy` request will result in an unconditional write of the
       `Policy`.
       
      bytes etag = 3;
      Specified by:
      getEtag in interface PolicyOrBuilder
      Returns:
      The etag.
    • hasUpdateTime

      public boolean hasUpdateTime()
       The time stamp the `Policy` was previously updated. This is set by the
       server, not specified by the caller, and represents the last time a call to
       `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
       be ignored.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      hasUpdateTime in interface PolicyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       The time stamp the `Policy` was previously updated. This is set by the
       server, not specified by the caller, and represents the last time a call to
       `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
       be ignored.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      getUpdateTime in interface PolicyOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       The time stamp the `Policy` was previously updated. This is set by the
       server, not specified by the caller, and represents the last time a call to
       `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
       be ignored.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      getUpdateTimeOrBuilder in interface PolicyOrBuilder
    • hasListPolicy

      public boolean hasListPolicy()
       List of values either allowed or disallowed.
       
      .google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
      Specified by:
      hasListPolicy in interface PolicyOrBuilder
      Returns:
      Whether the listPolicy field is set.
    • getListPolicy

      public Policy.ListPolicy getListPolicy()
       List of values either allowed or disallowed.
       
      .google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
      Specified by:
      getListPolicy in interface PolicyOrBuilder
      Returns:
      The listPolicy.
    • getListPolicyOrBuilder

      public Policy.ListPolicyOrBuilder getListPolicyOrBuilder()
       List of values either allowed or disallowed.
       
      .google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
      Specified by:
      getListPolicyOrBuilder in interface PolicyOrBuilder
    • hasBooleanPolicy

      public boolean hasBooleanPolicy()
       For boolean `Constraints`, whether to enforce the `Constraint` or not.
       
      .google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
      Specified by:
      hasBooleanPolicy in interface PolicyOrBuilder
      Returns:
      Whether the booleanPolicy field is set.
    • getBooleanPolicy

      public Policy.BooleanPolicy getBooleanPolicy()
       For boolean `Constraints`, whether to enforce the `Constraint` or not.
       
      .google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
      Specified by:
      getBooleanPolicy in interface PolicyOrBuilder
      Returns:
      The booleanPolicy.
    • getBooleanPolicyOrBuilder

      public Policy.BooleanPolicyOrBuilder getBooleanPolicyOrBuilder()
       For boolean `Constraints`, whether to enforce the `Constraint` or not.
       
      .google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
      Specified by:
      getBooleanPolicyOrBuilder in interface PolicyOrBuilder
    • hasRestoreDefault

      public boolean hasRestoreDefault()
       Restores the default behavior of the constraint; independent of
       `Constraint` type.
       
      .google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
      Specified by:
      hasRestoreDefault in interface PolicyOrBuilder
      Returns:
      Whether the restoreDefault field is set.
    • getRestoreDefault

      public Policy.RestoreDefault getRestoreDefault()
       Restores the default behavior of the constraint; independent of
       `Constraint` type.
       
      .google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
      Specified by:
      getRestoreDefault in interface PolicyOrBuilder
      Returns:
      The restoreDefault.
    • getRestoreDefaultOrBuilder

      public Policy.RestoreDefaultOrBuilder getRestoreDefaultOrBuilder()
       Restores the default behavior of the constraint; independent of
       `Constraint` type.
       
      .google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
      Specified by:
      getRestoreDefaultOrBuilder in interface PolicyOrBuilder
    • 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 Policy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static Policy.Builder newBuilder()
    • newBuilder

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

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

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

      public static Policy getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Policy> 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 Policy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder