class Google::Apis::MirrorV1::Subscription
A subscription to events on a collection.
Attributes
The URL where notifications should be delivered (must start with https://). Corresponds to the JSON property `callbackUrl` @return [String]
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]
The ID of the subscription. Corresponds to the JSON property `id` @return [String]
The type of resource. This is always mirror#subscription. Corresponds to the JSON property `kind` @return [String]
A notification delivered by the API. Corresponds to the JSON property `notification` @return [Google::Apis::MirrorV1::Notification]
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>]
The time at which this subscription was last modified, formatted according to RFC 3339. Corresponds to the JSON property `updated` @return [DateTime]
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]
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
# File generated/google/apis/mirror_v1/classes.rb, line 698 def initialize(**args) update!(**args) end
Public Instance Methods
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