google-api-client 0.9.8 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -376,6 +376,18 @@ module Google
376
376
  include Google::Apis::Core::JsonObjectSupport
377
377
  end
378
378
 
379
+ class IncludeConditions
380
+ class Representation < Google::Apis::Core::JsonRepresentation; end
381
+
382
+ include Google::Apis::Core::JsonObjectSupport
383
+ end
384
+
385
+ class LinkedForeignAccount
386
+ class Representation < Google::Apis::Core::JsonRepresentation; end
387
+
388
+ include Google::Apis::Core::JsonObjectSupport
389
+ end
390
+
379
391
  class McfData
380
392
  class Representation < Google::Apis::Core::JsonRepresentation; end
381
393
 
@@ -490,6 +502,36 @@ module Google
490
502
  include Google::Apis::Core::JsonObjectSupport
491
503
  end
492
504
 
505
+ class RemarketingAudience
506
+ class Representation < Google::Apis::Core::JsonRepresentation; end
507
+
508
+ class AudienceDefinition
509
+ class Representation < Google::Apis::Core::JsonRepresentation; end
510
+
511
+ include Google::Apis::Core::JsonObjectSupport
512
+ end
513
+
514
+ class StateBasedAudienceDefinition
515
+ class Representation < Google::Apis::Core::JsonRepresentation; end
516
+
517
+ class ExcludeConditions
518
+ class Representation < Google::Apis::Core::JsonRepresentation; end
519
+
520
+ include Google::Apis::Core::JsonObjectSupport
521
+ end
522
+
523
+ include Google::Apis::Core::JsonObjectSupport
524
+ end
525
+
526
+ include Google::Apis::Core::JsonObjectSupport
527
+ end
528
+
529
+ class RemarketingAudiences
530
+ class Representation < Google::Apis::Core::JsonRepresentation; end
531
+
532
+ include Google::Apis::Core::JsonObjectSupport
533
+ end
534
+
493
535
  class Segment
494
536
  class Representation < Google::Apis::Core::JsonRepresentation; end
495
537
 
@@ -1159,6 +1201,7 @@ module Google
1159
1201
  collection :column_headers, as: 'columnHeaders', class: Google::Apis::AnalyticsV3::GaData::ColumnHeader, decorator: Google::Apis::AnalyticsV3::GaData::ColumnHeader::Representation
1160
1202
 
1161
1203
  property :contains_sampled_data, as: 'containsSampledData'
1204
+ property :data_last_refreshed, as: 'dataLastRefreshed'
1162
1205
  property :data_table, as: 'dataTable', class: Google::Apis::AnalyticsV3::GaData::DataTable, decorator: Google::Apis::AnalyticsV3::GaData::DataTable::Representation
1163
1206
 
1164
1207
  property :id, as: 'id'
@@ -1366,6 +1409,33 @@ module Google
1366
1409
  end
1367
1410
  end
1368
1411
 
1412
+ class IncludeConditions
1413
+ # @private
1414
+ class Representation < Google::Apis::Core::JsonRepresentation
1415
+ property :days_to_look_back, as: 'daysToLookBack'
1416
+ property :is_smart_list, as: 'isSmartList'
1417
+ property :kind, as: 'kind'
1418
+ property :membership_duration_days, as: 'membershipDurationDays'
1419
+ property :segment, as: 'segment'
1420
+ end
1421
+ end
1422
+
1423
+ class LinkedForeignAccount
1424
+ # @private
1425
+ class Representation < Google::Apis::Core::JsonRepresentation
1426
+ property :account_id, as: 'accountId'
1427
+ property :eligible_for_search, as: 'eligibleForSearch'
1428
+ property :id, as: 'id'
1429
+ property :internal_web_property_id, as: 'internalWebPropertyId'
1430
+ property :kind, as: 'kind'
1431
+ property :linked_account_id, as: 'linkedAccountId'
1432
+ property :remarketing_audience_id, as: 'remarketingAudienceId'
1433
+ property :status, as: 'status'
1434
+ property :type, as: 'type'
1435
+ property :web_property_id, as: 'webPropertyId'
1436
+ end
1437
+ end
1438
+
1369
1439
  class McfData
1370
1440
  # @private
1371
1441
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1633,6 +1703,72 @@ module Google
1633
1703
  end
1634
1704
  end
1635
1705
 
1706
+ class RemarketingAudience
1707
+ # @private
1708
+ class Representation < Google::Apis::Core::JsonRepresentation
1709
+ property :account_id, as: 'accountId'
1710
+ property :audience_definition, as: 'audienceDefinition', class: Google::Apis::AnalyticsV3::RemarketingAudience::AudienceDefinition, decorator: Google::Apis::AnalyticsV3::RemarketingAudience::AudienceDefinition::Representation
1711
+
1712
+ property :audience_type, as: 'audienceType'
1713
+ property :created, as: 'created', type: DateTime
1714
+
1715
+ property :description, as: 'description'
1716
+ property :id, as: 'id'
1717
+ property :internal_web_property_id, as: 'internalWebPropertyId'
1718
+ property :kind, as: 'kind'
1719
+ collection :linked_ad_accounts, as: 'linkedAdAccounts', class: Google::Apis::AnalyticsV3::LinkedForeignAccount, decorator: Google::Apis::AnalyticsV3::LinkedForeignAccount::Representation
1720
+
1721
+ collection :linked_views, as: 'linkedViews'
1722
+ property :name, as: 'name'
1723
+ property :state_based_audience_definition, as: 'stateBasedAudienceDefinition', class: Google::Apis::AnalyticsV3::RemarketingAudience::StateBasedAudienceDefinition, decorator: Google::Apis::AnalyticsV3::RemarketingAudience::StateBasedAudienceDefinition::Representation
1724
+
1725
+ property :updated, as: 'updated', type: DateTime
1726
+
1727
+ property :web_property_id, as: 'webPropertyId'
1728
+ end
1729
+
1730
+ class AudienceDefinition
1731
+ # @private
1732
+ class Representation < Google::Apis::Core::JsonRepresentation
1733
+ property :include_conditions, as: 'includeConditions', class: Google::Apis::AnalyticsV3::IncludeConditions, decorator: Google::Apis::AnalyticsV3::IncludeConditions::Representation
1734
+
1735
+ end
1736
+ end
1737
+
1738
+ class StateBasedAudienceDefinition
1739
+ # @private
1740
+ class Representation < Google::Apis::Core::JsonRepresentation
1741
+ property :exclude_conditions, as: 'excludeConditions', class: Google::Apis::AnalyticsV3::RemarketingAudience::StateBasedAudienceDefinition::ExcludeConditions, decorator: Google::Apis::AnalyticsV3::RemarketingAudience::StateBasedAudienceDefinition::ExcludeConditions::Representation
1742
+
1743
+ property :include_conditions, as: 'includeConditions', class: Google::Apis::AnalyticsV3::IncludeConditions, decorator: Google::Apis::AnalyticsV3::IncludeConditions::Representation
1744
+
1745
+ end
1746
+
1747
+ class ExcludeConditions
1748
+ # @private
1749
+ class Representation < Google::Apis::Core::JsonRepresentation
1750
+ property :exclusion_duration, as: 'exclusionDuration'
1751
+ property :segment, as: 'segment'
1752
+ end
1753
+ end
1754
+ end
1755
+ end
1756
+
1757
+ class RemarketingAudiences
1758
+ # @private
1759
+ class Representation < Google::Apis::Core::JsonRepresentation
1760
+ collection :items, as: 'items', class: Google::Apis::AnalyticsV3::RemarketingAudience, decorator: Google::Apis::AnalyticsV3::RemarketingAudience::Representation
1761
+
1762
+ property :items_per_page, as: 'itemsPerPage'
1763
+ property :kind, as: 'kind'
1764
+ property :next_link, as: 'nextLink'
1765
+ property :previous_link, as: 'previousLink'
1766
+ property :start_index, as: 'startIndex'
1767
+ property :total_results, as: 'totalResults'
1768
+ property :username, as: 'username'
1769
+ end
1770
+ end
1771
+
1636
1772
  class Segment
1637
1773
  # @private
1638
1774
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -2450,6 +2450,262 @@ module Google
2450
2450
  execute_or_queue_command(command, &block)
2451
2451
  end
2452
2452
 
