Class ErrorInfo

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.compute.v1.ErrorInfo
All Implemented Interfaces:
ErrorInfoOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ErrorInfo extends com.google.protobuf.GeneratedMessage implements ErrorInfoOrBuilder
 Describes the cause of the error with structured details.

 Example of an error when contacting the "pubsub.googleapis.com" API when it
 is not enabled:

 { "reason": "API_DISABLED"
 "domain": "googleapis.com"
 "metadata": {
 "resource": "projects/123",
 "service": "pubsub.googleapis.com"
 }
 }

 This response indicates that the pubsub.googleapis.com API is not enabled.

 Example of an error that is returned when attempting to create a Spanner
 instance in a region that is out of stock:

 { "reason": "STOCKOUT"
 "domain": "spanner.googleapis.com",
 "metadata": {
 "availableRegions": "us-central1,us-east2"
 }
 }
 
Protobuf type google.cloud.compute.v1.ErrorInfo
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Describes the cause of the error with structured details.

    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
     

    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
    Additional structured details about this error.
    boolean
     
    static ErrorInfo
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    The logical grouping to which the "reason" belongs.
    com.google.protobuf.ByteString
    The logical grouping to which the "reason" belongs.
    Deprecated.
    int
    Additional structured details about this error.
    Additional structured details about this error.
    getMetadatasOrDefault(String key, String defaultValue)
    Additional structured details about this error.
    Additional structured details about this error.
    com.google.protobuf.Parser<ErrorInfo>
     
    The reason of the error.
    com.google.protobuf.ByteString
    The reason of the error.
    int
     
    boolean
    The logical grouping to which the "reason" belongs.
    int
     
    boolean
    The reason of the error.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
    newBuilder(ErrorInfo prototype)
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static ErrorInfo
     
    static ErrorInfo
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ErrorInfo
    parseFrom(byte[] data)
     
    static ErrorInfo
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ErrorInfo
    parseFrom(com.google.protobuf.ByteString data)
     
    static ErrorInfo
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ErrorInfo
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static ErrorInfo
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ErrorInfo
     
    static ErrorInfo
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static ErrorInfo
     
    static ErrorInfo
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<ErrorInfo>
     
     
    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
    • hasDomain

      public boolean hasDomain()
       The logical grouping to which the "reason" belongs. The error domain
       is typically the registered service name of the tool or product that
       generates the error. Example: "pubsub.googleapis.com". If the error is
       generated by some common infrastructure, the error domain must be a
       globally unique value that identifies the infrastructure. For Google API
       infrastructure, the error domain is "googleapis.com".
       
      optional string domain = 284415172;
      Specified by:
      hasDomain in interface ErrorInfoOrBuilder
      Returns:
      Whether the domain field is set.
    • getDomain

      public String getDomain()
       The logical grouping to which the "reason" belongs. The error domain
       is typically the registered service name of the tool or product that
       generates the error. Example: "pubsub.googleapis.com". If the error is
       generated by some common infrastructure, the error domain must be a
       globally unique value that identifies the infrastructure. For Google API
       infrastructure, the error domain is "googleapis.com".
       
      optional string domain = 284415172;
      Specified by:
      getDomain in interface ErrorInfoOrBuilder
      Returns:
      The domain.
    • getDomainBytes

      public com.google.protobuf.ByteString getDomainBytes()
       The logical grouping to which the "reason" belongs. The error domain
       is typically the registered service name of the tool or product that
       generates the error. Example: "pubsub.googleapis.com". If the error is
       generated by some common infrastructure, the error domain must be a
       globally unique value that identifies the infrastructure. For Google API
       infrastructure, the error domain is "googleapis.com".
       
      optional string domain = 284415172;
      Specified by:
      getDomainBytes in interface ErrorInfoOrBuilder
      Returns:
      The bytes for domain.
    • getMetadatasCount

      public int getMetadatasCount()
      Description copied from interface: ErrorInfoOrBuilder
       Additional structured details about this error.
      
       Keys must match a regular expression of `a-z+` but should
       ideally be lowerCamelCase. Also, they must be limited to 64 characters in
       length. When identifying the current value of an exceeded limit, the units
       should be contained in the key, not the value.  For example, rather than
       `{"instanceLimit": "100/request"}`, should be returned as,
       `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
       instances that can be created in a single (batch) request.
       
      map<string, string> metadatas = 8514340;
      Specified by:
      getMetadatasCount in interface ErrorInfoOrBuilder
    • containsMetadatas

      public boolean containsMetadatas(String key)
       Additional structured details about this error.
      
       Keys must match a regular expression of `a-z+` but should
       ideally be lowerCamelCase. Also, they must be limited to 64 characters in
       length. When identifying the current value of an exceeded limit, the units
       should be contained in the key, not the value.  For example, rather than
       `{"instanceLimit": "100/request"}`, should be returned as,
       `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
       instances that can be created in a single (batch) request.
       
      map<string, string> metadatas = 8514340;
      Specified by:
      containsMetadatas in interface ErrorInfoOrBuilder
    • getMetadatas

      @Deprecated public Map<String,String> getMetadatas()
      Deprecated.
      Use getMetadatasMap() instead.
      Specified by:
      getMetadatas in interface ErrorInfoOrBuilder
    • getMetadatasMap

      public Map<String,String> getMetadatasMap()
       Additional structured details about this error.
      
       Keys must match a regular expression of `a-z+` but should
       ideally be lowerCamelCase. Also, they must be limited to 64 characters in
       length. When identifying the current value of an exceeded limit, the units
       should be contained in the key, not the value.  For example, rather than
       `{"instanceLimit": "100/request"}`, should be returned as,
       `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
       instances that can be created in a single (batch) request.
       
      map<string, string> metadatas = 8514340;
      Specified by:
      getMetadatasMap in interface ErrorInfoOrBuilder
    • getMetadatasOrDefault

      public String getMetadatasOrDefault(String key, String defaultValue)
       Additional structured details about this error.
      
       Keys must match a regular expression of `a-z+` but should
       ideally be lowerCamelCase. Also, they must be limited to 64 characters in
       length. When identifying the current value of an exceeded limit, the units
       should be contained in the key, not the value.  For example, rather than
       `{"instanceLimit": "100/request"}`, should be returned as,
       `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
       instances that can be created in a single (batch) request.
       
      map<string, string> metadatas = 8514340;
      Specified by:
      getMetadatasOrDefault in interface ErrorInfoOrBuilder
    • getMetadatasOrThrow

      public String getMetadatasOrThrow(String key)
       Additional structured details about this error.
      
       Keys must match a regular expression of `a-z+` but should
       ideally be lowerCamelCase. Also, they must be limited to 64 characters in
       length. When identifying the current value of an exceeded limit, the units
       should be contained in the key, not the value.  For example, rather than
       `{"instanceLimit": "100/request"}`, should be returned as,
       `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
       instances that can be created in a single (batch) request.
       
      map<string, string> metadatas = 8514340;
      Specified by:
      getMetadatasOrThrow in interface ErrorInfoOrBuilder
    • hasReason

      public boolean hasReason()
       The reason of the error. This is a constant value that identifies the
       proximate cause of the error. Error reasons are unique within a particular
       domain of errors. This should be at most 63 characters and match a
       regular expression of `A-Z+[A-Z0-9]`, which represents
       UPPER_SNAKE_CASE.
       
      optional string reason = 138777156;
      Specified by:
      hasReason in interface ErrorInfoOrBuilder
      Returns:
      Whether the reason field is set.
    • getReason

      public String getReason()
       The reason of the error. This is a constant value that identifies the
       proximate cause of the error. Error reasons are unique within a particular
       domain of errors. This should be at most 63 characters and match a
       regular expression of `A-Z+[A-Z0-9]`, which represents
       UPPER_SNAKE_CASE.
       
      optional string reason = 138777156;
      Specified by:
      getReason in interface ErrorInfoOrBuilder
      Returns:
      The reason.
    • getReasonBytes

      public com.google.protobuf.ByteString getReasonBytes()
       The reason of the error. This is a constant value that identifies the
       proximate cause of the error. Error reasons are unique within a particular
       domain of errors. This should be at most 63 characters and match a
       regular expression of `A-Z+[A-Z0-9]`, which represents
       UPPER_SNAKE_CASE.
       
      optional string reason = 138777156;
      Specified by:
      getReasonBytes in interface ErrorInfoOrBuilder
      Returns:
      The bytes for reason.
    • 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 ErrorInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static ErrorInfo.Builder newBuilder()
    • newBuilder

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

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

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

      public static ErrorInfo getDefaultInstance()
    • parser

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

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