Class: Google::Apis::MirrorV1::Subscription
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::MirrorV1::Subscription
 
- 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
- 
  
    
      #callback_url  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The URL where notifications should be delivered (must start with https://). 
- 
  
    
      #collection  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The collection to subscribe to. 
- 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The ID of the subscription. 
- 
  
    
      #kind  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The type of resource. 
- 
  
    
      #notification  ⇒ Google::Apis::MirrorV1::Notification 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A notification delivered by the API. 
- 
  
    
      #operation  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A list of operations that should be subscribed to. 
- 
  
    
      #updated  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The time at which this subscription was last modified, formatted according to RFC 3339. 
- 
  
    
      #user_token  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 
- 
  
    
      #verify_token  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ Subscription 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Subscription. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
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_url ⇒ String
The URL where notifications should be delivered (must start with https://).
Corresponds to the JSON property callbackUrl
| 643 644 645 | # File 'generated/google/apis/mirror_v1/classes.rb', line 643 def callback_url @callback_url end | 
#collection ⇒ 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
| 652 653 654 | # File 'generated/google/apis/mirror_v1/classes.rb', line 652 def collection @collection end | 
#id ⇒ String
The ID of the subscription.
Corresponds to the JSON property id
| 657 658 659 | # File 'generated/google/apis/mirror_v1/classes.rb', line 657 def id @id end | 
#kind ⇒ String
The type of resource. This is always mirror#subscription.
Corresponds to the JSON property kind
| 662 663 664 | # File 'generated/google/apis/mirror_v1/classes.rb', line 662 def kind @kind end | 
#notification ⇒ Google::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 | 
#operation ⇒ Array<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
| 678 679 680 | # File 'generated/google/apis/mirror_v1/classes.rb', line 678 def operation @operation end | 
#updated ⇒ DateTime
The time at which this subscription was last modified, formatted according to
RFC 3339.
Corresponds to the JSON property updated
| 684 685 686 | # File 'generated/google/apis/mirror_v1/classes.rb', line 684 def updated @updated end | 
#user_token ⇒ String
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
| 690 691 692 | # File 'generated/google/apis/mirror_v1/classes.rb', line 690 def user_token @user_token end | 
#verify_token ⇒ 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
| 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 |