2453
+ # Delete a remarketing audience.
2454
+ # @param [String] account_id
2455
+ # Account ID to which the remarketing audience belongs.
2456
+ # @param [String] web_property_id
2457
+ # Web property ID to which the remarketing audience belongs.
2458
+ # @param [String] remarketing_audience_id
2459
+ # The ID of the remarketing audience to delete.
2460
+ # @param [String] fields
2461
+ # Selector specifying which fields to include in a partial response.
2462
+ # @param [String] quota_user
2463
+ # Available to use for quota purposes for server-side applications. Can be any
2464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2465
+ # Overrides userIp if both are provided.
2466
+ # @param [String] user_ip
2467
+ # IP address of the site where the request originates. Use this if you want to
2468
+ # enforce per-user limits.
2469
+ # @param [Google::Apis::RequestOptions] options
2470
+ # Request-specific options
2471
+ #
2472
+ # @yield [result, err] Result & error if block supplied
2473
+ # @yieldparam result [NilClass] No result returned for this method
2474
+ # @yieldparam err [StandardError] error object if request failed
2475
+ #
2476
+ # @return [void]
2477
+ #
2478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2481
+ def delete_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2482
+ command = make_simple_command(:delete, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options)
2483
+ command.params['accountId'] = account_id unless account_id.nil?
2484
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2485
+ command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil?
2486
+ command.query['fields'] = fields unless fields.nil?
2487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2488
+ command.query['userIp'] = user_ip unless user_ip.nil?
2489
+ execute_or_queue_command(command, &block)
2490
+ end
2491
+
2492
+ # Gets a remarketing audience to which the user has access.
2493
+ # @param [String] account_id
2494
+ # The account ID of the remarketing audience to retrieve.
2495
+ # @param [String] web_property_id
2496
+ # The web property ID of the remarketing audience to retrieve.
2497
+ # @param [String] remarketing_audience_id
2498
+ # The ID of the remarketing audience to retrieve.
2499
+ # @param [String] fields
2500
+ # Selector specifying which fields to include in a partial response.
2501
+ # @param [String] quota_user
2502
+ # Available to use for quota purposes for server-side applications. Can be any
2503
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2504
+ # Overrides userIp if both are provided.
2505
+ # @param [String] user_ip
2506
+ # IP address of the site where the request originates. Use this if you want to
2507
+ # enforce per-user limits.
2508
+ # @param [Google::Apis::RequestOptions] options
2509
+ # Request-specific options
2510
+ #
2511
+ # @yield [result, err] Result & error if block supplied
2512
+ # @yieldparam result [Google::Apis::AnalyticsV3::RemarketingAudience] parsed result object
2513
+ # @yieldparam err [StandardError] error object if request failed
2514
+ #
2515
+ # @return [Google::Apis::AnalyticsV3::RemarketingAudience]
2516
+ #
2517
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2518
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2519
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2520
+ def get_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2521
+ command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options)
2522
+ command.response_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2523
+ command.response_class = Google::Apis::AnalyticsV3::RemarketingAudience
2524
+ command.params['accountId'] = account_id unless account_id.nil?
2525
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2526
+ command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil?
2527
+ command.query['fields'] = fields unless fields.nil?
2528
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2529
+ command.query['userIp'] = user_ip unless user_ip.nil?
2530
+ execute_or_queue_command(command, &block)
2531
+ end
2532
+
2533
+ # Creates a new remarketing audience.
2534
+ # @param [String] account_id
2535
+ # The account ID for which to create the remarketing audience.
2536
+ # @param [String] web_property_id
2537
+ # Web property ID for which to create the remarketing audience.
2538
+ # @param [Google::Apis::AnalyticsV3::RemarketingAudience] remarketing_audience_object
2539
+ # @param [String] fields
2540
+ # Selector specifying which fields to include in a partial response.
2541
+ # @param [String] quota_user
2542
+ # Available to use for quota purposes for server-side applications. Can be any
2543
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2544
+ # Overrides userIp if both are provided.
2545
+ # @param [String] user_ip
2546
+ # IP address of the site where the request originates. Use this if you want to
2547
+ # enforce per-user limits.
2548
+ # @param [Google::Apis::RequestOptions] options
2549
+ # Request-specific options
2550
+ #
2551
+ # @yield [result, err] Result & error if block supplied
2552
+ # @yieldparam result [Google::Apis::AnalyticsV3::RemarketingAudience] parsed result object
2553
+ # @yieldparam err [StandardError] error object if request failed
2554
+ #
2555
+ # @return [Google::Apis::AnalyticsV3::RemarketingAudience]
2556
+ #
2557
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2558
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2559
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2560
+ def insert_management_remarketing_audience(account_id, web_property_id, remarketing_audience_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2561
+ command = make_simple_command(:post, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences', options)
2562
+ command.request_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2563
+ command.request_object = remarketing_audience_object
2564
+ command.response_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2565
+ command.response_class = Google::Apis::AnalyticsV3::RemarketingAudience
2566
+ command.params['accountId'] = account_id unless account_id.nil?
2567
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2568
+ command.query['fields'] = fields unless fields.nil?
2569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2570
+ command.query['userIp'] = user_ip unless user_ip.nil?
2571
+ execute_or_queue_command(command, &block)
2572
+ end
2573
+
2574
+ # Lists remarketing audiences to which the user has access.
2575
+ # @param [String] account_id
2576
+ # The account ID of the remarketing audiences to retrieve.
2577
+ # @param [String] web_property_id
2578
+ # The web property ID of the remarketing audiences to retrieve.
2579
+ # @param [Fixnum] max_results
2580
+ # The maximum number of remarketing audiences to include in this response.
2581
+ # @param [Fixnum] start_index
2582
+ # An index of the first entity to retrieve. Use this parameter as a pagination
2583
+ # mechanism along with the max-results parameter.
2584
+ # @param [String] type
2585
+ # @param [String] fields
2586
+ # Selector specifying which fields to include in a partial response.
2587
+ # @param [String] quota_user
2588
+ # Available to use for quota purposes for server-side applications. Can be any
2589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2590
+ # Overrides userIp if both are provided.
2591
+ # @param [String] user_ip
2592
+ # IP address of the site where the request originates. Use this if you want to
2593
+ # enforce per-user limits.
2594
+ # @param [Google::Apis::RequestOptions] options
2595
+ # Request-specific options
2596
+ #
2597
+ # @yield [result, err] Result & error if block supplied
2598
+ # @yieldparam result [Google::Apis::AnalyticsV3::RemarketingAudiences] parsed result object
2599
+ # @yieldparam err [StandardError] error object if request failed
2600
+ #
2601
+ # @return [Google::Apis::AnalyticsV3::RemarketingAudiences]
2602
+ #
2603
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2604
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2605
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2606
+ def list_management_remarketing_audiences(account_id, web_property_id, max_results: nil, start_index: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2607
+ command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences', options)
2608
+ command.response_representation = Google::Apis::AnalyticsV3::RemarketingAudiences::Representation
2609
+ command.response_class = Google::Apis::AnalyticsV3::RemarketingAudiences
2610
+ command.params['accountId'] = account_id unless account_id.nil?
2611
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2612
+ command.query['max-results'] = max_results unless max_results.nil?
2613
+ command.query['start-index'] = start_index unless start_index.nil?
2614
+ command.query['type'] = type unless type.nil?
2615
+ command.query['fields'] = fields unless fields.nil?
2616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2617
+ command.query['userIp'] = user_ip unless user_ip.nil?
2618
+ execute_or_queue_command(command, &block)
2619
+ end
2620
+
2621
+ # Updates an existing remarketing audience. This method supports patch semantics.
2622
+ # @param [String] account_id
2623
+ # The account ID of the remarketing audience to update.
2624
+ # @param [String] web_property_id
2625
+ # The web property ID of the remarketing audience to update.
2626
+ # @param [String] remarketing_audience_id
2627
+ # The ID of the remarketing audience to update.
2628
+ # @param [Google::Apis::AnalyticsV3::RemarketingAudience] remarketing_audience_object
2629
+ # @param [String] fields
2630
+ # Selector specifying which fields to include in a partial response.
2631
+ # @param [String] quota_user
2632
+ # Available to use for quota purposes for server-side applications. Can be any
2633
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2634
+ # Overrides userIp if both are provided.
2635
+ # @param [String] user_ip
2636
+ # IP address of the site where the request originates. Use this if you want to
2637
+ # enforce per-user limits.
2638
+ # @param [Google::Apis::RequestOptions] options
2639
+ # Request-specific options
2640
+ #
2641
+ # @yield [result, err] Result & error if block supplied
2642
+ # @yieldparam result [Google::Apis::AnalyticsV3::RemarketingAudience] parsed result object
2643
+ # @yieldparam err [StandardError] error object if request failed
2644
+ #
2645
+ # @return [Google::Apis::AnalyticsV3::RemarketingAudience]
2646
+ #
2647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2650
+ def patch_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, remarketing_audience_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2651
+ command = make_simple_command(:patch, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options)
2652
+ command.request_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2653
+ command.request_object = remarketing_audience_object
2654
+ command.response_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2655
+ command.response_class = Google::Apis::AnalyticsV3::RemarketingAudience
2656
+ command.params['accountId'] = account_id unless account_id.nil?
2657
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2658
+ command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil?
2659
+ command.query['fields'] = fields unless fields.nil?
2660
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2661
+ command.query['userIp'] = user_ip unless user_ip.nil?
2662
+ execute_or_queue_command(command, &block)
2663
+ end
2664
+
2665
+ # Updates an existing remarketing audience.
2666
+ # @param [String] account_id
2667
+ # The account ID of the remarketing audience to update.
2668
+ # @param [String] web_property_id
2669
+ # The web property ID of the remarketing audience to update.
2670
+ # @param [String] remarketing_audience_id
2671
+ # The ID of the remarketing audience to update.
2672
+ # @param [Google::Apis::AnalyticsV3::RemarketingAudience] remarketing_audience_object
2673
+ # @param [String] fields
2674
+ # Selector specifying which fields to include in a partial response.
2675
+ # @param [String] quota_user
2676
+ # Available to use for quota purposes for server-side applications. Can be any
2677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2678
+ # Overrides userIp if both are provided.
2679
+ # @param [String] user_ip
2680
+ # IP address of the site where the request originates. Use this if you want to
2681
+ # enforce per-user limits.
2682
+ # @param [Google::Apis::RequestOptions] options
2683
+ # Request-specific options
2684
+ #
2685
+ # @yield [result, err] Result & error if block supplied
2686
+ # @yieldparam result [Google::Apis::AnalyticsV3::RemarketingAudience] parsed result object
2687
+ # @yieldparam err [StandardError] error object if request failed
2688
+ #
2689
+ # @return [Google::Apis::AnalyticsV3::RemarketingAudience]
2690
+ #
2691
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2692
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2693
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2694
+ def update_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, remarketing_audience_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2695
+ command = make_simple_command(:put, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options)
2696
+ command.request_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2697
+ command.request_object = remarketing_audience_object
2698
+ command.response_representation = Google::Apis::AnalyticsV3::RemarketingAudience::Representation
2699
+ command.response_class = Google::Apis::AnalyticsV3::RemarketingAudience
2700
+ command.params['accountId'] = account_id unless account_id.nil?
2701
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2702
+ command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil?
2703
+ command.query['fields'] = fields unless fields.nil?
2704
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2705
+ command.query['userIp'] = user_ip unless user_ip.nil?
2706
+ execute_or_queue_command(command, &block)
2707
+ end
2708
+
2453
2709
  # Lists segments to which the user has access.
2454
2710
  # @param [Fixnum] max_results
2455
2711
  # The maximum number of segments to include in this response.
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/analytics/devguides/reporting/core/v4/
26
26
  module AnalyticsreportingV4
27
27
  VERSION = 'V4'
28
- REVISION = '20160512'
28
+ REVISION = '20170309'
29
29
 
30
30
  # View your Google Analytics data
31
31
  AUTH_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/analytics.readonly'
@@ -22,19 +22,26 @@ module Google
22
22
  module Apis
23
23
  module AnalyticsreportingV4
24
24
 
25
- # The headers for each of the pivot sections defined in the request.
26
- class PivotHeader
25
+ # Filter Clause to be used in a segment definition, can be wither a metric or
26
+ # a dimension filter.
27
+ class SegmentFilterClause
27
28
  include Google::Apis::Core::Hashable
28
29
 
29
- # The total number of groups for this pivot.
30
- # Corresponds to the JSON property `totalPivotGroupsCount`
31
- # @return [Fixnum]
32
- attr_accessor :total_pivot_groups_count
30
+ # Metric filter to be used in a segment filter clause.
31
+ # Corresponds to the JSON property `metricFilter`
32
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
33
+ attr_accessor :metric_filter
33
34
 
34
- # A single pivot section header.
35
- # Corresponds to the JSON property `pivotHeaderEntries`
36
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
37
- attr_accessor :pivot_header_entries
35
+ # Matches the complement (`!`) of the filter.
36
+ # Corresponds to the JSON property `not`
37
+ # @return [Boolean]
38
+ attr_accessor :not
39
+ alias_method :not?, :not
40
+
41
+ # Dimension filter specifies the filtering options on a dimension.
42
+ # Corresponds to the JSON property `dimensionFilter`
43
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
44
+ attr_accessor :dimension_filter
38
45
 
39
46
  def initialize(**args)
40
47
  update!(**args)
@@ -42,41 +49,65 @@ module Google
42
49
 
43
50
  # Update properties of this object
44
51
  def update!(**args)
45
- @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
46
- @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
52
+ @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
53
+ @not = args[:not] if args.key?(:not)
54
+ @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
47
55
  end
48
56
  end
49
57
 
50
- # A metric in the request.
51
- class Metric
58
+ # Represents a group of metric filters.
59
+ # Set the operator value to specify how the filters are logically combined.
60
+ class MetricFilterClause
52
61
  include Google::Apis::Core::Hashable
53
62
 
54
- # An alias for the metric expression is an alternate name for the
55
- # expression. The alias can be used for filtering and sorting. This field
56
- # is optional and is useful if the expression is not a single metric but
57
- # a complex expression which cannot be used in filtering and sorting.
58
- # The alias is also used in the response column header.
59
- # Corresponds to the JSON property `alias`
63
+ # The operator for combining multiple metric filters. If unspecified, it is
64
+ # treated as an `OR`.
65
+ # Corresponds to the JSON property `operator`
60
66
  # @return [String]
61
- attr_accessor :alias
67
+ attr_accessor :operator
62
68
 
63
- # Specifies how the metric expression should be formatted, for example
64
- # `INTEGER`.
65
- # Corresponds to the JSON property `formattingType`
69
+ # The repeated set of filters. They are logically combined based on the
70
+ # operator specified.
71
+ # Corresponds to the JSON property `filters`
72
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
73
+ attr_accessor :filters
74
+
75
+ def initialize(**args)
76
+ update!(**args)
77
+ end
78
+
79
+ # Update properties of this object
80
+ def update!(**args)
81
+ @operator = args[:operator] if args.key?(:operator)
82
+ @filters = args[:filters] if args.key?(:filters)
83
+ end
84
+ end
85
+
86
+ # Defines a cohort. A cohort is a group of users who share a common
87
+ # characteristic. For example, all users with the same acquisition date
88
+ # belong to the same cohort.
89
+ class Cohort
90
+ include Google::Apis::Core::Hashable
91
+
92
+ # A unique name for the cohort. If not defined name will be auto-generated
93
+ # with values cohort_[1234...].
94
+ # Corresponds to the JSON property `name`
66
95
  # @return [String]
67
- attr_accessor :formatting_type
96
+ attr_accessor :name
68
97
 
69
- # A metric expression in the request. An expression is constructed from one
70
- # or more metrics and numbers. Accepted operators include: Plus (+), Minus
71
- # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
72
- # Positive cardinal numbers (0-9), can include decimals and is limited to
73
- # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
74
- # metric expression is just a single metric name like `ga:users`.
75
- # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
76
- # will result in unexpected results.
77
- # Corresponds to the JSON property `expression`
98
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
99
+ # The start and end dates are specified in
100
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
101
+ # Corresponds to the JSON property `dateRange`
102
+ # @return [Google::Apis::AnalyticsreportingV4::DateRange]
103
+ attr_accessor :date_range
104
+
105
+ # Type of the cohort. The only supported type as of now is
106
+ # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
107
+ # as `FIRST_VISIT_DATE` type cohort.
108
+ # Corresponds to the JSON property `type`
78
109
  # @return [String]
79
- attr_accessor :expression
110
+ attr_accessor :type
80
111
 
81
112
  def initialize(**args)
82
113
  update!(**args)
@@ -84,58 +115,46 @@ module Google
84
115
 
85
116
  # Update properties of this object
86
117
  def update!(**args)
87
- @alias = args[:alias] if args.key?(:alias)
88
- @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
89
- @expression = args[:expression] if args.key?(:expression)
118
+ @name = args[:name] if args.key?(:name)
119
+ @date_range = args[:date_range] if args.key?(:date_range)
120
+ @type = args[:type] if args.key?(:type)
90
121
  end
91
122
  end
92
123
 
93
- # Column headers.
94
- class ColumnHeader
124
+ # A row in the report.
125
+ class ReportRow
95
126
  include Google::Apis::Core::Hashable
96
127
 
97
- # The dimension names in the response.
128
+ # List of metrics for each requested DateRange.
129
+ # Corresponds to the JSON property `metrics`
130
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
131
+ attr_accessor :metrics
132
+
133
+ # List of requested dimensions.
98
134
  # Corresponds to the JSON property `dimensions`
99
135
  # @return [Array<String>]
100
136
  attr_accessor :dimensions
101
137
 
102
- # The headers for the metrics.
103
- # Corresponds to the JSON property `metricHeader`
104
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
105
- attr_accessor :metric_header
106
-
107
138
  def initialize(**args)
108
139
  update!(**args)
109
140
  end
110
141
 
111
142
  # Update properties of this object
112
143
  def update!(**args)
144
+ @metrics = args[:metrics] if args.key?(:metrics)
113
145
  @dimensions = args[:dimensions] if args.key?(:dimensions)
114
- @metric_header = args[:metric_header] if args.key?(:metric_header)
115
146
  end
116
147
  end
117
148
 
118
- # Dynamic segment definition for defining the segment within the request.
119
- # A segment can select users, sessions or both.
120
- class DynamicSegment
149
+ # A list of segment filters in the `OR` group are combined with the logical OR
150
+ # operator.
151
+ class OrFiltersForSegment
121
152
  include Google::Apis::Core::Hashable
122
153
 
123
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
124
- # are combined together with a logical `AND` operation.
125
- # Corresponds to the JSON property `sessionSegment`
126
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
127
- attr_accessor :session_segment
128
-
129
- # The name of the dynamic segment.
130
- # Corresponds to the JSON property `name`
131
- # @return [String]
132
- attr_accessor :name
133
-
134
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
135
- # are combined together with a logical `AND` operation.
136
- # Corresponds to the JSON property `userSegment`
137
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
138
- attr_accessor :user_segment
154
+ # List of segment filters to be combined with a `OR` operator.
155
+ # Corresponds to the JSON property `segmentFilterClauses`
156
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
157
+ attr_accessor :segment_filter_clauses
139
158
 
140
159
  def initialize(**args)
141
160
  update!(**args)
@@ -143,9 +162,7 @@ module Google
143
162
 
144
163
  # Update properties of this object
145
164
  def update!(**args)
146
- @session_segment = args[:session_segment] if args.key?(:session_segment)
147
- @name = args[:name] if args.key?(:name)
148
- @user_segment = args[:user_segment] if args.key?(:user_segment)
165
+ @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
149
166
  end
150
167
  end
151
168
 
@@ -153,45 +170,43 @@ module Google
153
170
  class MetricHeader
154
171
  include Google::Apis::Core::Hashable
155
172
 
156
- # Headers for the metrics in the response.
157
- # Corresponds to the JSON property `metricHeaderEntries`
158
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
159
- attr_accessor :metric_header_entries
160
-
161
173
  # Headers for the pivots in the response.
162
174
  # Corresponds to the JSON property `pivotHeaders`
163
175
  # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeader>]
164
176
  attr_accessor :pivot_headers
165
177
 
178
+ # Headers for the metrics in the response.
179
+ # Corresponds to the JSON property `metricHeaderEntries`
180
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricHeaderEntry>]
181
+ attr_accessor :metric_header_entries
182
+
166
183
  def initialize(**args)
167
184
  update!(**args)
168
185
  end
169
186
 
170
187
  # Update properties of this object
171
188
  def update!(**args)
172
- @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
173
189
  @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers)
190
+ @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries)
174
191
  end
