Skip to content

Commit 8d664d9

Browse files
1 parent 1267596 commit 8d664d9

19 files changed

Lines changed: 1435 additions & 1 deletion

src/GoogleHealthAPI.php

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
*/
3636
class GoogleHealthAPI extends \Google\Service
3737
{
38+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39+
const CLOUD_PLATFORM =
40+
"https://www.googleapis.com/auth/cloud-platform";
3841

39-
42+
public $projects_subscribers;
4043
public $users;
4144
public $users_dataTypes_dataPoints;
4245
public $rootUrlTemplate;
@@ -58,6 +61,76 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
5861
$this->version = 'v4';
5962
$this->serviceName = 'health';
6063

64+
$this->projects_subscribers = new GoogleHealthAPI\Resource\ProjectsSubscribers(
65+
$this,
66+
$this->serviceName,
67+
'subscribers',
68+
[
69+
'methods' => [
70+
'create' => [
71+
'path' => 'v4/{+parent}/subscribers',
72+
'httpMethod' => 'POST',
73+
'parameters' => [
74+
'parent' => [
75+
'location' => 'path',
76+
'type' => 'string',
77+
'required' => true,
78+
],
79+
'subscriberId' => [
80+
'location' => 'query',
81+
'type' => 'string',
82+
],
83+
],
84+
],'delete' => [
85+
'path' => 'v4/{+name}',
86+
'httpMethod' => 'DELETE',
87+
'parameters' => [
88+
'name' => [
89+
'location' => 'path',
90+
'type' => 'string',
91+
'required' => true,
92+
],
93+
'force' => [
94+
'location' => 'query',
95+
'type' => 'boolean',
96+
],
97+
],
98+
],'list' => [
99+
'path' => 'v4/{+parent}/subscribers',
100+
'httpMethod' => 'GET',
101+
'parameters' => [
102+
'parent' => [
103+
'location' => 'path',
104+
'type' => 'string',
105+
'required' => true,
106+
],
107+
'pageSize' => [
108+
'location' => 'query',
109+
'type' => 'integer',
110+
],
111+
'pageToken' => [
112+
'location' => 'query',
113+
'type' => 'string',
114+
],
115+
],
116+
],'patch' => [
117+
'path' => 'v4/{+name}',
118+
'httpMethod' => 'PATCH',
119+
'parameters' => [
120+
'name' => [
121+
'location' => 'path',
122+
'type' => 'string',
123+
'required' => true,
124+
],
125+
'updateMask' => [
126+
'location' => 'query',
127+
'type' => 'string',
128+
],
129+
],
130+
],
131+
]
132+
]
133+
);
61134
$this->users = new GoogleHealthAPI\Resource\Users(
62135
$this,
63136
$this->serviceName,
@@ -176,6 +249,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
176249
'type' => 'boolean',
177250
],
178251
],
252+
],'get' => [
253+
'path' => 'v4/{+name}',
254+
'httpMethod' => 'GET',
255+
'parameters' => [
256+
'name' => [
257+
'location' => 'path',
258+
'type' => 'string',
259+
'required' => true,
260+
],
261+
],
179262
],'list' => [
180263
'path' => 'v4/{+parent}/dataPoints',
181264
'httpMethod' => 'GET',
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\GoogleHealthAPI;
19+
20+
class CreateSubscriberPayload extends \Google\Collection
21+
{
22+
protected $collection_key = 'subscriberConfigs';
23+
protected $endpointAuthorizationType = EndpointAuthorization::class;
24+
protected $endpointAuthorizationDataType = '';
25+
/**
26+
* Required. The full HTTPS URI where update notifications will be sent. The
27+
* URI must be a valid URL and use HTTPS as the scheme. This endpoint will be
28+
* verified during the `CreateSubscriber` call. See CreateSubscriber RPC
29+
* documentation for verification details.
30+
*
31+
* @var string
32+
*/
33+
public $endpointUri;
34+
protected $subscriberConfigsType = SubscriberConfig::class;
35+
protected $subscriberConfigsDataType = 'array';
36+
37+
/**
38+
* Required. Authorization mechanism for the subscriber endpoint. The `secret`
39+
* within this message is crucial for endpoint verification and for securing
40+
* webhook notifications.
41+
*
42+
* @param EndpointAuthorization $endpointAuthorization
43+
*/
44+
public function setEndpointAuthorization(EndpointAuthorization $endpointAuthorization)
45+
{
46+
$this->endpointAuthorization = $endpointAuthorization;
47+
}
48+
/**
49+
* @return EndpointAuthorization
50+
*/
51+
public function getEndpointAuthorization()
52+
{
53+
return $this->endpointAuthorization;
54+
}
55+
/**
56+
* Required. The full HTTPS URI where update notifications will be sent. The
57+
* URI must be a valid URL and use HTTPS as the scheme. This endpoint will be
58+
* verified during the `CreateSubscriber` call. See CreateSubscriber RPC
59+
* documentation for verification details.
60+
*
61+
* @param string $endpointUri
62+
*/
63+
public function setEndpointUri($endpointUri)
64+
{
65+
$this->endpointUri = $endpointUri;
66+
}
67+
/**
68+
* @return string
69+
*/
70+
public function getEndpointUri()
71+
{
72+
return $this->endpointUri;
73+
}
74+
/**
75+
* Optional. Configuration for the subscriber.
76+
*
77+
* @param SubscriberConfig[] $subscriberConfigs
78+
*/
79+
public function setSubscriberConfigs($subscriberConfigs)
80+
{
81+
$this->subscriberConfigs = $subscriberConfigs;
82+
}
83+
/**
84+
* @return SubscriberConfig[]
85+
*/
86+
public function getSubscriberConfigs()
87+
{
88+
return $this->subscriberConfigs;
89+
}
90+
}
91+
92+
// Adding a class alias for backwards compatibility with the previous class name.
93+
class_alias(CreateSubscriberPayload::class, 'Google_Service_GoogleHealthAPI_CreateSubscriberPayload');

src/GoogleHealthAPI/DailyRollupDataPoint.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class DailyRollupDataPoint extends \Google\Model
5353
protected $sedentaryPeriodDataType = '';
5454
protected $stepsType = StepsRollupValue::class;
5555
protected $stepsDataType = '';
56+
protected $swimLengthsDataType = SwimLengthsDataRollupValue::class;
57+
protected $swimLengthsDataDataType = '';
5658
protected $timeInHeartRateZoneType = TimeInHeartRateZoneRollupValue::class;
5759
protected $timeInHeartRateZoneDataType = '';
5860
protected $totalCaloriesType = TotalCaloriesRollupValue::class;
@@ -361,6 +363,24 @@ public function getSteps()
361363
{
362364
return $this->steps;
363365
}
366+
/**
367+
* Returned by default when rolling up data points from the `swim-lengths-
368+
* data` data type, or when requested explicitly using the `swim-lengths-data`
369+
* rollup type identifier.
370+
*
371+
* @param SwimLengthsDataRollupValue $swimLengthsData
372+
*/
373+
public function setSwimLengthsData(SwimLengthsDataRollupValue $swimLengthsData)
374+
{
375+
$this->swimLengthsData = $swimLengthsData;
376+
}
377+
/**
378+
* @return SwimLengthsDataRollupValue
379+
*/
380+
public function getSwimLengthsData()
381+
{
382+
return $this->swimLengthsData;
383+
}
364384
/**
365385
* Returned by default when rolling up data points from the `time-in-heart-
366386
* rate-zone` data type, or when requested explicitly using the `time-in-

src/GoogleHealthAPI/DataPoint.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class DataPoint extends \Google\Model
5555
protected $heartRateDataType = '';
5656
protected $heartRateVariabilityType = HeartRateVariability::class;
5757
protected $heartRateVariabilityDataType = '';
58+
protected $heightType = Height::class;
59+
protected $heightDataType = '';
5860
protected $hydrationLogType = HydrationLog::class;
5961
protected $hydrationLogDataType = '';
6062
/**
@@ -86,6 +88,8 @@ class DataPoint extends \Google\Model
8688
protected $sleepDataType = '';
8789
protected $stepsType = Steps::class;
8890
protected $stepsDataType = '';
91+
protected $swimLengthsDataType = SwimLengthsData::class;
92+
protected $swimLengthsDataDataType = '';
8993
protected $timeInHeartRateZoneType = TimeInHeartRateZone::class;
9094
protected $timeInHeartRateZoneDataType = '';
9195
protected $vo2MaxType = VO2Max::class;
@@ -392,6 +396,22 @@ public function getHeartRateVariability()
392396
{
393397
return $this->heartRateVariability;
394398
}
399+
/**
400+
* Optional. Data for points in the `height` sample data type collection.
401+
*
402+
* @param Height $height
403+
*/
404+
public function setHeight(Height $height)
405+
{
406+
$this->height = $height;
407+
}
408+
/**
409+
* @return Height
410+
*/
411+
public function getHeight()
412+
{
413+
return $this->height;
414+
}
395415
/**
396416
* Optional. Data for points in the `hydration-log` session data type
397417
* collection.
@@ -535,6 +555,23 @@ public function getSteps()
535555
{
536556
return $this->steps;
537557
}
558+
/**
559+
* Optional. Data for points in the `swim-lengths-data` interval data type
560+
* collection.
561+
*
562+
* @param SwimLengthsData $swimLengthsData
563+
*/
564+
public function setSwimLengthsData(SwimLengthsData $swimLengthsData)
565+
{
566+
$this->swimLengthsData = $swimLengthsData;
567+
}
568+
/**
569+
* @return SwimLengthsData
570+
*/
571+
public function getSwimLengthsData()
572+
{
573+
return $this->swimLengthsData;
574+
}
538575
/**
539576
* Optional. Data for points in the `time-in-heart-rate-zone` interval data
540577
* type collection.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\GoogleHealthAPI;
19+
20+
class EndpointAuthorization extends \Google\Model
21+
{
22+
/**
23+
* Required. Input only. Provides a client-provided secret that will be sent
24+
* with each notification to the subscriber endpoint using the "Authorization"
25+
* header. The value must include the authorization scheme, e.g., "Bearer " or
26+
* "Basic ", as it will be used as the full Authorization header value. This
27+
* secret is used by the API to test the endpoint during `CreateSubscriber`
28+
* and `UpdateSubscriber` calls, and will be sent in the `Authorization`
29+
* header for all subsequent webhook notifications to this endpoint.
30+
*
31+
* @var string
32+
*/
33+
public $secret;
34+
/**
35+
* Output only. Whether the secret is set.
36+
*
37+
* @var bool
38+
*/
39+
public $secretSet;
40+
41+
/**
42+
* Required. Input only. Provides a client-provided secret that will be sent
43+
* with each notification to the subscriber endpoint using the "Authorization"
44+
* header. The value must include the authorization scheme, e.g., "Bearer " or
45+
* "Basic ", as it will be used as the full Authorization header value. This
46+
* secret is used by the API to test the endpoint during `CreateSubscriber`
47+
* and `UpdateSubscriber` calls, and will be sent in the `Authorization`
48+
* header for all subsequent webhook notifications to this endpoint.
49+
*
50+
* @param string $secret
51+
*/
52+
public function setSecret($secret)
53+
{
54+
$this->secret = $secret;
55+
}
56+
/**
57+
* @return string
58+
*/
59+
public function getSecret()
60+
{
61+
return $this->secret;
62+
}
63+
/**
64+
* Output only. Whether the secret is set.
65+
*
66+
* @param bool $secretSet
67+
*/
68+
public function setSecretSet($secretSet)
69+
{
70+
$this->secretSet = $secretSet;
71+
}
72+
/**
73+
* @return bool
74+
*/
75+
public function getSecretSet()
76+
{
77+
return $this->secretSet;
78+
}
79+
}
80+
81+
// Adding a class alias for backwards compatibility with the previous class name.
82+
class_alias(EndpointAuthorization::class, 'Google_Service_GoogleHealthAPI_EndpointAuthorization');

0 commit comments

Comments
 (0)