Class Policy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.iam.v2beta.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
 Data for an IAM policy.
 
Protobuf type google.iam.v2beta.Policy
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Data for an IAM policy.

    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
     
    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
    A key-value map to store arbitrary metadata for the `Policy`.
    boolean
     
    Deprecated.
    int
    A key-value map to store arbitrary metadata for the `Policy`.
    A key-value map to store arbitrary metadata for the `Policy`.
    A key-value map to store arbitrary metadata for the `Policy`.
    A key-value map to store arbitrary metadata for the `Policy`.
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    static Policy
     
     
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    static final com.google.protobuf.Descriptors.Descriptor
     
    A user-specified description of the `Policy`.
    com.google.protobuf.ByteString
    A user-specified description of the `Policy`.
    An opaque tag that identifies the current version of the `Policy`.
    com.google.protobuf.ByteString
    An opaque tag that identifies the current version of the `Policy`.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    Immutable.
    com.google.protobuf.ByteString
    Immutable.
    com.google.protobuf.Parser<Policy>
     
    getRules(int index)
    A list of rules that specify the behavior of the `Policy`.
    int
    A list of rules that specify the behavior of the `Policy`.
    A list of rules that specify the behavior of the `Policy`.
    getRulesOrBuilder(int index)
    A list of rules that specify the behavior of the `Policy`.
    A list of rules that specify the behavior of the `Policy`.
    int
     
    Immutable.
    com.google.protobuf.ByteString
    Immutable.
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    boolean
    Output only.
    boolean
    Output only.
    int
     
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    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, 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()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       Immutable. The resource name of the `Policy`, which must be unique. Format:
       `policies/{attachment_point}/denypolicies/{policy_id}`
      
      
       The attachment point is identified by its URL-encoded full resource name,
       which means that the forward-slash character, `/`, must be written as
       `%2F`. For example,
       `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
      
       For organizations and folders, use the numeric ID in the full resource
       name. For projects, requests can use the alphanumeric or the numeric ID.
       Responses always contain the numeric ID.
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface PolicyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Immutable. The resource name of the `Policy`, which must be unique. Format:
       `policies/{attachment_point}/denypolicies/{policy_id}`
      
      
       The attachment point is identified by its URL-encoded full resource name,
       which means that the forward-slash character, `/`, must be written as
       `%2F`. For example,
       `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-deny-policy`.
      
       For organizations and folders, use the numeric ID in the full resource
       name. For projects, requests can use the alphanumeric or the numeric ID.
       Responses always contain the numeric ID.
       
      string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getNameBytes in interface PolicyOrBuilder
      Returns:
      The bytes for name.
    • getUid

      public String getUid()
       Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
       `Policy` is created.
       
      string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getUid in interface PolicyOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
       `Policy` is created.
       
      string uid = 2 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getUidBytes in interface PolicyOrBuilder
      Returns:
      The bytes for uid.
    • getKind

      public String getKind()
       Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
       
      string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKind in interface PolicyOrBuilder
      Returns:
      The kind.
    • getKindBytes

      public com.google.protobuf.ByteString getKindBytes()
       Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
       
      string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKindBytes in interface PolicyOrBuilder
      Returns:
      The bytes for kind.
    • getDisplayName

      public String getDisplayName()
       A user-specified description of the `Policy`. This value can be up to 63
       characters.
       
      string display_name = 4;
      Specified by:
      getDisplayName in interface PolicyOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       A user-specified description of the `Policy`. This value can be up to 63
       characters.
       
      string display_name = 4;
      Specified by:
      getDisplayNameBytes in interface PolicyOrBuilder
      Returns:
      The bytes for displayName.
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: PolicyOrBuilder
       A key-value map to store arbitrary metadata for the `Policy`. Keys
       can be up to 63 characters. Values can be up to 255 characters.
       
      map<string, string> annotations = 5;
      Specified by:
      getAnnotationsCount in interface PolicyOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       A key-value map to store arbitrary metadata for the `Policy`. Keys
       can be up to 63 characters. Values can be up to 255 characters.
       
      map<string, string> annotations = 5;
      Specified by:
      containsAnnotations in interface PolicyOrBuilder
    • getAnnotations

      @Deprecated public Map<String,String> getAnnotations()
      Deprecated.
      Use getAnnotationsMap() instead.
      Specified by:
      getAnnotations in interface PolicyOrBuilder
    • getAnnotationsMap

      public Map<String,String> getAnnotationsMap()
       A key-value map to store arbitrary metadata for the `Policy`. Keys
       can be up to 63 characters. Values can be up to 255 characters.
       
      map<string, string> annotations = 5;
      Specified by:
      getAnnotationsMap in interface PolicyOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       A key-value map to store arbitrary metadata for the `Policy`. Keys
       can be up to 63 characters. Values can be up to 255 characters.
       
      map<string, string> annotations = 5;
      Specified by:
      getAnnotationsOrDefault in interface PolicyOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       A key-value map to store arbitrary metadata for the `Policy`. Keys
       can be up to 63 characters. Values can be up to 255 characters.
       
      map<string, string> annotations = 5;
      Specified by:
      getAnnotationsOrThrow in interface PolicyOrBuilder
    • getEtag

      public String getEtag()
       An opaque tag that identifies the current version of the `Policy`. IAM uses
       this value to help manage concurrent updates, so they do not cause one
       update to be overwritten by another.
      
       If this field is present in a [CreatePolicy][] request, the value is
       ignored.
       
      string etag = 6;
      Specified by:
      getEtag in interface PolicyOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       An opaque tag that identifies the current version of the `Policy`. IAM uses
       this value to help manage concurrent updates, so they do not cause one
       update to be overwritten by another.
      
       If this field is present in a [CreatePolicy][] request, the value is
       ignored.
       
      string etag = 6;
      Specified by:
      getEtagBytes in interface PolicyOrBuilder
      Returns:
      The bytes for etag.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time when the `Policy` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface PolicyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time when the `Policy` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface PolicyOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time when the `Policy` was created.
       
      .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface PolicyOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time when the `Policy` was last updated.
       
      .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface PolicyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time when the `Policy` was last updated.
       
      .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface PolicyOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time when the `Policy` was last updated.
       
      .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface PolicyOrBuilder
    • hasDeleteTime

      public boolean hasDeleteTime()
       Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
       
      .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasDeleteTime in interface PolicyOrBuilder
      Returns:
      Whether the deleteTime field is set.
    • getDeleteTime

      public com.google.protobuf.Timestamp getDeleteTime()
       Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
       
      .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDeleteTime in interface PolicyOrBuilder
      Returns:
      The deleteTime.
    • getDeleteTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder()
       Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
       
      .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDeleteTimeOrBuilder in interface PolicyOrBuilder
    • getRulesList

      public List<PolicyRule> getRulesList()
       A list of rules that specify the behavior of the `Policy`. All of the rules
       should be of the `kind` specified in the `Policy`.
       
      repeated .google.iam.v2beta.PolicyRule rules = 10;
      Specified by:
      getRulesList in interface PolicyOrBuilder
    • getRulesOrBuilderList

      public List<? extends PolicyRuleOrBuilder> getRulesOrBuilderList()
       A list of rules that specify the behavior of the `Policy`. All of the rules
       should be of the `kind` specified in the `Policy`.
       
      repeated .google.iam.v2beta.PolicyRule rules = 10;
      Specified by:
      getRulesOrBuilderList in interface PolicyOrBuilder
    • getRulesCount

      public int getRulesCount()
       A list of rules that specify the behavior of the `Policy`. All of the rules
       should be of the `kind` specified in the `Policy`.
       
      repeated .google.iam.v2beta.PolicyRule rules = 10;
      Specified by:
      getRulesCount in interface PolicyOrBuilder
    • getRules

      public PolicyRule getRules(int index)
       A list of rules that specify the behavior of the `Policy`. All of the rules
       should be of the `kind` specified in the `Policy`.
       
      repeated .google.iam.v2beta.PolicyRule rules = 10;
      Specified by:
      getRules in interface PolicyOrBuilder
    • getRulesOrBuilder

      public PolicyRuleOrBuilder getRulesOrBuilder(int index)
       A list of rules that specify the behavior of the `Policy`. All of the rules
       should be of the `kind` specified in the `Policy`.
       
      repeated .google.iam.v2beta.PolicyRule rules = 10;
      Specified by:
      getRulesOrBuilder 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