175
192
  end
176
193
 
177
- # The data response corresponding to the request.
178
- class Report
194
+ # A group of dimension filters. Set the operator value to specify how
195
+ # the filters are logically combined.
196
+ class DimensionFilterClause
179
197
  include Google::Apis::Core::Hashable
180
198
 
181
- # Column headers.
182
- # Corresponds to the JSON property `columnHeader`
183
- # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
184
- attr_accessor :column_header
185
-
186
- # The data part of the report.
187
- # Corresponds to the JSON property `data`
188
- # @return [Google::Apis::AnalyticsreportingV4::ReportData]
189
- attr_accessor :data
190
-
191
- # Page token to retrieve the next page of results in the list.
192
- # Corresponds to the JSON property `nextPageToken`
199
+ # The operator for combining multiple dimension filters. If unspecified, it
200
+ # is treated as an `OR`.
201
+ # Corresponds to the JSON property `operator`
193
202
  # @return [String]
194
- attr_accessor :next_page_token
203
+ attr_accessor :operator
204
+
205
+ # The repeated set of filters. They are logically combined based on the
206
+ # operator specified.
207
+ # Corresponds to the JSON property `filters`
208
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
209
+ attr_accessor :filters
195
210
 
196
211
  def initialize(**args)
197
212
  update!(**args)
@@ -199,32 +214,48 @@ module Google
199
214
 
200
215
  # Update properties of this object
201
216
  def update!(**args)
202
- @column_header = args[:column_header] if args.key?(:column_header)
203
- @data = args[:data] if args.key?(:data)
204
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
217
+ @operator = args[:operator] if args.key?(:operator)
218
+ @filters = args[:filters] if args.key?(:filters)
205
219
  end
206
220
  end
207
221
 
208
- # Filter Clause to be used in a segment definition, can be wither a metric or
209
- # a dimension filter.
210
- class SegmentFilterClause
222
+ # The main response class which holds the reports from the Reporting API
223
+ # `batchGet` call.
224
+ class GetReportsResponse
211
225
  include Google::Apis::Core::Hashable
212
226
 
213
- # Dimension filter specifies the filtering options on a dimension.
214
- # Corresponds to the JSON property `dimensionFilter`
215
- # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter]
216
- attr_accessor :dimension_filter
227
+ # Responses corresponding to each of the request.
228
+ # Corresponds to the JSON property `reports`
229
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
230
+ attr_accessor :reports
217
231
 
218
- # Metric filter to be used in a segment filter clause.
219
- # Corresponds to the JSON property `metricFilter`
220
- # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter]
221
- attr_accessor :metric_filter
232
+ def initialize(**args)
233
+ update!(**args)
234
+ end
222
235
 
223
- # Matches the complement (`!`) of the filter.
224
- # Corresponds to the JSON property `not`
236
+ # Update properties of this object
237
+ def update!(**args)
238
+ @reports = args[:reports] if args.key?(:reports)
239
+ end
240
+ end
241
+
242
+ # Sequence conditions consist of one or more steps, where each step is defined
243
+ # by one or more dimension/metric conditions. Multiple steps can be combined
244
+ # with special sequence operators.
245
+ class SequenceSegment
246
+ include Google::Apis::Core::Hashable
247
+
248
+ # If set, first step condition must match the first hit of the visitor (in
249
+ # the date range).
250
+ # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
225
251
  # @return [Boolean]
226
- attr_accessor :not
227
- alias_method :not?, :not
252
+ attr_accessor :first_step_should_match_first_hit
253
+ alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
254
+
255
+ # The list of steps in the sequence.
256
+ # Corresponds to the JSON property `segmentSequenceSteps`
257
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
258
+ attr_accessor :segment_sequence_steps
228
259
 
229
260
  def initialize(**args)
230
261
  update!(**args)
@@ -232,328 +263,13 @@ module Google
232
263
 
233
264
  # Update properties of this object
234
265
  def update!(**args)
235
- @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
236
- @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
237
- @not = args[:not] if args.key?(:not)
266
+ @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
267
+ @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
238
268
  end
239
269
  end
240
270
 
