Class AttributeContext.Request.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContext.RequestOrBuilder, Cloneable
    Enclosing class:
    AttributeContext.Request

    public static final class AttributeContext.Request.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<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 Detail

      • 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.Request.Builder>
      • internalGetMutableMapField

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

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

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

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

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

        public AttributeContext.Request.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.Request.Builder>
      • addRepeatedField

        public AttributeContext.Request.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.Request.Builder>
      • isInitialized

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

        public AttributeContext.Request.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.Request.Builder>
        Throws:
        IOException
      • 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;
        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;
        Specified by:
        getIdBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for id.
      • setId

        public AttributeContext.Request.Builder setId​(String 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;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public AttributeContext.Request.Builder 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;
        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;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getMethodBytes

        public com.google.protobuf.ByteString getMethodBytes()
         The HTTP request method, such as `GET`, `POST`.
         
        string method = 2;
        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;
        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;
        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;
        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;
        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;
        Specified by:
        containsHeaders 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;
        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;
        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;
        Specified by:
        getHeadersOrThrow in interface AttributeContext.RequestOrBuilder
      • 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;
      • getMutableHeaders

        @Deprecated
        public Map<String,​String> getMutableHeaders()
        Deprecated.
        Use alternate mutation accessors instead.
      • 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;
      • 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;
      • getPathBytes

        public com.google.protobuf.ByteString getPathBytes()
         The HTTP URL path, excluding the query parameters.
         
        string path = 4;
        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;
        Parameters:
        value - The path to set.
        Returns:
        This builder for chaining.
      • clearPath

        public AttributeContext.Request.Builder clearPath()
         The HTTP URL path, excluding the query parameters.
         
        string path = 4;
        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;
        Parameters:
        value - The bytes for path to set.
        Returns:
        This builder for chaining.
      • getHostBytes

        public com.google.protobuf.ByteString getHostBytes()
         The HTTP request `Host` header value.
         
        string host = 5;
        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;
        Parameters:
        value - The host to set.
        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;
        Parameters:
        value - The bytes for host to set.
        Returns:
        This builder for chaining.
      • getSchemeBytes

        public com.google.protobuf.ByteString getSchemeBytes()
         The HTTP URL scheme, such as `http` and `https`.
         
        string scheme = 6;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
      • 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;
      • 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;
      • clearTime

        public AttributeContext.Request.Builder clearTime()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
      • getTimeBuilder

        public com.google.protobuf.Timestamp.Builder getTimeBuilder()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
      • getTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
        Specified by:
        getTimeOrBuilder in interface AttributeContext.RequestOrBuilder
      • setSize

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

        public AttributeContext.Request.Builder clearSize()
         The HTTP request size in bytes. If unknown, it must be -1.
         
        int64 size = 10;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        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;
        Specified by:
        getAuth in interface AttributeContext.RequestOrBuilder
        Returns:
        The auth.
      • setAuth

        public AttributeContext.Request.Builder setAuth​(AttributeContext.Auth value)
         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;
      • mergeAuth

        public AttributeContext.Request.Builder mergeAuth​(AttributeContext.Auth value)
         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;
      • clearAuth

        public AttributeContext.Request.Builder 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;
      • getAuthBuilder

        public AttributeContext.Auth.Builder getAuthBuilder()
         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;
      • setUnknownFields

        public final AttributeContext.Request.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.Request.Builder>
      • mergeUnknownFields

        public final AttributeContext.Request.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.Request.Builder>