Class: Google::Apis::HealthV4::Subscriber

Inherits:
Object
  • Object
show all
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

-- Resource Messages -- A subscriber receives notifications from Google Health API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Subscriber

Returns a new instance of Subscriber.



5476
5477
5478
# File 'lib/google/apis/health_v4/classes.rb', line 5476

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

Instance Attribute Details

#create_timeString

Output only. The time at which the subscriber was created. Corresponds to the JSON property createTime

Returns:

  • (String)


5429
5430
5431
# File 'lib/google/apis/health_v4/classes.rb', line 5429

def create_time
  @create_time
end

#endpoint_authorizationGoogle::Apis::HealthV4::EndpointAuthorization

Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the GOOGLE-HEALTH-API-SIGNATURE HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API. Corresponds to the JSON property endpointAuthorization



5439
5440
5441
# File 'lib/google/apis/health_v4/classes.rb', line 5439

def endpoint_authorization
  @endpoint_authorization
end

#endpoint_uriString

Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during CreateSubscriber and UpdateSubscriber calls. See RPC documentation for verification details. Corresponds to the JSON property endpointUri

Returns:

  • (String)


5447
5448
5449
# File 'lib/google/apis/health_v4/classes.rb', line 5447

def endpoint_uri
  @endpoint_uri
end

#nameString

Identifier. The resource name of the Subscriber. Format: projects/project/ subscribers/subscriber The project ID is a Google Cloud Project ID or Project Number. The subscriber ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234- 567890abcdef Corresponds to the JSON property name

Returns:

  • (String)


5459
5460
5461
# File 'lib/google/apis/health_v4/classes.rb', line 5459

def name
  @name
end

#stateString

Output only. The state of the subscriber. Corresponds to the JSON property state

Returns:

  • (String)


5464
5465
5466
# File 'lib/google/apis/health_v4/classes.rb', line 5464

def state
  @state
end

#subscriber_configsArray<Google::Apis::HealthV4::SubscriberConfig>

Optional. Configuration for the subscriber. Corresponds to the JSON property subscriberConfigs



5469
5470
5471
# File 'lib/google/apis/health_v4/classes.rb', line 5469

def subscriber_configs
  @subscriber_configs
end

#update_timeString

Output only. The time at which the subscriber was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


5474
5475
5476
# File 'lib/google/apis/health_v4/classes.rb', line 5474

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5481
5482
5483
5484
5485
5486
5487
5488
5489
# File 'lib/google/apis/health_v4/classes.rb', line 5481

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @endpoint_authorization = args[:endpoint_authorization] if args.key?(:endpoint_authorization)
  @endpoint_uri = args[:endpoint_uri] if args.key?(:endpoint_uri)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @subscriber_configs = args[:subscriber_configs] if args.key?(:subscriber_configs)
  @update_time = args[:update_time] if args.key?(:update_time)
end