241
- # Dimension filter specifies the filtering options on a dimension.
242
- class DimensionFilter
243
- include Google::Apis::Core::Hashable
244
-
245
- # The dimension to filter on. A DimensionFilter must contain a dimension.
246
- # Corresponds to the JSON property `dimensionName`
247
- # @return [String]
248
- attr_accessor :dimension_name
249
-
250
- # How to match the dimension to the expression. The default is REGEXP.
251
- # Corresponds to the JSON property `operator`
252
- # @return [String]
253
- attr_accessor :operator
254
-
255
- # Should the match be case sensitive? Default is false.
256
- # Corresponds to the JSON property `caseSensitive`
257
- # @return [Boolean]
258
- attr_accessor :case_sensitive
259
- alias_method :case_sensitive?, :case_sensitive
260
-
261
- # Strings or regular expression to match against. Only the first value of
262
- # the list is used for comparison unless the operator is `IN_LIST`.
263
- # If `IN_LIST` operator, then the entire list is used to filter the
264
- # dimensions as explained in the description of the `IN_LIST` operator.
265
- # Corresponds to the JSON property `expressions`
266
- # @return [Array<String>]
267
- attr_accessor :expressions
268
-
269
- # Logical `NOT` operator. If this boolean is set to true, then the matching
270
- # dimension values will be excluded in the report. The default is false.
271
- # Corresponds to the JSON property `not`
272
- # @return [Boolean]
273
- attr_accessor :not
274
- alias_method :not?, :not
275
-
276
- def initialize(**args)
277
- update!(**args)
278
- end
279
-
280
- # Update properties of this object
281
- def update!(**args)
282
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
283
- @operator = args[:operator] if args.key?(:operator)
284
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
285
- @expressions = args[:expressions] if args.key?(:expressions)
286
- @not = args[:not] if args.key?(:not)
287
- end
288
- end
289
-
290
- # Dimension filter specifies the filtering options on a dimension.
291
- class SegmentDimensionFilter
292
- include Google::Apis::Core::Hashable
293
-
294
- # Maximum comparison values for `BETWEEN` match type.
295
- # Corresponds to the JSON property `maxComparisonValue`
296
- # @return [String]
297
- attr_accessor :max_comparison_value
298
-
299
- # Name of the dimension for which the filter is being applied.
300
- # Corresponds to the JSON property `dimensionName`
301
- # @return [String]
302
- attr_accessor :dimension_name
303
-
304
- # Should the match be case sensitive, ignored for `IN_LIST` operator.
305
- # Corresponds to the JSON property `caseSensitive`
306
- # @return [Boolean]
307
- attr_accessor :case_sensitive
308
- alias_method :case_sensitive?, :case_sensitive
309
-
310
- # The operator to use to match the dimension with the expressions.
311
- # Corresponds to the JSON property `operator`
312
- # @return [String]
313
- attr_accessor :operator
314
-
315
- # The list of expressions, only the first element is used for all operators
316
- # Corresponds to the JSON property `expressions`
317
- # @return [Array<String>]
318
- attr_accessor :expressions
319
-
320
- # Minimum comparison values for `BETWEEN` match type.
321
- # Corresponds to the JSON property `minComparisonValue`
322
- # @return [String]
323
- attr_accessor :min_comparison_value
324
-
325
- def initialize(**args)
326
- update!(**args)
327
- end
328
-
329
- # Update properties of this object
330
- def update!(**args)
331
- @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
332
- @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
333
- @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
334
- @operator = args[:operator] if args.key?(:operator)
335
- @expressions = args[:expressions] if args.key?(:expressions)
336
- @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
337
- end
338
- end
339
-
340
- # The main request class which specifies the Reporting API request.
341
- class ReportRequest
342
- include Google::Apis::Core::Hashable
343
-
344
- # Defines a cohort group.
345
- # For example:
346
- # "cohortGroup": `
347
- # "cohorts": [`
348
- # "name": "cohort 1",
349
- # "type": "FIRST_VISIT_DATE",
350
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
351
- # `,`
352
- # "name": "cohort 2"
353
- # "type": "FIRST_VISIT_DATE"
354
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
355
- # `]
356
- # `
357
- # Corresponds to the JSON property `cohortGroup`
358
- # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
359
- attr_accessor :cohort_group
360
-
361
- # Dimensions requested in the request.
362
- # Corresponds to the JSON property `dimensions`
363
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
364
- attr_accessor :dimensions
365
-
366
- # The metric filter clauses. They are logically combined with the `AND`
367
- # operator. Metric filters look at only the first date range and not the
368
- # comparing date range. Note that filtering on metrics occurs after the
369
- # metrics are aggregated.
370
- # Corresponds to the JSON property `metricFilterClauses`
371
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
372
- attr_accessor :metric_filter_clauses
373
-
374
- # If set to true, hides the total of all metrics for all the matching rows,
375
- # for every date range. The default false and will return the totals.
376
- # Corresponds to the JSON property `hideTotals`
377
- # @return [Boolean]
378
- attr_accessor :hide_totals
379
- alias_method :hide_totals?, :hide_totals
380
-
381
- # If set to false, the response does not include rows if all the retrieved
382
- # metrics are equal to zero. The default is false which will exclude these
383
- # rows.
384
- # Corresponds to the JSON property `includeEmptyRows`
385
- # @return [Boolean]
386
- attr_accessor :include_empty_rows
387
- alias_method :include_empty_rows?, :include_empty_rows
388
-
389
- # The dimension filter clauses for filtering Dimension Values. They are
390
- # logically combined with the `AND` operator. Note that filtering occurs
391
- # before any dimensions are aggregated, so that the returned metrics
392
- # represent the total for only the relevant dimensions.
393
- # Corresponds to the JSON property `dimensionFilterClauses`
394
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
395
- attr_accessor :dimension_filter_clauses
396
-
397
- # The pivot definitions.
398
- # Corresponds to the JSON property `pivots`
399
- # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
400
- attr_accessor :pivots
401
-
402
- # Date ranges in the request. The request can have a maximum of 2 date
403
- # ranges. The response will contain a set of metric values for each
404
- # combination of the dimensions for each date range in the request. So, if
405
- # there are two date ranges, there will be two set of metric values, one for
406
- # the original date range and one for the second date range.
407
- # The `reportRequest.dateRanges` field should not be specified for cohorts
408
- # or Lifetime value requests.
409
- # If a date range is not provided, the default date range is (startDate:
410
- # current date - 7 days, endDate: current date - 1 day)
411
- # Corresponds to the JSON property `dateRanges`
412
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
413
- attr_accessor :date_ranges
414
-
415
- # Segment the data returned for the request. A segment definition helps look
416
- # at a subset of the segment request. A request can contain up to four
417
- # segments. All requests should have the same segment definitions. Requests
418
- # with segments must have the `ga:segment` dimension.
419
- # Corresponds to the JSON property `segments`
420
- # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
421
- attr_accessor :segments
422
-
423
- # The desired sampling level. If the sampling level is not specified the
424
- # DEFAULT sampling level will be used. All requests should have same
425
- # `samplingLevel`.
426
- # Corresponds to the JSON property `samplingLevel`
427
- # @return [String]
428
- attr_accessor :sampling_level
429
-
430
- # Metrics, the quantitative measurements, requested in the request.
431
- # Requests must specify at least one metric.
432
- # Corresponds to the JSON property `metrics`
433
- # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
434
- attr_accessor :metrics
435
-
436
- # Page size is for paging and specifies the maximum number of returned rows.
437
- # Page size should be >= 0. A query returns the default of 1,000 rows.
438
- # The Analytics Core Reporting API returns a maximum of 10,000 rows per
439
- # request, no matter how many you ask for. It can also return fewer rows
440
- # than requested, if there aren't as many dimension segments as you expect.
441
- # For instance, there are fewer than 300 possible values for `ga:country`,
442
- # so when segmenting only by country, you can't get more than 300 rows,
443
- # even if you set `pageSize` to a higher value.
444
- # Corresponds to the JSON property `pageSize`
445
- # @return [Fixnum]
446
- attr_accessor :page_size
447
-
448
- # Sort order on output rows. To compare two rows, the elements of the
449
- # following are applied in order until a difference is found. All date
450
- # ranges in the output get the same row order.
451
- # Corresponds to the JSON property `orderBys`
452
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
453
- attr_accessor :order_bys
454
-
455
- # Dimension or metric filters that restrict the data returned for your
456
- # request. To use the `filtersExpression`, supply a dimension or metric on
457
- # which to filter, followed by the filter expression. For example, the
458
- # following expression selects `ga:browser` dimension which starts with
459
- # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
460
- # and metric filters, see
461
- # [Filters reference](https://developers.google.com/analytics/devguides/
462
- # reporting/core/v3/reference#filters).
463
- # Corresponds to the JSON property `filtersExpression`
464
- # @return [String]
465
- attr_accessor :filters_expression
466
-
467
- # If set to true, hides the minimum and maximum across all matching rows.
468
- # The default is false and the value ranges are returned.
469
- # Corresponds to the JSON property `hideValueRanges`
470
- # @return [Boolean]
471
- attr_accessor :hide_value_ranges
472
- alias_method :hide_value_ranges?, :hide_value_ranges
473
-
474
- # Unique View Id for retrieving Analytics data.
475
- # Corresponds to the JSON property `viewId`
476
- # @return [String]
477
- attr_accessor :view_id
478
-
479
- # A continuation token to get the next page of the results. Adding this to
480
- # the request will return the rows after the pageToken. The pageToken should
481
- # be the value returned in the nextPageToken parameter in the response to
482
- # the GetReports request.
483
- # Corresponds to the JSON property `pageToken`
484
- # @return [String]
485
- attr_accessor :page_token
486
-
487
- def initialize(**args)
488
- update!(**args)
489
- end
490
-
491
- # Update properties of this object
492
- def update!(**args)
493
- @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
494
- @dimensions = args[:dimensions] if args.key?(:dimensions)
495
- @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
496
- @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
497
- @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
498
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
499
- @pivots = args[:pivots] if args.key?(:pivots)
500
- @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
501
- @segments = args[:segments] if args.key?(:segments)
502
- @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
503
- @metrics = args[:metrics] if args.key?(:metrics)
504
- @page_size = args[:page_size] if args.key?(:page_size)
505
- @order_bys = args[:order_bys] if args.key?(:order_bys)
506
- @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
507
- @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
508
- @view_id = args[:view_id] if args.key?(:view_id)
509
- @page_token = args[:page_token] if args.key?(:page_token)
510
- end
511
- end
512
-
513
- # A Simple segment conditions consist of one or more dimension/metric
514
- # conditions that can be combined.
515
- class SimpleSegment
516
- include Google::Apis::Core::Hashable
517
-
518
- # A list of segment filters groups which are combined with logical `AND`
519
- # operator.
520
- # Corresponds to the JSON property `orFiltersForSegment`
521
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
522
- attr_accessor :or_filters_for_segment
523
-
524
- def initialize(**args)
525
- update!(**args)
526
- end
527
-
528
- # Update properties of this object
529
- def update!(**args)
530
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
531
- end
532
- end
533
-
534
- # SegmentDefinition defines the segment to be a set of SegmentFilters which
535
- # are combined together with a logical `AND` operation.
536
- class SegmentDefinition
537
- include Google::Apis::Core::Hashable
538
-
539
- # A segment is defined by a set of segment filters which are combined
540
- # together with a logical `AND` operation.
541
- # Corresponds to the JSON property `segmentFilters`
542
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
543
- attr_accessor :segment_filters
544
-
545
- def initialize(**args)
546
- update!(**args)
547
- end
548
-
549
- # Update properties of this object
550
- def update!(**args)
551
- @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
552
- end
553
- end
554
-
555
- # Metric filter to be used in a segment filter clause.
556
- class SegmentMetricFilter
271
+ # Metric filter to be used in a segment filter clause.
272
+ class SegmentMetricFilter
557
273
  include Google::Apis::Core::Hashable
558
274
 
559
275
  # The metric that will be filtered on. A `metricFilter` must contain a
@@ -562,30 +278,30 @@ module Google
562
278
  # @return [String]
563
279
  attr_accessor :metric_name
564
280
 
565
- # Specifies is the operation to perform to compare the metric. The default
566
- # is `EQUAL`.
567
- # Corresponds to the JSON property `operator`
568
- # @return [String]
569
- attr_accessor :operator
570
-
571
- # The value to compare against. If the operator is `BETWEEN`, this value is
572
- # treated as minimum comparison value.
573
- # Corresponds to the JSON property `comparisonValue`
574
- # @return [String]
575
- attr_accessor :comparison_value
576
-
577
281
  # Scope for a metric defines the level at which that metric is defined. The
578
282
  # specified metric scope must be equal to or greater than its primary scope
579
283
  # as defined in the data model. The primary scope is defined by if the
580
284
  # segment is selecting users or sessions.
581
285
  # Corresponds to the JSON property `scope`
582
286
  # @return [String]
583
- attr_accessor :scope
287
+ attr_accessor :scope
288
+
289
+ # Max comparison value is only used for `BETWEEN` operator.
290
+ # Corresponds to the JSON property `maxComparisonValue`
291
+ # @return [String]
292
+ attr_accessor :max_comparison_value
293
+
294
+ # The value to compare against. If the operator is `BETWEEN`, this value is
295
+ # treated as minimum comparison value.
296
+ # Corresponds to the JSON property `comparisonValue`
297
+ # @return [String]
298
+ attr_accessor :comparison_value
584
299
 
585
- # Max comparison value is only used for `BETWEEN` operator.
586
- # Corresponds to the JSON property `maxComparisonValue`
300
+ # Specifies is the operation to perform to compare the metric. The default
301
+ # is `EQUAL`.
302
+ # Corresponds to the JSON property `operator`
587
303
  # @return [String]
588
- attr_accessor :max_comparison_value
304
+ attr_accessor :operator
589
305
 
590
306
  def initialize(**args)
591
307
  update!(**args)
@@ -594,72 +310,91 @@ module Google
594
310
  # Update properties of this object
595
311
  def update!(**args)
596
312
  @metric_name = args[:metric_name] if args.key?(:metric_name)
597
- @operator = args[:operator] if args.key?(:operator)
598
- @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
599
313
  @scope = args[:scope] if args.key?(:scope)
600
314
  @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
315
+ @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
316
+ @operator = args[:operator] if args.key?(:operator)
601
317
  end
602
318
  end
603
319
 
604
- # The data part of the report.
605
- class ReportData
320
+ # Used to return a list of metrics for a single DateRange / dimension
321
+ # combination
322
+ class DateRangeValues
606
323
  include Google::Apis::Core::Hashable
607
324
 
608
- # Total number of matching rows for this query.
609
- # Corresponds to the JSON property `rowCount`
610
- # @return [Fixnum]
611
- attr_accessor :row_count
612
-
613
- # If sampling was enabled, this returns the total number of samples
614
- # present, one entry per date range.
615
- # Corresponds to the JSON property `samplingSpaceSizes`
325
+ # Each value corresponds to each Metric in the request.
326
+ # Corresponds to the JSON property `values`
616
327
  # @return [Array<String>]
617
- attr_accessor :sampling_space_sizes
328
+ attr_accessor :values
618
329
 
619
- # Minimum and maximum values seen over all matching rows. These are both
620
- # empty when `hideValueRanges` in the request is false, or when
621
- # rowCount is zero.
622
- # Corresponds to the JSON property `maximums`
623
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
624
- attr_accessor :maximums
330
+ # The values of each pivot region.
331
+ # Corresponds to the JSON property `pivotValueRegions`
332
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
333
+ attr_accessor :pivot_value_regions
625
334
 
626
- # If sampling was enabled, this returns the total number of samples
627
- # read, one entry per date range
628
- # Corresponds to the JSON property `samplesReadCounts`
629
- # @return [Array<String>]
630
- attr_accessor :samples_read_counts
335
+ def initialize(**args)
336
+ update!(**args)
337
+ end
631
338
 
632
- # Minimum and maximum values seen over all matching rows. These are both
633
- # empty when `hideValueRanges` in the request is false, or when
634
- # rowCount is zero.
635
- # Corresponds to the JSON property `minimums`
636
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
637
- attr_accessor :minimums
339
+ # Update properties of this object
340
+ def update!(**args)
341
+ @values = args[:values] if args.key?(:values)
342
+ @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
343
+ end
344
+ end
638
345
 
639
- # There's one ReportRow for every unique combination of dimensions.
640
- # Corresponds to the JSON property `rows`
641
- # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
642
- attr_accessor :rows
346
+ # Defines a cohort group.
347
+ # For example:
348
+ # "cohortGroup": `
349
+ # "cohorts": [`
350
+ # "name": "cohort 1",
351
+ # "type": "FIRST_VISIT_DATE",
352
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
353
+ # `,`
354
+ # "name": "cohort 2"
355
+ # "type": "FIRST_VISIT_DATE"
356
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
357
+ # `]
358
+ # `
359
+ class CohortGroup
360
+ include Google::Apis::Core::Hashable
643
361
 
644
- # For each requested date range, for the set of all rows that match
645
- # the query, every requested value format gets a total. The total
646
- # for a value format is computed by first totaling the metrics
647
- # mentioned in the value format and then evaluating the value
648
- # format as a scalar expression. E.g., The "totals" for
649
- # `3 / (ga:sessions + 2)` we compute
650
- # `3 / ((sum of all relevant ga:sessions) + 2)`.
651
- # Totals are computed before pagination.
652
- # Corresponds to the JSON property `totals`
653
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
654
- attr_accessor :totals
362
+ # The definition for the cohort.
363
+ # Corresponds to the JSON property `cohorts`
364
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
365
+ attr_accessor :cohorts
655
366
 
656
- # Indicates if response to this request is golden or not. Data is
657
- # golden when the exact same request will not produce any new results if
658
- # asked at a later point in time.
659
- # Corresponds to the JSON property `isDataGolden`
367
+ # Enable Life Time Value (LTV). LTV measures lifetime value for users
368
+ # acquired through different channels.
369
+ # Please see:
370
+ # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
371
+ # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
372
+ # If the value of lifetimeValue is false:
373
+ # - The metric values are similar to the values in the web interface cohort
374
+ # report.
375
+ # - The cohort definition date ranges must be aligned to the calendar week
376
+ # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
377
+ # the cohort definition should be a Sunday and the `endDate` should be the
378
+ # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
379
+ # should be the 1st of the month and `endDate` should be the last day
380
+ # of the month.
381
+ # When the lifetimeValue is true:
382
+ # - The metric values will correspond to the values in the web interface
383
+ # LifeTime value report.
384
+ # - The Lifetime Value report shows you how user value (Revenue) and
385
+ # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
386
+ # grow during the 90 days after a user is acquired.
387
+ # - The metrics are calculated as a cumulative average per user per the time
388
+ # increment.
389
+ # - The cohort definition date ranges need not be aligned to the calendar
390
+ # week and month boundaries.
391
+ # - The `viewId` must be an
392
+ # [app view ID](https://support.google.com/analytics/answer/2649553#
393
+ # WebVersusAppViews)
394
+ # Corresponds to the JSON property `lifetimeValue`
660
395
  # @return [Boolean]
