Class HttpResponse

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HttpResponseOrBuilder, java.io.Serializable

    public final class HttpResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements HttpResponseOrBuilder
     Represents an HTTP response.
     
    Protobuf type google.rpc.HttpResponse
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HttpResponse.Builder
      Represents an HTTP response.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

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

      Fields 
      Modifier and Type Field Description
      static int BODY_FIELD_NUMBER  
      static int HEADERS_FIELD_NUMBER  
      static int REASON_FIELD_NUMBER  
      static int STATUS_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      com.google.protobuf.ByteString getBody()
      The HTTP response body.
      static HttpResponse getDefaultInstance()  
      HttpResponse getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      HttpHeader getHeaders​(int index)
      The HTTP response headers.
      int getHeadersCount()
      The HTTP response headers.
      java.util.List<HttpHeader> getHeadersList()
      The HTTP response headers.
      HttpHeaderOrBuilder getHeadersOrBuilder​(int index)
      The HTTP response headers.
      java.util.List<? extends HttpHeaderOrBuilder> getHeadersOrBuilderList()
      The HTTP response headers.
      com.google.protobuf.Parser<HttpResponse> getParserForType()  
      java.lang.String getReason()
      The HTTP reason phrase, such as "OK" or "Not Found".
      com.google.protobuf.ByteString getReasonBytes()
      The HTTP reason phrase, such as "OK" or "Not Found".
      int getSerializedSize()  
      int getStatus()
      The HTTP status code, such as 200 or 404.
      int hashCode()  
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static HttpResponse.Builder newBuilder()  
      static HttpResponse.Builder newBuilder​(HttpResponse prototype)  
      HttpResponse.Builder newBuilderForType()  
      protected HttpResponse.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static HttpResponse parseDelimitedFrom​(java.io.InputStream input)  
      static HttpResponse parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HttpResponse parseFrom​(byte[] data)  
      static HttpResponse parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HttpResponse parseFrom​(com.google.protobuf.ByteString data)  
      static HttpResponse parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HttpResponse parseFrom​(com.google.protobuf.CodedInputStream input)  
      static HttpResponse parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HttpResponse parseFrom​(java.io.InputStream input)  
      static HttpResponse parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static HttpResponse parseFrom​(java.nio.ByteBuffer data)  
      static HttpResponse parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<HttpResponse> parser()  
      HttpResponse.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        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, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, 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, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, 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
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getStatus

        public int getStatus()
         The HTTP status code, such as 200 or 404.
         
        int32 status = 1;
        Specified by:
        getStatus in interface HttpResponseOrBuilder
        Returns:
        The status.
      • getReason

        public java.lang.String getReason()
         The HTTP reason phrase, such as "OK" or "Not Found".
         
        string reason = 2;
        Specified by:
        getReason in interface HttpResponseOrBuilder
        Returns:
        The reason.
      • getReasonBytes

        public com.google.protobuf.ByteString getReasonBytes()
         The HTTP reason phrase, such as "OK" or "Not Found".
         
        string reason = 2;
        Specified by:
        getReasonBytes in interface HttpResponseOrBuilder
        Returns:
        The bytes for reason.
      • getHeadersList

        public java.util.List<HttpHeader> getHeadersList()
         The HTTP response headers. The ordering of the headers is significant.
         Multiple headers with the same key may present for the response.
         
        repeated .google.rpc.HttpHeader headers = 3;
        Specified by:
        getHeadersList in interface HttpResponseOrBuilder
      • getHeadersOrBuilderList

        public java.util.List<? extends HttpHeaderOrBuilder> getHeadersOrBuilderList()
         The HTTP response headers. The ordering of the headers is significant.
         Multiple headers with the same key may present for the response.
         
        repeated .google.rpc.HttpHeader headers = 3;
        Specified by:
        getHeadersOrBuilderList in interface HttpResponseOrBuilder
      • getHeadersCount

        public int getHeadersCount()
         The HTTP response headers. The ordering of the headers is significant.
         Multiple headers with the same key may present for the response.
         
        repeated .google.rpc.HttpHeader headers = 3;
        Specified by:
        getHeadersCount in interface HttpResponseOrBuilder
      • getHeaders

        public HttpHeader getHeaders​(int index)
         The HTTP response headers. The ordering of the headers is significant.
         Multiple headers with the same key may present for the response.
         
        repeated .google.rpc.HttpHeader headers = 3;
        Specified by:
        getHeaders in interface HttpResponseOrBuilder
      • getHeadersOrBuilder

        public HttpHeaderOrBuilder getHeadersOrBuilder​(int index)
         The HTTP response headers. The ordering of the headers is significant.
         Multiple headers with the same key may present for the response.
         
        repeated .google.rpc.HttpHeader headers = 3;
        Specified by:
        getHeadersOrBuilder in interface HttpResponseOrBuilder
      • getBody

        public com.google.protobuf.ByteString getBody()
         The HTTP response body. If the body is not expected, it should be empty.
         
        bytes body = 4;
        Specified by:
        getBody in interface HttpResponseOrBuilder
        Returns:
        The body.
      • isInitialized

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

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

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

        public boolean equals​(java.lang.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 HttpResponse parseFrom​(java.nio.ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpResponse parseFrom​(java.nio.ByteBuffer data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

        public static HttpResponse parseFrom​(java.io.InputStream input)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static HttpResponse parseDelimitedFrom​(java.io.InputStream input)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

        public static HttpResponse parseFrom​(com.google.protobuf.CodedInputStream input)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

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

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

        protected HttpResponse.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static HttpResponse getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<HttpResponse> 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.GeneratedMessageV3
      • getDefaultInstanceForType

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