Documentation

Request extends Message
in package

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.

Generated from protobuf message google.rpc.context.AttributeContext.Request

Table of Contents

Properties

$auth  : mixed
The request authentication. May be absent for unauthenticated requests.
$host  : mixed
The HTTP request `Host` header value.
$id  : mixed
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.
$method  : mixed
The HTTP request method, such as `GET`, `POST`.
$path  : mixed
The HTTP URL path, excluding the query parameters.
$protocol  : mixed
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.
$query  : mixed
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.
$reason  : mixed
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
$scheme  : mixed
The HTTP URL scheme, such as `http` and `https`.
$size  : mixed
The HTTP request size in bytes. If unknown, it must be -1.
$time  : mixed
The timestamp when the `destination` service receives the last byte of the request.
$headers  : mixed
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.

Methods

__construct()  : mixed
Constructor.
clearAuth()  : mixed
clearTime()  : mixed
getAuth()  : Auth|null
The request authentication. May be absent for unauthenticated requests.
getHeaders()  : MapField
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.
getHost()  : string
The HTTP request `Host` header value.
getId()  : string
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.
getMethod()  : string
The HTTP request method, such as `GET`, `POST`.
getPath()  : string
The HTTP URL path, excluding the query parameters.
getProtocol()  : string
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.
getQuery()  : string
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.
getReason()  : string
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
getScheme()  : string
The HTTP URL scheme, such as `http` and `https`.
getSize()  : int|string
The HTTP request size in bytes. If unknown, it must be -1.
getTime()  : Timestamp|null
The timestamp when the `destination` service receives the last byte of the request.
hasAuth()  : mixed
hasTime()  : mixed
setAuth()  : $this
The request authentication. May be absent for unauthenticated requests.
setHeaders()  : $this
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.
setHost()  : $this
The HTTP request `Host` header value.
setId()  : $this
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.
setMethod()  : $this
The HTTP request method, such as `GET`, `POST`.
setPath()  : $this
The HTTP URL path, excluding the query parameters.
setProtocol()  : $this
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.
setQuery()  : $this
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.
setReason()  : $this
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
setScheme()  : $this
The HTTP URL scheme, such as `http` and `https`.
setSize()  : $this
The HTTP request size in bytes. If unknown, it must be -1.
setTime()  : $this
The timestamp when the `destination` service receives the last byte of the request.

Properties

$auth

The request authentication. May be absent for unauthenticated requests.

protected mixed $auth = null

Derived from the HTTP request Authorization header or equivalent.

Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];

$host

The HTTP request `Host` header value.

protected mixed $host = ''

Generated from protobuf field string host = 5 [json_name = "host"];

$id

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.

protected mixed $id = ''

Generated from protobuf field string id = 1 [json_name = "id"];

$method

The HTTP request method, such as `GET`, `POST`.

protected mixed $method = ''

Generated from protobuf field string method = 2 [json_name = "method"];

$path

The HTTP URL path, excluding the query parameters.

protected mixed $path = ''

Generated from protobuf field string path = 4 [json_name = "path"];

$protocol

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.

protected mixed $protocol = ''

Generated from protobuf field string protocol = 11 [json_name = "protocol"];

$query

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.

protected mixed $query = ''

Generated from protobuf field string query = 7 [json_name = "query"];

$reason

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

protected mixed $reason = ''

Generated from protobuf field string reason = 12 [json_name = "reason"];

$scheme

The HTTP URL scheme, such as `http` and `https`.

protected mixed $scheme = ''

Generated from protobuf field string scheme = 6 [json_name = "scheme"];

$size

The HTTP request size in bytes. If unknown, it must be -1.

protected mixed $size = 0

Generated from protobuf field int64 size = 10 [json_name = "size"];

$time

The timestamp when the `destination` service receives the last byte of the request.

protected mixed $time = null

Generated from protobuf field .google.protobuf.Timestamp time = 9 [json_name = "time"];

$headers

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.

private mixed $headers

Generated from protobuf field map<string, string> headers = 3 [json_name = "headers"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type string $id
      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.
@type string $method
      The HTTP request method, such as `GET`, `POST`.
@type array|\Google\Protobuf\Internal\MapField $headers
      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.
@type string $path
      The HTTP URL path, excluding the query parameters.
@type string $host
      The HTTP request `Host` header value.
@type string $scheme
      The HTTP URL scheme, such as `http` and `https`.
@type string $query
      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.
@type \Google\Protobuf\Timestamp $time
      The timestamp when the `destination` service receives the last byte of
      the request.
@type int|string $size
      The HTTP request size in bytes. If unknown, it must be -1.
@type string $protocol
      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.
@type string $reason
      A special parameter for request reason. It is used by security systems
      to associate auditing information with a request.
@type \Google\Rpc\Context\AttributeContext\Auth $auth
      The request authentication. May be absent for unauthenticated requests.
      Derived from the HTTP request `Authorization` header or equivalent.

}