661
- attr_accessor :is_data_golden
662
- alias_method :is_data_golden?, :is_data_golden
396
+ attr_accessor :lifetime_value
397
+ alias_method :lifetime_value?, :lifetime_value
663
398
 
664
399
  def initialize(**args)
665
400
  update!(**args)
@@ -667,14 +402,8 @@ module Google
667
402
 
668
403
  # Update properties of this object
669
404
  def update!(**args)
670
- @row_count = args[:row_count] if args.key?(:row_count)
671
- @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
672
- @maximums = args[:maximums] if args.key?(:maximums)
673
- @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
674
- @minimums = args[:minimums] if args.key?(:minimums)
675
- @rows = args[:rows] if args.key?(:rows)
676
- @totals = args[:totals] if args.key?(:totals)
677
- @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
405
+ @cohorts = args[:cohorts] if args.key?(:cohorts)
406
+ @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
678
407
  end
679
408
  end
680
409
 
@@ -684,7 +413,7 @@ module Google
684
413
 
685
414
  # Requests, each request will have a separate response.
686
415
  # There can be a maximum of 5 requests. All requests should have the same
687
- # `dateRange`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
416
+ # `dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
688
417
  # Corresponds to the JSON property `reportRequests`
689
418
  # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRequest>]
690
419
  attr_accessor :report_requests
@@ -699,87 +428,57 @@ module Google
699
428
  end
700
429
  end
701
430
 
702
- # Specifies the sorting options.
703
- class OrderBy
704
- include Google::Apis::Core::Hashable
705
-
706
- # The sorting order for the field.
707
- # Corresponds to the JSON property `sortOrder`
708
- # @return [String]
709
- attr_accessor :sort_order
710
-
711
- # The order type. The default orderType is `VALUE`.
712
- # Corresponds to the JSON property `orderType`
713
- # @return [String]
714
- attr_accessor :order_type
715
-
716
- # The field which to sort by. The default sort order is ascending. Example:
717
- # `ga:browser`.
718
- # Note, that you can only specify one field for sort here. For example,
719
- # `ga:browser, ga:city` is not valid.
720
- # Corresponds to the JSON property `fieldName`
721
- # @return [String]
722
- attr_accessor :field_name
723
-
724
- def initialize(**args)
725
- update!(**args)
726
- end
727
-
728
- # Update properties of this object
729
- def update!(**args)
730
- @sort_order = args[:sort_order] if args.key?(:sort_order)
731
- @order_type = args[:order_type] if args.key?(:order_type)
732
- @field_name = args[:field_name] if args.key?(:field_name)
733
- end
734
- end
735
-
736
- # Defines a cohort. A cohort is a group of users who share a common
737
- # characteristic. For example, all users with the same acquisition date
738
- # belong to the same cohort.
739
- class Cohort
431
+ # The Pivot describes the pivot section in the request.
432
+ # The Pivot helps rearrange the information in the table for certain reports
433
+ # by pivoting your data on a second dimension.
434
+ class Pivot
740
435
  include Google::Apis::Core::Hashable
741
436
 
742
- # Type of the cohort. The only supported type as of now is
743
- # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated
744
- # as `FIRST_VISIT_DATE` type cohort.
745
- # Corresponds to the JSON property `type`
746
- # @return [String]
747
- attr_accessor :type
748
-
749
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
750
- # The start and end dates are specified in
751
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
752
- # Corresponds to the JSON property `dateRange`
753
- # @return [Google::Apis::AnalyticsreportingV4::DateRange]
754
- attr_accessor :date_range
755
-
756
- # A unique name for the cohort. If not defined name will be auto-generated
757
- # with values cohort_[1234...].
758
- # Corresponds to the JSON property `name`
759
- # @return [String]
760
- attr_accessor :name
437
+ # Specifies the maximum number of groups to return.
438
+ # The default value is 10, also the maximum value is 1,000.
439
+ # Corresponds to the JSON property `maxGroupCount`
440
+ # @return [Fixnum]
441
+ attr_accessor :max_group_count
761
442
 
762
- def initialize(**args)
763
- update!(**args)
764
- end
443
+ # If k metrics were requested, then the response will contain some
444
+ # data-dependent multiple of k columns in the report. E.g., if you pivoted
445
+ # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
446
+ # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
447
+ # of columns is determined by descending order of "total" for the first of
448
+ # the k values. Ties are broken by lexicographic ordering of the first
449
+ # pivot dimension, then lexicographic ordering of the second pivot
450
+ # dimension, and so on. E.g., if the totals for the first value for
451
+ # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
452
+ # would be Chrome, Firefox, IE.
453
+ # The following let you choose which of the groups of k columns are
454
+ # included in the response.
455
+ # Corresponds to the JSON property `startGroup`
456
+ # @return [Fixnum]
457
+ attr_accessor :start_group
765
458
 
766
- # Update properties of this object
767
- def update!(**args)
768
- @type = args[:type] if args.key?(:type)
769
- @date_range = args[:date_range] if args.key?(:date_range)
770
- @name = args[:name] if args.key?(:name)
771
- end
772
- end
459
+ # The pivot metrics. Pivot metrics are part of the
460
+ # restriction on total number of metrics allowed in the request.
461
+ # Corresponds to the JSON property `metrics`
462
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
463
+ attr_accessor :metrics
773
464
 
774
- # A list of segment filters in the `OR` group are combined with the logical OR
775
- # operator.
776
- class OrFiltersForSegment
777
- include Google::Apis::Core::Hashable
465
+ # A list of dimensions to show as pivot columns. A Pivot can have a maximum
466
+ # of 4 dimensions. Pivot dimensions are part of the restriction on the
467
+ # total number of dimensions allowed in the request.
468
+ # Corresponds to the JSON property `dimensions`
469
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
470
+ attr_accessor :dimensions
778
471
 
779
- # List of segment filters to be combined with a `OR` operator.
780
- # Corresponds to the JSON property `segmentFilterClauses`
781
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilterClause>]
782
- attr_accessor :segment_filter_clauses
472
+ # DimensionFilterClauses are logically combined with an `AND` operator: only
473
+ # data that is included by all these DimensionFilterClauses contributes to
474
+ # the values in this pivot region. Dimension filters can be used to restrict
475
+ # the columns shown in the pivot region. For example if you have
476
+ # `ga:browser` as the requested dimension in the pivot region, and you
477
+ # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
478
+ # then only those two browsers would show up as columns.
479
+ # Corresponds to the JSON property `dimensionFilterClauses`
480
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
481
+ attr_accessor :dimension_filter_clauses
783
482
 
784
483
  def initialize(**args)
785
484
  update!(**args)
@@ -787,27 +486,33 @@ module Google
787
486
 
788
487
  # Update properties of this object
789
488
  def update!(**args)
790
- @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses)
489
+ @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
490
+ @start_group = args[:start_group] if args.key?(:start_group)
491
+ @metrics = args[:metrics] if args.key?(:metrics)
492
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
493
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
791
494
  end
792
495
  end
793
496
 
794
- # Sequence conditions consist of one or more steps, where each step is defined
795
- # by one or more dimension/metric conditions. Multiple steps can be combined
796
- # with special sequence operators.
797
- class SequenceSegment
497
+ # The headers for the each of the metric column corresponding to the metrics
498
+ # requested in the pivots section of the response.
499
+ class PivotHeaderEntry
798
500
  include Google::Apis::Core::Hashable
799
501
 
800
- # If set, first step condition must match the first hit of the visitor (in
801
- # the date range).
802
- # Corresponds to the JSON property `firstStepShouldMatchFirstHit`
803
- # @return [Boolean]
804
- attr_accessor :first_step_should_match_first_hit
805
- alias_method :first_step_should_match_first_hit?, :first_step_should_match_first_hit
502
+ # The name of the dimensions in the pivot response.
503
+ # Corresponds to the JSON property `dimensionNames`
504
+ # @return [Array<String>]
505
+ attr_accessor :dimension_names
806
506
 
807
- # The list of steps in the sequence.
808
- # Corresponds to the JSON property `segmentSequenceSteps`
809
- # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentSequenceStep>]
810
- attr_accessor :segment_sequence_steps
507
+ # Header for the metrics.
508
+ # Corresponds to the JSON property `metric`
509
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
510
+ attr_accessor :metric
511
+
512
+ # The values for the dimensions in the pivot.
513
+ # Corresponds to the JSON property `dimensionValues`
514
+ # @return [Array<String>]
515
+ attr_accessor :dimension_values
811
516
 
812
517
  def initialize(**args)
813
518
  update!(**args)
@@ -815,8 +520,9 @@ module Google
815
520
 
816
521
  # Update properties of this object
817
522
  def update!(**args)
818
- @first_step_should_match_first_hit = args[:first_step_should_match_first_hit] if args.key?(:first_step_should_match_first_hit)
819
- @segment_sequence_steps = args[:segment_sequence_steps] if args.key?(:segment_sequence_steps)
523
+ @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
524
+ @metric = args[:metric] if args.key?(:metric)
525
+ @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
820
526
  end
821
527
  end
822
528
 
@@ -875,26 +581,16 @@ module Google
875
581
  end
876
582
  end
877
583
 
878
- # The headers for the each of the metric column corresponding to the metrics
879
- # requested in the pivots section of the response.
880
- class PivotHeaderEntry
584
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
585
+ # are combined together with a logical `AND` operation.
586
+ class SegmentDefinition
881
587
  include Google::Apis::Core::Hashable
882
588
 
883
- # The name of the dimensions in the pivotDimensionValues field in the
884
- # response.
885
- # Corresponds to the JSON property `dimensionNames`
886
- # @return [Array<String>]
887
- attr_accessor :dimension_names
888
-
889
- # The values for the dimensions in the pivot.
890
- # Corresponds to the JSON property `dimensionValues`
891
- # @return [Array<String>]
892
- attr_accessor :dimension_values
893
-
894
- # Header for the metrics.
895
- # Corresponds to the JSON property `metric`
896
- # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry]
897
- attr_accessor :metric
589
+ # A segment is defined by a set of segment filters which are combined
590
+ # together with a logical `AND` operation.
591
+ # Corresponds to the JSON property `segmentFilters`
592
+ # @return [Array<Google::Apis::AnalyticsreportingV4::SegmentFilter>]
593
+ attr_accessor :segment_filters
898
594
 
899
595
  def initialize(**args)
900
596
  update!(**args)
@@ -902,28 +598,23 @@ module Google
902
598
 
903
599
  # Update properties of this object
904
600
  def update!(**args)
905
- @dimension_names = args[:dimension_names] if args.key?(:dimension_names)
906
- @dimension_values = args[:dimension_values] if args.key?(:dimension_values)
907
- @metric = args[:metric] if args.key?(:metric)
601
+ @segment_filters = args[:segment_filters] if args.key?(:segment_filters)
908
602
  end
909
603
  end
910
604
 
911
- # A group of dimension filters. Set the operator value to specify how
912
- # the filters are logically combined.
913
- class DimensionFilterClause
605
+ # Header for the metrics.
606
+ class MetricHeaderEntry
914
607
  include Google::Apis::Core::Hashable
915
608
 
916
- # The operator for combining multiple dimension filters. If unspecified, it
917
- # is treated as an `OR`.
918
- # Corresponds to the JSON property `operator`
609
+ # The type of the metric, for example `INTEGER`.
610
+ # Corresponds to the JSON property `type`
919
611
  # @return [String]
920
- attr_accessor :operator
612
+ attr_accessor :type
921
613
 
922
- # The repeated set of filters. They are logically combined based on the
923
- # operator specified.
924
- # Corresponds to the JSON property `filters`
925
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilter>]
926
- attr_accessor :filters
614
+ # The name of the header.
615
+ # Corresponds to the JSON property `name`
616
+ # @return [String]
617
+ attr_accessor :name
927
618
 
928
619
  def initialize(**args)
929
620
  update!(**args)
@@ -931,26 +622,85 @@ module Google
931
622
 
932
623
  # Update properties of this object
933
624
  def update!(**args)
934
- @operator = args[:operator] if args.key?(:operator)
935
- @filters = args[:filters] if args.key?(:filters)
625
+ @type = args[:type] if args.key?(:type)
626
+ @name = args[:name] if args.key?(:name)
936
627
  end
937
628
  end
938
629
 
939
- # A segment sequence definition.
940
- class SegmentSequenceStep
630
+ # The data part of the report.
631
+ class ReportData
941
632
  include Google::Apis::Core::Hashable
942
633
 
