google-api-client 0.30.9 → 0.30.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +89 -0
  3. data/api_names.yaml +1 -0
  4. data/generated/google/apis/abusiveexperiencereport_v1.rb +1 -1
  5. data/generated/google/apis/abusiveexperiencereport_v1/classes.rb +18 -7
  6. data/generated/google/apis/abusiveexperiencereport_v1/service.rb +5 -10
  7. data/generated/google/apis/adexperiencereport_v1.rb +1 -1
  8. data/generated/google/apis/adexperiencereport_v1/classes.rb +24 -12
  9. data/generated/google/apis/adexperiencereport_v1/service.rb +6 -9
  10. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  11. data/generated/google/apis/analyticsreporting_v4/classes.rb +3 -0
  12. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  13. data/generated/google/apis/androidmanagement_v1/classes.rb +62 -9
  14. data/generated/google/apis/androidmanagement_v1/representations.rb +19 -0
  15. data/generated/google/apis/bigquery_v2.rb +1 -1
  16. data/generated/google/apis/bigquery_v2/classes.rb +32 -9
  17. data/generated/google/apis/bigquery_v2/representations.rb +5 -0
  18. data/generated/google/apis/bigquery_v2/service.rb +1 -1
  19. data/generated/google/apis/bigqueryconnection_v1beta1.rb +37 -0
  20. data/generated/google/apis/bigqueryconnection_v1beta1/classes.rb +645 -0
  21. data/generated/google/apis/bigqueryconnection_v1beta1/representations.rb +263 -0
  22. data/generated/google/apis/bigqueryconnection_v1beta1/service.rb +378 -0
  23. data/generated/google/apis/bigtableadmin_v2.rb +1 -1
  24. data/generated/google/apis/bigtableadmin_v2/classes.rb +41 -16
  25. data/generated/google/apis/bigtableadmin_v2/representations.rb +15 -0
  26. data/generated/google/apis/binaryauthorization_v1.rb +35 -0
  27. data/generated/google/apis/binaryauthorization_v1/classes.rb +388 -0
  28. data/generated/google/apis/binaryauthorization_v1/representations.rb +167 -0
  29. data/generated/google/apis/binaryauthorization_v1/service.rb +313 -0
  30. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  31. data/generated/google/apis/binaryauthorization_v1beta1/classes.rb +6 -1
  32. data/generated/google/apis/binaryauthorization_v1beta1/service.rb +10 -6
  33. data/generated/google/apis/calendar_v3.rb +1 -1
  34. data/generated/google/apis/calendar_v3/classes.rb +1 -1
  35. data/generated/google/apis/cloudasset_v1.rb +1 -1
  36. data/generated/google/apis/cloudasset_v1/classes.rb +52 -1
  37. data/generated/google/apis/cloudasset_v1/representations.rb +17 -0
  38. data/generated/google/apis/cloudasset_v1beta1.rb +1 -1
  39. data/generated/google/apis/cloudasset_v1beta1/classes.rb +6 -1
  40. data/generated/google/apis/cloudiot_v1.rb +1 -1
  41. data/generated/google/apis/cloudiot_v1/classes.rb +11 -4
  42. data/generated/google/apis/cloudkms_v1.rb +1 -1
  43. data/generated/google/apis/cloudkms_v1/classes.rb +0 -14
  44. data/generated/google/apis/cloudkms_v1/representations.rb +0 -2
  45. data/generated/google/apis/cloudkms_v1/service.rb +3 -3
  46. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1.rb +1 -1
  47. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/classes.rb +6 -1
  48. data/generated/google/apis/cloudprivatecatalogproducer_v1beta1/service.rb +5 -3
  49. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  50. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +12 -8
  51. data/generated/google/apis/cloudresourcemanager_v1/service.rb +5 -1
  52. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  53. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +12 -8
  54. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +6 -2
  55. data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +11 -4
  57. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  58. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +11 -4
  59. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  60. data/generated/google/apis/cloudsearch_v1/classes.rb +14 -3
  61. data/generated/google/apis/cloudsearch_v1/representations.rb +1 -0
  62. data/generated/google/apis/cloudsearch_v1/service.rb +3 -1
  63. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  64. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +2 -2
  65. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  66. data/generated/google/apis/cloudtrace_v2/classes.rb +8 -0
  67. data/generated/google/apis/cloudtrace_v2/representations.rb +1 -0
  68. data/generated/google/apis/commentanalyzer_v1alpha1.rb +1 -1
  69. data/generated/google/apis/commentanalyzer_v1alpha1/classes.rb +1 -0
  70. data/generated/google/apis/composer_v1.rb +1 -1
  71. data/generated/google/apis/composer_v1/classes.rb +17 -24
  72. data/generated/google/apis/composer_v1beta1.rb +1 -1
  73. data/generated/google/apis/composer_v1beta1/classes.rb +17 -24
  74. data/generated/google/apis/compute_alpha.rb +1 -1
  75. data/generated/google/apis/compute_alpha/classes.rb +1139 -284
  76. data/generated/google/apis/compute_alpha/representations.rb +304 -1
  77. data/generated/google/apis/compute_alpha/service.rb +935 -23
  78. data/generated/google/apis/compute_beta.rb +1 -1
  79. data/generated/google/apis/compute_beta/classes.rb +554 -98
  80. data/generated/google/apis/compute_beta/representations.rb +117 -0
  81. data/generated/google/apis/compute_beta/service.rb +63 -19
  82. data/generated/google/apis/compute_v1.rb +1 -1
  83. data/generated/google/apis/compute_v1/classes.rb +1187 -165
  84. data/generated/google/apis/compute_v1/representations.rb +402 -0
  85. data/generated/google/apis/compute_v1/service.rb +832 -12
  86. data/generated/google/apis/container_v1.rb +1 -1
  87. data/generated/google/apis/container_v1/classes.rb +36 -0
  88. data/generated/google/apis/container_v1/representations.rb +16 -0
  89. data/generated/google/apis/container_v1beta1.rb +1 -1
  90. data/generated/google/apis/container_v1beta1/classes.rb +153 -0
  91. data/generated/google/apis/container_v1beta1/representations.rb +77 -0
  92. data/generated/google/apis/content_v2.rb +1 -1
  93. data/generated/google/apis/content_v2/classes.rb +93 -2
  94. data/generated/google/apis/content_v2/representations.rb +37 -0
  95. data/generated/google/apis/content_v2_1.rb +1 -1
  96. data/generated/google/apis/content_v2_1/classes.rb +86 -2
  97. data/generated/google/apis/content_v2_1/representations.rb +36 -0
  98. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  99. data/generated/google/apis/dataflow_v1b3/classes.rb +21 -106
  100. data/generated/google/apis/dataflow_v1b3/representations.rb +3 -58
  101. data/generated/google/apis/dataflow_v1b3/service.rb +0 -327
  102. data/generated/google/apis/dataproc_v1.rb +1 -1
  103. data/generated/google/apis/dataproc_v1/classes.rb +7 -0
  104. data/generated/google/apis/dataproc_v1/representations.rb +1 -0
  105. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  106. data/generated/google/apis/dataproc_v1beta2/classes.rb +7 -0
  107. data/generated/google/apis/dataproc_v1beta2/representations.rb +1 -0
  108. data/generated/google/apis/datastore_v1.rb +1 -1
  109. data/generated/google/apis/datastore_v1/classes.rb +9 -75
  110. data/generated/google/apis/datastore_v1beta1.rb +1 -1
  111. data/generated/google/apis/datastore_v1beta1/classes.rb +9 -75
  112. data/generated/google/apis/dfareporting_v3_1.rb +1 -1
  113. data/generated/google/apis/dfareporting_v3_1/classes.rb +42 -302
  114. data/generated/google/apis/dfareporting_v3_1/representations.rb +8 -84
  115. data/generated/google/apis/dfareporting_v3_1/service.rb +5 -107
  116. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  117. data/generated/google/apis/dialogflow_v2beta1/classes.rb +118 -0
  118. data/generated/google/apis/dialogflow_v2beta1/representations.rb +70 -0
  119. data/generated/google/apis/dialogflow_v2beta1/service.rb +75 -0
  120. data/generated/google/apis/dlp_v2.rb +1 -1
  121. data/generated/google/apis/dlp_v2/classes.rb +42 -0
  122. data/generated/google/apis/dlp_v2/representations.rb +16 -0
  123. data/generated/google/apis/dlp_v2/service.rb +125 -1
  124. data/generated/google/apis/docs_v1.rb +1 -1
  125. data/generated/google/apis/docs_v1/classes.rb +128 -0
  126. data/generated/google/apis/docs_v1/representations.rb +49 -0
  127. data/generated/google/apis/{appstate_v1.rb → domainsrdap_v1.rb} +8 -11
  128. data/generated/google/apis/domainsrdap_v1/classes.rb +269 -0
  129. data/generated/google/apis/{appstate_v1 → domainsrdap_v1}/representations.rb +33 -22
  130. data/generated/google/apis/domainsrdap_v1/service.rb +350 -0
  131. data/generated/google/apis/drive_v2.rb +1 -1
  132. data/generated/google/apis/drive_v2/classes.rb +10 -1
  133. data/generated/google/apis/drive_v2/representations.rb +1 -0
  134. data/generated/google/apis/drive_v3.rb +1 -1
  135. data/generated/google/apis/drive_v3/classes.rb +10 -1
  136. data/generated/google/apis/drive_v3/representations.rb +1 -0
  137. data/generated/google/apis/driveactivity_v2.rb +1 -1
  138. data/generated/google/apis/firestore_v1.rb +1 -1
  139. data/generated/google/apis/firestore_v1/classes.rb +21 -130
  140. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  141. data/generated/google/apis/firestore_v1beta1/classes.rb +16 -122
  142. data/generated/google/apis/firestore_v1beta2.rb +1 -1
  143. data/generated/google/apis/firestore_v1beta2/classes.rb +14 -83
  144. data/generated/google/apis/healthcare_v1alpha2.rb +1 -1
  145. data/generated/google/apis/healthcare_v1alpha2/classes.rb +94 -48
  146. data/generated/google/apis/healthcare_v1alpha2/representations.rb +16 -0
  147. data/generated/google/apis/healthcare_v1alpha2/service.rb +117 -75
  148. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  149. data/generated/google/apis/healthcare_v1beta1/classes.rb +56 -2
  150. data/generated/google/apis/healthcare_v1beta1/representations.rb +17 -0
  151. data/generated/google/apis/healthcare_v1beta1/service.rb +10 -5
  152. data/generated/google/apis/homegraph_v1.rb +31 -0
  153. data/generated/google/apis/homegraph_v1/classes.rb +692 -0
  154. data/generated/google/apis/homegraph_v1/representations.rb +323 -0
  155. data/generated/google/apis/homegraph_v1/service.rb +255 -0
  156. data/generated/google/apis/logging_v2.rb +1 -1
  157. data/generated/google/apis/logging_v2/classes.rb +8 -7
  158. data/generated/google/apis/logging_v2/service.rb +40 -35
  159. data/generated/google/apis/ml_v1.rb +1 -1
  160. data/generated/google/apis/monitoring_v3.rb +1 -1
  161. data/generated/google/apis/pagespeedonline_v5.rb +1 -1
  162. data/generated/google/apis/pubsub_v1.rb +1 -1
  163. data/generated/google/apis/pubsub_v1/classes.rb +6 -1
  164. data/generated/google/apis/pubsub_v1/service.rb +15 -9
  165. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  166. data/generated/google/apis/pubsub_v1beta2/classes.rb +6 -1
  167. data/generated/google/apis/pubsub_v1beta2/service.rb +10 -6
  168. data/generated/google/apis/run_v1alpha1.rb +1 -1
  169. data/generated/google/apis/run_v1alpha1/classes.rb +26 -6
  170. data/generated/google/apis/run_v1alpha1/representations.rb +1 -0
  171. data/generated/google/apis/run_v1alpha1/service.rb +5 -3
  172. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  173. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +6 -1
  174. data/generated/google/apis/runtimeconfig_v1beta1/service.rb +5 -3
  175. data/generated/google/apis/script_v1.rb +1 -1
  176. data/generated/google/apis/script_v1/service.rb +6 -5
  177. data/generated/google/apis/securitycenter_v1.rb +1 -1
  178. data/generated/google/apis/securitycenter_v1/classes.rb +11 -4
  179. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  180. data/generated/google/apis/securitycenter_v1beta1/classes.rb +11 -4
  181. data/generated/google/apis/servicebroker_v1.rb +1 -1
  182. data/generated/google/apis/servicebroker_v1/classes.rb +6 -1
  183. data/generated/google/apis/servicebroker_v1/service.rb +5 -3
  184. data/generated/google/apis/servicebroker_v1alpha1.rb +1 -1
  185. data/generated/google/apis/servicebroker_v1alpha1/classes.rb +6 -1
  186. data/generated/google/apis/servicebroker_v1alpha1/service.rb +5 -3
  187. data/generated/google/apis/servicebroker_v1beta1.rb +1 -1
  188. data/generated/google/apis/servicebroker_v1beta1/classes.rb +6 -1
  189. data/generated/google/apis/servicebroker_v1beta1/service.rb +5 -3
  190. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  191. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +1 -4
  192. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  193. data/generated/google/apis/servicemanagement_v1/classes.rb +11 -4
  194. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  195. data/generated/google/apis/servicenetworking_v1/classes.rb +1 -4
  196. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  197. data/generated/google/apis/servicenetworking_v1beta/classes.rb +1 -4
  198. data/generated/google/apis/serviceusage_v1.rb +1 -1
  199. data/generated/google/apis/serviceusage_v1/classes.rb +30 -4
  200. data/generated/google/apis/serviceusage_v1/representations.rb +14 -0
  201. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  202. data/generated/google/apis/serviceusage_v1beta1/classes.rb +30 -4
  203. data/generated/google/apis/serviceusage_v1beta1/representations.rb +14 -0
  204. data/generated/google/apis/slides_v1.rb +1 -1
  205. data/generated/google/apis/slides_v1/classes.rb +1 -1
  206. data/generated/google/apis/speech_v1.rb +1 -1
  207. data/generated/google/apis/speech_v1/classes.rb +9 -7
  208. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  209. data/generated/google/apis/speech_v1p1beta1/classes.rb +17 -15
  210. data/generated/google/apis/speech_v2beta.rb +1 -1
  211. data/generated/google/apis/speech_v2beta/classes.rb +3 -3
  212. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  213. data/generated/google/apis/sqladmin_v1beta4/classes.rb +72 -0
  214. data/generated/google/apis/sqladmin_v1beta4/representations.rb +35 -0
  215. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  216. data/generated/google/apis/storage_v1.rb +1 -1
  217. data/generated/google/apis/storage_v1/classes.rb +7 -1
  218. data/generated/google/apis/storage_v1/representations.rb +2 -2
  219. data/generated/google/apis/storage_v1/service.rb +6 -1
  220. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  221. data/generated/google/apis/storagetransfer_v1/service.rb +1 -9
  222. data/generated/google/apis/testing_v1.rb +1 -1
  223. data/generated/google/apis/testing_v1/classes.rb +19 -0
  224. data/generated/google/apis/testing_v1/representations.rb +3 -0
  225. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  226. data/generated/google/apis/toolresults_v1beta3/classes.rb +1 -0
  227. data/generated/google/apis/translate_v3beta1.rb +1 -1
  228. data/generated/google/apis/translate_v3beta1/classes.rb +33 -0
  229. data/generated/google/apis/translate_v3beta1/representations.rb +3 -0
  230. data/generated/google/apis/verifiedaccess_v1.rb +35 -0
  231. data/generated/google/apis/verifiedaccess_v1/classes.rb +174 -0
  232. data/generated/google/apis/verifiedaccess_v1/representations.rb +99 -0
  233. data/generated/google/apis/verifiedaccess_v1/service.rb +120 -0
  234. data/generated/google/apis/vision_v1.rb +1 -1
  235. data/generated/google/apis/vision_v1/classes.rb +204 -2375
  236. data/generated/google/apis/vision_v1/representations.rb +701 -1634
  237. data/generated/google/apis/vision_v1/service.rb +17 -17
  238. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  239. data/generated/google/apis/vision_v1p1beta1/classes.rb +135 -2306
  240. data/generated/google/apis/vision_v1p1beta1/representations.rb +768 -1701
  241. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  242. data/generated/google/apis/vision_v1p2beta1/classes.rb +326 -2161
  243. data/generated/google/apis/vision_v1p2beta1/representations.rb +897 -1710
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_v3.rb +1 -1
  246. data/generated/google/apis/youtube_v3/classes.rb +8 -2
  247. data/generated/google/apis/youtube_v3/representations.rb +1 -0
  248. data/lib/google/apis/version.rb +1 -1
  249. metadata +22 -6
  250. data/generated/google/apis/appstate_v1/classes.rb +0 -154
  251. data/generated/google/apis/appstate_v1/service.rb +0 -249