clearAuth()

public clearAuth() : mixed

clearTime()

public clearTime() : mixed

getAuth()

The request authentication. May be absent for unauthenticated requests.

public getAuth() : Auth|null

Derived from the HTTP request Authorization header or equivalent.

Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];

Return values
Auth|null

getHeaders()

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.

public getHeaders() : MapField

Generated from protobuf field map<string, string> headers = 3 [json_name = "headers"];

Return values
MapField

getHost()

The HTTP request `Host` header value.

public getHost() : string

Generated from protobuf field string host = 5 [json_name = "host"];

Return values
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.

public getId() : string

Generated from protobuf field string id = 1 [json_name = "id"];

Return values
string

getMethod()

The HTTP request method, such as `GET`, `POST`.

public getMethod() : string

Generated from protobuf field string method = 2 [json_name = "method"];

Return values
string

getPath()

The HTTP URL path, excluding the query parameters.

public getPath() : string

Generated from protobuf field string path = 4 [json_name = "path"];

Return values
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.

public getProtocol() : string

Generated from protobuf field string protocol = 11 [json_name = "protocol"];

Return values
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.

public getQuery() : string

Generated from protobuf field string query = 7 [json_name = "query"];

Return values
string

getReason()

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

public getReason() : string

Generated from protobuf field string reason = 12 [json_name = "reason"];

Return values
string

getScheme()

The HTTP URL scheme, such as `http` and `https`.

public getScheme() : string

Generated from protobuf field string scheme = 6 [json_name = "scheme"];

Return values
string

getSize()

The HTTP request size in bytes. If unknown, it must be -1.

public getSize() : int|string

Generated from protobuf field int64 size = 10 [json_name = "size"];

Return values
int|string

getTime()

The timestamp when the `destination` service receives the last byte of the request.

public getTime() : Timestamp|null

Generated from protobuf field .google.protobuf.Timestamp time = 9 [json_name = "time"];

Return values
Timestamp|null

setAuth()

The request authentication. May be absent for unauthenticated requests.

public setAuth(Auth $var) : $this

Derived from the HTTP request Authorization header or equivalent.

Generated from protobuf field .google.rpc.context.AttributeContext.Auth auth = 13 [json_name = "auth"];

Parameters
$var : Auth
Return values
$this

setHeaders()

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.

public setHeaders(array<string|int, mixed>|MapField $var) : $this

Generated from protobuf field map<string, string> headers = 3 [json_name = "headers"];

Parameters
$var : array<string|int, mixed>|MapField
Return values
$this

setHost()

The HTTP request `Host` header value.

public setHost(string $var) : $this

Generated from protobuf field string host = 5 [json_name = "host"];

Parameters
$var : string
Return values
$this

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.

public setId(string $var) : $this

Generated from protobuf field string id = 1 [json_name = "id"];

Parameters
$var : string
Return values
$this

setMethod()

The HTTP request method, such as `GET`, `POST`.

public setMethod(string $var) : $this

Generated from protobuf field string method = 2 [json_name = "method"];

Parameters
$var : string
Return values
$this

setPath()

The HTTP URL path, excluding the query parameters.

public setPath(string $var) : $this

Generated from protobuf field string path = 4 [json_name = "path"];

Parameters
$var : string
Return values
$this

setProtocol()

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.

public setProtocol(string $var) : $this

Generated from protobuf field string protocol = 11 [json_name = "protocol"];

Parameters
$var : string
Return values
$this

setQuery()

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.

public setQuery(string $var) : $this

Generated from protobuf field string query = 7 [json_name = "query"];

Parameters
$var : string
Return values
$this

setReason()

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

public setReason(string $var) : $this

Generated from protobuf field string reason = 12 [json_name = "reason"];

Parameters
$var : string
Return values
$this

setScheme()

The HTTP URL scheme, such as `http` and `https`.

public setScheme(string $var) : $this

Generated from protobuf field string scheme = 6 [json_name = "scheme"];

Parameters
$var : string
Return values
$this

setSize()

The HTTP request size in bytes. If unknown, it must be -1.

public setSize(int|string $var) : $this

Generated from protobuf field int64 size = 10 [json_name = "size"];

Parameters
$var : int|string
Return values
$this

setTime()

The timestamp when the `destination` service receives the last byte of the request.

public setTime(Timestamp $var) : $this

Generated from protobuf field .google.protobuf.Timestamp time = 9 [json_name = "time"];

Parameters
$var : Timestamp
Return values
$this

        
On this page

Search results