943
- # Specifies if the step immediately precedes or can be any time before the
944
- # next step.
945
- # Corresponds to the JSON property `matchType`
634
+ # Minimum and maximum values seen over all matching rows. These are both
635
+ # empty when `hideValueRanges` in the request is false, or when
636
+ # rowCount is zero.
637
+ # Corresponds to the JSON property `minimums`
638
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
639
+ attr_accessor :minimums
640
+
641
+ # If the results are
642
+ # [sampled](https://support.google.com/analytics/answer/2637192),
643
+ # this returns the total number of
644
+ # samples present, one entry per date range. If the results are not sampled
645
+ # this field will not be defined. See
646
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
647
+ # for details.
648
+ # Corresponds to the JSON property `samplingSpaceSizes`
649
+ # @return [Array<String>]
650
+ attr_accessor :sampling_space_sizes
651
+
652
+ # For each requested date range, for the set of all rows that match
653
+ # the query, every requested value format gets a total. The total
654
+ # for a value format is computed by first totaling the metrics
655
+ # mentioned in the value format and then evaluating the value
656
+ # format as a scalar expression. E.g., The "totals" for
657
+ # `3 / (ga:sessions + 2)` we compute
658
+ # `3 / ((sum of all relevant ga:sessions) + 2)`.
659
+ # Totals are computed before pagination.
660
+ # Corresponds to the JSON property `totals`
661
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
662
+ attr_accessor :totals
663
+
664
+ # If the results are
665
+ # [sampled](https://support.google.com/analytics/answer/2637192),
666
+ # this returns the total number of samples read, one entry per date range.
667
+ # If the results are not sampled this field will not be defined. See
668
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
669
+ # for details.
670
+ # Corresponds to the JSON property `samplesReadCounts`
671
+ # @return [Array<String>]
672
+ attr_accessor :samples_read_counts
673
+
674
+ # Indicates if response to this request is golden or not. Data is
675
+ # golden when the exact same request will not produce any new results if
676
+ # asked at a later point in time.
677
+ # Corresponds to the JSON property `isDataGolden`
678
+ # @return [Boolean]
679
+ attr_accessor :is_data_golden
680
+ alias_method :is_data_golden?, :is_data_golden
681
+
682
+ # There's one ReportRow for every unique combination of dimensions.
683
+ # Corresponds to the JSON property `rows`
684
+ # @return [Array<Google::Apis::AnalyticsreportingV4::ReportRow>]
685
+ attr_accessor :rows
686
+
687
+ # Total number of matching rows for this query.
688
+ # Corresponds to the JSON property `rowCount`
689
+ # @return [Fixnum]
690
+ attr_accessor :row_count
691
+
692
+ # The last time the data in the report was refreshed. All the hits received
693
+ # before this timestamp are included in the calculation of the report.
694
+ # Corresponds to the JSON property `dataLastRefreshed`
946
695
  # @return [String]
947
- attr_accessor :match_type
696
+ attr_accessor :data_last_refreshed
948
697
 
949
- # A sequence is specified with a list of Or grouped filters which are
950
- # combined with `AND` operator.
951
- # Corresponds to the JSON property `orFiltersForSegment`
952
- # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
953
- attr_accessor :or_filters_for_segment
698
+ # Minimum and maximum values seen over all matching rows. These are both
699
+ # empty when `hideValueRanges` in the request is false, or when
700
+ # rowCount is zero.
701
+ # Corresponds to the JSON property `maximums`
702
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
703
+ attr_accessor :maximums
954
704
 
955
705
  def initialize(**args)
956
706
  update!(**args)
@@ -958,59 +708,52 @@ module Google
958
708
 
959
709
  # Update properties of this object
960
710
  def update!(**args)
961
- @match_type = args[:match_type] if args.key?(:match_type)
962
- @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
711
+ @minimums = args[:minimums] if args.key?(:minimums)
712
+ @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes)
713
+ @totals = args[:totals] if args.key?(:totals)
714
+ @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts)
715
+ @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden)
716
+ @rows = args[:rows] if args.key?(:rows)
717
+ @row_count = args[:row_count] if args.key?(:row_count)
718
+ @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
719
+ @maximums = args[:maximums] if args.key?(:maximums)
963
720
  end
964
721
  end
965
722
 
966
- # The Pivot describes the pivot section in the request.
967
- # The Pivot helps rearrange the information in the table for certain reports
968
- # by pivoting your data on a second dimension.
969
- class Pivot
723
+ # Dimension filter specifies the filtering options on a dimension.
724
+ class DimensionFilter
970
725
  include Google::Apis::Core::Hashable
971
726
 
972
- # A list of dimensions to show as pivot columns.
973
- # Corresponds to the JSON property `dimensions`
974
- # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
975
- attr_accessor :dimensions
727
+ # Should the match be case sensitive? Default is false.
728
+ # Corresponds to the JSON property `caseSensitive`
729
+ # @return [Boolean]
730
+ attr_accessor :case_sensitive
731
+ alias_method :case_sensitive?, :case_sensitive
976
732
 
977
- # Metrics to aggregate and return.
978
- # Corresponds to the JSON property `metrics`
979
- # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
980
- attr_accessor :metrics
733
+ # The dimension to filter on. A DimensionFilter must contain a dimension.
734
+ # Corresponds to the JSON property `dimensionName`
735
+ # @return [String]
736
+ attr_accessor :dimension_name
981
737
 
982
- # Specifies the maximum number of groups to return.
983
- # The default value is 10, also the maximum value is 1,000.
984
- # Corresponds to the JSON property `maxGroupCount`
985
- # @return [Fixnum]
986
- attr_accessor :max_group_count
738
+ # How to match the dimension to the expression. The default is REGEXP.
739
+ # Corresponds to the JSON property `operator`
740
+ # @return [String]
741
+ attr_accessor :operator
987
742
 
988
- # DimensionFilterClauses are logically combined with an `AND` operator: only
989
- # data that is included by all these DimensionFilterClauses contributes to
990
- # the values in this pivot region. Dimension filters can be used to restrict
991
- # the columns shown in the pivot region. For example if you have
992
- # `ga:browser` as the requested dimension in the pivot region, and you
993
- # specify key filters to restrict `ga:browser` to only "IE" or "Firefox",
994
- # then only those two browsers would show up as columns.
995
- # Corresponds to the JSON property `dimensionFilterClauses`
996
- # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
997
- attr_accessor :dimension_filter_clauses
743
+ # Logical `NOT` operator. If this boolean is set to true, then the matching
744
+ # dimension values will be excluded in the report. The default is false.
745
+ # Corresponds to the JSON property `not`
746
+ # @return [Boolean]
747
+ attr_accessor :not
748
+ alias_method :not?, :not
998
749
 
999
- # If k metrics were requested, then the response will contain some
1000
- # data-dependent multiple of k columns in the report. E.g., if you pivoted
1001
- # on the dimension `ga:browser` then you'd get k columns for "Firefox", k
1002
- # columns for "IE", k columns for "Chrome", etc. The ordering of the groups
1003
- # of columns is determined by descending order of "total" for the first of
1004
- # the k values. Ties are broken by lexicographic ordering of the first
1005
- # pivot dimension, then lexicographic ordering of the second pivot
1006
- # dimension, and so on. E.g., if the totals for the first value for
1007
- # Firefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns
1008
- # would be Chrome, Firefox, IE.
1009
- # The following let you choose which of the groups of k columns are
1010
- # included in the response.
1011
- # Corresponds to the JSON property `startGroup`
1012
- # @return [Fixnum]
1013
- attr_accessor :start_group
750
+ # Strings or regular expression to match against. Only the first value of
751
+ # the list is used for comparison unless the operator is `IN_LIST`.
752
+ # If `IN_LIST` operator, then the entire list is used to filter the
753
+ # dimensions as explained in the description of the `IN_LIST` operator.
754
+ # Corresponds to the JSON property `expressions`
755
+ # @return [Array<String>]
756
+ attr_accessor :expressions
1014
757
 
1015
758
  def initialize(**args)
1016
759
  update!(**args)
@@ -1018,28 +761,48 @@ module Google
1018
761
 
1019
762
  # Update properties of this object
1020
763
  def update!(**args)
1021
- @dimensions = args[:dimensions] if args.key?(:dimensions)
1022
- @metrics = args[:metrics] if args.key?(:metrics)
1023
- @max_group_count = args[:max_group_count] if args.key?(:max_group_count)
1024
- @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1025
- @start_group = args[:start_group] if args.key?(:start_group)
764
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
765
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
766
+ @operator = args[:operator] if args.key?(:operator)
767
+ @not = args[:not] if args.key?(:not)
768
+ @expressions = args[:expressions] if args.key?(:expressions)
1026
769
  end
1027
770
  end
1028
771
 
1029
- # Used to return a list of metrics for a single DateRange / dimension
1030
- # combination
1031
- class DateRangeValues
1032
- include Google::Apis::Core::Hashable
772
+ # Dimension filter specifies the filtering options on a dimension.
773
+ class SegmentDimensionFilter
774
+ include Google::Apis::Core::Hashable
775
+
776
+ # Minimum comparison values for `BETWEEN` match type.
777
+ # Corresponds to the JSON property `minComparisonValue`
778
+ # @return [String]
779
+ attr_accessor :min_comparison_value
780
+
781
+ # Maximum comparison values for `BETWEEN` match type.
782
+ # Corresponds to the JSON property `maxComparisonValue`
783
+ # @return [String]
784
+ attr_accessor :max_comparison_value
785
+
786
+ # Name of the dimension for which the filter is being applied.
787
+ # Corresponds to the JSON property `dimensionName`
788
+ # @return [String]
789
+ attr_accessor :dimension_name
790
+
791
+ # The operator to use to match the dimension with the expressions.
792
+ # Corresponds to the JSON property `operator`
793
+ # @return [String]
794
+ attr_accessor :operator
1033
795
 
1034
- # Each value corresponds to each Metric in the request.
1035
- # Corresponds to the JSON property `values`
796
+ # The list of expressions, only the first element is used for all operators
797
+ # Corresponds to the JSON property `expressions`
1036
798
  # @return [Array<String>]
1037
- attr_accessor :values
799
+ attr_accessor :expressions
1038
800
 
1039
- # The values of each pivot region.
1040
- # Corresponds to the JSON property `pivotValueRegions`
1041
- # @return [Array<Google::Apis::AnalyticsreportingV4::PivotValueRegion>]
1042
- attr_accessor :pivot_value_regions
801
+ # Should the match be case sensitive, ignored for `IN_LIST` operator.
802
+ # Corresponds to the JSON property `caseSensitive`
803
+ # @return [Boolean]
804
+ attr_accessor :case_sensitive
805
+ alias_method :case_sensitive?, :case_sensitive
1043
806
 
1044
807
  def initialize(**args)
1045
808
  update!(**args)
@@ -1047,27 +810,36 @@ module Google
1047
810
 
1048
811
  # Update properties of this object
1049
812
  def update!(**args)
1050
- @values = args[:values] if args.key?(:values)
1051
- @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions)
813
+ @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value)
814
+ @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value)
815
+ @dimension_name = args[:dimension_name] if args.key?(:dimension_name)
816
+ @operator = args[:operator] if args.key?(:operator)
817
+ @expressions = args[:expressions] if args.key?(:expressions)
818
+ @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive)
1052
819
  end
1053
820
  end
1054
821
 
1055
- # Represents a group of metric filters.
1056
- # Set the operator value to specify how the filters are logically combined.
1057
- class MetricFilterClause
822
+ # Specifies the sorting options.
823
+ class OrderBy
1058
824
  include Google::Apis::Core::Hashable
1059
825
 
1060
- # The operator for combining multiple metric filters. If unspecified, it is
1061
- # treated as an `OR`.
1062
- # Corresponds to the JSON property `operator`
826
+ # The field which to sort by. The default sort order is ascending. Example:
827
+ # `ga:browser`.
828
+ # Note, that you can only specify one field for sort here. For example,
829
+ # `ga:browser, ga:city` is not valid.
830
+ # Corresponds to the JSON property `fieldName`
1063
831
  # @return [String]
1064
- attr_accessor :operator
832
+ attr_accessor :field_name
1065
833
 
1066
- # The repeated set of filters. They are logically combined based on the
1067
- # operator specified.
1068
- # Corresponds to the JSON property `filters`
1069
- # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilter>]
1070
- attr_accessor :filters
834
+ # The order type. The default orderType is `VALUE`.
835
+ # Corresponds to the JSON property `orderType`
836
+ # @return [String]
837
+ attr_accessor :order_type
838
+
839
+ # The sorting order for the field.
840
+ # Corresponds to the JSON property `sortOrder`
841
+ # @return [String]
842
+ attr_accessor :sort_order
1071
843
 
1072
844
  def initialize(**args)
1073
845
  update!(**args)
@@ -1075,8 +847,9 @@ module Google
1075
847
 
1076
848
  # Update properties of this object
1077
849
  def update!(**args)
1078
- @operator = args[:operator] if args.key?(:operator)
1079
- @filters = args[:filters] if args.key?(:filters)
850
+ @field_name = args[:field_name] if args.key?(:field_name)
851
+ @order_type = args[:order_type] if args.key?(:order_type)
852
+ @sort_order = args[:sort_order] if args.key?(:sort_order)
1080
853
  end
