Class AttributeContext.Response.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
com.google.rpc.context.AttributeContext.Response.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContext.ResponseOrBuilder, Cloneable
Enclosing class:
AttributeContext.Response

public static final class AttributeContext.Response.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder> implements AttributeContext.ResponseOrBuilder
 This message defines attributes for a typical network response. It
 generally models semantics of an HTTP response.
 
Protobuf type google.rpc.context.AttributeContext.Response
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapField internalGetMapField(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • internalGetMutableMapField

      protected com.google.protobuf.MapField internalGetMutableMapField(int number)
      Overrides:
      internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.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.GeneratedMessageV3.Builder<AttributeContext.Response.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.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • getDefaultInstanceForType

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

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

      public AttributeContext.Response buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • setField

      public AttributeContext.Response.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • clearField

      public AttributeContext.Response.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • clearOneof

      public AttributeContext.Response.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • setRepeatedField

      public AttributeContext.Response.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • addRepeatedField

      public AttributeContext.Response.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • mergeFrom

      public AttributeContext.Response.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<AttributeContext.Response.Builder>
    • mergeFrom

    • isInitialized

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

      public AttributeContext.Response.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<AttributeContext.Response.Builder>
      Throws:
      IOException
    • getCode

      public long getCode()
       The HTTP response status code, such as `200` and `404`.
       
      int64 code = 1;
      Specified by:
      getCode in interface AttributeContext.ResponseOrBuilder
      Returns:
      The code.
    • setCode

      public AttributeContext.Response.Builder setCode(long value)
       The HTTP response status code, such as `200` and `404`.
       
      int64 code = 1;
      Parameters:
      value - The code to set.
      Returns:
      This builder for chaining.
    • clearCode

       The HTTP response status code, such as `200` and `404`.
       
      int64 code = 1;
      Returns:
      This builder for chaining.
    • getSize

      public long getSize()
       The HTTP response size in bytes. If unknown, it must be -1.
       
      int64 size = 2;
      Specified by:
      getSize in interface AttributeContext.ResponseOrBuilder
      Returns:
      The size.
    • setSize

      public AttributeContext.Response.Builder setSize(long value)
       The HTTP response size in bytes. If unknown, it must be -1.
       
      int64 size = 2;
      Parameters:
      value - The size to set.
      Returns:
      This builder for chaining.
    • clearSize

       The HTTP response size in bytes. If unknown, it must be -1.
       
      int64 size = 2;
      Returns:
      This builder for chaining.
    • getHeadersCount

      public int getHeadersCount()
      Description copied from interface: AttributeContext.ResponseOrBuilder
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersCount in interface AttributeContext.ResponseOrBuilder
    • containsHeaders

      public boolean containsHeaders(String key)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      containsHeaders in interface AttributeContext.ResponseOrBuilder
    • getHeaders

      @Deprecated public Map<String,String> getHeaders()
      Deprecated.
      Use getHeadersMap() instead.
      Specified by:
      getHeaders in interface AttributeContext.ResponseOrBuilder
    • getHeadersMap

      public Map<String,String> getHeadersMap()
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersMap in interface AttributeContext.ResponseOrBuilder
    • getHeadersOrDefault

      public String getHeadersOrDefault(String key, String defaultValue)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersOrDefault in interface AttributeContext.ResponseOrBuilder
    • getHeadersOrThrow

      public String getHeadersOrThrow(String key)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersOrThrow in interface AttributeContext.ResponseOrBuilder
    • clearHeaders

      public AttributeContext.Response.Builder clearHeaders()
    • removeHeaders

      public AttributeContext.Response.Builder removeHeaders(String key)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
    • getMutableHeaders

      @Deprecated public Map<String,String> getMutableHeaders()
      Deprecated.
      Use alternate mutation accessors instead.
    • putHeaders

      public AttributeContext.Response.Builder putHeaders(String key, String value)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
    • putAllHeaders

      public AttributeContext.Response.Builder putAllHeaders(Map<String,String> values)
       The HTTP response headers. If multiple headers share the same key, they
       must be merged according to HTTP spec. All header keys must be
       lowercased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
    • hasTime

      public boolean hasTime()
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
      Specified by:
      hasTime in interface AttributeContext.ResponseOrBuilder
      Returns:
      Whether the time field is set.
    • getTime

      public Timestamp getTime()
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
      Specified by:
      getTime in interface AttributeContext.ResponseOrBuilder
      Returns:
      The time.
    • setTime

       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
    • setTime

      public AttributeContext.Response.Builder setTime(Timestamp.Builder builderForValue)
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
    • mergeTime

      public AttributeContext.Response.Builder mergeTime(Timestamp value)
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
    • clearTime

       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
    • getTimeBuilder

      public Timestamp.Builder getTimeBuilder()
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
    • getTimeOrBuilder

      public TimestampOrBuilder getTimeOrBuilder()
       The timestamp when the `destination` service sends the last byte of
       the response.
       
      .google.protobuf.Timestamp time = 4;
      Specified by:
      getTimeOrBuilder in interface AttributeContext.ResponseOrBuilder
    • hasBackendLatency

      public boolean hasBackendLatency()
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
      Specified by:
      hasBackendLatency in interface AttributeContext.ResponseOrBuilder
      Returns:
      Whether the backendLatency field is set.
    • getBackendLatency

      public Duration getBackendLatency()
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
      Specified by:
      getBackendLatency in interface AttributeContext.ResponseOrBuilder
      Returns:
      The backendLatency.
    • setBackendLatency

      public AttributeContext.Response.Builder setBackendLatency(Duration value)
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
    • setBackendLatency

      public AttributeContext.Response.Builder setBackendLatency(Duration.Builder builderForValue)
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
    • mergeBackendLatency

      public AttributeContext.Response.Builder mergeBackendLatency(Duration value)
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
    • clearBackendLatency

      public AttributeContext.Response.Builder clearBackendLatency()
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
    • getBackendLatencyBuilder

      public Duration.Builder getBackendLatencyBuilder()
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
    • getBackendLatencyOrBuilder

      public DurationOrBuilder getBackendLatencyOrBuilder()
       The length of time it takes the backend service to fully respond to a
       request. Measured from when the destination service starts to send the
       request to the backend until when the destination service receives the
       complete response from the backend.
       
      .google.protobuf.Duration backend_latency = 5;
      Specified by:
      getBackendLatencyOrBuilder in interface AttributeContext.ResponseOrBuilder
    • setUnknownFields

      public final AttributeContext.Response.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
    • mergeUnknownFields

      public final AttributeContext.Response.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>