Class: Google::Apis::HealthV4::Subscription
- Inherits:
-
Object
- Object
- Google::Apis::HealthV4::Subscription
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/health_v4/classes.rb,
lib/google/apis/health_v4/representations.rb,
lib/google/apis/health_v4/representations.rb
Overview
A subscription to a data collection for a specific user, to be delivered to a subscriber.
Instance Attribute Summary collapse
-
#data_types ⇒ Array<String>
Optional.
-
#name ⇒ String
Identifier.
-
#user ⇒ String
Immutable.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Subscription
constructor
A new instance of Subscription.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Subscription
Returns a new instance of Subscription.
5468 5469 5470 |
# File 'lib/google/apis/health_v4/classes.rb', line 5468 def initialize(**args) update!(**args) end |
Instance Attribute Details
#data_types ⇒ Array<String>
Optional. Data types subscribed to. A subscriber will only receive
notifications for data types that are declared here. A subscription can only
subscribe to the data types of the subscriber. The values should be in the
format "users/health_user_id/dataTypes/data_type" where data_type is
one of "altitude", "distance", "floors", "sleep", "steps", "weight".
Corresponds to the JSON property dataTypes
5446 5447 5448 |
# File 'lib/google/apis/health_v4/classes.rb', line 5446 def data_types @data_types end |
#name ⇒ String
Identifier. The resource name of the Subscription. Format: projects/project/
subscribers/subscriber/subscriptions/subscription`Example:projects/my-
project/subscribers/my-subscriber-123/subscriptions/my-subscription-456The
projectID is mandatory (6-30 characters, matching /a-z6,30/) The
subscriberID is user-settable (4-36 characters, matching /[a-z]([a-z0-9-]2,
34[a-z0-9])/) if provided during creation, or system-generated otherwise. The
subscriptionID is user-settable (4-36 chars, matching /[a-z]([a-z0-9-]2,34
[a-z0-9])/) or system-generated otherwise.
Corresponds to the JSON propertyname`
5458 5459 5460 |
# File 'lib/google/apis/health_v4/classes.rb', line 5458 def name @name end |
#user ⇒ String
Immutable. The resource name of the user for whom this subscription is active.
Format: users/userwhereuser`is the publichealthUserIdas returned
by theGetIdentityaction in the profile PAPI (seegoogle.
devicesandservices.health.v4main.HealthProfileService.GetIdentity).
Corresponds to the JSON propertyuser`
5466 5467 5468 |
# File 'lib/google/apis/health_v4/classes.rb', line 5466 def user @user end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5473 5474 5475 5476 5477 |
# File 'lib/google/apis/health_v4/classes.rb', line 5473 def update!(**args) @data_types = args[:data_types] if args.key?(:data_types) @name = args[:name] if args.key?(:name) @user = args[:user] if args.key?(:user) end |