1081
854
  end
1082
855
 
@@ -1108,21 +881,65 @@ module Google
1108
881
  end
1109
882
  end
1110
883
 
1111
- # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
1112
- # The start and end dates are specified in
1113
- # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
1114
- class DateRange
884
+ # A segment sequence definition.
885
+ class SegmentSequenceStep
1115
886
  include Google::Apis::Core::Hashable
1116
887
 
1117
- # The start date for the query in the format `YYYY-MM-DD`.
1118
- # Corresponds to the JSON property `startDate`
888
+ # A sequence is specified with a list of Or grouped filters which are
889
+ # combined with `AND` operator.
890
+ # Corresponds to the JSON property `orFiltersForSegment`
891
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
892
+ attr_accessor :or_filters_for_segment
893
+
894
+ # Specifies if the step immediately precedes or can be any time before the
895
+ # next step.
896
+ # Corresponds to the JSON property `matchType`
1119
897
  # @return [String]
1120
- attr_accessor :start_date
898
+ attr_accessor :match_type
1121
899
 
1122
- # The end date for the query in the format `YYYY-MM-DD`.
1123
- # Corresponds to the JSON property `endDate`
900
+ def initialize(**args)
901
+ update!(**args)
902
+ end
903
+
904
+ # Update properties of this object
905
+ def update!(**args)
906
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
907
+ @match_type = args[:match_type] if args.key?(:match_type)
908
+ end
909
+ end
910
+
911
+ # [Metrics](https://support.google.com/analytics/answer/1033861)
912
+ # are the quantitative measurements. For example, the metric `ga:users`
913
+ # indicates the total number of users for the requested time period.
914
+ class Metric
915
+ include Google::Apis::Core::Hashable
916
+
917
+ # A metric expression in the request. An expression is constructed from one
918
+ # or more metrics and numbers. Accepted operators include: Plus (+), Minus
919
+ # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
920
+ # Positive cardinal numbers (0-9), can include decimals and is limited to
921
+ # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
922
+ # metric expression is just a single metric name like `ga:users`.
923
+ # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics
924
+ # will result in unexpected results.
925
+ # Corresponds to the JSON property `expression`
1124
926
  # @return [String]
1125
- attr_accessor :end_date
927
+ attr_accessor :expression
928
+
929
+ # Specifies how the metric expression should be formatted, for example
930
+ # `INTEGER`.
931
+ # Corresponds to the JSON property `formattingType`
932
+ # @return [String]
933
+ attr_accessor :formatting_type
934
+
935
+ # An alias for the metric expression is an alternate name for the
936
+ # expression. The alias can be used for filtering and sorting. This field
937
+ # is optional and is useful if the expression is not a single metric but
938
+ # a complex expression which cannot be used in filtering and sorting.
939
+ # The alias is also used in the response column header.
940
+ # Corresponds to the JSON property `alias`
941
+ # @return [String]
942
+ attr_accessor :alias
1126
943
 
1127
944
  def initialize(**args)
1128
945
  update!(**args)
@@ -1130,24 +947,20 @@ module Google
1130
947
 
1131
948
  # Update properties of this object
1132
949
  def update!(**args)
1133
- @start_date = args[:start_date] if args.key?(:start_date)
1134
- @end_date = args[:end_date] if args.key?(:end_date)
950
+ @expression = args[:expression] if args.key?(:expression)
951
+ @formatting_type = args[:formatting_type] if args.key?(:formatting_type)
952
+ @alias = args[:alias] if args.key?(:alias)
1135
953
  end
1136
954
  end
1137
955
 
1138
- # A row in the report.
1139
- class ReportRow
956
+ # The metric values in the pivot region.
957
+ class PivotValueRegion
1140
958
  include Google::Apis::Core::Hashable
1141
959
 
1142
- # List of requested dimensions.
1143
- # Corresponds to the JSON property `dimensions`
960
+ # The values of the metrics in each of the pivot regions.
961
+ # Corresponds to the JSON property `values`
1144
962
  # @return [Array<String>]
1145
- attr_accessor :dimensions
1146
-
1147
- # List of metrics for each requested DateRange
1148
- # Corresponds to the JSON property `metrics`
1149
- # @return [Array<Google::Apis::AnalyticsreportingV4::DateRangeValues>]
1150
- attr_accessor :metrics
963
+ attr_accessor :values
1151
964
 
1152
965
  def initialize(**args)
1153
966
  update!(**args)
@@ -1155,63 +968,28 @@ module Google
1155
968
 
1156
969
  # Update properties of this object
1157
970
  def update!(**args)
1158
- @dimensions = args[:dimensions] if args.key?(:dimensions)
1159
- @metrics = args[:metrics] if args.key?(:metrics)
971
+ @values = args[:values] if args.key?(:values)
1160
972
  end
1161
973
  end
1162
974
 
1163
- # Defines a cohort group.
1164
- # For example:
1165
- # "cohortGroup": `
1166
- # "cohorts": [`
1167
- # "name": "cohort 1",
1168
- # "type": "FIRST_VISIT_DATE",
1169
- # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
1170
- # `,`
1171
- # "name": "cohort 2"
1172
- # "type": "FIRST_VISIT_DATE"
1173
- # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
1174
- # `]
1175
- # `
1176
- class CohortGroup
975
+ # The data response corresponding to the request.
976
+ class Report
1177
977
  include Google::Apis::Core::Hashable
1178
978
 
1179
- # Enable Life Time Value (LTV). LTV measures lifetime value for users
1180
- # acquired through different channels.
1181
- # Please see:
1182
- # [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and
1183
- # [Lifetime Value](https://support.google.com/analytics/answer/6182550)
1184
- # If the value of lifetimeValue is false:
1185
- # - The metric values are similar to the values in the web interface cohort
1186
- # report.
1187
- # - The cohort definition date ranges must be aligned to the calendar week
1188
- # and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in
1189
- # the cohort definition should be a Sunday and the `endDate` should be the
1190
- # following Saturday, and for `ga:cohortNthMonth`, the `startDate`
1191
- # should be the 1st of the month and `endDate` should be the last day
1192
- # of the month.
1193
- # When the lifetimeValue is true:
1194
- # - The metric values will correspond to the values in the web interface
1195
- # LifeTime value report.
1196
- # - The Lifetime Value report shows you how user value (Revenue) and
1197
- # engagement (Appviews, Goal Completions, Sessions, and Session Duration)
1198
- # grow during the 90 days after a user is acquired.
1199
- # - The metrics are calculated as a cumulative average per user per the time
1200
- # increment.
1201
- # - The cohort definition date ranges need not be aligned to the calendar
1202
- # week and month boundaries.
1203
- # - The `viewId` must be an
1204
- # [app view ID](https://support.google.com/analytics/answer/2649553#
1205
- # WebVersusAppViews)
1206
- # Corresponds to the JSON property `lifetimeValue`
1207
- # @return [Boolean]
1208
- attr_accessor :lifetime_value
1209
- alias_method :lifetime_value?, :lifetime_value
979
+ # The data part of the report.
980
+ # Corresponds to the JSON property `data`
981
+ # @return [Google::Apis::AnalyticsreportingV4::ReportData]
982
+ attr_accessor :data
1210
983
 
1211
- # The definition for the cohort.
1212
- # Corresponds to the JSON property `cohorts`
1213
- # @return [Array<Google::Apis::AnalyticsreportingV4::Cohort>]
1214
- attr_accessor :cohorts
984
+ # Page token to retrieve the next page of results in the list.
985
+ # Corresponds to the JSON property `nextPageToken`
986
+ # @return [String]
987
+ attr_accessor :next_page_token
988
+
989
+ # Column headers.
990
+ # Corresponds to the JSON property `columnHeader`
991
+ # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader]
992
+ attr_accessor :column_header
1215
993
 
1216
994
  def initialize(**args)
1217
995
  update!(**args)
@@ -1219,20 +997,25 @@ module Google
1219
997
 
1220
998
  # Update properties of this object
1221
999
  def update!(**args)
1222
- @lifetime_value = args[:lifetime_value] if args.key?(:lifetime_value)
1223
- @cohorts = args[:cohorts] if args.key?(:cohorts)
1000
+ @data = args[:data] if args.key?(:data)
1001
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1002
+ @column_header = args[:column_header] if args.key?(:column_header)
1224
1003
  end
1225
1004
  end
1226
1005
 
1227
- # The main response class which holds the reports from the Reporting API
1228
- # `batchGet` call.
1229
- class GetReportsResponse
1006
+ # The headers for each of the pivot sections defined in the request.
1007
+ class PivotHeader
1230
1008
  include Google::Apis::Core::Hashable
1231
1009
 
1232
- # Responses corresponding to each of the request.
1233
- # Corresponds to the JSON property `reports`
1234
- # @return [Array<Google::Apis::AnalyticsreportingV4::Report>]
1235
- attr_accessor :reports
1010
+ # A single pivot section header.
1011
+ # Corresponds to the JSON property `pivotHeaderEntries`
1012
+ # @return [Array<Google::Apis::AnalyticsreportingV4::PivotHeaderEntry>]
1013
+ attr_accessor :pivot_header_entries
1014
+
1015
+ # The total number of groups for this pivot.
1016
+ # Corresponds to the JSON property `totalPivotGroupsCount`
1017
+ # @return [Fixnum]
1018
+ attr_accessor :total_pivot_groups_count
1236
1019
 
1237
1020
  def initialize(**args)
1238
1021
  update!(**args)
@@ -1240,23 +1023,26 @@ module Google
1240
1023
 
1241
1024
  # Update properties of this object
1242
1025
  def update!(**args)
1243
- @reports = args[:reports] if args.key?(:reports)
1026
+ @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries)
1027
+ @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count)
1244
1028
  end
1245
1029
  end
1246
1030
 
1247
- # Header for the metrics.
1248
- class MetricHeaderEntry
1031
+ # A contiguous set of days: startDate, startDate + 1 day, ..., endDate.
1032
+ # The start and end dates are specified in
1033
+ # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
1034
+ class DateRange
1249
1035
  include Google::Apis::Core::Hashable
1250
1036
 
1251
- # The type of the metric, for example `INTEGER`.
1252
- # Corresponds to the JSON property `type`
1037
+ # The start date for the query in the format `YYYY-MM-DD`.
1038
+ # Corresponds to the JSON property `startDate`
1253
1039
  # @return [String]
1254
- attr_accessor :type
1040
+ attr_accessor :start_date
1255
1041
 
1256
- # The name of the header.
1257
- # Corresponds to the JSON property `name`
1042
+ # The end date for the query in the format `YYYY-MM-DD`.
1043
+ # Corresponds to the JSON property `endDate`
1258
1044
  # @return [String]
1259
- attr_accessor :name
1045
+ attr_accessor :end_date
1260
1046
 
1261
1047
  def initialize(**args)
1262
1048
  update!(**args)
@@ -1264,8 +1050,8 @@ module Google
1264
1050
 
1265
1051
  # Update properties of this object
1266
1052
  def update!(**args)
1267
- @type = args[:type] if args.key?(:type)
1268
- @name = args[:name] if args.key?(:name)
1053
+ @start_date = args[:start_date] if args.key?(:start_date)
1054
+ @end_date = args[:end_date] if args.key?(:end_date)
1269
1055
  end
1270
1056
  end
1271
1057
 
@@ -1280,6 +1066,11 @@ module Google
1280
1066
  # @return [String]
1281
1067
  attr_accessor :metric_name
1282
1068
 
1069
+ # The value to compare against.
1070
+ # Corresponds to the JSON property `comparisonValue`
1071
+ # @return [String]
1072
+ attr_accessor :comparison_value
1073
+
1283
1074
  # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the
1284
1075
  # comparisonValue, the default is `EQUAL`. If the operator is
1285
1076
  # `IS_MISSING`, checks if the metric is missing and would ignore the
@@ -1288,11 +1079,6 @@ module Google
1288
1079
  # @return [String]
1289
1080
  attr_accessor :operator
1290
1081
 
1291
- # The value to compare against.
1292
- # Corresponds to the JSON property `comparisonValue`
1293
- # @return [String]
1294
- attr_accessor :comparison_value
1295
-
1296
1082
  # Logical `NOT` operator. If this boolean is set to true, then the matching
1297
1083
  # metric values will be excluded in the report. The default is false.
1298
1084
  # Corresponds to the JSON property `not`
@@ -1307,13 +1093,201 @@ module Google
1307
1093
  # Update properties of this object
1308
1094
  def update!(**args)
1309
1095
  @metric_name = args[:metric_name] if args.key?(:metric_name)
1310
- @operator = args[:operator] if args.key?(:operator)
1311
1096
  @comparison_value = args[:comparison_value] if args.key?(:comparison_value)
1097
+ @operator = args[:operator] if args.key?(:operator)
1312
1098
  @not = args[:not] if args.key?(:not)
