Class AttributeContext.Request.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext.Request,AttributeContext.Request.Builder>
com.google.rpc.context.AttributeContext.Request.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, AttributeContext.RequestOrBuilder, Cloneable
Enclosing class:
AttributeContext.Request

public static final class AttributeContext.Request.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext.Request,AttributeContext.Request.Builder> implements AttributeContext.RequestOrBuilder
 This message defines attributes for an HTTP request. If the actual
 request is not an HTTP request, the runtime system should try to map
 the actual request to an equivalent HTTP request.
 
Protobuf type google.rpc.context.AttributeContext.Request
  • Method Details

    • getId

      public String getId()
       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       
      string id = 1 [json_name = "id"];
      Specified by:
      getId in interface AttributeContext.RequestOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       
      string id = 1 [json_name = "id"];
      Specified by:
      getIdBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for id.
    • setId

       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       
      string id = 1 [json_name = "id"];
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       
      string id = 1 [json_name = "id"];
      Returns:
      This builder for chaining.
    • setIdBytes

      public AttributeContext.Request.Builder setIdBytes(com.google.protobuf.ByteString value)
       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       
      string id = 1 [json_name = "id"];
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getMethod

      public String getMethod()
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2 [json_name = "method"];
      Specified by:
      getMethod in interface AttributeContext.RequestOrBuilder
      Returns:
      The method.
    • getMethodBytes

      public com.google.protobuf.ByteString getMethodBytes()
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2 [json_name = "method"];
      Specified by:
      getMethodBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for method.
    • setMethod

      public AttributeContext.Request.Builder setMethod(String value)
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2 [json_name = "method"];
      Parameters:
      value - The method to set.
      Returns:
      This builder for chaining.
    • clearMethod

      public AttributeContext.Request.Builder clearMethod()
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2 [json_name = "method"];
      Returns:
      This builder for chaining.
    • setMethodBytes

      public AttributeContext.Request.Builder setMethodBytes(com.google.protobuf.ByteString value)
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2 [json_name = "method"];
      Parameters:
      value - The bytes for method to set.
      Returns:
      This builder for chaining.
    • getHeadersCount

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

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

      public AttributeContext.Request.Builder clearHeaders()
    • removeHeaders

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

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

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

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

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

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

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

      public String getPath()
       The HTTP URL path, excluding the query parameters.
       
      string path = 4 [json_name = "path"];
      Specified by:
      getPath in interface AttributeContext.RequestOrBuilder
      Returns:
      The path.
    • getPathBytes

      public com.google.protobuf.ByteString getPathBytes()
       The HTTP URL path, excluding the query parameters.
       
      string path = 4 [json_name = "path"];
      Specified by:
      getPathBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for path.
    • setPath

      public AttributeContext.Request.Builder setPath(String value)
       The HTTP URL path, excluding the query parameters.
       
      string path = 4 [json_name = "path"];
      Parameters:
      value - The path to set.
      Returns:
      This builder for chaining.
    • clearPath

       The HTTP URL path, excluding the query parameters.
       
      string path = 4 [json_name = "path"];
      Returns:
      This builder for chaining.
    • setPathBytes

      public AttributeContext.Request.Builder setPathBytes(com.google.protobuf.ByteString value)
       The HTTP URL path, excluding the query parameters.
       
      string path = 4 [json_name = "path"];
      Parameters:
      value - The bytes for path to set.
      Returns:
      This builder for chaining.
    • getHost

      public String getHost()
       The HTTP request `Host` header value.
       
      string host = 5 [json_name = "host"];
      Specified by:
      getHost in interface AttributeContext.RequestOrBuilder
      Returns:
      The host.
    • getHostBytes

      public com.google.protobuf.ByteString getHostBytes()
       The HTTP request `Host` header value.
       
      string host = 5 [json_name = "host"];
      Specified by:
      getHostBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for host.
    • setHost

      public AttributeContext.Request.Builder setHost(String value)
       The HTTP request `Host` header value.
       
      string host = 5 [json_name = "host"];
      Parameters:
      value - The host to set.
      Returns:
      This builder for chaining.
    • clearHost

       The HTTP request `Host` header value.
       
      string host = 5 [json_name = "host"];
      Returns:
      This builder for chaining.
    • setHostBytes

      public AttributeContext.Request.Builder setHostBytes(com.google.protobuf.ByteString value)
       The HTTP request `Host` header value.
       
      string host = 5 [json_name = "host"];
      Parameters:
      value - The bytes for host to set.
      Returns:
      This builder for chaining.
    • getScheme

      public String getScheme()
       The HTTP URL scheme, such as `http` and `https`.
       
      string scheme = 6 [json_name = "scheme"];
      Specified by:
      getScheme in interface AttributeContext.RequestOrBuilder
      Returns:
      The scheme.
    • getSchemeBytes

      public com.google.protobuf.ByteString getSchemeBytes()
       The HTTP URL scheme, such as `http` and `https`.
       
      string scheme = 6 [json_name = "scheme"];
      Specified by:
      getSchemeBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for scheme.
    • setScheme

      public AttributeContext.Request.Builder setScheme(String value)
       The HTTP URL scheme, such as `http` and `https`.
       
      string scheme = 6 [json_name = "scheme"];
      Parameters:
      value - The scheme to set.
      Returns:
      This builder for chaining.
    • clearScheme

      public AttributeContext.Request.Builder clearScheme()
       The HTTP URL scheme, such as `http` and `https`.
       
      string scheme = 6 [json_name = "scheme"];
      Returns:
      This builder for chaining.
    • setSchemeBytes

      public AttributeContext.Request.Builder setSchemeBytes(com.google.protobuf.ByteString value)
       The HTTP URL scheme, such as `http` and `https`.
       
      string scheme = 6 [json_name = "scheme"];
      Parameters:
      value - The bytes for scheme to set.
      Returns:
      This builder for chaining.
    • getQuery

      public String getQuery()
       The HTTP URL query in the format of `name1=value1&name2=value2`, as it
       appears in the first line of the HTTP request. No decoding is performed.
       
      string query = 7 [json_name = "query"];
      Specified by:
      getQuery in interface AttributeContext.RequestOrBuilder
      Returns:
      The query.
    • getQueryBytes

      public com.google.protobuf.ByteString getQueryBytes()
       The HTTP URL query in the format of `name1=value1&name2=value2`, as it
       appears in the first line of the HTTP request. No decoding is performed.
       
      string query = 7 [json_name = "query"];
      Specified by:
      getQueryBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for query.
    • setQuery

      public AttributeContext.Request.Builder setQuery(String value)
       The HTTP URL query in the format of `name1=value1&name2=value2`, as it
       appears in the first line of the HTTP request. No decoding is performed.
       
      string query = 7 [json_name = "query"];
      Parameters:
      value - The query to set.
      Returns:
      This builder for chaining.
    • clearQuery

      public AttributeContext.Request.Builder clearQuery()
       The HTTP URL query in the format of `name1=value1&name2=value2`, as it
       appears in the first line of the HTTP request. No decoding is performed.
       
      string query = 7 [json_name = "query"];
      Returns:
      This builder for chaining.
    • setQueryBytes

      public AttributeContext.Request.Builder setQueryBytes(com.google.protobuf.ByteString value)
       The HTTP URL query in the format of `name1=value1&name2=value2`, as it
       appears in the first line of the HTTP request. No decoding is performed.
       
      string query = 7 [json_name = "query"];
      Parameters:
      value - The bytes for query to set.
      Returns:
      This builder for chaining.
    • hasTime

      public boolean hasTime()
       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
      Specified by:
      hasTime in interface AttributeContext.RequestOrBuilder
      Returns:
      Whether the time field is set.
    • getTime

      public com.google.protobuf.Timestamp getTime()
       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
      Specified by:
      getTime in interface AttributeContext.RequestOrBuilder
      Returns:
      The time.
    • setTime

      public AttributeContext.Request.Builder setTime(com.google.protobuf.Timestamp value)
       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
    • setTime

      public AttributeContext.Request.Builder setTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
    • mergeTime

      public AttributeContext.Request.Builder mergeTime(com.google.protobuf.Timestamp value)
       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
    • clearTime

       The timestamp when the `destination` service receives the last byte of
       the request.
       
      .google.protobuf.Timestamp time = 9 [json_name = "time"];
    • getSize

      public long getSize()
       The HTTP request size in bytes. If unknown, it must be -1.
       
      int64 size = 10 [json_name = "size"];
      Specified by:
      getSize in interface AttributeContext.RequestOrBuilder
      Returns:
      The size.
    • setSize

      public AttributeContext.Request.Builder setSize(long value)
       The HTTP request size in bytes. If unknown, it must be -1.
       
      int64 size = 10 [json_name = "size"];
      Parameters:
      value - The size to set.
      Returns:
      This builder for chaining.
    • clearSize

       The HTTP request size in bytes. If unknown, it must be -1.
       
      int64 size = 10 [json_name = "size"];
      Returns:
      This builder for chaining.
    • getProtocol

      public String getProtocol()
       The network protocol used with the request, such as "http/1.1",
       "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for details.
       
      string protocol = 11 [json_name = "protocol"];
      Specified by:
      getProtocol in interface AttributeContext.RequestOrBuilder
      Returns:
      The protocol.
    • getProtocolBytes

      public com.google.protobuf.ByteString getProtocolBytes()
       The network protocol used with the request, such as "http/1.1",
       "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for details.
       
      string protocol = 11 [json_name = "protocol"];
      Specified by:
      getProtocolBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for protocol.
    • setProtocol

      public AttributeContext.Request.Builder setProtocol(String value)
       The network protocol used with the request, such as "http/1.1",
       "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for details.
       
      string protocol = 11 [json_name = "protocol"];
      Parameters:
      value - The protocol to set.
      Returns:
      This builder for chaining.
    • clearProtocol

      public AttributeContext.Request.Builder clearProtocol()
       The network protocol used with the request, such as "http/1.1",
       "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for details.
       
      string protocol = 11 [json_name = "protocol"];
      Returns:
      This builder for chaining.
    • setProtocolBytes

      public AttributeContext.Request.Builder setProtocolBytes(com.google.protobuf.ByteString value)
       The network protocol used with the request, such as "http/1.1",
       "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
       https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
       for details.
       
      string protocol = 11 [json_name = "protocol"];
      Parameters:
      value - The bytes for protocol to set.
      Returns:
      This builder for chaining.
    • getReason

      public String getReason()
       A special parameter for request reason. It is used by security systems
       to associate auditing information with a request.
       
      string reason = 12 [json_name = "reason"];
      Specified by:
      getReason in interface AttributeContext.RequestOrBuilder
      Returns:
      The reason.
    • getReasonBytes

      public com.google.protobuf.ByteString getReasonBytes()
       A special parameter for request reason. It is used by security systems
       to associate auditing information with a request.
       
      string reason = 12 [json_name = "reason"];
      Specified by:
      getReasonBytes in interface AttributeContext.RequestOrBuilder
      Returns:
      The bytes for reason.
    • setReason

      public AttributeContext.Request.Builder setReason(String value)
       A special parameter for request reason. It is used by security systems
       to associate auditing information with a request.
       
      string reason = 12 [json_name = "reason"];
      Parameters:
      value - The reason to set.
      Returns:
      This builder for chaining.
    • clearReason

      public AttributeContext.Request.Builder clearReason()
       A special parameter for request reason. It is used by security systems
       to associate auditing information with a request.
       
      string reason = 12 [json_name = "reason"];
      Returns:
      This builder for chaining.
    • setReasonBytes

      public AttributeContext.Request.Builder setReasonBytes(com.google.protobuf.ByteString value)
       A special parameter for request reason. It is used by security systems
       to associate auditing information with a request.
       
      string reason = 12 [json_name = "reason"];
      Parameters:
      value - The bytes for reason to set.
      Returns:
      This builder for chaining.
    • hasAuth

      public boolean hasAuth()
       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];
      Specified by:
      hasAuth in interface AttributeContext.RequestOrBuilder
      Returns:
      Whether the auth field is set.
    • getAuth

      public AttributeContext.Auth getAuth()
       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];
      Specified by:
      getAuth in interface AttributeContext.RequestOrBuilder
      Returns:
      The auth.
    • setAuth

       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];
    • setAuth

       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];
    • mergeAuth

       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];
    • clearAuth

       The request authentication. May be absent for unauthenticated requests.
       Derived from the HTTP request `Authorization` header or equivalent.
       
      .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];