Cloud PubSub V1 Client - Class CloudStorageConfig (1.44.0)

Reference documentation and code samples for the Cloud PubSub V1 Client class CloudStorageConfig.

Configuration for a Cloud Storage subscription.

Generated from protobuf message google.pubsub.v1.CloudStorageConfig

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ bucket string

Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

↳ filename_prefix string

User-provided prefix for Cloud Storage filename. See the object naming requirements.

↳ filename_suffix string

User-provided suffix for Cloud Storage filename. See the object naming requirements. Must not end in "/".

↳ text_config Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig

If set, message data will be written to Cloud Storage in text format.

↳ avro_config Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig

If set, message data will be written to Cloud Storage in Avro format.

↳ max_duration Google\Protobuf\Duration

The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

↳ max_bytes int|string

The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

↳ state int

Output only. An output-only field that indicates whether or not the subscription can receive messages.

getBucket

Required. User-provided name for the Cloud Storage bucket.

The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

Returns
TypeDescription
string

setBucket

Required. User-provided name for the Cloud Storage bucket.

The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFilenamePrefix

User-provided prefix for Cloud Storage filename. See the object naming requirements.

Returns
TypeDescription
string

setFilenamePrefix

User-provided prefix for Cloud Storage filename. See the object naming requirements.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFilenameSuffix

User-provided suffix for Cloud Storage filename. See the object naming requirements. Must not end in "/".

Returns
TypeDescription
string

setFilenameSuffix

User-provided suffix for Cloud Storage filename. See the object naming requirements. Must not end in "/".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTextConfig

If set, message data will be written to Cloud Storage in text format.

Returns
TypeDescription
Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig|null

hasTextConfig

setTextConfig

If set, message data will be written to Cloud Storage in text format.

Parameter
NameDescription
var Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig
Returns
TypeDescription
$this

getAvroConfig

If set, message data will be written to Cloud Storage in Avro format.

Returns
TypeDescription
Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig|null

hasAvroConfig

setAvroConfig

If set, message data will be written to Cloud Storage in Avro format.

Parameter
NameDescription
var Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig
Returns
TypeDescription
$this

getMaxDuration

The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasMaxDuration

clearMaxDuration

setMaxDuration

The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getMaxBytes

The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

Returns
TypeDescription
int|string

setMaxBytes

The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getState

Output only. An output-only field that indicates whether or not the subscription can receive messages.

Returns
TypeDescription
int

setState

Output only. An output-only field that indicates whether or not the subscription can receive messages.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getOutputFormat

Returns
TypeDescription
string