1313
1099
  end
1314
1100
  end
1315
1101
 
1316
- # A dimension in the request.
1102
+ # The main request class which specifies the Reporting API request.
1103
+ class ReportRequest
1104
+ include Google::Apis::Core::Hashable
1105
+
1106
+ # The metric filter clauses. They are logically combined with the `AND`
1107
+ # operator. Metric filters look at only the first date range and not the
1108
+ # comparing date range. Note that filtering on metrics occurs after the
1109
+ # metrics are aggregated.
1110
+ # Corresponds to the JSON property `metricFilterClauses`
1111
+ # @return [Array<Google::Apis::AnalyticsreportingV4::MetricFilterClause>]
1112
+ attr_accessor :metric_filter_clauses
1113
+
1114
+ # Page size is for paging and specifies the maximum number of returned rows.
1115
+ # Page size should be >= 0. A query returns the default of 1,000 rows.
1116
+ # The Analytics Core Reporting API returns a maximum of 10,000 rows per
1117
+ # request, no matter how many you ask for. It can also return fewer rows
1118
+ # than requested, if there aren't as many dimension segments as you expect.
1119
+ # For instance, there are fewer than 300 possible values for `ga:country`,
1120
+ # so when segmenting only by country, you can't get more than 300 rows,
1121
+ # even if you set `pageSize` to a higher value.
1122
+ # Corresponds to the JSON property `pageSize`
1123
+ # @return [Fixnum]
1124
+ attr_accessor :page_size
1125
+
1126
+ # If set to true, hides the total of all metrics for all the matching rows,
1127
+ # for every date range. The default false and will return the totals.
1128
+ # Corresponds to the JSON property `hideTotals`
1129
+ # @return [Boolean]
1130
+ attr_accessor :hide_totals
1131
+ alias_method :hide_totals?, :hide_totals
1132
+
1133
+ # If set to true, hides the minimum and maximum across all matching rows.
1134
+ # The default is false and the value ranges are returned.
1135
+ # Corresponds to the JSON property `hideValueRanges`
1136
+ # @return [Boolean]
1137
+ attr_accessor :hide_value_ranges
1138
+ alias_method :hide_value_ranges?, :hide_value_ranges
1139
+
1140
+ # Dimension or metric filters that restrict the data returned for your
1141
+ # request. To use the `filtersExpression`, supply a dimension or metric on
1142
+ # which to filter, followed by the filter expression. For example, the
1143
+ # following expression selects `ga:browser` dimension which starts with
1144
+ # Firefox; `ga:browser=~^Firefox`. For more information on dimensions
1145
+ # and metric filters, see
1146
+ # [Filters reference](https://developers.google.com/analytics/devguides/
1147
+ # reporting/core/v3/reference#filters).
1148
+ # Corresponds to the JSON property `filtersExpression`
1149
+ # @return [String]
1150
+ attr_accessor :filters_expression
1151
+
1152
+ # Defines a cohort group.
1153
+ # For example:
1154
+ # "cohortGroup": `
1155
+ # "cohorts": [`
1156
+ # "name": "cohort 1",
1157
+ # "type": "FIRST_VISIT_DATE",
1158
+ # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" `
1159
+ # `,`
1160
+ # "name": "cohort 2"
1161
+ # "type": "FIRST_VISIT_DATE"
1162
+ # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" `
1163
+ # `]
1164
+ # `
1165
+ # Corresponds to the JSON property `cohortGroup`
1166
+ # @return [Google::Apis::AnalyticsreportingV4::CohortGroup]
1167
+ attr_accessor :cohort_group
1168
+
1169
+ # The Analytics
1170
+ # [view ID](https://support.google.com/analytics/answer/1009618)
1171
+ # from which to retrieve data. Every [ReportRequest](#ReportRequest)
1172
+ # within a `batchGet` method must contain the same `viewId`.
1173
+ # Corresponds to the JSON property `viewId`
1174
+ # @return [String]
1175
+ attr_accessor :view_id
1176
+
1177
+ # The metrics requested.
1178
+ # Requests must specify at least one metric. Requests can have a
1179
+ # total of 10 metrics.
1180
+ # Corresponds to the JSON property `metrics`
1181
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Metric>]
1182
+ attr_accessor :metrics
1183
+
1184
+ # The dimension filter clauses for filtering Dimension Values. They are
1185
+ # logically combined with the `AND` operator. Note that filtering occurs
1186
+ # before any dimensions are aggregated, so that the returned metrics
1187
+ # represent the total for only the relevant dimensions.
1188
+ # Corresponds to the JSON property `dimensionFilterClauses`
1189
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DimensionFilterClause>]
1190
+ attr_accessor :dimension_filter_clauses
1191
+
1192
+ # Sort order on output rows. To compare two rows, the elements of the
1193
+ # following are applied in order until a difference is found. All date
1194
+ # ranges in the output get the same row order.
1195
+ # Corresponds to the JSON property `orderBys`
1196
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrderBy>]
1197
+ attr_accessor :order_bys
1198
+
1199
+ # Segment the data returned for the request. A segment definition helps look
1200
+ # at a subset of the segment request. A request can contain up to four
1201
+ # segments. Every [ReportRequest](#ReportRequest) within a
1202
+ # `batchGet` method must contain the same `segments` definition. Requests
1203
+ # with segments must have the `ga:segment` dimension.
1204
+ # Corresponds to the JSON property `segments`
1205
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Segment>]
1206
+ attr_accessor :segments
1207
+
1208
+ # The desired report
1209
+ # [sample](https://support.google.com/analytics/answer/2637192) size.
1210
+ # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling
1211
+ # level is used. Every [ReportRequest](#ReportRequest) within a
1212
+ # `batchGet` method must contain the same `samplingLevel` definition. See
1213
+ # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
1214
+ # for details.
1215
+ # Corresponds to the JSON property `samplingLevel`
1216
+ # @return [String]
1217
+ attr_accessor :sampling_level
1218
+
1219
+ # The dimensions requested.
1220
+ # Requests can have a total of 7 dimensions.
1221
+ # Corresponds to the JSON property `dimensions`
1222
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Dimension>]
1223
+ attr_accessor :dimensions
1224
+
1225
+ # A continuation token to get the next page of the results. Adding this to
1226
+ # the request will return the rows after the pageToken. The pageToken should
1227
+ # be the value returned in the nextPageToken parameter in the response to
1228
+ # the GetReports request.
1229
+ # Corresponds to the JSON property `pageToken`
1230
+ # @return [String]
1231
+ attr_accessor :page_token
1232
+
1233
+ # Date ranges in the request. The request can have a maximum of 2 date
1234
+ # ranges. The response will contain a set of metric values for each
1235
+ # combination of the dimensions for each date range in the request. So, if
1236
+ # there are two date ranges, there will be two set of metric values, one for
1237
+ # the original date range and one for the second date range.
1238
+ # The `reportRequest.dateRanges` field should not be specified for cohorts
1239
+ # or Lifetime value requests.
1240
+ # If a date range is not provided, the default date range is (startDate:
1241
+ # current date - 7 days, endDate: current date - 1 day). Every
1242
+ # [ReportRequest](#ReportRequest) within a `batchGet` method must
1243
+ # contain the same `dateRanges` definition.
1244
+ # Corresponds to the JSON property `dateRanges`
1245
+ # @return [Array<Google::Apis::AnalyticsreportingV4::DateRange>]
1246
+ attr_accessor :date_ranges
1247
+
1248
+ # The pivot definitions. Requests can have a maximum of 2 pivots.
1249
+ # Corresponds to the JSON property `pivots`
1250
+ # @return [Array<Google::Apis::AnalyticsreportingV4::Pivot>]
1251
+ attr_accessor :pivots
1252
+
1253
+ # If set to false, the response does not include rows if all the retrieved
1254
+ # metrics are equal to zero. The default is false which will exclude these
1255
+ # rows.
1256
+ # Corresponds to the JSON property `includeEmptyRows`
1257
+ # @return [Boolean]
1258
+ attr_accessor :include_empty_rows
1259
+ alias_method :include_empty_rows?, :include_empty_rows
1260
+
1261
+ def initialize(**args)
1262
+ update!(**args)
1263
+ end
1264
+
1265
+ # Update properties of this object
1266
+ def update!(**args)
1267
+ @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses)
1268
+ @page_size = args[:page_size] if args.key?(:page_size)
1269
+ @hide_totals = args[:hide_totals] if args.key?(:hide_totals)
1270
+ @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges)
1271
+ @filters_expression = args[:filters_expression] if args.key?(:filters_expression)
1272
+ @cohort_group = args[:cohort_group] if args.key?(:cohort_group)
1273
+ @view_id = args[:view_id] if args.key?(:view_id)
1274
+ @metrics = args[:metrics] if args.key?(:metrics)
1275
+ @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses)
1276
+ @order_bys = args[:order_bys] if args.key?(:order_bys)
1277
+ @segments = args[:segments] if args.key?(:segments)
1278
+ @sampling_level = args[:sampling_level] if args.key?(:sampling_level)
1279
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
1280
+ @page_token = args[:page_token] if args.key?(:page_token)
1281
+ @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
1282
+ @pivots = args[:pivots] if args.key?(:pivots)
1283
+ @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows)
1284
+ end
1285
+ end
1286
+
1287
+ # [Dimensions](https://support.google.com/analytics/answer/1033861)
1288
+ # are attributes of your data. For example, the dimension `ga:city`
1289
+ # indicates the city, for example, "Paris" or "New York", from which
1290
+ # a session originates.
1317
1291
  class Dimension
1318
1292
  include Google::Apis::Core::Hashable
1319
1293
 
@@ -1362,14 +1336,74 @@ module Google
1362
1336
  end
1363
1337
  end
1364
1338
 
1365
- # The metric values in the pivot region.
1366
- class PivotValueRegion
1339
+ # Dynamic segment definition for defining the segment within the request.
1340
+ # A segment can select users, sessions or both.
1341
+ class DynamicSegment
1367
1342
  include Google::Apis::Core::Hashable
1368
1343
 
1369
- # The values of the metrics in each of the pivot regions.
1370
- # Corresponds to the JSON property `values`
1344
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1345
+ # are combined together with a logical `AND` operation.
1346
+ # Corresponds to the JSON property `sessionSegment`
1347
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1348
+ attr_accessor :session_segment
1349
+
1350
+ # The name of the dynamic segment.
1351
+ # Corresponds to the JSON property `name`
1352
+ # @return [String]
1353
+ attr_accessor :name
1354
+
1355
+ # SegmentDefinition defines the segment to be a set of SegmentFilters which
1356
+ # are combined together with a logical `AND` operation.
1357
+ # Corresponds to the JSON property `userSegment`
1358
+ # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition]
1359
+ attr_accessor :user_segment
1360
+
1361
+ def initialize(**args)
1362
+ update!(**args)
1363
+ end
1364
+
1365
+ # Update properties of this object
1366
+ def update!(**args)
1367
+ @session_segment = args[:session_segment] if args.key?(:session_segment)
1368
+ @name = args[:name] if args.key?(:name)
1369
+ @user_segment = args[:user_segment] if args.key?(:user_segment)
1370
+ end
1371
+ end
1372
+
1373
+ # A Simple segment conditions consist of one or more dimension/metric
1374
+ # conditions that can be combined.
1375
+ class SimpleSegment
1376
+ include Google::Apis::Core::Hashable
1377
+
1378
+ # A list of segment filters groups which are combined with logical `AND`
1379
+ # operator.
1380
+ # Corresponds to the JSON property `orFiltersForSegment`
1381
+ # @return [Array<Google::Apis::AnalyticsreportingV4::OrFiltersForSegment>]
1382
+ attr_accessor :or_filters_for_segment
1383
+
1384
+ def initialize(**args)
1385
+ update!(**args)
1386
+ end
1387
+
1388
+ # Update properties of this object
1389
+ def update!(**args)
1390
+ @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment)
1391
+ end
1392
+ end
1393
+
1394
+ # Column headers.
1395
+ class ColumnHeader
1396
+ include Google::Apis::Core::Hashable
1397
+
1398
+ # The headers for the metrics.
1399
+ # Corresponds to the JSON property `metricHeader`
1400
+ # @return [Google::Apis::AnalyticsreportingV4::MetricHeader]
1401
+ attr_accessor :metric_header
1402
+
1403
+ # The dimension names in the response.
1404
+ # Corresponds to the JSON property `dimensions`
1371
1405
  # @return [Array<String>]
1372
- attr_accessor :values
1406
+ attr_accessor :dimensions
1373
1407
 
1374
1408
  def initialize(**args)
1375
1409
  update!(**args)
@@ -1377,7 +1411,8 @@ module Google
1377
1411
 
1378
1412
  # Update properties of this object
1379
1413
  def update!(**args)
1380
- @values = args[:values] if args.key?(:values)
1414
+ @metric_header = args[:metric_header] if args.key?(:metric_header)
1415
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
1381
1416
  end
1382
1417
  end
1383
1418
  end