Class: Google::Apis::PubsubV1::CloudStorageConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb

Overview

Configuration for a Cloud Storage subscription.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CloudStorageConfig

Returns a new instance of CloudStorageConfig.



292
293
294
# File 'lib/google/apis/pubsub_v1/classes.rb', line 292

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#avro_configGoogle::Apis::PubsubV1::AvroConfig

Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary. Corresponds to the JSON property avroConfig



243
244
245
# File 'lib/google/apis/pubsub_v1/classes.rb', line 243

def avro_config
  @avro_config
end

#bucketString

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. Corresponds to the JSON property bucket

Returns:

  • (String)


251
252
253
# File 'lib/google/apis/pubsub_v1/classes.rb', line 251

def bucket
  @bucket
end

#filename_prefixString

Optional. User-provided prefix for Cloud Storage filename. See the object naming requirements. Corresponds to the JSON property filenamePrefix

Returns:

  • (String)


257
258
259
# File 'lib/google/apis/pubsub_v1/classes.rb', line 257

def filename_prefix
  @filename_prefix
end

#filename_suffixString

Optional. User-provided suffix for Cloud Storage filename. See the object naming requirements. Must not end in "/". Corresponds to the JSON property filenameSuffix

Returns:

  • (String)


264
265
266
# File 'lib/google/apis/pubsub_v1/classes.rb', line 264

def filename_suffix
  @filename_suffix
end

#max_bytesFixnum

Optional. 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. Corresponds to the JSON property maxBytes

Returns:

  • (Fixnum)


271
272
273
# File 'lib/google/apis/pubsub_v1/classes.rb', line 271

def max_bytes
  @max_bytes
end

#max_durationString

Optional. 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. Corresponds to the JSON property maxDuration

Returns:

  • (String)


278
279
280
# File 'lib/google/apis/pubsub_v1/classes.rb', line 278

def max_duration
  @max_duration
end

#stateString

Output only. An output-only field that indicates whether or not the subscription can receive messages. Corresponds to the JSON property state

Returns:

  • (String)


284
285
286
# File 'lib/google/apis/pubsub_v1/classes.rb', line 284

def state
  @state
end

#text_configGoogle::Apis::PubsubV1::TextConfig

Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline. Corresponds to the JSON property textConfig



290
291
292
# File 'lib/google/apis/pubsub_v1/classes.rb', line 290

def text_config
  @text_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



297
298
299
300
301
302
303
304
305
306
# File 'lib/google/apis/pubsub_v1/classes.rb', line 297

def update!(**args)
  @avro_config = args[:avro_config] if args.key?(:avro_config)
  @bucket = args[:bucket] if args.key?(:bucket)
  @filename_prefix = args[:filename_prefix] if args.key?(:filename_prefix)
  @filename_suffix = args[:filename_suffix] if args.key?(:filename_suffix)
  @max_bytes = args[:max_bytes] if args.key?(:max_bytes)
  @max_duration = args[:max_duration] if args.key?(:max_duration)
  @state = args[:state] if args.key?(:state)
  @text_config = args[:text_config] if args.key?(:text_config)
end