Class Key

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.api.apikeys.v2.Key
All Implemented Interfaces:
KeyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Key extends com.google.protobuf.GeneratedMessage implements KeyOrBuilder
 The representation of a key managed by the API Keys API.
 
Protobuf type google.api.apikeys.v2.Key
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    The representation of a key managed by the API Keys API.

    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
    Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
    boolean
     
    Deprecated.
    int
    Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
    Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
    Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
    Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata.
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    static Key
     
     
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    static final com.google.protobuf.Descriptors.Descriptor
     
    Human-readable display name of this key that you can modify.
    com.google.protobuf.ByteString
    Human-readable display name of this key that you can modify.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    com.google.protobuf.Parser<Key>
     
    Key restrictions.
    Key restrictions.
    int
     
    Output only.
    com.google.protobuf.ByteString
    Output only.
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    boolean
    Output only.
    boolean
    Output only.
    int
     
    boolean
    Key restrictions.
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
    newBuilder(Key prototype)
     
     
    protected Key.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Key
     
    static Key
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Key
    parseFrom(byte[] data)
     
    static Key
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Key
    parseFrom(com.google.protobuf.ByteString data)
     
    static Key
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Key
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Key
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Key
     
    static Key
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Key
     
    static Key
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Key>
     
     
    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()
       Output only. The resource name of the key.
       The `name` has the form:
       `projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>`.
       For example:
       `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2`
      
       NOTE: Key is a global resource; hence the only supported value for
       location is `global`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface KeyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The resource name of the key.
       The `name` has the form:
       `projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>`.
       For example:
       `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2`
      
       NOTE: Key is a global resource; hence the only supported value for
       location is `global`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface KeyOrBuilder
      Returns:
      The bytes for name.
    • getUid

      public String getUid()
       Output only. Unique id in UUID4 format.
       
      string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUid in interface KeyOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. Unique id in UUID4 format.
       
      string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUidBytes in interface KeyOrBuilder
      Returns:
      The bytes for uid.
    • getDisplayName

      public String getDisplayName()
       Human-readable display name of this key that you can modify.
       The maximum length is 63 characters.
       
      string display_name = 2;
      Specified by:
      getDisplayName in interface KeyOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Human-readable display name of this key that you can modify.
       The maximum length is 63 characters.
       
      string display_name = 2;
      Specified by:
      getDisplayNameBytes in interface KeyOrBuilder
      Returns:
      The bytes for displayName.
    • getKeyString

      public String getKeyString()
       Output only. An encrypted and signed value held by this key.
       This field can be accessed only through the `GetKeyString` method.
       
      string key_string = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKeyString in interface KeyOrBuilder
      Returns:
      The keyString.
    • getKeyStringBytes

      public com.google.protobuf.ByteString getKeyStringBytes()
       Output only. An encrypted and signed value held by this key.
       This field can be accessed only through the `GetKeyString` method.
       
      string key_string = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKeyStringBytes in interface KeyOrBuilder
      Returns:
      The bytes for keyString.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. A timestamp identifying the time this key was originally
       created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface KeyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. A timestamp identifying the time this key was originally
       created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface KeyOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. A timestamp identifying the time this key was originally
       created.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface KeyOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. A timestamp identifying the time this key was last
       updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface KeyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. A timestamp identifying the time this key was last
       updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface KeyOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. A timestamp identifying the time this key was last
       updated.
       
      .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface KeyOrBuilder
    • hasDeleteTime

      public boolean hasDeleteTime()
       Output only. A timestamp when this key was deleted. If the resource is not
       deleted, this must be empty.
       
      .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasDeleteTime in interface KeyOrBuilder
      Returns:
      Whether the deleteTime field is set.
    • getDeleteTime

      public com.google.protobuf.Timestamp getDeleteTime()
       Output only. A timestamp when this key was deleted. If the resource is not
       deleted, this must be empty.
       
      .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDeleteTime in interface KeyOrBuilder
      Returns:
      The deleteTime.
    • getDeleteTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder()
       Output only. A timestamp when this key was deleted. If the resource is not
       deleted, this must be empty.
       
      .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDeleteTimeOrBuilder in interface KeyOrBuilder
    • getAnnotationsCount

      public int getAnnotationsCount()
      Description copied from interface: KeyOrBuilder
       Annotations is an unstructured key-value map stored with a policy that
       may be set by external tools to store and retrieve arbitrary metadata.
       They are not queryable and should be preserved when modifying objects.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsCount in interface KeyOrBuilder
    • containsAnnotations

      public boolean containsAnnotations(String key)
       Annotations is an unstructured key-value map stored with a policy that
       may be set by external tools to store and retrieve arbitrary metadata.
       They are not queryable and should be preserved when modifying objects.
       
      map<string, string> annotations = 8;
      Specified by:
      containsAnnotations in interface KeyOrBuilder
    • getAnnotations

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

      public Map<String,String> getAnnotationsMap()
       Annotations is an unstructured key-value map stored with a policy that
       may be set by external tools to store and retrieve arbitrary metadata.
       They are not queryable and should be preserved when modifying objects.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsMap in interface KeyOrBuilder
    • getAnnotationsOrDefault

      public String getAnnotationsOrDefault(String key, String defaultValue)
       Annotations is an unstructured key-value map stored with a policy that
       may be set by external tools to store and retrieve arbitrary metadata.
       They are not queryable and should be preserved when modifying objects.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsOrDefault in interface KeyOrBuilder
    • getAnnotationsOrThrow

      public String getAnnotationsOrThrow(String key)
       Annotations is an unstructured key-value map stored with a policy that
       may be set by external tools to store and retrieve arbitrary metadata.
       They are not queryable and should be preserved when modifying objects.
       
      map<string, string> annotations = 8;
      Specified by:
      getAnnotationsOrThrow in interface KeyOrBuilder
    • hasRestrictions

      public boolean hasRestrictions()
       Key restrictions.
       
      .google.api.apikeys.v2.Restrictions restrictions = 9;
      Specified by:
      hasRestrictions in interface KeyOrBuilder
      Returns:
      Whether the restrictions field is set.
    • getRestrictions

      public Restrictions getRestrictions()
       Key restrictions.
       
      .google.api.apikeys.v2.Restrictions restrictions = 9;
      Specified by:
      getRestrictions in interface KeyOrBuilder
      Returns:
      The restrictions.
    • getRestrictionsOrBuilder

      public RestrictionsOrBuilder getRestrictionsOrBuilder()
       Key restrictions.
       
      .google.api.apikeys.v2.Restrictions restrictions = 9;
      Specified by:
      getRestrictionsOrBuilder in interface KeyOrBuilder
    • getEtag

      public String getEtag()
       Output only. A checksum computed by the server based on the current value
       of the Key resource. This may be sent on update and delete requests to
       ensure the client has an up-to-date value before proceeding. See
       https://google.aip.dev/154.
       
      string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getEtag in interface KeyOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       Output only. A checksum computed by the server based on the current value
       of the Key resource. This may be sent on update and delete requests to
       ensure the client has an up-to-date value before proceeding. See
       https://google.aip.dev/154.
       
      string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getEtagBytes in interface KeyOrBuilder
      Returns:
      The bytes for etag.
    • 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 Key parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static Key.Builder newBuilder()
    • newBuilder

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

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

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

      public static Key getDefaultInstance()
    • parser

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

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