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.
5471 5472 5473 |
# File 'lib/google/apis/health_v4/classes.rb', line 5471 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
5449 5450 5451 |
# File 'lib/google/apis/health_v4/classes.rb', line 5449 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`
5461 5462 5463 |
# File 'lib/google/apis/health_v4/classes.rb', line 5461 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`
5469 5470 5471 |
# File 'lib/google/apis/health_v4/classes.rb', line 5469 def user @user end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5476 5477 5478 5479 5480 |
# File 'lib/google/apis/health_v4/classes.rb', line 5476 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 |