Class: Google::Apis::MirrorV1::Subscription

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

Overview

A subscription to events on a collection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Subscription

Returns a new instance of Subscription.



698
699
700
# File 'generated/google/apis/mirror_v1/classes.rb', line 698

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

Instance Attribute Details

#callback_urlString

The URL where notifications should be delivered (must start with https://). Corresponds to the JSON property callbackUrl

Returns:

  • (String)


643
644
645
# File 'generated/google/apis/mirror_v1/classes.rb', line 643

def callback_url
  @callback_url
end

#collectionString

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

Returns:

  • (String)


652
653
654
# File 'generated/google/apis/mirror_v1/classes.rb', line 652

def collection
  @collection
end

#idString

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

Returns:

  • (String)


657
658
659
# File 'generated/google/apis/mirror_v1/classes.rb', line 657

def id
  @id
end

#kindString

The type of resource. This is always mirror#subscription. Corresponds to the JSON property kind

Returns:

  • (String)


662
663
664
# File 'generated/google/apis/mirror_v1/classes.rb', line 662

def kind
  @kind
end

#notificationGoogle::Apis::MirrorV1::Notification

A notification delivered by the API. Corresponds to the JSON property notification



667
668
669
# File 'generated/google/apis/mirror_v1/classes.rb', line 667

def notification
  @notification
end

#operationArray<String>

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

Returns:

  • (Array<String>)


678
679
680
# File 'generated/google/apis/mirror_v1/classes.rb', line 678

def operation
  @operation
end

#updatedDateTime

The time at which this subscription was last modified, formatted according to RFC 3339. Corresponds to the JSON property updated

Returns:

  • (DateTime)


684
685
686
# File 'generated/google/apis/mirror_v1/classes.rb', line 684

def updated
  @updated
end

#user_tokenString

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

Returns:

  • (String)


690
691
692
# File 'generated/google/apis/mirror_v1/classes.rb', line 690

def user_token
  @user_token
end

#verify_tokenString

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

Returns:

  • (String)


696
697
698
# File 'generated/google/apis/mirror_v1/classes.rb', line 696

def verify_token
  @verify_token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



703
704
705
706
707
708
709
710
711
712
713
# 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