class Google::Apis::MirrorV1::Subscription

A subscription to events on a collection.

Attributes

callback_url[RW]

The URL where notifications should be delivered (must start with https://). Corresponds to the JSON property `callbackUrl` @return [String]

collection[RW]

The collection to subscribe to. Allowed values are:

  • timeline - Changes in the timeline including insertion, deletion, and

updates.

  • locations - Location updates.

  • settings - Settings updates.

Corresponds to the JSON property `collection` @return [String]

id[RW]

The ID of the subscription. Corresponds to the JSON property `id` @return [String]

kind[RW]

The type of resource. This is always mirror#subscription. Corresponds to the JSON property `kind` @return [String]

notification[RW]

A notification delivered by the API. Corresponds to the JSON property `notification` @return [Google::Apis::MirrorV1::Notification]

operation[RW]

A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are:

  • UPDATE - The item has been updated.

  • INSERT - A new item has been inserted.

  • DELETE - The item has been deleted.

  • MENU_ACTION - A custom menu item has been triggered by the user.

Corresponds to the JSON property `operation` @return [Array<String>]

updated[RW]

The time at which this subscription was last modified, formatted according to RFC 3339. Corresponds to the JSON property `updated` @return [DateTime]

user_token[RW]

An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. Corresponds to the JSON property `userToken` @return [String]

verify_token[RW]

A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. Corresponds to the JSON property `verifyToken` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/mirror_v1/classes.rb, line 698
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/mirror_v1/classes.rb, line 703
def update!(**args)
  @callback_url = args[:callback_url] if args.key?(:callback_url)
  @collection = args[:collection] if args.key?(:collection)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @notification = args[:notification] if args.key?(:notification)
  @operation = args[:operation] if args.key?(:operation)
  @updated = args[:updated] if args.key?(:updated)
  @user_token = args[:user_token] if args.key?(:user_token)
  @verify_token = args[:verify_token] if args.key?(:verify_token)
end