Documentation

ReadRequest extends Message
in package

Request object for ByteStream.Read.

Generated from protobuf message google.bytestream.ReadRequest

Table of Contents

Properties

$read_limit  : mixed
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.
$read_offset  : mixed
The offset for the first byte to return in the read, relative to the start of the resource.
$resource_name  : mixed
The name of the resource to read.

Methods

__construct()  : mixed
Constructor.
getReadLimit()  : int|string
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.
getReadOffset()  : int|string
The offset for the first byte to return in the read, relative to the start of the resource.
getResourceName()  : string
The name of the resource to read.
setReadLimit()  : $this
The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.
setReadOffset()  : $this
The offset for the first byte to return in the read, relative to the start of the resource.
setResourceName()  : $this
The name of the resource to read.

Properties

$read_limit

The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.

protected mixed $read_limit = 0

If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

Generated from protobuf field int64 read_limit = 3 [json_name = "readLimit"];

$read_offset

The offset for the first byte to return in the read, relative to the start of the resource.

protected mixed $read_offset = 0

A read_offset that is negative or greater than the size of the resource will cause an OUT_OF_RANGE error.

Generated from protobuf field int64 read_offset = 2 [json_name = "readOffset"];

$resource_name

The name of the resource to read.

protected mixed $resource_name = ''

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

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 $resource_name
      The name of the resource to read.
@type int|string $read_offset
      The offset for the first byte to return in the read, relative to the start
      of the resource.
      A `read_offset` that is negative or greater than the size of the resource
      will cause an `OUT_OF_RANGE` error.
@type int|string $read_limit
      The maximum number of `data` bytes the server is allowed to return in the
      sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
      there is no limit, and a negative `read_limit` will cause an error.
      If the stream returns fewer bytes than allowed by the `read_limit` and no
      error occurred, the stream includes all data from the `read_offset` to the
      end of the resource.

}

getReadLimit()

The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.

public getReadLimit() : int|string

If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

Generated from protobuf field int64 read_limit = 3 [json_name = "readLimit"];

Return values
int|string

getReadOffset()

The offset for the first byte to return in the read, relative to the start of the resource.

public getReadOffset() : int|string

A read_offset that is negative or greater than the size of the resource will cause an OUT_OF_RANGE error.

Generated from protobuf field int64 read_offset = 2 [json_name = "readOffset"];

Return values
int|string

getResourceName()

The name of the resource to read.

public getResourceName() : string

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

Return values
string

setReadLimit()

The maximum number of `data` bytes the server is allowed to return in the sum of all `ReadResponse` messages. A `read_limit` of zero indicates that there is no limit, and a negative `read_limit` will cause an error.

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

If the stream returns fewer bytes than allowed by the read_limit and no error occurred, the stream includes all data from the read_offset to the end of the resource.

Generated from protobuf field int64 read_limit = 3 [json_name = "readLimit"];

Parameters
$var : int|string
Return values
$this

setReadOffset()

The offset for the first byte to return in the read, relative to the start of the resource.

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

A read_offset that is negative or greater than the size of the resource will cause an OUT_OF_RANGE error.

Generated from protobuf field int64 read_offset = 2 [json_name = "readOffset"];

Parameters
$var : int|string
Return values
$this

setResourceName()

The name of the resource to read.

public setResourceName(string $var) : $this

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

Parameters
$var : string
Return values
$this

        
On this page

Search results