@@ -0,0 +1,323 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module HomegraphV1
24
+
25
+ class AgentDeviceId
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AgentOtherDeviceId
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class Device
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class DeviceInfo
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class DeviceNames
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Empty
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class QueryRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class QueryRequestInput
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class QueryRequestPayload
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class QueryResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class QueryResponsePayload
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ReportStateAndNotificationDevice
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class ReportStateAndNotificationRequest
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class ReportStateAndNotificationResponse
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class RequestSyncDevicesRequest
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class RequestSyncDevicesResponse
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class StateAndNotificationPayload
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class SyncRequest
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class SyncResponse
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class SyncResponsePayload
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class AgentDeviceId
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ property :id, as: 'id'
149
+ end
150
+ end
151
+
152
+ class AgentOtherDeviceId
153
+ # @private
154
+ class Representation < Google::Apis::Core::JsonRepresentation
155
+ property :agent_id, as: 'agentId'
156
+ property :device_id, as: 'deviceId'
157
+ end
158
+ end
159
+
160
+ class Device
161
+ # @private
162
+ class Representation < Google::Apis::Core::JsonRepresentation
163
+ hash :attributes, as: 'attributes'
164
+ property :custom_data, as: 'customData'
165
+ property :device_info, as: 'deviceInfo', class: Google::Apis::HomegraphV1::DeviceInfo, decorator: Google::Apis::HomegraphV1::DeviceInfo::Representation
166
+
167
+ property :id, as: 'id'
168
+ property :name, as: 'name', class: Google::Apis::HomegraphV1::DeviceNames, decorator: Google::Apis::HomegraphV1::DeviceNames::Representation
169
+
170
+ collection :other_device_ids, as: 'otherDeviceIds', class: Google::Apis::HomegraphV1::AgentOtherDeviceId, decorator: Google::Apis::HomegraphV1::AgentOtherDeviceId::Representation
171
+
172
+ property :room_hint, as: 'roomHint'
173
+ property :structure_hint, as: 'structureHint'
174
+ collection :traits, as: 'traits'
175
+ property :type, as: 'type'
176
+ property :will_report_state, as: 'willReportState'
177
+ end
178
+ end
179
+
180
+ class DeviceInfo
181
+ # @private
182
+ class Representation < Google::Apis::Core::JsonRepresentation
183
+ property :hw_version, as: 'hwVersion'
184
+ property :manufacturer, as: 'manufacturer'
185
+ property :model, as: 'model'
186
+ property :sw_version, as: 'swVersion'
187
+ end
188
+ end
189
+
190
+ class DeviceNames
191
+ # @private
192
+ class Representation < Google::Apis::Core::JsonRepresentation
193
+ collection :default_names, as: 'defaultNames'
194
+ property :name, as: 'name'
195
+ collection :nicknames, as: 'nicknames'
196
+ end
197
+ end
198
+
199
+ class Empty
200
+ # @private
201
+ class Representation < Google::Apis::Core::JsonRepresentation
202
+ end
203
+ end
204
+
205
+ class QueryRequest
206
+ # @private
207
+ class Representation < Google::Apis::Core::JsonRepresentation
208
+ property :agent_user_id, as: 'agentUserId'
209
+ collection :inputs, as: 'inputs', class: Google::Apis::HomegraphV1::QueryRequestInput, decorator: Google::Apis::HomegraphV1::QueryRequestInput::Representation
210
+
211
+ property :request_id, as: 'requestId'
212
+ end
213
+ end
214
+
215
+ class QueryRequestInput
216
+ # @private
217
+ class Representation < Google::Apis::Core::JsonRepresentation
218
+ property :payload, as: 'payload', class: Google::Apis::HomegraphV1::QueryRequestPayload, decorator: Google::Apis::HomegraphV1::QueryRequestPayload::Representation
219
+
220
+ end
221
+ end
222
+
223
+ class QueryRequestPayload
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ collection :devices, as: 'devices', class: Google::Apis::HomegraphV1::AgentDeviceId, decorator: Google::Apis::HomegraphV1::AgentDeviceId::Representation
227
+
228
+ end
229
+ end
230
+
231
+ class QueryResponse
232
+ # @private
233
+ class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :payload, as: 'payload', class: Google::Apis::HomegraphV1::QueryResponsePayload, decorator: Google::Apis::HomegraphV1::QueryResponsePayload::Representation
235
+
236
+ property :request_id, as: 'requestId'
237
+ end
238
+ end
239
+
240
+ class QueryResponsePayload
241
+ # @private
242
+ class Representation < Google::Apis::Core::JsonRepresentation
243
+ hash :devices, as: 'devices'
244
+ end
245
+ end
246
+
247
+ class ReportStateAndNotificationDevice
248
+ # @private
249
+ class Representation < Google::Apis::Core::JsonRepresentation
250
+ hash :notifications, as: 'notifications'
251
+ hash :states, as: 'states'
252
+ end
253
+ end
254
+
255
+ class ReportStateAndNotificationRequest
256
+ # @private
257
+ class Representation < Google::Apis::Core::JsonRepresentation
258
+ property :agent_user_id, as: 'agentUserId'
259
+ property :event_id, as: 'eventId'
260
+ property :follow_up_token, as: 'followUpToken'
261
+ property :payload, as: 'payload', class: Google::Apis::HomegraphV1::StateAndNotificationPayload, decorator: Google::Apis::HomegraphV1::StateAndNotificationPayload::Representation
262
+
263
+ property :request_id, as: 'requestId'
264
+ end
265
+ end
266
+
267
+ class ReportStateAndNotificationResponse
268
+ # @private
269
+ class Representation < Google::Apis::Core::JsonRepresentation
270
+ property :request_id, as: 'requestId'
271
+ end
272
+ end
273
+
274
+ class RequestSyncDevicesRequest
275
+ # @private
276
+ class Representation < Google::Apis::Core::JsonRepresentation
277
+ property :agent_user_id, as: 'agentUserId'
278
+ property :async, as: 'async'
279
+ end
280
+ end
281
+
282
+ class RequestSyncDevicesResponse
283
+ # @private
284
+ class Representation < Google::Apis::Core::JsonRepresentation
285
+ end
286
+ end
287
+
288
+ class StateAndNotificationPayload
289
+ # @private
290
+ class Representation < Google::Apis::Core::JsonRepresentation
291
+ property :devices, as: 'devices', class: Google::Apis::HomegraphV1::ReportStateAndNotificationDevice, decorator: Google::Apis::HomegraphV1::ReportStateAndNotificationDevice::Representation
292
+
293
+ end
294
+ end
295
+
296
+ class SyncRequest
297
+ # @private
298
+ class Representation < Google::Apis::Core::JsonRepresentation
299
+ property :agent_user_id, as: 'agentUserId'
300
+ property :request_id, as: 'requestId'
301
+ end
302
+ end
303
+
304
+ class SyncResponse
305
+ # @private
306
+ class Representation < Google::Apis::Core::JsonRepresentation
307
+ property :payload, as: 'payload', class: Google::Apis::HomegraphV1::SyncResponsePayload, decorator: Google::Apis::HomegraphV1::SyncResponsePayload::Representation
308
+
309
+ property :request_id, as: 'requestId'
310
+ end
311
+ end
312
+
313
+ class SyncResponsePayload
314
+ # @private
315
+ class Representation < Google::Apis::Core::JsonRepresentation
316
+ property :agent_user_id, as: 'agentUserId'
317
+ collection :devices, as: 'devices', class: Google::Apis::HomegraphV1::Device, decorator: Google::Apis::HomegraphV1::Device::Representation
318
+
319
+ end
320
+ end
321
+ end
322
+ end
323
+ end
@@ -0,0 +1,255 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module HomegraphV1
23
+ # HomeGraph API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/homegraph_v1'
29
+ #
30
+ # Homegraph = Google::Apis::HomegraphV1 # Alias the module
31
+ # service = Homegraph::HomeGraphServiceService.new
32
+ #
33
+ # @see https://developers.google.com/actions/smarthome/create-app#request-sync
34
+ class HomeGraphServiceService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://homegraph.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Unlinks an agent user from Google. As a result, all data related to this
51
+ # user will be deleted.
52
+ # Here is how the agent user is created in Google:
53
+ # 1. When a user opens their Google Home App, they can begin linking a 3p
54
+ # partner.
55
+ # 2. User is guided through the OAuth process.
56
+ # 3. After entering the 3p credentials, Google gets the 3p OAuth token and
57
+ # uses it to make a Sync call to the 3p partner and gets back all of the
58
+ # user's data, including `agent_user_id` and devices.
59
+ # 4. Google creates the agent user and stores a mapping from the
60
+ # `agent_user_id` -> Google ID mapping. Google also
61
+ # stores all of the user's devices under that Google ID.
62
+ # The mapping from `agent_user_id` to Google ID is many to many, since one
63
+ # Google user can have multiple 3p accounts, and multiple Google users can
64
+ # map to one `agent_user_id` (e.g., a husband and wife share one Nest account
65
+ # username/password).
66
+ # The third-party user's identity is passed in as `agent_user_id`.
67
+ # The agent is identified by the JWT signed by the partner's service account.
68
+ # Note: Special characters (except "/") in `agent_user_id` must be
69
+ # URL-encoded.
70
+ # @param [String] agent_user_id
71
+ # Required. Third-party user ID.
72
+ # @param [String] request_id
73
+ # Request ID used for debugging.
74
+ # @param [String] fields
75
+ # Selector specifying which fields to include in a partial response.
76
+ # @param [String] quota_user
77
+ # Available to use for quota purposes for server-side applications. Can be any
78
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
79
+ # @param [Google::Apis::RequestOptions] options
80
+ # Request-specific options
81
+ #
82
+ # @yield [result, err] Result & error if block supplied
83
+ # @yieldparam result [Google::Apis::HomegraphV1::Empty] parsed result object
84
+ # @yieldparam err [StandardError] error object if request failed
85
+ #
86
+ # @return [Google::Apis::HomegraphV1::Empty]
87
+ #
88
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
89
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
90
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
91
+ def delete_agent_user(agent_user_id, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
92
+ command = make_simple_command(:delete, 'v1/{+agentUserId}', options)
93
+ command.response_representation = Google::Apis::HomegraphV1::Empty::Representation
94
+ command.response_class = Google::Apis::HomegraphV1::Empty
95
+ command.params['agentUserId'] = agent_user_id unless agent_user_id.nil?
96
+ command.query['requestId'] = request_id unless request_id.nil?
97
+ command.query['fields'] = fields unless fields.nil?
98
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
99
+ execute_or_queue_command(command, &block)
100
+ end
101
+
102
+ # Gets the device states for the devices in QueryRequest.
103
+ # The third-party user's identity is passed in as `agent_user_id`. The agent
104
+ # is identified by the JWT signed by the third-party partner's service
105
+ # account.
106
+ # @param [Google::Apis::HomegraphV1::QueryRequest] query_request_object
107
+ # @param [String] fields
108
+ # Selector specifying which fields to include in a partial response.
109
+ # @param [String] quota_user
110
+ # Available to use for quota purposes for server-side applications. Can be any
111
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
112
+ # @param [Google::Apis::RequestOptions] options
113
+ # Request-specific options
114
+ #
115
+ # @yield [result, err] Result & error if block supplied
116
+ # @yieldparam result [Google::Apis::HomegraphV1::QueryResponse] parsed result object
117
+ # @yieldparam err [StandardError] error object if request failed
118
+ #
119
+ # @return [Google::Apis::HomegraphV1::QueryResponse]
120
+ #
121
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
122
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
123
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
124
+ def query_device(query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
125
+ command = make_simple_command(:post, 'v1/devices:query', options)
126
+ command.request_representation = Google::Apis::HomegraphV1::QueryRequest::Representation
127
+ command.request_object = query_request_object
128
+ command.response_representation = Google::Apis::HomegraphV1::QueryResponse::Representation
129
+ command.response_class = Google::Apis::HomegraphV1::QueryResponse
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ execute_or_queue_command(command, &block)
133
+ end
134
+
135
+ # Reports device state and optionally sends device notifications. Called by
136
+ # an agent when the device state of a third-party changes or the agent wants
137
+ # to send a notification about the device. See
138
+ # [Implement Report State](/actions/smarthome/report-state) for more
139
+ # information.
140
+ # This method updates a predefined set of states for a device, which all
141
+ # devices have according to their prescribed traits (for example, a light
142
+ # will have the [OnOff](/actions/smarthome/traits/onoff) trait that reports
143
+ # the state `on` as a boolean value).
144
+ # A new state may not be created and an INVALID_ARGUMENT code will be thrown
145
+ # if so. It also optionally takes in a list of Notifications that may be
146
+ # created, which are associated to this state change.
147
+ # The third-party user's identity is passed in as `agent_user_id`.
148
+ # The agent is identified by the JWT signed by the partner's service account.
149
+ # @param [Google::Apis::HomegraphV1::ReportStateAndNotificationRequest] report_state_and_notification_request_object
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
152
+ # @param [String] quota_user
153
+ # Available to use for quota purposes for server-side applications. Can be any
154
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
155
+ # @param [Google::Apis::RequestOptions] options
156
+ # Request-specific options
157
+ #
158
+ # @yield [result, err] Result & error if block supplied
159
+ # @yieldparam result [Google::Apis::HomegraphV1::ReportStateAndNotificationResponse] parsed result object
160
+ # @yieldparam err [StandardError] error object if request failed
161
+ #
162
+ # @return [Google::Apis::HomegraphV1::ReportStateAndNotificationResponse]
163
+ #
164
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
167
+ def report_device_state_and_notification(report_state_and_notification_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:post, 'v1/devices:reportStateAndNotification', options)
169
+ command.request_representation = Google::Apis::HomegraphV1::ReportStateAndNotificationRequest::Representation
170
+ command.request_object = report_state_and_notification_request_object
171
+ command.response_representation = Google::Apis::HomegraphV1::ReportStateAndNotificationResponse::Representation
172
+ command.response_class = Google::Apis::HomegraphV1::ReportStateAndNotificationResponse
173
+ command.query['fields'] = fields unless fields.nil?
174
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
175
+ execute_or_queue_command(command, &block)
176
+ end
177
+
178
+ # Requests a `SYNC` call from Google to a 3p partner's home control agent for
179
+ # a user.
180
+ # The third-party user's identity is passed in as `agent_user_id`
181
+ # (see RequestSyncDevicesRequest) and forwarded back to the agent.
182
+ # The agent is identified by the API key or JWT signed by the partner's
183
+ # service account.
184
+ # @param [Google::Apis::HomegraphV1::RequestSyncDevicesRequest] request_sync_devices_request_object
185
+ # @param [String] fields
186
+ # Selector specifying which fields to include in a partial response.
187
+ # @param [String] quota_user
188
+ # Available to use for quota purposes for server-side applications. Can be any
189
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
190
+ # @param [Google::Apis::RequestOptions] options
191
+ # Request-specific options
192
+ #
193
+ # @yield [result, err] Result & error if block supplied
194
+ # @yieldparam result [Google::Apis::HomegraphV1::RequestSyncDevicesResponse] parsed result object
195
+ # @yieldparam err [StandardError] error object if request failed
196
+ #
197
+ # @return [Google::Apis::HomegraphV1::RequestSyncDevicesResponse]
198
+ #
199
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
200
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
201
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
202
+ def request_sync_devices(request_sync_devices_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
203
+ command = make_simple_command(:post, 'v1/devices:requestSync', options)
204
+ command.request_representation = Google::Apis::HomegraphV1::RequestSyncDevicesRequest::Representation
205
+ command.request_object = request_sync_devices_request_object
206
+ command.response_representation = Google::Apis::HomegraphV1::RequestSyncDevicesResponse::Representation
207
+ command.response_class = Google::Apis::HomegraphV1::RequestSyncDevicesResponse
208
+ command.query['fields'] = fields unless fields.nil?
209
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
210
+ execute_or_queue_command(command, &block)
211
+ end
212
+
213
+ # Gets all the devices associated with the given third-party user.
214
+ # The third-party user's identity is passed in as `agent_user_id`. The agent
215
+ # is identified by the JWT signed by the third-party partner's service
216
+ # account.
217
+ # @param [Google::Apis::HomegraphV1::SyncRequest] sync_request_object
218
+ # @param [String] fields
219
+ # Selector specifying which fields to include in a partial response.
220
+ # @param [String] quota_user
221
+ # Available to use for quota purposes for server-side applications. Can be any
222
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
223
+ # @param [Google::Apis::RequestOptions] options
224
+ # Request-specific options
225
+ #
226
+ # @yield [result, err] Result & error if block supplied
227
+ # @yieldparam result [Google::Apis::HomegraphV1::SyncResponse] parsed result object
228
+ # @yieldparam err [StandardError] error object if request failed
229
+ #
230
+ # @return [Google::Apis::HomegraphV1::SyncResponse]
231
+ #
232
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
233
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
234
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
235
+ def sync_device(sync_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
236
+ command = make_simple_command(:post, 'v1/devices:sync', options)
237
+ command.request_representation = Google::Apis::HomegraphV1::SyncRequest::Representation
238
+ command.request_object = sync_request_object
239
+ command.response_representation = Google::Apis::HomegraphV1::SyncResponse::Representation
240
+ command.response_class = Google::Apis::HomegraphV1::SyncResponse
241
+ command.query['fields'] = fields unless fields.nil?
242
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
243
+ execute_or_queue_command(command, &block)
244
+ end
245
+
246
+ protected
247
+
248
+ def apply_command_defaults(command)
249
+ command.query['key'] = key unless key.nil?
250
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
251
+ end
252
+ end
253
+ end
254
+ end
255
+ end