Class HttpResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpResponse.Builder>
com.google.rpc.HttpResponse.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HttpResponseOrBuilder, Cloneable
Enclosing class:
HttpResponse

public static final class HttpResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<HttpResponse.Builder> implements HttpResponseOrBuilder
 Represents an HTTP response.
 
Protobuf type google.rpc.HttpResponse
  • 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.Builder<HttpResponse.Builder>
    • clear

      public HttpResponse.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<HttpResponse.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<HttpResponse.Builder>
    • getDefaultInstanceForType

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

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

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

      public HttpResponse.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpResponse.Builder>
    • mergeFrom

      public HttpResponse.Builder mergeFrom(HttpResponse other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<HttpResponse.Builder>
    • mergeFrom

      public HttpResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpResponse.Builder>
      Throws:
      IOException
    • 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.
    • setStatus

      public HttpResponse.Builder setStatus(int value)
       The HTTP status code, such as 200 or 404.
       
      int32 status = 1;
      Parameters:
      value - The status to set.
      Returns:
      This builder for chaining.
    • clearStatus

      public HttpResponse.Builder clearStatus()
       The HTTP status code, such as 200 or 404.
       
      int32 status = 1;
      Returns:
      This builder for chaining.
    • getReason

      public 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.
    • setReason

      public HttpResponse.Builder setReason(String value)
       The HTTP reason phrase, such as "OK" or "Not Found".
       
      string reason = 2;
      Parameters:
      value - The reason to set.
      Returns:
      This builder for chaining.
    • clearReason

      public HttpResponse.Builder clearReason()
       The HTTP reason phrase, such as "OK" or "Not Found".
       
      string reason = 2;
      Returns:
      This builder for chaining.
    • setReasonBytes

      public HttpResponse.Builder setReasonBytes(com.google.protobuf.ByteString value)
       The HTTP reason phrase, such as "OK" or "Not Found".
       
      string reason = 2;
      Parameters:
      value - The bytes for reason to set.
      Returns:
      This builder for chaining.
    • getHeadersList

      public 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
    • 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
    • setHeaders

      public HttpResponse.Builder setHeaders(int index, HttpHeader value)
       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;
    • setHeaders

      public HttpResponse.Builder setHeaders(int index, HttpHeader.Builder builderForValue)
       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;
    • addHeaders

      public HttpResponse.Builder addHeaders(HttpHeader value)
       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;
    • addHeaders

      public HttpResponse.Builder addHeaders(int index, HttpHeader value)
       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;
    • addHeaders

      public HttpResponse.Builder addHeaders(HttpHeader.Builder builderForValue)
       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;
    • addHeaders

      public HttpResponse.Builder addHeaders(int index, HttpHeader.Builder builderForValue)
       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;
    • addAllHeaders

      public HttpResponse.Builder addAllHeaders(Iterable<? extends HttpHeader> values)
       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;
    • clearHeaders

      public HttpResponse.Builder clearHeaders()
       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;
    • removeHeaders

      public HttpResponse.Builder removeHeaders(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;
    • getHeadersBuilder

      public HttpHeader.Builder getHeadersBuilder(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;
    • 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
    • getHeadersOrBuilderList

      public 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
    • addHeadersBuilder

      public HttpHeader.Builder addHeadersBuilder()
       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;
    • addHeadersBuilder

      public HttpHeader.Builder addHeadersBuilder(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;
    • getHeadersBuilderList

      public List<HttpHeader.Builder> getHeadersBuilderList()
       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;
    • 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.
    • setBody

      public HttpResponse.Builder setBody(com.google.protobuf.ByteString value)
       The HTTP response body. If the body is not expected, it should be empty.
       
      bytes body = 4;
      Parameters:
      value - The body to set.
      Returns:
      This builder for chaining.
    • clearBody

      public HttpResponse.Builder clearBody()
       The HTTP response body. If the body is not expected, it should be empty.
       
      bytes body = 4;
      Returns:
      This builder for chaining.