Class: Google::Apis::StorageV1::Notification

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

Overview

A subscription to receive Google PubSub notifications.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Notification

Returns a new instance of Notification.



1353
1354
1355
# File 'lib/google/apis/storage_v1/classes.rb', line 1353

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

Instance Attribute Details

#custom_attributesHash<String,String>

An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. Corresponds to the JSON property custom_attributes

Returns:

  • (Hash<String,String>)


1307
1308
1309
# File 'lib/google/apis/storage_v1/classes.rb', line 1307

def custom_attributes
  @custom_attributes
end

#etagString

HTTP 1.1 Entity tag for this subscription notification. Corresponds to the JSON property etag

Returns:

  • (String)


1312
1313
1314
# File 'lib/google/apis/storage_v1/classes.rb', line 1312

def etag
  @etag
end

#event_typesArray<String>

If present, only send notifications about listed event types. If empty, sent notifications for all event types. Corresponds to the JSON property event_types

Returns:

  • (Array<String>)


1318
1319
1320
# File 'lib/google/apis/storage_v1/classes.rb', line 1318

def event_types
  @event_types
end

#idString

The ID of the notification. Corresponds to the JSON property id

Returns:

  • (String)


1323
1324
1325
# File 'lib/google/apis/storage_v1/classes.rb', line 1323

def id
  @id
end

#kindString

The kind of item this is. For notifications, this is always storage# notification. Corresponds to the JSON property kind

Returns:

  • (String)


1329
1330
1331
# File 'lib/google/apis/storage_v1/classes.rb', line 1329

def kind
  @kind
end

#object_name_prefixString

If present, only apply this notification configuration to object names that begin with this prefix. Corresponds to the JSON property object_name_prefix

Returns:

  • (String)


1335
1336
1337
# File 'lib/google/apis/storage_v1/classes.rb', line 1335

def object_name_prefix
  @object_name_prefix
end

#payload_formatString

The desired content of the Payload. Corresponds to the JSON property payload_format

Returns:

  • (String)


1340
1341
1342
# File 'lib/google/apis/storage_v1/classes.rb', line 1340

def payload_format
  @payload_format
end

The canonical URL of this notification. Corresponds to the JSON property selfLink

Returns:

  • (String)


1345
1346
1347
# File 'lib/google/apis/storage_v1/classes.rb', line 1345

def self_link
  @self_link
end

#topicString

The Cloud PubSub topic to which this subscription publishes. Formatted as: '// pubsub.googleapis.com/projects/project-identifier/topics/my-topic' Corresponds to the JSON property topic

Returns:

  • (String)


1351
1352
1353
# File 'lib/google/apis/storage_v1/classes.rb', line 1351

def topic
  @topic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
# File 'lib/google/apis/storage_v1/classes.rb', line 1358

def update!(**args)
  @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes)
  @etag = args[:etag] if args.key?(:etag)
  @event_types = args[:event_types] if args.key?(:event_types)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @object_name_prefix = args[:object_name_prefix] if args.key?(:object_name_prefix)
  @payload_format = args[:payload_format] if args.key?(:payload_format)
  @self_link = args[:self_link] if args.key?(:self_link)
  @topic = args[:topic] if args.key?(:topic)
end