|
| 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; |
| 19 | + |
| 20 | +use Google\Client; |
| 21 | + |
| 22 | +/** |
| 23 | + * Service definition for GoogleHealthAPI (v4). |
| 24 | + * |
| 25 | + * <p> |
| 26 | + * The Google Health API lets you view and manage health and fitness metrics and |
| 27 | + * measurement data.</p> |
| 28 | + * |
| 29 | + * <p> |
| 30 | + * For more information about this service, see the API |
| 31 | + * <a href="https://developers.google.com/health" target="_blank">Documentation</a> |
| 32 | + * </p> |
| 33 | + * |
| 34 | + * @author Google, Inc. |
| 35 | + */ |
| 36 | +class GoogleHealthAPI extends \Google\Service |
| 37 | +{ |
| 38 | + |
| 39 | + |
| 40 | + public $users; |
| 41 | + public $users_dataTypes_dataPoints; |
| 42 | + public $rootUrlTemplate; |
| 43 | + |
| 44 | + /** |
| 45 | + * Constructs the internal representation of the GoogleHealthAPI service. |
| 46 | + * |
| 47 | + * @param Client|array $clientOrConfig The client used to deliver requests, or a |
| 48 | + * config array to pass to a new Client instance. |
| 49 | + * @param string $rootUrl The root URL used for requests to the service. |
| 50 | + */ |
| 51 | + public function __construct($clientOrConfig = [], $rootUrl = null) |
| 52 | + { |
| 53 | + parent::__construct($clientOrConfig); |
| 54 | + $this->rootUrl = $rootUrl ?: 'https://health.googleapis.com/'; |
| 55 | + $this->rootUrlTemplate = $rootUrl ?: 'https://health.UNIVERSE_DOMAIN/'; |
| 56 | + $this->servicePath = ''; |
| 57 | + $this->batchPath = 'batch'; |
| 58 | + $this->version = 'v4'; |
| 59 | + $this->serviceName = 'health'; |
| 60 | + |
| 61 | + $this->users = new GoogleHealthAPI\Resource\Users( |
| 62 | + $this, |
| 63 | + $this->serviceName, |
| 64 | + 'users', |
| 65 | + [ |
| 66 | + 'methods' => [ |
| 67 | + 'getIdentity' => [ |
| 68 | + 'path' => 'v4/{+name}', |
| 69 | + 'httpMethod' => 'GET', |
| 70 | + 'parameters' => [ |
| 71 | + 'name' => [ |
| 72 | + 'location' => 'path', |
| 73 | + 'type' => 'string', |
| 74 | + 'required' => true, |
| 75 | + ], |
| 76 | + ], |
| 77 | + ],'getProfile' => [ |
| 78 | + 'path' => 'v4/{+name}', |
| 79 | + 'httpMethod' => 'GET', |
| 80 | + 'parameters' => [ |
| 81 | + 'name' => [ |
| 82 | + 'location' => 'path', |
| 83 | + 'type' => 'string', |
| 84 | + 'required' => true, |
| 85 | + ], |
| 86 | + ], |
| 87 | + ],'getSettings' => [ |
| 88 | + 'path' => 'v4/{+name}', |
| 89 | + 'httpMethod' => 'GET', |
| 90 | + 'parameters' => [ |
| 91 | + 'name' => [ |
| 92 | + 'location' => 'path', |
| 93 | + 'type' => 'string', |
| 94 | + 'required' => true, |
| 95 | + ], |
| 96 | + ], |
| 97 | + ],'updateProfile' => [ |
| 98 | + 'path' => 'v4/{+name}', |
| 99 | + 'httpMethod' => 'PATCH', |
| 100 | + 'parameters' => [ |
| 101 | + 'name' => [ |
| 102 | + 'location' => 'path', |
| 103 | + 'type' => 'string', |
| 104 | + 'required' => true, |
| 105 | + ], |
| 106 | + 'updateMask' => [ |
| 107 | + 'location' => 'query', |
| 108 | + 'type' => 'string', |
| 109 | + ], |
| 110 | + ], |
| 111 | + ],'updateSettings' => [ |
| 112 | + 'path' => 'v4/{+name}', |
| 113 | + 'httpMethod' => 'PATCH', |
| 114 | + 'parameters' => [ |
| 115 | + 'name' => [ |
| 116 | + 'location' => 'path', |
| 117 | + 'type' => 'string', |
| 118 | + 'required' => true, |
| 119 | + ], |
| 120 | + 'updateMask' => [ |
| 121 | + 'location' => 'query', |
| 122 | + 'type' => 'string', |
| 123 | + ], |
| 124 | + ], |
| 125 | + ], |
| 126 | + ] |
| 127 | + ] |
| 128 | + ); |
| 129 | + $this->users_dataTypes_dataPoints = new GoogleHealthAPI\Resource\UsersDataTypesDataPoints( |
| 130 | + $this, |
| 131 | + $this->serviceName, |
| 132 | + 'dataPoints', |
| 133 | + [ |
| 134 | + 'methods' => [ |
| 135 | + 'batchDelete' => [ |
| 136 | + 'path' => 'v4/{+parent}/dataPoints:batchDelete', |
| 137 | + 'httpMethod' => 'POST', |
| 138 | + 'parameters' => [ |
| 139 | + 'parent' => [ |
| 140 | + 'location' => 'path', |
| 141 | + 'type' => 'string', |
| 142 | + 'required' => true, |
| 143 | + ], |
| 144 | + ], |
| 145 | + ],'create' => [ |
| 146 | + 'path' => 'v4/{+parent}/dataPoints', |
| 147 | + 'httpMethod' => 'POST', |
| 148 | + 'parameters' => [ |
| 149 | + 'parent' => [ |
| 150 | + 'location' => 'path', |
| 151 | + 'type' => 'string', |
| 152 | + 'required' => true, |
| 153 | + ], |
| 154 | + ], |
| 155 | + ],'dailyRollUp' => [ |
| 156 | + 'path' => 'v4/{+parent}/dataPoints:dailyRollUp', |
| 157 | + 'httpMethod' => 'POST', |
| 158 | + 'parameters' => [ |
| 159 | + 'parent' => [ |
| 160 | + 'location' => 'path', |
| 161 | + 'type' => 'string', |
| 162 | + 'required' => true, |
| 163 | + ], |
| 164 | + ], |
| 165 | + ],'exportExerciseTcx' => [ |
| 166 | + 'path' => 'v4/{+name}:exportExerciseTcx', |
| 167 | + 'httpMethod' => 'GET', |
| 168 | + 'parameters' => [ |
| 169 | + 'name' => [ |
| 170 | + 'location' => 'path', |
| 171 | + 'type' => 'string', |
| 172 | + 'required' => true, |
| 173 | + ], |
| 174 | + 'partialData' => [ |
| 175 | + 'location' => 'query', |
| 176 | + 'type' => 'boolean', |
| 177 | + ], |
| 178 | + ], |
| 179 | + ],'list' => [ |
| 180 | + 'path' => 'v4/{+parent}/dataPoints', |
| 181 | + 'httpMethod' => 'GET', |
| 182 | + 'parameters' => [ |
| 183 | + 'parent' => [ |
| 184 | + 'location' => 'path', |
| 185 | + 'type' => 'string', |
| 186 | + 'required' => true, |
| 187 | + ], |
| 188 | + 'filter' => [ |
| 189 | + 'location' => 'query', |
| 190 | + 'type' => 'string', |
| 191 | + ], |
| 192 | + 'pageSize' => [ |
| 193 | + 'location' => 'query', |
| 194 | + 'type' => 'integer', |
| 195 | + ], |
| 196 | + 'pageToken' => [ |
| 197 | + 'location' => 'query', |
| 198 | + 'type' => 'string', |
| 199 | + ], |
| 200 | + ], |
| 201 | + ],'patch' => [ |
| 202 | + 'path' => 'v4/{+name}', |
| 203 | + 'httpMethod' => 'PATCH', |
| 204 | + 'parameters' => [ |
| 205 | + 'name' => [ |
| 206 | + 'location' => 'path', |
| 207 | + 'type' => 'string', |
| 208 | + 'required' => true, |
| 209 | + ], |
| 210 | + 'updateMask' => [ |
| 211 | + 'location' => 'query', |
| 212 | + 'type' => 'string', |
| 213 | + ], |
| 214 | + ], |
| 215 | + ],'reconcile' => [ |
| 216 | + 'path' => 'v4/{+parent}/dataPoints:reconcile', |
| 217 | + 'httpMethod' => 'GET', |
| 218 | + 'parameters' => [ |
| 219 | + 'parent' => [ |
| 220 | + 'location' => 'path', |
| 221 | + 'type' => 'string', |
| 222 | + 'required' => true, |
| 223 | + ], |
| 224 | + 'dataSourceFamily' => [ |
| 225 | + 'location' => 'query', |
| 226 | + 'type' => 'string', |
| 227 | + ], |
| 228 | + 'filter' => [ |
| 229 | + 'location' => 'query', |
| 230 | + 'type' => 'string', |
| 231 | + ], |
| 232 | + 'pageSize' => [ |
| 233 | + 'location' => 'query', |
| 234 | + 'type' => 'integer', |
| 235 | + ], |
| 236 | + 'pageToken' => [ |
| 237 | + 'location' => 'query', |
| 238 | + 'type' => 'string', |
| 239 | + ], |
| 240 | + ], |
| 241 | + ],'rollUp' => [ |
| 242 | + 'path' => 'v4/{+parent}/dataPoints:rollUp', |
| 243 | + 'httpMethod' => 'POST', |
| 244 | + 'parameters' => [ |
| 245 | + 'parent' => [ |
| 246 | + 'location' => 'path', |
| 247 | + 'type' => 'string', |
| 248 | + 'required' => true, |
| 249 | + ], |
| 250 | + ], |
| 251 | + ], |
| 252 | + ] |
| 253 | + ] |
| 254 | + ); |
| 255 | + } |
| 256 | +} |
| 257 | + |
| 258 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 259 | +class_alias(GoogleHealthAPI::class, 'Google_Service_GoogleHealthAPI'); |
0 commit comments