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
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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. |
↳ 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getFilenamePrefix
User-provided prefix for Cloud Storage filename. See the object naming requirements.
Returns | |
---|---|
Type | Description |
string |
setFilenamePrefix
User-provided prefix for Cloud Storage filename. See the object naming requirements.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getFilenameSuffix
User-provided suffix for Cloud Storage filename. See the object naming requirements.
Returns | |
---|---|
Type | Description |
string |
setFilenameSuffix
User-provided suffix for Cloud Storage filename. See the object naming requirements.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTextConfig
If set, message data will be written to Cloud Storage in text format.
Returns | |
---|---|
Type | Description |
Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig|null |
hasTextConfig
setTextConfig
If set, message data will be written to Cloud Storage in text format.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig
|
Returns | |
---|---|
Type | Description |
$this |
getAvroConfig
If set, message data will be written to Cloud Storage in Avro format.
Returns | |
---|---|
Type | Description |
Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig|null |
hasAvroConfig
setAvroConfig
If set, message data will be written to Cloud Storage in Avro format.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
Google\Protobuf\Duration
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getState
Output only. An output-only field that indicates whether or not the subscription can receive messages.
Returns | |
---|---|
Type | Description |
int |
setState
Output only. An output-only field that indicates whether or not the subscription can receive messages.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getOutputFormat
Returns | |
---|---|
Type | Description |
string |