google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,3600 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module AnalyticsV3
23
+ # Google Analytics API
24
+ #
25
+ # View and manage your Google Analytics data
26
+ #
27
+ # @example
28
+ # require 'google/apis/analytics_v3'
29
+ #
30
+ # Analytics = Google::Apis::AnalyticsV3 # Alias the module
31
+ # service = Analytics::AnalyticsService.new
32
+ #
33
+ # @see https://developers.google.com/analytics/
34
+ class AnalyticsService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'analytics/v3/')
53
+ end
54
+
55
+ # Returns Analytics data for a view (profile).
56
+ # @param [String] dimensions
57
+ # A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
58
+ # @param [String] end_date
59
+ # End date for fetching Analytics data. Request can should specify an end date
60
+ # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or
61
+ # 7daysAgo). The default value is yesterday.
62
+ # @param [String] filters
63
+ # A comma-separated list of dimension or metric filters to be applied to
64
+ # Analytics data.
65
+ # @param [String] ids
66
+ # Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX,
67
+ # where XXXX is the Analytics view (profile) ID.
68
+ # @param [Fixnum] max_results
69
+ # The maximum number of entries to include in this feed.
70
+ # @param [String] metrics
71
+ # A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'.
72
+ # At least one metric must be specified.
73
+ # @param [String] output
74
+ # The selected format for the response. Default format is JSON.
75
+ # @param [String] sampling_level
76
+ # The desired sampling level.
77
+ # @param [String] segment
78
+ # An Analytics segment to be applied to data.
79
+ # @param [String] sort
80
+ # A comma-separated list of dimensions or metrics that determine the sort order
81
+ # for Analytics data.
82
+ # @param [String] start_date
83
+ # Start date for fetching Analytics data. Requests can specify a start date
84
+ # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or
85
+ # 7daysAgo). The default value is 7daysAgo.
86
+ # @param [Fixnum] start_index
87
+ # An index of the first entity to retrieve. Use this parameter as a pagination
88
+ # mechanism along with the max-results parameter.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # Overrides userIp if both are provided.
95
+ # @param [String] user_ip
96
+ # IP address of the site where the request originates. Use this if you want to
97
+ # enforce per-user limits.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::AnalyticsV3::GaData] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::AnalyticsV3::GaData]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def get_ga_data(dimensions: nil, end_date: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, output: nil, sampling_level: nil, segment: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
111
+ path = 'data/ga'
112
+ command = make_simple_command(:get, path, options)
113
+ command.response_representation = Google::Apis::AnalyticsV3::GaData::Representation
114
+ command.response_class = Google::Apis::AnalyticsV3::GaData
115
+ command.query['dimensions'] = dimensions unless dimensions.nil?
116
+ command.query['end-date'] = end_date unless end_date.nil?
117
+ command.query['filters'] = filters unless filters.nil?
118
+ command.query['ids'] = ids unless ids.nil?
119
+ command.query['max-results'] = max_results unless max_results.nil?
120
+ command.query['metrics'] = metrics unless metrics.nil?
121
+ command.query['output'] = output unless output.nil?
122
+ command.query['samplingLevel'] = sampling_level unless sampling_level.nil?
123
+ command.query['segment'] = segment unless segment.nil?
124
+ command.query['sort'] = sort unless sort.nil?
125
+ command.query['start-date'] = start_date unless start_date.nil?
126
+ command.query['start-index'] = start_index unless start_index.nil?
127
+ command.query['fields'] = fields unless fields.nil?
128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
129
+ command.query['userIp'] = user_ip unless user_ip.nil?
130
+ execute_or_queue_command(command, &block)
131
+ end
132
+
133
+ # Returns Analytics Multi-Channel Funnels data for a view (profile).
134
+ # @param [String] dimensions
135
+ # A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,
136
+ # mcf:medium'.
137
+ # @param [String] end_date
138
+ # End date for fetching Analytics data. Requests can specify a start date
139
+ # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or
140
+ # 7daysAgo). The default value is 7daysAgo.
141
+ # @param [String] filters
142
+ # A comma-separated list of dimension or metric filters to be applied to the
143
+ # Analytics data.
144
+ # @param [String] ids
145
+ # Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX,
146
+ # where XXXX is the Analytics view (profile) ID.
147
+ # @param [Fixnum] max_results
148
+ # The maximum number of entries to include in this feed.
149
+ # @param [String] metrics
150
+ # A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:
151
+ # totalConversions,mcf:totalConversionValue'. At least one metric must be
152
+ # specified.
153
+ # @param [String] sampling_level
154
+ # The desired sampling level.
155
+ # @param [String] sort
156
+ # A comma-separated list of dimensions or metrics that determine the sort order
157
+ # for the Analytics data.
158
+ # @param [String] start_date
159
+ # Start date for fetching Analytics data. Requests can specify a start date
160
+ # formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or
161
+ # 7daysAgo). The default value is 7daysAgo.
162
+ # @param [Fixnum] start_index
163
+ # An index of the first entity to retrieve. Use this parameter as a pagination
164
+ # mechanism along with the max-results parameter.
165
+ # @param [String] fields
166
+ # Selector specifying which fields to include in a partial response.
167
+ # @param [String] quota_user
168
+ # Available to use for quota purposes for server-side applications. Can be any
169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
170
+ # Overrides userIp if both are provided.
171
+ # @param [String] user_ip
172
+ # IP address of the site where the request originates. Use this if you want to
173
+ # enforce per-user limits.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::AnalyticsV3::McfData] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::AnalyticsV3::McfData]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def get_mcf_data(dimensions: nil, end_date: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, sampling_level: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
187
+ path = 'data/mcf'
188
+ command = make_simple_command(:get, path, options)
189
+ command.response_representation = Google::Apis::AnalyticsV3::McfData::Representation
190
+ command.response_class = Google::Apis::AnalyticsV3::McfData
191
+ command.query['dimensions'] = dimensions unless dimensions.nil?
192
+ command.query['end-date'] = end_date unless end_date.nil?
193
+ command.query['filters'] = filters unless filters.nil?
194
+ command.query['ids'] = ids unless ids.nil?
195
+ command.query['max-results'] = max_results unless max_results.nil?
196
+ command.query['metrics'] = metrics unless metrics.nil?
197
+ command.query['samplingLevel'] = sampling_level unless sampling_level.nil?
198
+ command.query['sort'] = sort unless sort.nil?
199
+ command.query['start-date'] = start_date unless start_date.nil?
200
+ command.query['start-index'] = start_index unless start_index.nil?
201
+ command.query['fields'] = fields unless fields.nil?
202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
203
+ command.query['userIp'] = user_ip unless user_ip.nil?
204
+ execute_or_queue_command(command, &block)
205
+ end
206
+
207
+ # Returns real time data for a view (profile).
208
+ # @param [String] dimensions
209
+ # A comma-separated list of real time dimensions. E.g., 'rt:medium,rt:city'.
210
+ # @param [String] filters
211
+ # A comma-separated list of dimension or metric filters to be applied to real
212
+ # time data.
213
+ # @param [String] ids
214
+ # Unique table ID for retrieving real time data. Table ID is of the form ga:XXXX,
215
+ # where XXXX is the Analytics view (profile) ID.
216
+ # @param [Fixnum] max_results
217
+ # The maximum number of entries to include in this feed.
218
+ # @param [String] metrics
219
+ # A comma-separated list of real time metrics. E.g., 'rt:activeUsers'. At least
220
+ # one metric must be specified.
221
+ # @param [String] sort
222
+ # A comma-separated list of dimensions or metrics that determine the sort order
223
+ # for real time data.
224
+ # @param [String] fields
225
+ # Selector specifying which fields to include in a partial response.
226
+ # @param [String] quota_user
227
+ # Available to use for quota purposes for server-side applications. Can be any
228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
229
+ # Overrides userIp if both are provided.
230
+ # @param [String] user_ip
231
+ # IP address of the site where the request originates. Use this if you want to
232
+ # enforce per-user limits.
233
+ # @param [Google::Apis::RequestOptions] options
234
+ # Request-specific options
235
+ #
236
+ # @yield [result, err] Result & error if block supplied
237
+ # @yieldparam result [Google::Apis::AnalyticsV3::RealtimeData] parsed result object
238
+ # @yieldparam err [StandardError] error object if request failed
239
+ #
240
+ # @return [Google::Apis::AnalyticsV3::RealtimeData]
241
+ #
242
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
243
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
244
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
245
+ def get_realtime_data(dimensions: nil, filters: nil, ids: nil, max_results: nil, metrics: nil, sort: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
246
+ path = 'data/realtime'
247
+ command = make_simple_command(:get, path, options)
248
+ command.response_representation = Google::Apis::AnalyticsV3::RealtimeData::Representation
249
+ command.response_class = Google::Apis::AnalyticsV3::RealtimeData
250
+ command.query['dimensions'] = dimensions unless dimensions.nil?
251
+ command.query['filters'] = filters unless filters.nil?
252
+ command.query['ids'] = ids unless ids.nil?
253
+ command.query['max-results'] = max_results unless max_results.nil?
254
+ command.query['metrics'] = metrics unless metrics.nil?
255
+ command.query['sort'] = sort unless sort.nil?
256
+ command.query['fields'] = fields unless fields.nil?
257
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
258
+ command.query['userIp'] = user_ip unless user_ip.nil?
259
+ execute_or_queue_command(command, &block)
260
+ end
261
+
262
+ # Lists account summaries (lightweight tree comprised of accounts/properties/
263
+ # profiles) to which the user has access.
264
+ # @param [Fixnum] max_results
265
+ # The maximum number of account summaries to include in this response, where the
266
+ # largest acceptable value is 1000.
267
+ # @param [Fixnum] start_index
268
+ # An index of the first entity to retrieve. Use this parameter as a pagination
269
+ # mechanism along with the max-results parameter.
270
+ # @param [String] fields
271
+ # Selector specifying which fields to include in a partial response.
272
+ # @param [String] quota_user
273
+ # Available to use for quota purposes for server-side applications. Can be any
274
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
275
+ # Overrides userIp if both are provided.
276
+ # @param [String] user_ip
277
+ # IP address of the site where the request originates. Use this if you want to
278
+ # enforce per-user limits.
279
+ # @param [Google::Apis::RequestOptions] options
280
+ # Request-specific options
281
+ #
282
+ # @yield [result, err] Result & error if block supplied
283
+ # @yieldparam result [Google::Apis::AnalyticsV3::AccountSummaries] parsed result object
284
+ # @yieldparam err [StandardError] error object if request failed
285
+ #
286
+ # @return [Google::Apis::AnalyticsV3::AccountSummaries]
287
+ #
288
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
289
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
290
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
291
+ def list_account_summaries(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
292
+ path = 'management/accountSummaries'
293
+ command = make_simple_command(:get, path, options)
294
+ command.response_representation = Google::Apis::AnalyticsV3::AccountSummaries::Representation
295
+ command.response_class = Google::Apis::AnalyticsV3::AccountSummaries
296
+ command.query['max-results'] = max_results unless max_results.nil?
297
+ command.query['start-index'] = start_index unless start_index.nil?
298
+ command.query['fields'] = fields unless fields.nil?
299
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
300
+ command.query['userIp'] = user_ip unless user_ip.nil?
301
+ execute_or_queue_command(command, &block)
302
+ end
303
+
304
+ # Removes a user from the given account.
305
+ # @param [String] account_id
306
+ # Account ID to delete the user link for.
307
+ # @param [String] link_id
308
+ # Link ID to delete the user link for.
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # Overrides userIp if both are provided.
315
+ # @param [String] user_ip
316
+ # IP address of the site where the request originates. Use this if you want to
317
+ # enforce per-user limits.
318
+ # @param [Google::Apis::RequestOptions] options
319
+ # Request-specific options
320
+ #
321
+ # @yield [result, err] Result & error if block supplied
322
+ # @yieldparam result [NilClass] No result returned for this method
323
+ # @yieldparam err [StandardError] error object if request failed
324
+ #
325
+ # @return [void]
326
+ #
327
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
328
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
329
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
330
+ def delete_account_user_link(account_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
331
+ path = 'management/accounts/{accountId}/entityUserLinks/{linkId}'
332
+ command = make_simple_command(:delete, path, options)
333
+ command.params['accountId'] = account_id unless account_id.nil?
334
+ command.params['linkId'] = link_id unless link_id.nil?
335
+ command.query['fields'] = fields unless fields.nil?
336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
337
+ command.query['userIp'] = user_ip unless user_ip.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Adds a new user to the given account.
342
+ # @param [String] account_id
343
+ # Account ID to create the user link for.
344
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # Overrides userIp if both are provided.
351
+ # @param [String] user_ip
352
+ # IP address of the site where the request originates. Use this if you want to
353
+ # enforce per-user limits.
354
+ # @param [Google::Apis::RequestOptions] options
355
+ # Request-specific options
356
+ #
357
+ # @yield [result, err] Result & error if block supplied
358
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
359
+ # @yieldparam err [StandardError] error object if request failed
360
+ #
361
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
362
+ #
363
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
364
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
365
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
366
+ def insert_account_user_link(account_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
367
+ path = 'management/accounts/{accountId}/entityUserLinks'
368
+ command = make_simple_command(:post, path, options)
369
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
370
+ command.request_object = entity_user_link_object
371
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
372
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
373
+ command.params['accountId'] = account_id unless account_id.nil?
374
+ command.query['fields'] = fields unless fields.nil?
375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
376
+ command.query['userIp'] = user_ip unless user_ip.nil?
377
+ execute_or_queue_command(command, &block)
378
+ end
379
+
380
+ # Lists account-user links for a given account.
381
+ # @param [String] account_id
382
+ # Account ID to retrieve the user links for.
383
+ # @param [Fixnum] max_results
384
+ # The maximum number of account-user links to include in this response.
385
+ # @param [Fixnum] start_index
386
+ # An index of the first account-user link to retrieve. Use this parameter as a
387
+ # pagination mechanism along with the max-results parameter.
388
+ # @param [String] fields
389
+ # Selector specifying which fields to include in a partial response.
390
+ # @param [String] quota_user
391
+ # Available to use for quota purposes for server-side applications. Can be any
392
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
393
+ # Overrides userIp if both are provided.
394
+ # @param [String] user_ip
395
+ # IP address of the site where the request originates. Use this if you want to
396
+ # enforce per-user limits.
397
+ # @param [Google::Apis::RequestOptions] options
398
+ # Request-specific options
399
+ #
400
+ # @yield [result, err] Result & error if block supplied
401
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object
402
+ # @yieldparam err [StandardError] error object if request failed
403
+ #
404
+ # @return [Google::Apis::AnalyticsV3::EntityUserLinks]
405
+ #
406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
409
+ def list_account_user_links(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
410
+ path = 'management/accounts/{accountId}/entityUserLinks'
411
+ command = make_simple_command(:get, path, options)
412
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation
413
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks
414
+ command.params['accountId'] = account_id unless account_id.nil?
415
+ command.query['max-results'] = max_results unless max_results.nil?
416
+ command.query['start-index'] = start_index unless start_index.nil?
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ command.query['userIp'] = user_ip unless user_ip.nil?
420
+ execute_or_queue_command(command, &block)
421
+ end
422
+
423
+ # Updates permissions for an existing user on the given account.
424
+ # @param [String] account_id
425
+ # Account ID to update the account-user link for.
426
+ # @param [String] link_id
427
+ # Link ID to update the account-user link for.
428
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
429
+ # @param [String] fields
430
+ # Selector specifying which fields to include in a partial response.
431
+ # @param [String] quota_user
432
+ # Available to use for quota purposes for server-side applications. Can be any
433
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
434
+ # Overrides userIp if both are provided.
435
+ # @param [String] user_ip
436
+ # IP address of the site where the request originates. Use this if you want to
437
+ # enforce per-user limits.
438
+ # @param [Google::Apis::RequestOptions] options
439
+ # Request-specific options
440
+ #
441
+ # @yield [result, err] Result & error if block supplied
442
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
443
+ # @yieldparam err [StandardError] error object if request failed
444
+ #
445
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
446
+ #
447
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
448
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
449
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
450
+ def update_account_user_link(account_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
451
+ path = 'management/accounts/{accountId}/entityUserLinks/{linkId}'
452
+ command = make_simple_command(:put, path, options)
453
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
454
+ command.request_object = entity_user_link_object
455
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
456
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
457
+ command.params['accountId'] = account_id unless account_id.nil?
458
+ command.params['linkId'] = link_id unless link_id.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ command.query['userIp'] = user_ip unless user_ip.nil?
462
+ execute_or_queue_command(command, &block)
463
+ end
464
+
465
+ # Lists all accounts to which the user has access.
466
+ # @param [Fixnum] max_results
467
+ # The maximum number of accounts to include in this response.
468
+ # @param [Fixnum] start_index
469
+ # An index of the first account to retrieve. Use this parameter as a pagination
470
+ # mechanism along with the max-results parameter.
471
+ # @param [String] fields
472
+ # Selector specifying which fields to include in a partial response.
473
+ # @param [String] quota_user
474
+ # Available to use for quota purposes for server-side applications. Can be any
475
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
476
+ # Overrides userIp if both are provided.
477
+ # @param [String] user_ip
478
+ # IP address of the site where the request originates. Use this if you want to
479
+ # enforce per-user limits.
480
+ # @param [Google::Apis::RequestOptions] options
481
+ # Request-specific options
482
+ #
483
+ # @yield [result, err] Result & error if block supplied
484
+ # @yieldparam result [Google::Apis::AnalyticsV3::Accounts] parsed result object
485
+ # @yieldparam err [StandardError] error object if request failed
486
+ #
487
+ # @return [Google::Apis::AnalyticsV3::Accounts]
488
+ #
489
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
490
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
491
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
492
+ def list_accounts(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
493
+ path = 'management/accounts'
494
+ command = make_simple_command(:get, path, options)
495
+ command.response_representation = Google::Apis::AnalyticsV3::Accounts::Representation
496
+ command.response_class = Google::Apis::AnalyticsV3::Accounts
497
+ command.query['max-results'] = max_results unless max_results.nil?
498
+ command.query['start-index'] = start_index unless start_index.nil?
499
+ command.query['fields'] = fields unless fields.nil?
500
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
501
+ command.query['userIp'] = user_ip unless user_ip.nil?
502
+ execute_or_queue_command(command, &block)
503
+ end
504
+
505
+ # List custom data sources to which the user has access.
506
+ # @param [String] account_id
507
+ # Account Id for the custom data sources to retrieve.
508
+ # @param [String] web_property_id
509
+ # Web property Id for the custom data sources to retrieve.
510
+ # @param [Fixnum] max_results
511
+ # The maximum number of custom data sources to include in this response.
512
+ # @param [Fixnum] start_index
513
+ # A 1-based index of the first custom data source to retrieve. Use this
514
+ # parameter as a pagination mechanism along with the max-results parameter.
515
+ # @param [String] fields
516
+ # Selector specifying which fields to include in a partial response.
517
+ # @param [String] quota_user
518
+ # Available to use for quota purposes for server-side applications. Can be any
519
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
520
+ # Overrides userIp if both are provided.
521
+ # @param [String] user_ip
522
+ # IP address of the site where the request originates. Use this if you want to
523
+ # enforce per-user limits.
524
+ # @param [Google::Apis::RequestOptions] options
525
+ # Request-specific options
526
+ #
527
+ # @yield [result, err] Result & error if block supplied
528
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDataSources] parsed result object
529
+ # @yieldparam err [StandardError] error object if request failed
530
+ #
531
+ # @return [Google::Apis::AnalyticsV3::CustomDataSources]
532
+ #
533
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
534
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
535
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
536
+ def list_custom_data_sources(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
537
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources'
538
+ command = make_simple_command(:get, path, options)
539
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDataSources::Representation
540
+ command.response_class = Google::Apis::AnalyticsV3::CustomDataSources
541
+ command.params['accountId'] = account_id unless account_id.nil?
542
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
543
+ command.query['max-results'] = max_results unless max_results.nil?
544
+ command.query['start-index'] = start_index unless start_index.nil?
545
+ command.query['fields'] = fields unless fields.nil?
546
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
547
+ command.query['userIp'] = user_ip unless user_ip.nil?
548
+ execute_or_queue_command(command, &block)
549
+ end
550
+
551
+ # Get a custom dimension to which the user has access.
552
+ # @param [String] account_id
553
+ # Account ID for the custom dimension to retrieve.
554
+ # @param [String] web_property_id
555
+ # Web property ID for the custom dimension to retrieve.
556
+ # @param [String] custom_dimension_id
557
+ # The ID of the custom dimension to retrieve.
558
+ # @param [String] fields
559
+ # Selector specifying which fields to include in a partial response.
560
+ # @param [String] quota_user
561
+ # Available to use for quota purposes for server-side applications. Can be any
562
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
563
+ # Overrides userIp if both are provided.
564
+ # @param [String] user_ip
565
+ # IP address of the site where the request originates. Use this if you want to
566
+ # enforce per-user limits.
567
+ # @param [Google::Apis::RequestOptions] options
568
+ # Request-specific options
569
+ #
570
+ # @yield [result, err] Result & error if block supplied
571
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimension] parsed result object
572
+ # @yieldparam err [StandardError] error object if request failed
573
+ #
574
+ # @return [Google::Apis::AnalyticsV3::CustomDimension]
575
+ #
576
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
577
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
578
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
579
+ def get_custom_dimension(account_id, web_property_id, custom_dimension_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
580
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}'
581
+ command = make_simple_command(:get, path, options)
582
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
583
+ command.response_class = Google::Apis::AnalyticsV3::CustomDimension
584
+ command.params['accountId'] = account_id unless account_id.nil?
585
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
586
+ command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_id.nil?
587
+ command.query['fields'] = fields unless fields.nil?
588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
589
+ command.query['userIp'] = user_ip unless user_ip.nil?
590
+ execute_or_queue_command(command, &block)
591
+ end
592
+
593
+ # Create a new custom dimension.
594
+ # @param [String] account_id
595
+ # Account ID for the custom dimension to create.
596
+ # @param [String] web_property_id
597
+ # Web property ID for the custom dimension to create.
598
+ # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_object
599
+ # @param [String] fields
600
+ # Selector specifying which fields to include in a partial response.
601
+ # @param [String] quota_user
602
+ # Available to use for quota purposes for server-side applications. Can be any
603
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
604
+ # Overrides userIp if both are provided.
605
+ # @param [String] user_ip
606
+ # IP address of the site where the request originates. Use this if you want to
607
+ # enforce per-user limits.
608
+ # @param [Google::Apis::RequestOptions] options
609
+ # Request-specific options
610
+ #
611
+ # @yield [result, err] Result & error if block supplied
612
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimension] parsed result object
613
+ # @yieldparam err [StandardError] error object if request failed
614
+ #
615
+ # @return [Google::Apis::AnalyticsV3::CustomDimension]
616
+ #
617
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
618
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
619
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
620
+ def insert_custom_dimension(account_id, web_property_id, custom_dimension_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
621
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions'
622
+ command = make_simple_command(:post, path, options)
623
+ command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
624
+ command.request_object = custom_dimension_object
625
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
626
+ command.response_class = Google::Apis::AnalyticsV3::CustomDimension
627
+ command.params['accountId'] = account_id unless account_id.nil?
628
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
629
+ command.query['fields'] = fields unless fields.nil?
630
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
631
+ command.query['userIp'] = user_ip unless user_ip.nil?
632
+ execute_or_queue_command(command, &block)
633
+ end
634
+
635
+ # Lists custom dimensions to which the user has access.
636
+ # @param [String] account_id
637
+ # Account ID for the custom dimensions to retrieve.
638
+ # @param [String] web_property_id
639
+ # Web property ID for the custom dimensions to retrieve.
640
+ # @param [Fixnum] max_results
641
+ # The maximum number of custom dimensions to include in this response.
642
+ # @param [Fixnum] start_index
643
+ # An index of the first entity to retrieve. Use this parameter as a pagination
644
+ # mechanism along with the max-results parameter.
645
+ # @param [String] fields
646
+ # Selector specifying which fields to include in a partial response.
647
+ # @param [String] quota_user
648
+ # Available to use for quota purposes for server-side applications. Can be any
649
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
650
+ # Overrides userIp if both are provided.
651
+ # @param [String] user_ip
652
+ # IP address of the site where the request originates. Use this if you want to
653
+ # enforce per-user limits.
654
+ # @param [Google::Apis::RequestOptions] options
655
+ # Request-specific options
656
+ #
657
+ # @yield [result, err] Result & error if block supplied
658
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimensions] parsed result object
659
+ # @yieldparam err [StandardError] error object if request failed
660
+ #
661
+ # @return [Google::Apis::AnalyticsV3::CustomDimensions]
662
+ #
663
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
664
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
665
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
666
+ def list_custom_dimensions(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
667
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions'
668
+ command = make_simple_command(:get, path, options)
669
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDimensions::Representation
670
+ command.response_class = Google::Apis::AnalyticsV3::CustomDimensions
671
+ command.params['accountId'] = account_id unless account_id.nil?
672
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
673
+ command.query['max-results'] = max_results unless max_results.nil?
674
+ command.query['start-index'] = start_index unless start_index.nil?
675
+ command.query['fields'] = fields unless fields.nil?
676
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
677
+ command.query['userIp'] = user_ip unless user_ip.nil?
678
+ execute_or_queue_command(command, &block)
679
+ end
680
+
681
+ # Updates an existing custom dimension. This method supports patch semantics.
682
+ # @param [String] account_id
683
+ # Account ID for the custom dimension to update.
684
+ # @param [String] web_property_id
685
+ # Web property ID for the custom dimension to update.
686
+ # @param [String] custom_dimension_id
687
+ # Custom dimension ID for the custom dimension to update.
688
+ # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_object
689
+ # @param [Boolean] ignore_custom_data_source_links
690
+ # Force the update and ignore any warnings related to the custom dimension being
691
+ # linked to a custom data source / data set.
692
+ # @param [String] fields
693
+ # Selector specifying which fields to include in a partial response.
694
+ # @param [String] quota_user
695
+ # Available to use for quota purposes for server-side applications. Can be any
696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
697
+ # Overrides userIp if both are provided.
698
+ # @param [String] user_ip
699
+ # IP address of the site where the request originates. Use this if you want to
700
+ # enforce per-user limits.
701
+ # @param [Google::Apis::RequestOptions] options
702
+ # Request-specific options
703
+ #
704
+ # @yield [result, err] Result & error if block supplied
705
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimension] parsed result object
706
+ # @yieldparam err [StandardError] error object if request failed
707
+ #
708
+ # @return [Google::Apis::AnalyticsV3::CustomDimension]
709
+ #
710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
713
+ def patch_custom_dimension(account_id, web_property_id, custom_dimension_id, custom_dimension_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
714
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}'
715
+ command = make_simple_command(:patch, path, options)
716
+ command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
717
+ command.request_object = custom_dimension_object
718
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
719
+ command.response_class = Google::Apis::AnalyticsV3::CustomDimension
720
+ command.params['accountId'] = account_id unless account_id.nil?
721
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
722
+ command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_id.nil?
723
+ command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.nil?
724
+ command.query['fields'] = fields unless fields.nil?
725
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
726
+ command.query['userIp'] = user_ip unless user_ip.nil?
727
+ execute_or_queue_command(command, &block)
728
+ end
729
+
730
+ # Updates an existing custom dimension.
731
+ # @param [String] account_id
732
+ # Account ID for the custom dimension to update.
733
+ # @param [String] web_property_id
734
+ # Web property ID for the custom dimension to update.
735
+ # @param [String] custom_dimension_id
736
+ # Custom dimension ID for the custom dimension to update.
737
+ # @param [Google::Apis::AnalyticsV3::CustomDimension] custom_dimension_object
738
+ # @param [Boolean] ignore_custom_data_source_links
739
+ # Force the update and ignore any warnings related to the custom dimension being
740
+ # linked to a custom data source / data set.
741
+ # @param [String] fields
742
+ # Selector specifying which fields to include in a partial response.
743
+ # @param [String] quota_user
744
+ # Available to use for quota purposes for server-side applications. Can be any
745
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
746
+ # Overrides userIp if both are provided.
747
+ # @param [String] user_ip
748
+ # IP address of the site where the request originates. Use this if you want to
749
+ # enforce per-user limits.
750
+ # @param [Google::Apis::RequestOptions] options
751
+ # Request-specific options
752
+ #
753
+ # @yield [result, err] Result & error if block supplied
754
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomDimension] parsed result object
755
+ # @yieldparam err [StandardError] error object if request failed
756
+ #
757
+ # @return [Google::Apis::AnalyticsV3::CustomDimension]
758
+ #
759
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
760
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
761
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
762
+ def update_custom_dimension(account_id, web_property_id, custom_dimension_id, custom_dimension_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
763
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}'
764
+ command = make_simple_command(:put, path, options)
765
+ command.request_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
766
+ command.request_object = custom_dimension_object
767
+ command.response_representation = Google::Apis::AnalyticsV3::CustomDimension::Representation
768
+ command.response_class = Google::Apis::AnalyticsV3::CustomDimension
769
+ command.params['accountId'] = account_id unless account_id.nil?
770
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
771
+ command.params['customDimensionId'] = custom_dimension_id unless custom_dimension_id.nil?
772
+ command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.nil?
773
+ command.query['fields'] = fields unless fields.nil?
774
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
775
+ command.query['userIp'] = user_ip unless user_ip.nil?
776
+ execute_or_queue_command(command, &block)
777
+ end
778
+
779
+ # Get a custom metric to which the user has access.
780
+ # @param [String] account_id
781
+ # Account ID for the custom metric to retrieve.
782
+ # @param [String] web_property_id
783
+ # Web property ID for the custom metric to retrieve.
784
+ # @param [String] custom_metric_id
785
+ # The ID of the custom metric to retrieve.
786
+ # @param [String] fields
787
+ # Selector specifying which fields to include in a partial response.
788
+ # @param [String] quota_user
789
+ # Available to use for quota purposes for server-side applications. Can be any
790
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
791
+ # Overrides userIp if both are provided.
792
+ # @param [String] user_ip
793
+ # IP address of the site where the request originates. Use this if you want to
794
+ # enforce per-user limits.
795
+ # @param [Google::Apis::RequestOptions] options
796
+ # Request-specific options
797
+ #
798
+ # @yield [result, err] Result & error if block supplied
799
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetric] parsed result object
800
+ # @yieldparam err [StandardError] error object if request failed
801
+ #
802
+ # @return [Google::Apis::AnalyticsV3::CustomMetric]
803
+ #
804
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
805
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
806
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
807
+ def get_custom_metric(account_id, web_property_id, custom_metric_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
808
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}'
809
+ command = make_simple_command(:get, path, options)
810
+ command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
811
+ command.response_class = Google::Apis::AnalyticsV3::CustomMetric
812
+ command.params['accountId'] = account_id unless account_id.nil?
813
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
814
+ command.params['customMetricId'] = custom_metric_id unless custom_metric_id.nil?
815
+ command.query['fields'] = fields unless fields.nil?
816
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
817
+ command.query['userIp'] = user_ip unless user_ip.nil?
818
+ execute_or_queue_command(command, &block)
819
+ end
820
+
821
+ # Create a new custom metric.
822
+ # @param [String] account_id
823
+ # Account ID for the custom metric to create.
824
+ # @param [String] web_property_id
825
+ # Web property ID for the custom dimension to create.
826
+ # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_object
827
+ # @param [String] fields
828
+ # Selector specifying which fields to include in a partial response.
829
+ # @param [String] quota_user
830
+ # Available to use for quota purposes for server-side applications. Can be any
831
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
832
+ # Overrides userIp if both are provided.
833
+ # @param [String] user_ip
834
+ # IP address of the site where the request originates. Use this if you want to
835
+ # enforce per-user limits.
836
+ # @param [Google::Apis::RequestOptions] options
837
+ # Request-specific options
838
+ #
839
+ # @yield [result, err] Result & error if block supplied
840
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetric] parsed result object
841
+ # @yieldparam err [StandardError] error object if request failed
842
+ #
843
+ # @return [Google::Apis::AnalyticsV3::CustomMetric]
844
+ #
845
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
846
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
847
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
848
+ def insert_custom_metric(account_id, web_property_id, custom_metric_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
849
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics'
850
+ command = make_simple_command(:post, path, options)
851
+ command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
852
+ command.request_object = custom_metric_object
853
+ command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
854
+ command.response_class = Google::Apis::AnalyticsV3::CustomMetric
855
+ command.params['accountId'] = account_id unless account_id.nil?
856
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
857
+ command.query['fields'] = fields unless fields.nil?
858
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
859
+ command.query['userIp'] = user_ip unless user_ip.nil?
860
+ execute_or_queue_command(command, &block)
861
+ end
862
+
863
+ # Lists custom metrics to which the user has access.
864
+ # @param [String] account_id
865
+ # Account ID for the custom metrics to retrieve.
866
+ # @param [String] web_property_id
867
+ # Web property ID for the custom metrics to retrieve.
868
+ # @param [Fixnum] max_results
869
+ # The maximum number of custom metrics to include in this response.
870
+ # @param [Fixnum] start_index
871
+ # An index of the first entity to retrieve. Use this parameter as a pagination
872
+ # mechanism along with the max-results parameter.
873
+ # @param [String] fields
874
+ # Selector specifying which fields to include in a partial response.
875
+ # @param [String] quota_user
876
+ # Available to use for quota purposes for server-side applications. Can be any
877
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
878
+ # Overrides userIp if both are provided.
879
+ # @param [String] user_ip
880
+ # IP address of the site where the request originates. Use this if you want to
881
+ # enforce per-user limits.
882
+ # @param [Google::Apis::RequestOptions] options
883
+ # Request-specific options
884
+ #
885
+ # @yield [result, err] Result & error if block supplied
886
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetrics] parsed result object
887
+ # @yieldparam err [StandardError] error object if request failed
888
+ #
889
+ # @return [Google::Apis::AnalyticsV3::CustomMetrics]
890
+ #
891
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
892
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
893
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
894
+ def list_custom_metrics(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
895
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics'
896
+ command = make_simple_command(:get, path, options)
897
+ command.response_representation = Google::Apis::AnalyticsV3::CustomMetrics::Representation
898
+ command.response_class = Google::Apis::AnalyticsV3::CustomMetrics
899
+ command.params['accountId'] = account_id unless account_id.nil?
900
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
901
+ command.query['max-results'] = max_results unless max_results.nil?
902
+ command.query['start-index'] = start_index unless start_index.nil?
903
+ command.query['fields'] = fields unless fields.nil?
904
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
905
+ command.query['userIp'] = user_ip unless user_ip.nil?
906
+ execute_or_queue_command(command, &block)
907
+ end
908
+
909
+ # Updates an existing custom metric. This method supports patch semantics.
910
+ # @param [String] account_id
911
+ # Account ID for the custom metric to update.
912
+ # @param [String] web_property_id
913
+ # Web property ID for the custom metric to update.
914
+ # @param [String] custom_metric_id
915
+ # Custom metric ID for the custom metric to update.
916
+ # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_object
917
+ # @param [Boolean] ignore_custom_data_source_links
918
+ # Force the update and ignore any warnings related to the custom metric being
919
+ # linked to a custom data source / data set.
920
+ # @param [String] fields
921
+ # Selector specifying which fields to include in a partial response.
922
+ # @param [String] quota_user
923
+ # Available to use for quota purposes for server-side applications. Can be any
924
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
925
+ # Overrides userIp if both are provided.
926
+ # @param [String] user_ip
927
+ # IP address of the site where the request originates. Use this if you want to
928
+ # enforce per-user limits.
929
+ # @param [Google::Apis::RequestOptions] options
930
+ # Request-specific options
931
+ #
932
+ # @yield [result, err] Result & error if block supplied
933
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetric] parsed result object
934
+ # @yieldparam err [StandardError] error object if request failed
935
+ #
936
+ # @return [Google::Apis::AnalyticsV3::CustomMetric]
937
+ #
938
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
939
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
940
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
941
+ def patch_custom_metric(account_id, web_property_id, custom_metric_id, custom_metric_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
942
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}'
943
+ command = make_simple_command(:patch, path, options)
944
+ command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
945
+ command.request_object = custom_metric_object
946
+ command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
947
+ command.response_class = Google::Apis::AnalyticsV3::CustomMetric
948
+ command.params['accountId'] = account_id unless account_id.nil?
949
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
950
+ command.params['customMetricId'] = custom_metric_id unless custom_metric_id.nil?
951
+ command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.nil?
952
+ command.query['fields'] = fields unless fields.nil?
953
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
954
+ command.query['userIp'] = user_ip unless user_ip.nil?
955
+ execute_or_queue_command(command, &block)
956
+ end
957
+
958
+ # Updates an existing custom metric.
959
+ # @param [String] account_id
960
+ # Account ID for the custom metric to update.
961
+ # @param [String] web_property_id
962
+ # Web property ID for the custom metric to update.
963
+ # @param [String] custom_metric_id
964
+ # Custom metric ID for the custom metric to update.
965
+ # @param [Google::Apis::AnalyticsV3::CustomMetric] custom_metric_object
966
+ # @param [Boolean] ignore_custom_data_source_links
967
+ # Force the update and ignore any warnings related to the custom metric being
968
+ # linked to a custom data source / data set.
969
+ # @param [String] fields
970
+ # Selector specifying which fields to include in a partial response.
971
+ # @param [String] quota_user
972
+ # Available to use for quota purposes for server-side applications. Can be any
973
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
974
+ # Overrides userIp if both are provided.
975
+ # @param [String] user_ip
976
+ # IP address of the site where the request originates. Use this if you want to
977
+ # enforce per-user limits.
978
+ # @param [Google::Apis::RequestOptions] options
979
+ # Request-specific options
980
+ #
981
+ # @yield [result, err] Result & error if block supplied
982
+ # @yieldparam result [Google::Apis::AnalyticsV3::CustomMetric] parsed result object
983
+ # @yieldparam err [StandardError] error object if request failed
984
+ #
985
+ # @return [Google::Apis::AnalyticsV3::CustomMetric]
986
+ #
987
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
988
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
989
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
990
+ def update_custom_metric(account_id, web_property_id, custom_metric_id, custom_metric_object = nil, ignore_custom_data_source_links: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
991
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}'
992
+ command = make_simple_command(:put, path, options)
993
+ command.request_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
994
+ command.request_object = custom_metric_object
995
+ command.response_representation = Google::Apis::AnalyticsV3::CustomMetric::Representation
996
+ command.response_class = Google::Apis::AnalyticsV3::CustomMetric
997
+ command.params['accountId'] = account_id unless account_id.nil?
998
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
999
+ command.params['customMetricId'] = custom_metric_id unless custom_metric_id.nil?
1000
+ command.query['ignoreCustomDataSourceLinks'] = ignore_custom_data_source_links unless ignore_custom_data_source_links.nil?
1001
+ command.query['fields'] = fields unless fields.nil?
1002
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1003
+ command.query['userIp'] = user_ip unless user_ip.nil?
1004
+ execute_or_queue_command(command, &block)
1005
+ end
1006
+
1007
+ # Delete an experiment.
1008
+ # @param [String] account_id
1009
+ # Account ID to which the experiment belongs
1010
+ # @param [String] web_property_id
1011
+ # Web property ID to which the experiment belongs
1012
+ # @param [String] profile_id
1013
+ # View (Profile) ID to which the experiment belongs
1014
+ # @param [String] experiment_id
1015
+ # ID of the experiment to delete
1016
+ # @param [String] fields
1017
+ # Selector specifying which fields to include in a partial response.
1018
+ # @param [String] quota_user
1019
+ # Available to use for quota purposes for server-side applications. Can be any
1020
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1021
+ # Overrides userIp if both are provided.
1022
+ # @param [String] user_ip
1023
+ # IP address of the site where the request originates. Use this if you want to
1024
+ # enforce per-user limits.
1025
+ # @param [Google::Apis::RequestOptions] options
1026
+ # Request-specific options
1027
+ #
1028
+ # @yield [result, err] Result & error if block supplied
1029
+ # @yieldparam result [NilClass] No result returned for this method
1030
+ # @yieldparam err [StandardError] error object if request failed
1031
+ #
1032
+ # @return [void]
1033
+ #
1034
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1035
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1036
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1037
+ def delete_experiment(account_id, web_property_id, profile_id, experiment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1038
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}'
1039
+ command = make_simple_command(:delete, path, options)
1040
+ command.params['accountId'] = account_id unless account_id.nil?
1041
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1042
+ command.params['profileId'] = profile_id unless profile_id.nil?
1043
+ command.params['experimentId'] = experiment_id unless experiment_id.nil?
1044
+ command.query['fields'] = fields unless fields.nil?
1045
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1046
+ command.query['userIp'] = user_ip unless user_ip.nil?
1047
+ execute_or_queue_command(command, &block)
1048
+ end
1049
+
1050
+ # Returns an experiment to which the user has access.
1051
+ # @param [String] account_id
1052
+ # Account ID to retrieve the experiment for.
1053
+ # @param [String] web_property_id
1054
+ # Web property ID to retrieve the experiment for.
1055
+ # @param [String] profile_id
1056
+ # View (Profile) ID to retrieve the experiment for.
1057
+ # @param [String] experiment_id
1058
+ # Experiment ID to retrieve the experiment for.
1059
+ # @param [String] fields
1060
+ # Selector specifying which fields to include in a partial response.
1061
+ # @param [String] quota_user
1062
+ # Available to use for quota purposes for server-side applications. Can be any
1063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1064
+ # Overrides userIp if both are provided.
1065
+ # @param [String] user_ip
1066
+ # IP address of the site where the request originates. Use this if you want to
1067
+ # enforce per-user limits.
1068
+ # @param [Google::Apis::RequestOptions] options
1069
+ # Request-specific options
1070
+ #
1071
+ # @yield [result, err] Result & error if block supplied
1072
+ # @yieldparam result [Google::Apis::AnalyticsV3::Experiment] parsed result object
1073
+ # @yieldparam err [StandardError] error object if request failed
1074
+ #
1075
+ # @return [Google::Apis::AnalyticsV3::Experiment]
1076
+ #
1077
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1078
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1079
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1080
+ def get_experiment(account_id, web_property_id, profile_id, experiment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1081
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}'
1082
+ command = make_simple_command(:get, path, options)
1083
+ command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1084
+ command.response_class = Google::Apis::AnalyticsV3::Experiment
1085
+ command.params['accountId'] = account_id unless account_id.nil?
1086
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1087
+ command.params['profileId'] = profile_id unless profile_id.nil?
1088
+ command.params['experimentId'] = experiment_id unless experiment_id.nil?
1089
+ command.query['fields'] = fields unless fields.nil?
1090
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1091
+ command.query['userIp'] = user_ip unless user_ip.nil?
1092
+ execute_or_queue_command(command, &block)
1093
+ end
1094
+
1095
+ # Create a new experiment.
1096
+ # @param [String] account_id
1097
+ # Account ID to create the experiment for.
1098
+ # @param [String] web_property_id
1099
+ # Web property ID to create the experiment for.
1100
+ # @param [String] profile_id
1101
+ # View (Profile) ID to create the experiment for.
1102
+ # @param [Google::Apis::AnalyticsV3::Experiment] experiment_object
1103
+ # @param [String] fields
1104
+ # Selector specifying which fields to include in a partial response.
1105
+ # @param [String] quota_user
1106
+ # Available to use for quota purposes for server-side applications. Can be any
1107
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1108
+ # Overrides userIp if both are provided.
1109
+ # @param [String] user_ip
1110
+ # IP address of the site where the request originates. Use this if you want to
1111
+ # enforce per-user limits.
1112
+ # @param [Google::Apis::RequestOptions] options
1113
+ # Request-specific options
1114
+ #
1115
+ # @yield [result, err] Result & error if block supplied
1116
+ # @yieldparam result [Google::Apis::AnalyticsV3::Experiment] parsed result object
1117
+ # @yieldparam err [StandardError] error object if request failed
1118
+ #
1119
+ # @return [Google::Apis::AnalyticsV3::Experiment]
1120
+ #
1121
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1122
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1123
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1124
+ def insert_experiment(account_id, web_property_id, profile_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1125
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments'
1126
+ command = make_simple_command(:post, path, options)
1127
+ command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1128
+ command.request_object = experiment_object
1129
+ command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1130
+ command.response_class = Google::Apis::AnalyticsV3::Experiment
1131
+ command.params['accountId'] = account_id unless account_id.nil?
1132
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1133
+ command.params['profileId'] = profile_id unless profile_id.nil?
1134
+ command.query['fields'] = fields unless fields.nil?
1135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1136
+ command.query['userIp'] = user_ip unless user_ip.nil?
1137
+ execute_or_queue_command(command, &block)
1138
+ end
1139
+
1140
+ # Lists experiments to which the user has access.
1141
+ # @param [String] account_id
1142
+ # Account ID to retrieve experiments for.
1143
+ # @param [String] web_property_id
1144
+ # Web property ID to retrieve experiments for.
1145
+ # @param [String] profile_id
1146
+ # View (Profile) ID to retrieve experiments for.
1147
+ # @param [Fixnum] max_results
1148
+ # The maximum number of experiments to include in this response.
1149
+ # @param [Fixnum] start_index
1150
+ # An index of the first experiment to retrieve. Use this parameter as a
1151
+ # pagination mechanism along with the max-results parameter.
1152
+ # @param [String] fields
1153
+ # Selector specifying which fields to include in a partial response.
1154
+ # @param [String] quota_user
1155
+ # Available to use for quota purposes for server-side applications. Can be any
1156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1157
+ # Overrides userIp if both are provided.
1158
+ # @param [String] user_ip
1159
+ # IP address of the site where the request originates. Use this if you want to
1160
+ # enforce per-user limits.
1161
+ # @param [Google::Apis::RequestOptions] options
1162
+ # Request-specific options
1163
+ #
1164
+ # @yield [result, err] Result & error if block supplied
1165
+ # @yieldparam result [Google::Apis::AnalyticsV3::Experiments] parsed result object
1166
+ # @yieldparam err [StandardError] error object if request failed
1167
+ #
1168
+ # @return [Google::Apis::AnalyticsV3::Experiments]
1169
+ #
1170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1173
+ def list_experiments(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1174
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments'
1175
+ command = make_simple_command(:get, path, options)
1176
+ command.response_representation = Google::Apis::AnalyticsV3::Experiments::Representation
1177
+ command.response_class = Google::Apis::AnalyticsV3::Experiments
1178
+ command.params['accountId'] = account_id unless account_id.nil?
1179
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1180
+ command.params['profileId'] = profile_id unless profile_id.nil?
1181
+ command.query['max-results'] = max_results unless max_results.nil?
1182
+ command.query['start-index'] = start_index unless start_index.nil?
1183
+ command.query['fields'] = fields unless fields.nil?
1184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1185
+ command.query['userIp'] = user_ip unless user_ip.nil?
1186
+ execute_or_queue_command(command, &block)
1187
+ end
1188
+
1189
+ # Update an existing experiment. This method supports patch semantics.
1190
+ # @param [String] account_id
1191
+ # Account ID of the experiment to update.
1192
+ # @param [String] web_property_id
1193
+ # Web property ID of the experiment to update.
1194
+ # @param [String] profile_id
1195
+ # View (Profile) ID of the experiment to update.
1196
+ # @param [String] experiment_id
1197
+ # Experiment ID of the experiment to update.
1198
+ # @param [Google::Apis::AnalyticsV3::Experiment] experiment_object
1199
+ # @param [String] fields
1200
+ # Selector specifying which fields to include in a partial response.
1201
+ # @param [String] quota_user
1202
+ # Available to use for quota purposes for server-side applications. Can be any
1203
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1204
+ # Overrides userIp if both are provided.
1205
+ # @param [String] user_ip
1206
+ # IP address of the site where the request originates. Use this if you want to
1207
+ # enforce per-user limits.
1208
+ # @param [Google::Apis::RequestOptions] options
1209
+ # Request-specific options
1210
+ #
1211
+ # @yield [result, err] Result & error if block supplied
1212
+ # @yieldparam result [Google::Apis::AnalyticsV3::Experiment] parsed result object
1213
+ # @yieldparam err [StandardError] error object if request failed
1214
+ #
1215
+ # @return [Google::Apis::AnalyticsV3::Experiment]
1216
+ #
1217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1220
+ def patch_experiment(account_id, web_property_id, profile_id, experiment_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1221
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}'
1222
+ command = make_simple_command(:patch, path, options)
1223
+ command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1224
+ command.request_object = experiment_object
1225
+ command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1226
+ command.response_class = Google::Apis::AnalyticsV3::Experiment
1227
+ command.params['accountId'] = account_id unless account_id.nil?
1228
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1229
+ command.params['profileId'] = profile_id unless profile_id.nil?
1230
+ command.params['experimentId'] = experiment_id unless experiment_id.nil?
1231
+ command.query['fields'] = fields unless fields.nil?
1232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1233
+ command.query['userIp'] = user_ip unless user_ip.nil?
1234
+ execute_or_queue_command(command, &block)
1235
+ end
1236
+
1237
+ # Update an existing experiment.
1238
+ # @param [String] account_id
1239
+ # Account ID of the experiment to update.
1240
+ # @param [String] web_property_id
1241
+ # Web property ID of the experiment to update.
1242
+ # @param [String] profile_id
1243
+ # View (Profile) ID of the experiment to update.
1244
+ # @param [String] experiment_id
1245
+ # Experiment ID of the experiment to update.
1246
+ # @param [Google::Apis::AnalyticsV3::Experiment] experiment_object
1247
+ # @param [String] fields
1248
+ # Selector specifying which fields to include in a partial response.
1249
+ # @param [String] quota_user
1250
+ # Available to use for quota purposes for server-side applications. Can be any
1251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1252
+ # Overrides userIp if both are provided.
1253
+ # @param [String] user_ip
1254
+ # IP address of the site where the request originates. Use this if you want to
1255
+ # enforce per-user limits.
1256
+ # @param [Google::Apis::RequestOptions] options
1257
+ # Request-specific options
1258
+ #
1259
+ # @yield [result, err] Result & error if block supplied
1260
+ # @yieldparam result [Google::Apis::AnalyticsV3::Experiment] parsed result object
1261
+ # @yieldparam err [StandardError] error object if request failed
1262
+ #
1263
+ # @return [Google::Apis::AnalyticsV3::Experiment]
1264
+ #
1265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1268
+ def update_experiment(account_id, web_property_id, profile_id, experiment_id, experiment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1269
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}'
1270
+ command = make_simple_command(:put, path, options)
1271
+ command.request_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1272
+ command.request_object = experiment_object
1273
+ command.response_representation = Google::Apis::AnalyticsV3::Experiment::Representation
1274
+ command.response_class = Google::Apis::AnalyticsV3::Experiment
1275
+ command.params['accountId'] = account_id unless account_id.nil?
1276
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1277
+ command.params['profileId'] = profile_id unless profile_id.nil?
1278
+ command.params['experimentId'] = experiment_id unless experiment_id.nil?
1279
+ command.query['fields'] = fields unless fields.nil?
1280
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1281
+ command.query['userIp'] = user_ip unless user_ip.nil?
1282
+ execute_or_queue_command(command, &block)
1283
+ end
1284
+
1285
+ # Delete a filter.
1286
+ # @param [String] account_id
1287
+ # Account ID to delete the filter for.
1288
+ # @param [String] filter_id
1289
+ # ID of the filter to be deleted.
1290
+ # @param [String] fields
1291
+ # Selector specifying which fields to include in a partial response.
1292
+ # @param [String] quota_user
1293
+ # Available to use for quota purposes for server-side applications. Can be any
1294
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1295
+ # Overrides userIp if both are provided.
1296
+ # @param [String] user_ip
1297
+ # IP address of the site where the request originates. Use this if you want to
1298
+ # enforce per-user limits.
1299
+ # @param [Google::Apis::RequestOptions] options
1300
+ # Request-specific options
1301
+ #
1302
+ # @yield [result, err] Result & error if block supplied
1303
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filter] parsed result object
1304
+ # @yieldparam err [StandardError] error object if request failed
1305
+ #
1306
+ # @return [Google::Apis::AnalyticsV3::Filter]
1307
+ #
1308
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1309
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1310
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1311
+ def delete_filter(account_id, filter_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1312
+ path = 'management/accounts/{accountId}/filters/{filterId}'
1313
+ command = make_simple_command(:delete, path, options)
1314
+ command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation
1315
+ command.response_class = Google::Apis::AnalyticsV3::Filter
1316
+ command.params['accountId'] = account_id unless account_id.nil?
1317
+ command.params['filterId'] = filter_id unless filter_id.nil?
1318
+ command.query['fields'] = fields unless fields.nil?
1319
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1320
+ command.query['userIp'] = user_ip unless user_ip.nil?
1321
+ execute_or_queue_command(command, &block)
1322
+ end
1323
+
1324
+ # Returns a filters to which the user has access.
1325
+ # @param [String] account_id
1326
+ # Account ID to retrieve filters for.
1327
+ # @param [String] filter_id
1328
+ # Filter ID to retrieve filters for.
1329
+ # @param [String] fields
1330
+ # Selector specifying which fields to include in a partial response.
1331
+ # @param [String] quota_user
1332
+ # Available to use for quota purposes for server-side applications. Can be any
1333
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1334
+ # Overrides userIp if both are provided.
1335
+ # @param [String] user_ip
1336
+ # IP address of the site where the request originates. Use this if you want to
1337
+ # enforce per-user limits.
1338
+ # @param [Google::Apis::RequestOptions] options
1339
+ # Request-specific options
1340
+ #
1341
+ # @yield [result, err] Result & error if block supplied
1342
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filter] parsed result object
1343
+ # @yieldparam err [StandardError] error object if request failed
1344
+ #
1345
+ # @return [Google::Apis::AnalyticsV3::Filter]
1346
+ #
1347
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1348
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1349
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1350
+ def get_filter(account_id, filter_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1351
+ path = 'management/accounts/{accountId}/filters/{filterId}'
1352
+ command = make_simple_command(:get, path, options)
1353
+ command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation
1354
+ command.response_class = Google::Apis::AnalyticsV3::Filter
1355
+ command.params['accountId'] = account_id unless account_id.nil?
1356
+ command.params['filterId'] = filter_id unless filter_id.nil?
1357
+ command.query['fields'] = fields unless fields.nil?
1358
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1359
+ command.query['userIp'] = user_ip unless user_ip.nil?
1360
+ execute_or_queue_command(command, &block)
1361
+ end
1362
+
1363
+ # Create a new filter.
1364
+ # @param [String] account_id
1365
+ # Account ID to create filter for.
1366
+ # @param [Google::Apis::AnalyticsV3::Filter] filter_object
1367
+ # @param [String] fields
1368
+ # Selector specifying which fields to include in a partial response.
1369
+ # @param [String] quota_user
1370
+ # Available to use for quota purposes for server-side applications. Can be any
1371
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1372
+ # Overrides userIp if both are provided.
1373
+ # @param [String] user_ip
1374
+ # IP address of the site where the request originates. Use this if you want to
1375
+ # enforce per-user limits.
1376
+ # @param [Google::Apis::RequestOptions] options
1377
+ # Request-specific options
1378
+ #
1379
+ # @yield [result, err] Result & error if block supplied
1380
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filter] parsed result object
1381
+ # @yieldparam err [StandardError] error object if request failed
1382
+ #
1383
+ # @return [Google::Apis::AnalyticsV3::Filter]
1384
+ #
1385
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1386
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1387
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1388
+ def insert_filter(account_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1389
+ path = 'management/accounts/{accountId}/filters'
1390
+ command = make_simple_command(:post, path, options)
1391
+ command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation
1392
+ command.request_object = filter_object
1393
+ command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation
1394
+ command.response_class = Google::Apis::AnalyticsV3::Filter
1395
+ command.params['accountId'] = account_id unless account_id.nil?
1396
+ command.query['fields'] = fields unless fields.nil?
1397
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1398
+ command.query['userIp'] = user_ip unless user_ip.nil?
1399
+ execute_or_queue_command(command, &block)
1400
+ end
1401
+
1402
+ # Lists all filters for an account
1403
+ # @param [String] account_id
1404
+ # Account ID to retrieve filters for.
1405
+ # @param [Fixnum] max_results
1406
+ # The maximum number of filters to include in this response.
1407
+ # @param [Fixnum] start_index
1408
+ # An index of the first entity to retrieve. Use this parameter as a pagination
1409
+ # mechanism along with the max-results parameter.
1410
+ # @param [String] fields
1411
+ # Selector specifying which fields to include in a partial response.
1412
+ # @param [String] quota_user
1413
+ # Available to use for quota purposes for server-side applications. Can be any
1414
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1415
+ # Overrides userIp if both are provided.
1416
+ # @param [String] user_ip
1417
+ # IP address of the site where the request originates. Use this if you want to
1418
+ # enforce per-user limits.
1419
+ # @param [Google::Apis::RequestOptions] options
1420
+ # Request-specific options
1421
+ #
1422
+ # @yield [result, err] Result & error if block supplied
1423
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filters] parsed result object
1424
+ # @yieldparam err [StandardError] error object if request failed
1425
+ #
1426
+ # @return [Google::Apis::AnalyticsV3::Filters]
1427
+ #
1428
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1429
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1430
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1431
+ def list_filters(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1432
+ path = 'management/accounts/{accountId}/filters'
1433
+ command = make_simple_command(:get, path, options)
1434
+ command.response_representation = Google::Apis::AnalyticsV3::Filters::Representation
1435
+ command.response_class = Google::Apis::AnalyticsV3::Filters
1436
+ command.params['accountId'] = account_id unless account_id.nil?
1437
+ command.query['max-results'] = max_results unless max_results.nil?
1438
+ command.query['start-index'] = start_index unless start_index.nil?
1439
+ command.query['fields'] = fields unless fields.nil?
1440
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1441
+ command.query['userIp'] = user_ip unless user_ip.nil?
1442
+ execute_or_queue_command(command, &block)
1443
+ end
1444
+
1445
+ # Updates an existing filter. This method supports patch semantics.
1446
+ # @param [String] account_id
1447
+ # Account ID to which the filter belongs.
1448
+ # @param [String] filter_id
1449
+ # ID of the filter to be updated.
1450
+ # @param [Google::Apis::AnalyticsV3::Filter] filter_object
1451
+ # @param [String] fields
1452
+ # Selector specifying which fields to include in a partial response.
1453
+ # @param [String] quota_user
1454
+ # Available to use for quota purposes for server-side applications. Can be any
1455
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1456
+ # Overrides userIp if both are provided.
1457
+ # @param [String] user_ip
1458
+ # IP address of the site where the request originates. Use this if you want to
1459
+ # enforce per-user limits.
1460
+ # @param [Google::Apis::RequestOptions] options
1461
+ # Request-specific options
1462
+ #
1463
+ # @yield [result, err] Result & error if block supplied
1464
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filter] parsed result object
1465
+ # @yieldparam err [StandardError] error object if request failed
1466
+ #
1467
+ # @return [Google::Apis::AnalyticsV3::Filter]
1468
+ #
1469
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1470
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1471
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1472
+ def patch_filter(account_id, filter_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1473
+ path = 'management/accounts/{accountId}/filters/{filterId}'
1474
+ command = make_simple_command(:patch, path, options)
1475
+ command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation
1476
+ command.request_object = filter_object
1477
+ command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation
1478
+ command.response_class = Google::Apis::AnalyticsV3::Filter
1479
+ command.params['accountId'] = account_id unless account_id.nil?
1480
+ command.params['filterId'] = filter_id unless filter_id.nil?
1481
+ command.query['fields'] = fields unless fields.nil?
1482
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1483
+ command.query['userIp'] = user_ip unless user_ip.nil?
1484
+ execute_or_queue_command(command, &block)
1485
+ end
1486
+
1487
+ # Updates an existing filter.
1488
+ # @param [String] account_id
1489
+ # Account ID to which the filter belongs.
1490
+ # @param [String] filter_id
1491
+ # ID of the filter to be updated.
1492
+ # @param [Google::Apis::AnalyticsV3::Filter] filter_object
1493
+ # @param [String] fields
1494
+ # Selector specifying which fields to include in a partial response.
1495
+ # @param [String] quota_user
1496
+ # Available to use for quota purposes for server-side applications. Can be any
1497
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1498
+ # Overrides userIp if both are provided.
1499
+ # @param [String] user_ip
1500
+ # IP address of the site where the request originates. Use this if you want to
1501
+ # enforce per-user limits.
1502
+ # @param [Google::Apis::RequestOptions] options
1503
+ # Request-specific options
1504
+ #
1505
+ # @yield [result, err] Result & error if block supplied
1506
+ # @yieldparam result [Google::Apis::AnalyticsV3::Filter] parsed result object
1507
+ # @yieldparam err [StandardError] error object if request failed
1508
+ #
1509
+ # @return [Google::Apis::AnalyticsV3::Filter]
1510
+ #
1511
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1512
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1513
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1514
+ def update_filter(account_id, filter_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1515
+ path = 'management/accounts/{accountId}/filters/{filterId}'
1516
+ command = make_simple_command(:put, path, options)
1517
+ command.request_representation = Google::Apis::AnalyticsV3::Filter::Representation
1518
+ command.request_object = filter_object
1519
+ command.response_representation = Google::Apis::AnalyticsV3::Filter::Representation
1520
+ command.response_class = Google::Apis::AnalyticsV3::Filter
1521
+ command.params['accountId'] = account_id unless account_id.nil?
1522
+ command.params['filterId'] = filter_id unless filter_id.nil?
1523
+ command.query['fields'] = fields unless fields.nil?
1524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1525
+ command.query['userIp'] = user_ip unless user_ip.nil?
1526
+ execute_or_queue_command(command, &block)
1527
+ end
1528
+
1529
+ # Gets a goal to which the user has access.
1530
+ # @param [String] account_id
1531
+ # Account ID to retrieve the goal for.
1532
+ # @param [String] web_property_id
1533
+ # Web property ID to retrieve the goal for.
1534
+ # @param [String] profile_id
1535
+ # View (Profile) ID to retrieve the goal for.
1536
+ # @param [String] goal_id
1537
+ # Goal ID to retrieve the goal for.
1538
+ # @param [String] fields
1539
+ # Selector specifying which fields to include in a partial response.
1540
+ # @param [String] quota_user
1541
+ # Available to use for quota purposes for server-side applications. Can be any
1542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1543
+ # Overrides userIp if both are provided.
1544
+ # @param [String] user_ip
1545
+ # IP address of the site where the request originates. Use this if you want to
1546
+ # enforce per-user limits.
1547
+ # @param [Google::Apis::RequestOptions] options
1548
+ # Request-specific options
1549
+ #
1550
+ # @yield [result, err] Result & error if block supplied
1551
+ # @yieldparam result [Google::Apis::AnalyticsV3::Goal] parsed result object
1552
+ # @yieldparam err [StandardError] error object if request failed
1553
+ #
1554
+ # @return [Google::Apis::AnalyticsV3::Goal]
1555
+ #
1556
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1557
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1558
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1559
+ def get_goal(account_id, web_property_id, profile_id, goal_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1560
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}'
1561
+ command = make_simple_command(:get, path, options)
1562
+ command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation
1563
+ command.response_class = Google::Apis::AnalyticsV3::Goal
1564
+ command.params['accountId'] = account_id unless account_id.nil?
1565
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1566
+ command.params['profileId'] = profile_id unless profile_id.nil?
1567
+ command.params['goalId'] = goal_id unless goal_id.nil?
1568
+ command.query['fields'] = fields unless fields.nil?
1569
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1570
+ command.query['userIp'] = user_ip unless user_ip.nil?
1571
+ execute_or_queue_command(command, &block)
1572
+ end
1573
+
1574
+ # Create a new goal.
1575
+ # @param [String] account_id
1576
+ # Account ID to create the goal for.
1577
+ # @param [String] web_property_id
1578
+ # Web property ID to create the goal for.
1579
+ # @param [String] profile_id
1580
+ # View (Profile) ID to create the goal for.
1581
+ # @param [Google::Apis::AnalyticsV3::Goal] goal_object
1582
+ # @param [String] fields
1583
+ # Selector specifying which fields to include in a partial response.
1584
+ # @param [String] quota_user
1585
+ # Available to use for quota purposes for server-side applications. Can be any
1586
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1587
+ # Overrides userIp if both are provided.
1588
+ # @param [String] user_ip
1589
+ # IP address of the site where the request originates. Use this if you want to
1590
+ # enforce per-user limits.
1591
+ # @param [Google::Apis::RequestOptions] options
1592
+ # Request-specific options
1593
+ #
1594
+ # @yield [result, err] Result & error if block supplied
1595
+ # @yieldparam result [Google::Apis::AnalyticsV3::Goal] parsed result object
1596
+ # @yieldparam err [StandardError] error object if request failed
1597
+ #
1598
+ # @return [Google::Apis::AnalyticsV3::Goal]
1599
+ #
1600
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1601
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1602
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1603
+ def insert_goal(account_id, web_property_id, profile_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1604
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals'
1605
+ command = make_simple_command(:post, path, options)
1606
+ command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation
1607
+ command.request_object = goal_object
1608
+ command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation
1609
+ command.response_class = Google::Apis::AnalyticsV3::Goal
1610
+ command.params['accountId'] = account_id unless account_id.nil?
1611
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1612
+ command.params['profileId'] = profile_id unless profile_id.nil?
1613
+ command.query['fields'] = fields unless fields.nil?
1614
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1615
+ command.query['userIp'] = user_ip unless user_ip.nil?
1616
+ execute_or_queue_command(command, &block)
1617
+ end
1618
+
1619
+ # Lists goals to which the user has access.
1620
+ # @param [String] account_id
1621
+ # Account ID to retrieve goals for. Can either be a specific account ID or '~all'
1622
+ # , which refers to all the accounts that user has access to.
1623
+ # @param [String] web_property_id
1624
+ # Web property ID to retrieve goals for. Can either be a specific web property
1625
+ # ID or '~all', which refers to all the web properties that user has access to.
1626
+ # @param [String] profile_id
1627
+ # View (Profile) ID to retrieve goals for. Can either be a specific view (
1628
+ # profile) ID or '~all', which refers to all the views (profiles) that user has
1629
+ # access to.
1630
+ # @param [Fixnum] max_results
1631
+ # The maximum number of goals to include in this response.
1632
+ # @param [Fixnum] start_index
1633
+ # An index of the first goal to retrieve. Use this parameter as a pagination
1634
+ # mechanism along with the max-results parameter.
1635
+ # @param [String] fields
1636
+ # Selector specifying which fields to include in a partial response.
1637
+ # @param [String] quota_user
1638
+ # Available to use for quota purposes for server-side applications. Can be any
1639
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1640
+ # Overrides userIp if both are provided.
1641
+ # @param [String] user_ip
1642
+ # IP address of the site where the request originates. Use this if you want to
1643
+ # enforce per-user limits.
1644
+ # @param [Google::Apis::RequestOptions] options
1645
+ # Request-specific options
1646
+ #
1647
+ # @yield [result, err] Result & error if block supplied
1648
+ # @yieldparam result [Google::Apis::AnalyticsV3::Goals] parsed result object
1649
+ # @yieldparam err [StandardError] error object if request failed
1650
+ #
1651
+ # @return [Google::Apis::AnalyticsV3::Goals]
1652
+ #
1653
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1654
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1655
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1656
+ def list_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1657
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals'
1658
+ command = make_simple_command(:get, path, options)
1659
+ command.response_representation = Google::Apis::AnalyticsV3::Goals::Representation
1660
+ command.response_class = Google::Apis::AnalyticsV3::Goals
1661
+ command.params['accountId'] = account_id unless account_id.nil?
1662
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1663
+ command.params['profileId'] = profile_id unless profile_id.nil?
1664
+ command.query['max-results'] = max_results unless max_results.nil?
1665
+ command.query['start-index'] = start_index unless start_index.nil?
1666
+ command.query['fields'] = fields unless fields.nil?
1667
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1668
+ command.query['userIp'] = user_ip unless user_ip.nil?
1669
+ execute_or_queue_command(command, &block)
1670
+ end
1671
+
1672
+ # Updates an existing view (profile). This method supports patch semantics.
1673
+ # @param [String] account_id
1674
+ # Account ID to update the goal.
1675
+ # @param [String] web_property_id
1676
+ # Web property ID to update the goal.
1677
+ # @param [String] profile_id
1678
+ # View (Profile) ID to update the goal.
1679
+ # @param [String] goal_id
1680
+ # Index of the goal to be updated.
1681
+ # @param [Google::Apis::AnalyticsV3::Goal] goal_object
1682
+ # @param [String] fields
1683
+ # Selector specifying which fields to include in a partial response.
1684
+ # @param [String] quota_user
1685
+ # Available to use for quota purposes for server-side applications. Can be any
1686
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1687
+ # Overrides userIp if both are provided.
1688
+ # @param [String] user_ip
1689
+ # IP address of the site where the request originates. Use this if you want to
1690
+ # enforce per-user limits.
1691
+ # @param [Google::Apis::RequestOptions] options
1692
+ # Request-specific options
1693
+ #
1694
+ # @yield [result, err] Result & error if block supplied
1695
+ # @yieldparam result [Google::Apis::AnalyticsV3::Goal] parsed result object
1696
+ # @yieldparam err [StandardError] error object if request failed
1697
+ #
1698
+ # @return [Google::Apis::AnalyticsV3::Goal]
1699
+ #
1700
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1701
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1702
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1703
+ def patch_goal(account_id, web_property_id, profile_id, goal_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1704
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}'
1705
+ command = make_simple_command(:patch, path, options)
1706
+ command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation
1707
+ command.request_object = goal_object
1708
+ command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation
1709
+ command.response_class = Google::Apis::AnalyticsV3::Goal
1710
+ command.params['accountId'] = account_id unless account_id.nil?
1711
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1712
+ command.params['profileId'] = profile_id unless profile_id.nil?
1713
+ command.params['goalId'] = goal_id unless goal_id.nil?
1714
+ command.query['fields'] = fields unless fields.nil?
1715
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1716
+ command.query['userIp'] = user_ip unless user_ip.nil?
1717
+ execute_or_queue_command(command, &block)
1718
+ end
1719
+
1720
+ # Updates an existing view (profile).
1721
+ # @param [String] account_id
1722
+ # Account ID to update the goal.
1723
+ # @param [String] web_property_id
1724
+ # Web property ID to update the goal.
1725
+ # @param [String] profile_id
1726
+ # View (Profile) ID to update the goal.
1727
+ # @param [String] goal_id
1728
+ # Index of the goal to be updated.
1729
+ # @param [Google::Apis::AnalyticsV3::Goal] goal_object
1730
+ # @param [String] fields
1731
+ # Selector specifying which fields to include in a partial response.
1732
+ # @param [String] quota_user
1733
+ # Available to use for quota purposes for server-side applications. Can be any
1734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1735
+ # Overrides userIp if both are provided.
1736
+ # @param [String] user_ip
1737
+ # IP address of the site where the request originates. Use this if you want to
1738
+ # enforce per-user limits.
1739
+ # @param [Google::Apis::RequestOptions] options
1740
+ # Request-specific options
1741
+ #
1742
+ # @yield [result, err] Result & error if block supplied
1743
+ # @yieldparam result [Google::Apis::AnalyticsV3::Goal] parsed result object
1744
+ # @yieldparam err [StandardError] error object if request failed
1745
+ #
1746
+ # @return [Google::Apis::AnalyticsV3::Goal]
1747
+ #
1748
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1749
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1750
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1751
+ def update_goal(account_id, web_property_id, profile_id, goal_id, goal_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1752
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}'
1753
+ command = make_simple_command(:put, path, options)
1754
+ command.request_representation = Google::Apis::AnalyticsV3::Goal::Representation
1755
+ command.request_object = goal_object
1756
+ command.response_representation = Google::Apis::AnalyticsV3::Goal::Representation
1757
+ command.response_class = Google::Apis::AnalyticsV3::Goal
1758
+ command.params['accountId'] = account_id unless account_id.nil?
1759
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1760
+ command.params['profileId'] = profile_id unless profile_id.nil?
1761
+ command.params['goalId'] = goal_id unless goal_id.nil?
1762
+ command.query['fields'] = fields unless fields.nil?
1763
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1764
+ command.query['userIp'] = user_ip unless user_ip.nil?
1765
+ execute_or_queue_command(command, &block)
1766
+ end
1767
+
1768
+ # Delete a profile filter link.
1769
+ # @param [String] account_id
1770
+ # Account ID to which the profile filter link belongs.
1771
+ # @param [String] web_property_id
1772
+ # Web property Id to which the profile filter link belongs.
1773
+ # @param [String] profile_id
1774
+ # Profile ID to which the filter link belongs.
1775
+ # @param [String] link_id
1776
+ # ID of the profile filter link to delete.
1777
+ # @param [String] fields
1778
+ # Selector specifying which fields to include in a partial response.
1779
+ # @param [String] quota_user
1780
+ # Available to use for quota purposes for server-side applications. Can be any
1781
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1782
+ # Overrides userIp if both are provided.
1783
+ # @param [String] user_ip
1784
+ # IP address of the site where the request originates. Use this if you want to
1785
+ # enforce per-user limits.
1786
+ # @param [Google::Apis::RequestOptions] options
1787
+ # Request-specific options
1788
+ #
1789
+ # @yield [result, err] Result & error if block supplied
1790
+ # @yieldparam result [NilClass] No result returned for this method
1791
+ # @yieldparam err [StandardError] error object if request failed
1792
+ #
1793
+ # @return [void]
1794
+ #
1795
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1796
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1797
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1798
+ def delete_profile_filter_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1799
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}'
1800
+ command = make_simple_command(:delete, path, options)
1801
+ command.params['accountId'] = account_id unless account_id.nil?
1802
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1803
+ command.params['profileId'] = profile_id unless profile_id.nil?
1804
+ command.params['linkId'] = link_id unless link_id.nil?
1805
+ command.query['fields'] = fields unless fields.nil?
1806
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1807
+ command.query['userIp'] = user_ip unless user_ip.nil?
1808
+ execute_or_queue_command(command, &block)
1809
+ end
1810
+
1811
+ # Returns a single profile filter link.
1812
+ # @param [String] account_id
1813
+ # Account ID to retrieve profile filter link for.
1814
+ # @param [String] web_property_id
1815
+ # Web property Id to retrieve profile filter link for.
1816
+ # @param [String] profile_id
1817
+ # Profile ID to retrieve filter link for.
1818
+ # @param [String] link_id
1819
+ # ID of the profile filter link.
1820
+ # @param [String] fields
1821
+ # Selector specifying which fields to include in a partial response.
1822
+ # @param [String] quota_user
1823
+ # Available to use for quota purposes for server-side applications. Can be any
1824
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1825
+ # Overrides userIp if both are provided.
1826
+ # @param [String] user_ip
1827
+ # IP address of the site where the request originates. Use this if you want to
1828
+ # enforce per-user limits.
1829
+ # @param [Google::Apis::RequestOptions] options
1830
+ # Request-specific options
1831
+ #
1832
+ # @yield [result, err] Result & error if block supplied
1833
+ # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLink] parsed result object
1834
+ # @yieldparam err [StandardError] error object if request failed
1835
+ #
1836
+ # @return [Google::Apis::AnalyticsV3::ProfileFilterLink]
1837
+ #
1838
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1839
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1840
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1841
+ def get_profile_filter_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1842
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}'
1843
+ command = make_simple_command(:get, path, options)
1844
+ command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
1845
+ command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink
1846
+ command.params['accountId'] = account_id unless account_id.nil?
1847
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1848
+ command.params['profileId'] = profile_id unless profile_id.nil?
1849
+ command.params['linkId'] = link_id unless link_id.nil?
1850
+ command.query['fields'] = fields unless fields.nil?
1851
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1852
+ command.query['userIp'] = user_ip unless user_ip.nil?
1853
+ execute_or_queue_command(command, &block)
1854
+ end
1855
+
1856
+ # Create a new profile filter link.
1857
+ # @param [String] account_id
1858
+ # Account ID to create profile filter link for.
1859
+ # @param [String] web_property_id
1860
+ # Web property Id to create profile filter link for.
1861
+ # @param [String] profile_id
1862
+ # Profile ID to create filter link for.
1863
+ # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_object
1864
+ # @param [String] fields
1865
+ # Selector specifying which fields to include in a partial response.
1866
+ # @param [String] quota_user
1867
+ # Available to use for quota purposes for server-side applications. Can be any
1868
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1869
+ # Overrides userIp if both are provided.
1870
+ # @param [String] user_ip
1871
+ # IP address of the site where the request originates. Use this if you want to
1872
+ # enforce per-user limits.
1873
+ # @param [Google::Apis::RequestOptions] options
1874
+ # Request-specific options
1875
+ #
1876
+ # @yield [result, err] Result & error if block supplied
1877
+ # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLink] parsed result object
1878
+ # @yieldparam err [StandardError] error object if request failed
1879
+ #
1880
+ # @return [Google::Apis::AnalyticsV3::ProfileFilterLink]
1881
+ #
1882
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1883
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1884
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1885
+ def insert_profile_filter_link(account_id, web_property_id, profile_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1886
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks'
1887
+ command = make_simple_command(:post, path, options)
1888
+ command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
1889
+ command.request_object = profile_filter_link_object
1890
+ command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
1891
+ command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink
1892
+ command.params['accountId'] = account_id unless account_id.nil?
1893
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1894
+ command.params['profileId'] = profile_id unless profile_id.nil?
1895
+ command.query['fields'] = fields unless fields.nil?
1896
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1897
+ command.query['userIp'] = user_ip unless user_ip.nil?
1898
+ execute_or_queue_command(command, &block)
1899
+ end
1900
+
1901
+ # Lists all profile filter links for a profile.
1902
+ # @param [String] account_id
1903
+ # Account ID to retrieve profile filter links for.
1904
+ # @param [String] web_property_id
1905
+ # Web property Id for profile filter links for. Can either be a specific web
1906
+ # property ID or '~all', which refers to all the web properties that user has
1907
+ # access to.
1908
+ # @param [String] profile_id
1909
+ # Profile ID to retrieve filter links for. Can either be a specific profile ID
1910
+ # or '~all', which refers to all the profiles that user has access to.
1911
+ # @param [Fixnum] max_results
1912
+ # The maximum number of profile filter links to include in this response.
1913
+ # @param [Fixnum] start_index
1914
+ # An index of the first entity to retrieve. Use this parameter as a pagination
1915
+ # mechanism along with the max-results parameter.
1916
+ # @param [String] fields
1917
+ # Selector specifying which fields to include in a partial response.
1918
+ # @param [String] quota_user
1919
+ # Available to use for quota purposes for server-side applications. Can be any
1920
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1921
+ # Overrides userIp if both are provided.
1922
+ # @param [String] user_ip
1923
+ # IP address of the site where the request originates. Use this if you want to
1924
+ # enforce per-user limits.
1925
+ # @param [Google::Apis::RequestOptions] options
1926
+ # Request-specific options
1927
+ #
1928
+ # @yield [result, err] Result & error if block supplied
1929
+ # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLinks] parsed result object
1930
+ # @yieldparam err [StandardError] error object if request failed
1931
+ #
1932
+ # @return [Google::Apis::AnalyticsV3::ProfileFilterLinks]
1933
+ #
1934
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1935
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1936
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1937
+ def list_profile_filter_links(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1938
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks'
1939
+ command = make_simple_command(:get, path, options)
1940
+ command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLinks::Representation
1941
+ command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLinks
1942
+ command.params['accountId'] = account_id unless account_id.nil?
1943
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1944
+ command.params['profileId'] = profile_id unless profile_id.nil?
1945
+ command.query['max-results'] = max_results unless max_results.nil?
1946
+ command.query['start-index'] = start_index unless start_index.nil?
1947
+ command.query['fields'] = fields unless fields.nil?
1948
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1949
+ command.query['userIp'] = user_ip unless user_ip.nil?
1950
+ execute_or_queue_command(command, &block)
1951
+ end
1952
+
1953
+ # Update an existing profile filter link. This method supports patch semantics.
1954
+ # @param [String] account_id
1955
+ # Account ID to which profile filter link belongs.
1956
+ # @param [String] web_property_id
1957
+ # Web property Id to which profile filter link belongs
1958
+ # @param [String] profile_id
1959
+ # Profile ID to which filter link belongs
1960
+ # @param [String] link_id
1961
+ # ID of the profile filter link to be updated.
1962
+ # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_object
1963
+ # @param [String] fields
1964
+ # Selector specifying which fields to include in a partial response.
1965
+ # @param [String] quota_user
1966
+ # Available to use for quota purposes for server-side applications. Can be any
1967
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1968
+ # Overrides userIp if both are provided.
1969
+ # @param [String] user_ip
1970
+ # IP address of the site where the request originates. Use this if you want to
1971
+ # enforce per-user limits.
1972
+ # @param [Google::Apis::RequestOptions] options
1973
+ # Request-specific options
1974
+ #
1975
+ # @yield [result, err] Result & error if block supplied
1976
+ # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLink] parsed result object
1977
+ # @yieldparam err [StandardError] error object if request failed
1978
+ #
1979
+ # @return [Google::Apis::AnalyticsV3::ProfileFilterLink]
1980
+ #
1981
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1982
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1983
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1984
+ def patch_profile_filter_link(account_id, web_property_id, profile_id, link_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1985
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}'
1986
+ command = make_simple_command(:patch, path, options)
1987
+ command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
1988
+ command.request_object = profile_filter_link_object
1989
+ command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
1990
+ command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink
1991
+ command.params['accountId'] = account_id unless account_id.nil?
1992
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
1993
+ command.params['profileId'] = profile_id unless profile_id.nil?
1994
+ command.params['linkId'] = link_id unless link_id.nil?
1995
+ command.query['fields'] = fields unless fields.nil?
1996
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1997
+ command.query['userIp'] = user_ip unless user_ip.nil?
1998
+ execute_or_queue_command(command, &block)
1999
+ end
2000
+
2001
+ # Update an existing profile filter link.
2002
+ # @param [String] account_id
2003
+ # Account ID to which profile filter link belongs.
2004
+ # @param [String] web_property_id
2005
+ # Web property Id to which profile filter link belongs
2006
+ # @param [String] profile_id
2007
+ # Profile ID to which filter link belongs
2008
+ # @param [String] link_id
2009
+ # ID of the profile filter link to be updated.
2010
+ # @param [Google::Apis::AnalyticsV3::ProfileFilterLink] profile_filter_link_object
2011
+ # @param [String] fields
2012
+ # Selector specifying which fields to include in a partial response.
2013
+ # @param [String] quota_user
2014
+ # Available to use for quota purposes for server-side applications. Can be any
2015
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2016
+ # Overrides userIp if both are provided.
2017
+ # @param [String] user_ip
2018
+ # IP address of the site where the request originates. Use this if you want to
2019
+ # enforce per-user limits.
2020
+ # @param [Google::Apis::RequestOptions] options
2021
+ # Request-specific options
2022
+ #
2023
+ # @yield [result, err] Result & error if block supplied
2024
+ # @yieldparam result [Google::Apis::AnalyticsV3::ProfileFilterLink] parsed result object
2025
+ # @yieldparam err [StandardError] error object if request failed
2026
+ #
2027
+ # @return [Google::Apis::AnalyticsV3::ProfileFilterLink]
2028
+ #
2029
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2030
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2031
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2032
+ def update_profile_filter_link(account_id, web_property_id, profile_id, link_id, profile_filter_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2033
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}'
2034
+ command = make_simple_command(:put, path, options)
2035
+ command.request_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
2036
+ command.request_object = profile_filter_link_object
2037
+ command.response_representation = Google::Apis::AnalyticsV3::ProfileFilterLink::Representation
2038
+ command.response_class = Google::Apis::AnalyticsV3::ProfileFilterLink
2039
+ command.params['accountId'] = account_id unless account_id.nil?
2040
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2041
+ command.params['profileId'] = profile_id unless profile_id.nil?
2042
+ command.params['linkId'] = link_id unless link_id.nil?
2043
+ command.query['fields'] = fields unless fields.nil?
2044
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2045
+ command.query['userIp'] = user_ip unless user_ip.nil?
2046
+ execute_or_queue_command(command, &block)
2047
+ end
2048
+
2049
+ # Removes a user from the given view (profile).
2050
+ # @param [String] account_id
2051
+ # Account ID to delete the user link for.
2052
+ # @param [String] web_property_id
2053
+ # Web Property ID to delete the user link for.
2054
+ # @param [String] profile_id
2055
+ # View (Profile) ID to delete the user link for.
2056
+ # @param [String] link_id
2057
+ # Link ID to delete the user link for.
2058
+ # @param [String] fields
2059
+ # Selector specifying which fields to include in a partial response.
2060
+ # @param [String] quota_user
2061
+ # Available to use for quota purposes for server-side applications. Can be any
2062
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2063
+ # Overrides userIp if both are provided.
2064
+ # @param [String] user_ip
2065
+ # IP address of the site where the request originates. Use this if you want to
2066
+ # enforce per-user limits.
2067
+ # @param [Google::Apis::RequestOptions] options
2068
+ # Request-specific options
2069
+ #
2070
+ # @yield [result, err] Result & error if block supplied
2071
+ # @yieldparam result [NilClass] No result returned for this method
2072
+ # @yieldparam err [StandardError] error object if request failed
2073
+ #
2074
+ # @return [void]
2075
+ #
2076
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2077
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2078
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2079
+ def delete_profile_user_link(account_id, web_property_id, profile_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2080
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}'
2081
+ command = make_simple_command(:delete, path, options)
2082
+ command.params['accountId'] = account_id unless account_id.nil?
2083
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2084
+ command.params['profileId'] = profile_id unless profile_id.nil?
2085
+ command.params['linkId'] = link_id unless link_id.nil?
2086
+ command.query['fields'] = fields unless fields.nil?
2087
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2088
+ command.query['userIp'] = user_ip unless user_ip.nil?
2089
+ execute_or_queue_command(command, &block)
2090
+ end
2091
+
2092
+ # Adds a new user to the given view (profile).
2093
+ # @param [String] account_id
2094
+ # Account ID to create the user link for.
2095
+ # @param [String] web_property_id
2096
+ # Web Property ID to create the user link for.
2097
+ # @param [String] profile_id
2098
+ # View (Profile) ID to create the user link for.
2099
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
2100
+ # @param [String] fields
2101
+ # Selector specifying which fields to include in a partial response.
2102
+ # @param [String] quota_user
2103
+ # Available to use for quota purposes for server-side applications. Can be any
2104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2105
+ # Overrides userIp if both are provided.
2106
+ # @param [String] user_ip
2107
+ # IP address of the site where the request originates. Use this if you want to
2108
+ # enforce per-user limits.
2109
+ # @param [Google::Apis::RequestOptions] options
2110
+ # Request-specific options
2111
+ #
2112
+ # @yield [result, err] Result & error if block supplied
2113
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
2114
+ # @yieldparam err [StandardError] error object if request failed
2115
+ #
2116
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
2117
+ #
2118
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2119
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2120
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2121
+ def insert_profile_user_link(account_id, web_property_id, profile_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2122
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks'
2123
+ command = make_simple_command(:post, path, options)
2124
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
2125
+ command.request_object = entity_user_link_object
2126
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
2127
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
2128
+ command.params['accountId'] = account_id unless account_id.nil?
2129
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2130
+ command.params['profileId'] = profile_id unless profile_id.nil?
2131
+ command.query['fields'] = fields unless fields.nil?
2132
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2133
+ command.query['userIp'] = user_ip unless user_ip.nil?
2134
+ execute_or_queue_command(command, &block)
2135
+ end
2136
+
2137
+ # Lists profile-user links for a given view (profile).
2138
+ # @param [String] account_id
2139
+ # Account ID which the given view (profile) belongs to.
2140
+ # @param [String] web_property_id
2141
+ # Web Property ID which the given view (profile) belongs to. Can either be a
2142
+ # specific web property ID or '~all', which refers to all the web properties
2143
+ # that user has access to.
2144
+ # @param [String] profile_id
2145
+ # View (Profile) ID to retrieve the profile-user links for. Can either be a
2146
+ # specific profile ID or '~all', which refers to all the profiles that user has
2147
+ # access to.
2148
+ # @param [Fixnum] max_results
2149
+ # The maximum number of profile-user links to include in this response.
2150
+ # @param [Fixnum] start_index
2151
+ # An index of the first profile-user link to retrieve. Use this parameter as a
2152
+ # pagination mechanism along with the max-results parameter.
2153
+ # @param [String] fields
2154
+ # Selector specifying which fields to include in a partial response.
2155
+ # @param [String] quota_user
2156
+ # Available to use for quota purposes for server-side applications. Can be any
2157
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2158
+ # Overrides userIp if both are provided.
2159
+ # @param [String] user_ip
2160
+ # IP address of the site where the request originates. Use this if you want to
2161
+ # enforce per-user limits.
2162
+ # @param [Google::Apis::RequestOptions] options
2163
+ # Request-specific options
2164
+ #
2165
+ # @yield [result, err] Result & error if block supplied
2166
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object
2167
+ # @yieldparam err [StandardError] error object if request failed
2168
+ #
2169
+ # @return [Google::Apis::AnalyticsV3::EntityUserLinks]
2170
+ #
2171
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2172
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2173
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2174
+ def list_profile_user_links(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2175
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks'
2176
+ command = make_simple_command(:get, path, options)
2177
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation
2178
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks
2179
+ command.params['accountId'] = account_id unless account_id.nil?
2180
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2181
+ command.params['profileId'] = profile_id unless profile_id.nil?
2182
+ command.query['max-results'] = max_results unless max_results.nil?
2183
+ command.query['start-index'] = start_index unless start_index.nil?
2184
+ command.query['fields'] = fields unless fields.nil?
2185
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2186
+ command.query['userIp'] = user_ip unless user_ip.nil?
2187
+ execute_or_queue_command(command, &block)
2188
+ end
2189
+
2190
+ # Updates permissions for an existing user on the given view (profile).
2191
+ # @param [String] account_id
2192
+ # Account ID to update the user link for.
2193
+ # @param [String] web_property_id
2194
+ # Web Property ID to update the user link for.
2195
+ # @param [String] profile_id
2196
+ # View (Profile ID) to update the user link for.
2197
+ # @param [String] link_id
2198
+ # Link ID to update the user link for.
2199
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
2200
+ # @param [String] fields
2201
+ # Selector specifying which fields to include in a partial response.
2202
+ # @param [String] quota_user
2203
+ # Available to use for quota purposes for server-side applications. Can be any
2204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2205
+ # Overrides userIp if both are provided.
2206
+ # @param [String] user_ip
2207
+ # IP address of the site where the request originates. Use this if you want to
2208
+ # enforce per-user limits.
2209
+ # @param [Google::Apis::RequestOptions] options
2210
+ # Request-specific options
2211
+ #
2212
+ # @yield [result, err] Result & error if block supplied
2213
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
2214
+ # @yieldparam err [StandardError] error object if request failed
2215
+ #
2216
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
2217
+ #
2218
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2219
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2220
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2221
+ def update_profile_user_link(account_id, web_property_id, profile_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2222
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}'
2223
+ command = make_simple_command(:put, path, options)
2224
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
2225
+ command.request_object = entity_user_link_object
2226
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
2227
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
2228
+ command.params['accountId'] = account_id unless account_id.nil?
2229
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2230
+ command.params['profileId'] = profile_id unless profile_id.nil?
2231
+ command.params['linkId'] = link_id unless link_id.nil?
2232
+ command.query['fields'] = fields unless fields.nil?
2233
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2234
+ command.query['userIp'] = user_ip unless user_ip.nil?
2235
+ execute_or_queue_command(command, &block)
2236
+ end
2237
+
2238
+ # Deletes a view (profile).
2239
+ # @param [String] account_id
2240
+ # Account ID to delete the view (profile) for.
2241
+ # @param [String] web_property_id
2242
+ # Web property ID to delete the view (profile) for.
2243
+ # @param [String] profile_id
2244
+ # ID of the view (profile) to be deleted.
2245
+ # @param [String] fields
2246
+ # Selector specifying which fields to include in a partial response.
2247
+ # @param [String] quota_user
2248
+ # Available to use for quota purposes for server-side applications. Can be any
2249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2250
+ # Overrides userIp if both are provided.
2251
+ # @param [String] user_ip
2252
+ # IP address of the site where the request originates. Use this if you want to
2253
+ # enforce per-user limits.
2254
+ # @param [Google::Apis::RequestOptions] options
2255
+ # Request-specific options
2256
+ #
2257
+ # @yield [result, err] Result & error if block supplied
2258
+ # @yieldparam result [NilClass] No result returned for this method
2259
+ # @yieldparam err [StandardError] error object if request failed
2260
+ #
2261
+ # @return [void]
2262
+ #
2263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2266
+ def delete_profile(account_id, web_property_id, profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2267
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}'
2268
+ command = make_simple_command(:delete, path, options)
2269
+ command.params['accountId'] = account_id unless account_id.nil?
2270
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2271
+ command.params['profileId'] = profile_id unless profile_id.nil?
2272
+ command.query['fields'] = fields unless fields.nil?
2273
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2274
+ command.query['userIp'] = user_ip unless user_ip.nil?
2275
+ execute_or_queue_command(command, &block)
2276
+ end
2277
+
2278
+ # Gets a view (profile) to which the user has access.
2279
+ # @param [String] account_id
2280
+ # Account ID to retrieve the goal for.
2281
+ # @param [String] web_property_id
2282
+ # Web property ID to retrieve the goal for.
2283
+ # @param [String] profile_id
2284
+ # View (Profile) ID to retrieve the goal for.
2285
+ # @param [String] fields
2286
+ # Selector specifying which fields to include in a partial response.
2287
+ # @param [String] quota_user
2288
+ # Available to use for quota purposes for server-side applications. Can be any
2289
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2290
+ # Overrides userIp if both are provided.
2291
+ # @param [String] user_ip
2292
+ # IP address of the site where the request originates. Use this if you want to
2293
+ # enforce per-user limits.
2294
+ # @param [Google::Apis::RequestOptions] options
2295
+ # Request-specific options
2296
+ #
2297
+ # @yield [result, err] Result & error if block supplied
2298
+ # @yieldparam result [Google::Apis::AnalyticsV3::Profile] parsed result object
2299
+ # @yieldparam err [StandardError] error object if request failed
2300
+ #
2301
+ # @return [Google::Apis::AnalyticsV3::Profile]
2302
+ #
2303
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2304
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2305
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2306
+ def get_profile(account_id, web_property_id, profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2307
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}'
2308
+ command = make_simple_command(:get, path, options)
2309
+ command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation
2310
+ command.response_class = Google::Apis::AnalyticsV3::Profile
2311
+ command.params['accountId'] = account_id unless account_id.nil?
2312
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2313
+ command.params['profileId'] = profile_id unless profile_id.nil?
2314
+ command.query['fields'] = fields unless fields.nil?
2315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2316
+ command.query['userIp'] = user_ip unless user_ip.nil?
2317
+ execute_or_queue_command(command, &block)
2318
+ end
2319
+
2320
+ # Create a new view (profile).
2321
+ # @param [String] account_id
2322
+ # Account ID to create the view (profile) for.
2323
+ # @param [String] web_property_id
2324
+ # Web property ID to create the view (profile) for.
2325
+ # @param [Google::Apis::AnalyticsV3::Profile] profile_object
2326
+ # @param [String] fields
2327
+ # Selector specifying which fields to include in a partial response.
2328
+ # @param [String] quota_user
2329
+ # Available to use for quota purposes for server-side applications. Can be any
2330
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2331
+ # Overrides userIp if both are provided.
2332
+ # @param [String] user_ip
2333
+ # IP address of the site where the request originates. Use this if you want to
2334
+ # enforce per-user limits.
2335
+ # @param [Google::Apis::RequestOptions] options
2336
+ # Request-specific options
2337
+ #
2338
+ # @yield [result, err] Result & error if block supplied
2339
+ # @yieldparam result [Google::Apis::AnalyticsV3::Profile] parsed result object
2340
+ # @yieldparam err [StandardError] error object if request failed
2341
+ #
2342
+ # @return [Google::Apis::AnalyticsV3::Profile]
2343
+ #
2344
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2345
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2346
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2347
+ def insert_profile(account_id, web_property_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2348
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles'
2349
+ command = make_simple_command(:post, path, options)
2350
+ command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation
2351
+ command.request_object = profile_object
2352
+ command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation
2353
+ command.response_class = Google::Apis::AnalyticsV3::Profile
2354
+ command.params['accountId'] = account_id unless account_id.nil?
2355
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2356
+ command.query['fields'] = fields unless fields.nil?
2357
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2358
+ command.query['userIp'] = user_ip unless user_ip.nil?
2359
+ execute_or_queue_command(command, &block)
2360
+ end
2361
+
2362
+ # Lists views (profiles) to which the user has access.
2363
+ # @param [String] account_id
2364
+ # Account ID for the view (profiles) to retrieve. Can either be a specific
2365
+ # account ID or '~all', which refers to all the accounts to which the user has
2366
+ # access.
2367
+ # @param [String] web_property_id
2368
+ # Web property ID for the views (profiles) to retrieve. Can either be a specific
2369
+ # web property ID or '~all', which refers to all the web properties to which the
2370
+ # user has access.
2371
+ # @param [Fixnum] max_results
2372
+ # The maximum number of views (profiles) to include in this response.
2373
+ # @param [Fixnum] start_index
2374
+ # An index of the first entity to retrieve. Use this parameter as a pagination
2375
+ # mechanism along with the max-results parameter.
2376
+ # @param [String] fields
2377
+ # Selector specifying which fields to include in a partial response.
2378
+ # @param [String] quota_user
2379
+ # Available to use for quota purposes for server-side applications. Can be any
2380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2381
+ # Overrides userIp if both are provided.
2382
+ # @param [String] user_ip
2383
+ # IP address of the site where the request originates. Use this if you want to
2384
+ # enforce per-user limits.
2385
+ # @param [Google::Apis::RequestOptions] options
2386
+ # Request-specific options
2387
+ #
2388
+ # @yield [result, err] Result & error if block supplied
2389
+ # @yieldparam result [Google::Apis::AnalyticsV3::Profiles] parsed result object
2390
+ # @yieldparam err [StandardError] error object if request failed
2391
+ #
2392
+ # @return [Google::Apis::AnalyticsV3::Profiles]
2393
+ #
2394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2397
+ def list_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2398
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles'
2399
+ command = make_simple_command(:get, path, options)
2400
+ command.response_representation = Google::Apis::AnalyticsV3::Profiles::Representation
2401
+ command.response_class = Google::Apis::AnalyticsV3::Profiles
2402
+ command.params['accountId'] = account_id unless account_id.nil?
2403
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2404
+ command.query['max-results'] = max_results unless max_results.nil?
2405
+ command.query['start-index'] = start_index unless start_index.nil?
2406
+ command.query['fields'] = fields unless fields.nil?
2407
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2408
+ command.query['userIp'] = user_ip unless user_ip.nil?
2409
+ execute_or_queue_command(command, &block)
2410
+ end
2411
+
2412
+ # Updates an existing view (profile). This method supports patch semantics.
2413
+ # @param [String] account_id
2414
+ # Account ID to which the view (profile) belongs
2415
+ # @param [String] web_property_id
2416
+ # Web property ID to which the view (profile) belongs
2417
+ # @param [String] profile_id
2418
+ # ID of the view (profile) to be updated.
2419
+ # @param [Google::Apis::AnalyticsV3::Profile] profile_object
2420
+ # @param [String] fields
2421
+ # Selector specifying which fields to include in a partial response.
2422
+ # @param [String] quota_user
2423
+ # Available to use for quota purposes for server-side applications. Can be any
2424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2425
+ # Overrides userIp if both are provided.
2426
+ # @param [String] user_ip
2427
+ # IP address of the site where the request originates. Use this if you want to
2428
+ # enforce per-user limits.
2429
+ # @param [Google::Apis::RequestOptions] options
2430
+ # Request-specific options
2431
+ #
2432
+ # @yield [result, err] Result & error if block supplied
2433
+ # @yieldparam result [Google::Apis::AnalyticsV3::Profile] parsed result object
2434
+ # @yieldparam err [StandardError] error object if request failed
2435
+ #
2436
+ # @return [Google::Apis::AnalyticsV3::Profile]
2437
+ #
2438
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2439
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2440
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2441
+ def patch_profile(account_id, web_property_id, profile_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2442
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}'
2443
+ command = make_simple_command(:patch, path, options)
2444
+ command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation
2445
+ command.request_object = profile_object
2446
+ command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation
2447
+ command.response_class = Google::Apis::AnalyticsV3::Profile
2448
+ command.params['accountId'] = account_id unless account_id.nil?
2449
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2450
+ command.params['profileId'] = profile_id unless profile_id.nil?
2451
+ command.query['fields'] = fields unless fields.nil?
2452
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2453
+ command.query['userIp'] = user_ip unless user_ip.nil?
2454
+ execute_or_queue_command(command, &block)
2455
+ end
2456
+
2457
+ # Updates an existing view (profile).
2458
+ # @param [String] account_id
2459
+ # Account ID to which the view (profile) belongs
2460
+ # @param [String] web_property_id
2461
+ # Web property ID to which the view (profile) belongs
2462
+ # @param [String] profile_id
2463
+ # ID of the view (profile) to be updated.
2464
+ # @param [Google::Apis::AnalyticsV3::Profile] profile_object
2465
+ # @param [String] fields
2466
+ # Selector specifying which fields to include in a partial response.
2467
+ # @param [String] quota_user
2468
+ # Available to use for quota purposes for server-side applications. Can be any
2469
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2470
+ # Overrides userIp if both are provided.
2471
+ # @param [String] user_ip
2472
+ # IP address of the site where the request originates. Use this if you want to
2473
+ # enforce per-user limits.
2474
+ # @param [Google::Apis::RequestOptions] options
2475
+ # Request-specific options
2476
+ #
2477
+ # @yield [result, err] Result & error if block supplied
2478
+ # @yieldparam result [Google::Apis::AnalyticsV3::Profile] parsed result object
2479
+ # @yieldparam err [StandardError] error object if request failed
2480
+ #
2481
+ # @return [Google::Apis::AnalyticsV3::Profile]
2482
+ #
2483
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2484
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2485
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2486
+ def update_profile(account_id, web_property_id, profile_id, profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2487
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}'
2488
+ command = make_simple_command(:put, path, options)
2489
+ command.request_representation = Google::Apis::AnalyticsV3::Profile::Representation
2490
+ command.request_object = profile_object
2491
+ command.response_representation = Google::Apis::AnalyticsV3::Profile::Representation
2492
+ command.response_class = Google::Apis::AnalyticsV3::Profile
2493
+ command.params['accountId'] = account_id unless account_id.nil?
2494
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2495
+ command.params['profileId'] = profile_id unless profile_id.nil?
2496
+ command.query['fields'] = fields unless fields.nil?
2497
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2498
+ command.query['userIp'] = user_ip unless user_ip.nil?
2499
+ execute_or_queue_command(command, &block)
2500
+ end
2501
+
2502
+ # Lists segments to which the user has access.
2503
+ # @param [Fixnum] max_results
2504
+ # The maximum number of segments to include in this response.
2505
+ # @param [Fixnum] start_index
2506
+ # An index of the first segment to retrieve. Use this parameter as a pagination
2507
+ # mechanism along with the max-results parameter.
2508
+ # @param [String] fields
2509
+ # Selector specifying which fields to include in a partial response.
2510
+ # @param [String] quota_user
2511
+ # Available to use for quota purposes for server-side applications. Can be any
2512
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2513
+ # Overrides userIp if both are provided.
2514
+ # @param [String] user_ip
2515
+ # IP address of the site where the request originates. Use this if you want to
2516
+ # enforce per-user limits.
2517
+ # @param [Google::Apis::RequestOptions] options
2518
+ # Request-specific options
2519
+ #
2520
+ # @yield [result, err] Result & error if block supplied
2521
+ # @yieldparam result [Google::Apis::AnalyticsV3::Segments] parsed result object
2522
+ # @yieldparam err [StandardError] error object if request failed
2523
+ #
2524
+ # @return [Google::Apis::AnalyticsV3::Segments]
2525
+ #
2526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2529
+ def list_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2530
+ path = 'management/segments'
2531
+ command = make_simple_command(:get, path, options)
2532
+ command.response_representation = Google::Apis::AnalyticsV3::Segments::Representation
2533
+ command.response_class = Google::Apis::AnalyticsV3::Segments
2534
+ command.query['max-results'] = max_results unless max_results.nil?
2535
+ command.query['start-index'] = start_index unless start_index.nil?
2536
+ command.query['fields'] = fields unless fields.nil?
2537
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2538
+ command.query['userIp'] = user_ip unless user_ip.nil?
2539
+ execute_or_queue_command(command, &block)
2540
+ end
2541
+
2542
+ # Returns a single unsampled report.
2543
+ # @param [String] account_id
2544
+ # Account ID to retrieve unsampled report for.
2545
+ # @param [String] web_property_id
2546
+ # Web property ID to retrieve unsampled reports for.
2547
+ # @param [String] profile_id
2548
+ # View (Profile) ID to retrieve unsampled report for.
2549
+ # @param [String] unsampled_report_id
2550
+ # ID of the unsampled report to retrieve.
2551
+ # @param [String] fields
2552
+ # Selector specifying which fields to include in a partial response.
2553
+ # @param [String] quota_user
2554
+ # Available to use for quota purposes for server-side applications. Can be any
2555
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2556
+ # Overrides userIp if both are provided.
2557
+ # @param [String] user_ip
2558
+ # IP address of the site where the request originates. Use this if you want to
2559
+ # enforce per-user limits.
2560
+ # @param [Google::Apis::RequestOptions] options
2561
+ # Request-specific options
2562
+ #
2563
+ # @yield [result, err] Result & error if block supplied
2564
+ # @yieldparam result [Google::Apis::AnalyticsV3::UnsampledReport] parsed result object
2565
+ # @yieldparam err [StandardError] error object if request failed
2566
+ #
2567
+ # @return [Google::Apis::AnalyticsV3::UnsampledReport]
2568
+ #
2569
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2570
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2571
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2572
+ def get_unsampled_report(account_id, web_property_id, profile_id, unsampled_report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2573
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}'
2574
+ command = make_simple_command(:get, path, options)
2575
+ command.response_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation
2576
+ command.response_class = Google::Apis::AnalyticsV3::UnsampledReport
2577
+ command.params['accountId'] = account_id unless account_id.nil?
2578
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2579
+ command.params['profileId'] = profile_id unless profile_id.nil?
2580
+ command.params['unsampledReportId'] = unsampled_report_id unless unsampled_report_id.nil?
2581
+ command.query['fields'] = fields unless fields.nil?
2582
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2583
+ command.query['userIp'] = user_ip unless user_ip.nil?
2584
+ execute_or_queue_command(command, &block)
2585
+ end
2586
+
2587
+ # Create a new unsampled report.
2588
+ # @param [String] account_id
2589
+ # Account ID to create the unsampled report for.
2590
+ # @param [String] web_property_id
2591
+ # Web property ID to create the unsampled report for.
2592
+ # @param [String] profile_id
2593
+ # View (Profile) ID to create the unsampled report for.
2594
+ # @param [Google::Apis::AnalyticsV3::UnsampledReport] unsampled_report_object
2595
+ # @param [String] fields
2596
+ # Selector specifying which fields to include in a partial response.
2597
+ # @param [String] quota_user
2598
+ # Available to use for quota purposes for server-side applications. Can be any
2599
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2600
+ # Overrides userIp if both are provided.
2601
+ # @param [String] user_ip
2602
+ # IP address of the site where the request originates. Use this if you want to
2603
+ # enforce per-user limits.
2604
+ # @param [Google::Apis::RequestOptions] options
2605
+ # Request-specific options
2606
+ #
2607
+ # @yield [result, err] Result & error if block supplied
2608
+ # @yieldparam result [Google::Apis::AnalyticsV3::UnsampledReport] parsed result object
2609
+ # @yieldparam err [StandardError] error object if request failed
2610
+ #
2611
+ # @return [Google::Apis::AnalyticsV3::UnsampledReport]
2612
+ #
2613
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2614
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2615
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2616
+ def insert_unsampled_report(account_id, web_property_id, profile_id, unsampled_report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2617
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports'
2618
+ command = make_simple_command(:post, path, options)
2619
+ command.request_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation
2620
+ command.request_object = unsampled_report_object
2621
+ command.response_representation = Google::Apis::AnalyticsV3::UnsampledReport::Representation
2622
+ command.response_class = Google::Apis::AnalyticsV3::UnsampledReport
2623
+ command.params['accountId'] = account_id unless account_id.nil?
2624
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2625
+ command.params['profileId'] = profile_id unless profile_id.nil?
2626
+ command.query['fields'] = fields unless fields.nil?
2627
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2628
+ command.query['userIp'] = user_ip unless user_ip.nil?
2629
+ execute_or_queue_command(command, &block)
2630
+ end
2631
+
2632
+ # Lists unsampled reports to which the user has access.
2633
+ # @param [String] account_id
2634
+ # Account ID to retrieve unsampled reports for. Must be a specific account ID, ~
2635
+ # all is not supported.
2636
+ # @param [String] web_property_id
2637
+ # Web property ID to retrieve unsampled reports for. Must be a specific web
2638
+ # property ID, ~all is not supported.
2639
+ # @param [String] profile_id
2640
+ # View (Profile) ID to retrieve unsampled reports for. Must be a specific view (
2641
+ # profile) ID, ~all is not supported.
2642
+ # @param [Fixnum] max_results
2643
+ # The maximum number of unsampled reports to include in this response.
2644
+ # @param [Fixnum] start_index
2645
+ # An index of the first unsampled report to retrieve. Use this parameter as a
2646
+ # pagination mechanism along with the max-results parameter.
2647
+ # @param [String] fields
2648
+ # Selector specifying which fields to include in a partial response.
2649
+ # @param [String] quota_user
2650
+ # Available to use for quota purposes for server-side applications. Can be any
2651
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2652
+ # Overrides userIp if both are provided.
2653
+ # @param [String] user_ip
2654
+ # IP address of the site where the request originates. Use this if you want to
2655
+ # enforce per-user limits.
2656
+ # @param [Google::Apis::RequestOptions] options
2657
+ # Request-specific options
2658
+ #
2659
+ # @yield [result, err] Result & error if block supplied
2660
+ # @yieldparam result [Google::Apis::AnalyticsV3::UnsampledReports] parsed result object
2661
+ # @yieldparam err [StandardError] error object if request failed
2662
+ #
2663
+ # @return [Google::Apis::AnalyticsV3::UnsampledReports]
2664
+ #
2665
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2666
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2667
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2668
+ def list_unsampled_reports(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2669
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports'
2670
+ command = make_simple_command(:get, path, options)
2671
+ command.response_representation = Google::Apis::AnalyticsV3::UnsampledReports::Representation
2672
+ command.response_class = Google::Apis::AnalyticsV3::UnsampledReports
2673
+ command.params['accountId'] = account_id unless account_id.nil?
2674
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2675
+ command.params['profileId'] = profile_id unless profile_id.nil?
2676
+ command.query['max-results'] = max_results unless max_results.nil?
2677
+ command.query['start-index'] = start_index unless start_index.nil?
2678
+ command.query['fields'] = fields unless fields.nil?
2679
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2680
+ command.query['userIp'] = user_ip unless user_ip.nil?
2681
+ execute_or_queue_command(command, &block)
2682
+ end
2683
+
2684
+ # Delete data associated with a previous upload.
2685
+ # @param [String] account_id
2686
+ # Account Id for the uploads to be deleted.
2687
+ # @param [String] web_property_id
2688
+ # Web property Id for the uploads to be deleted.
2689
+ # @param [String] custom_data_source_id
2690
+ # Custom data source Id for the uploads to be deleted.
2691
+ # @param [Google::Apis::AnalyticsV3::DeleteUploadDataRequest] delete_upload_data_request_object
2692
+ # @param [String] fields
2693
+ # Selector specifying which fields to include in a partial response.
2694
+ # @param [String] quota_user
2695
+ # Available to use for quota purposes for server-side applications. Can be any
2696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2697
+ # Overrides userIp if both are provided.
2698
+ # @param [String] user_ip
2699
+ # IP address of the site where the request originates. Use this if you want to
2700
+ # enforce per-user limits.
2701
+ # @param [Google::Apis::RequestOptions] options
2702
+ # Request-specific options
2703
+ #
2704
+ # @yield [result, err] Result & error if block supplied
2705
+ # @yieldparam result [NilClass] No result returned for this method
2706
+ # @yieldparam err [StandardError] error object if request failed
2707
+ #
2708
+ # @return [void]
2709
+ #
2710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2713
+ def delete_upload_data(account_id, web_property_id, custom_data_source_id, delete_upload_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2714
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData'
2715
+ command = make_simple_command(:post, path, options)
2716
+ command.request_representation = Google::Apis::AnalyticsV3::DeleteUploadDataRequest::Representation
2717
+ command.request_object = delete_upload_data_request_object
2718
+ command.params['accountId'] = account_id unless account_id.nil?
2719
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2720
+ command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil?
2721
+ command.query['fields'] = fields unless fields.nil?
2722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2723
+ command.query['userIp'] = user_ip unless user_ip.nil?
2724
+ execute_or_queue_command(command, &block)
2725
+ end
2726
+
2727
+ # List uploads to which the user has access.
2728
+ # @param [String] account_id
2729
+ # Account Id for the upload to retrieve.
2730
+ # @param [String] web_property_id
2731
+ # Web property Id for the upload to retrieve.
2732
+ # @param [String] custom_data_source_id
2733
+ # Custom data source Id for upload to retrieve.
2734
+ # @param [String] upload_id
2735
+ # Upload Id to retrieve.
2736
+ # @param [String] fields
2737
+ # Selector specifying which fields to include in a partial response.
2738
+ # @param [String] quota_user
2739
+ # Available to use for quota purposes for server-side applications. Can be any
2740
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2741
+ # Overrides userIp if both are provided.
2742
+ # @param [String] user_ip
2743
+ # IP address of the site where the request originates. Use this if you want to
2744
+ # enforce per-user limits.
2745
+ # @param [Google::Apis::RequestOptions] options
2746
+ # Request-specific options
2747
+ #
2748
+ # @yield [result, err] Result & error if block supplied
2749
+ # @yieldparam result [Google::Apis::AnalyticsV3::Upload] parsed result object
2750
+ # @yieldparam err [StandardError] error object if request failed
2751
+ #
2752
+ # @return [Google::Apis::AnalyticsV3::Upload]
2753
+ #
2754
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2755
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2756
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2757
+ def get_upload(account_id, web_property_id, custom_data_source_id, upload_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2758
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}'
2759
+ command = make_simple_command(:get, path, options)
2760
+ command.response_representation = Google::Apis::AnalyticsV3::Upload::Representation
2761
+ command.response_class = Google::Apis::AnalyticsV3::Upload
2762
+ command.params['accountId'] = account_id unless account_id.nil?
2763
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2764
+ command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil?
2765
+ command.params['uploadId'] = upload_id unless upload_id.nil?
2766
+ command.query['fields'] = fields unless fields.nil?
2767
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2768
+ command.query['userIp'] = user_ip unless user_ip.nil?
2769
+ execute_or_queue_command(command, &block)
2770
+ end
2771
+
2772
+ # List uploads to which the user has access.
2773
+ # @param [String] account_id
2774
+ # Account Id for the uploads to retrieve.
2775
+ # @param [String] web_property_id
2776
+ # Web property Id for the uploads to retrieve.
2777
+ # @param [String] custom_data_source_id
2778
+ # Custom data source Id for uploads to retrieve.
2779
+ # @param [Fixnum] max_results
2780
+ # The maximum number of uploads to include in this response.
2781
+ # @param [Fixnum] start_index
2782
+ # A 1-based index of the first upload to retrieve. Use this parameter as a
2783
+ # pagination mechanism along with the max-results parameter.
2784
+ # @param [String] fields
2785
+ # Selector specifying which fields to include in a partial response.
2786
+ # @param [String] quota_user
2787
+ # Available to use for quota purposes for server-side applications. Can be any
2788
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2789
+ # Overrides userIp if both are provided.
2790
+ # @param [String] user_ip
2791
+ # IP address of the site where the request originates. Use this if you want to
2792
+ # enforce per-user limits.
2793
+ # @param [Google::Apis::RequestOptions] options
2794
+ # Request-specific options
2795
+ #
2796
+ # @yield [result, err] Result & error if block supplied
2797
+ # @yieldparam result [Google::Apis::AnalyticsV3::Uploads] parsed result object
2798
+ # @yieldparam err [StandardError] error object if request failed
2799
+ #
2800
+ # @return [Google::Apis::AnalyticsV3::Uploads]
2801
+ #
2802
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2803
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2804
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2805
+ def list_uploads(account_id, web_property_id, custom_data_source_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2806
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads'
2807
+ command = make_simple_command(:get, path, options)
2808
+ command.response_representation = Google::Apis::AnalyticsV3::Uploads::Representation
2809
+ command.response_class = Google::Apis::AnalyticsV3::Uploads
2810
+ command.params['accountId'] = account_id unless account_id.nil?
2811
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2812
+ command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil?
2813
+ command.query['max-results'] = max_results unless max_results.nil?
2814
+ command.query['start-index'] = start_index unless start_index.nil?
2815
+ command.query['fields'] = fields unless fields.nil?
2816
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2817
+ command.query['userIp'] = user_ip unless user_ip.nil?
2818
+ execute_or_queue_command(command, &block)
2819
+ end
2820
+
2821
+ # Upload data for a custom data source.
2822
+ # @param [String] account_id
2823
+ # Account Id associated with the upload.
2824
+ # @param [String] web_property_id
2825
+ # Web property UA-string associated with the upload.
2826
+ # @param [String] custom_data_source_id
2827
+ # Custom data source Id to which the data being uploaded belongs.
2828
+ # @param [String] fields
2829
+ # Selector specifying which fields to include in a partial response.
2830
+ # @param [String] quota_user
2831
+ # Available to use for quota purposes for server-side applications. Can be any
2832
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2833
+ # Overrides userIp if both are provided.
2834
+ # @param [String] user_ip
2835
+ # IP address of the site where the request originates. Use this if you want to
2836
+ # enforce per-user limits.
2837
+ # @param [IO, String] upload_source
2838
+ # IO stream or filename containing content to upload
2839
+ # @param [String] content_type
2840
+ # Content type of the uploaded content.
2841
+ # @param [Google::Apis::RequestOptions] options
2842
+ # Request-specific options
2843
+ #
2844
+ # @yield [result, err] Result & error if block supplied
2845
+ # @yieldparam result [Google::Apis::AnalyticsV3::Upload] parsed result object
2846
+ # @yieldparam err [StandardError] error object if request failed
2847
+ #
2848
+ # @return [Google::Apis::AnalyticsV3::Upload]
2849
+ #
2850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2853
+ def upload_data(account_id, web_property_id, custom_data_source_id, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
2854
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads'
2855
+ if upload_source.nil?
2856
+ command = make_simple_command(:post, path, options)
2857
+ else
2858
+ command = make_upload_command(:post, path, options)
2859
+ command.upload_source = upload_source
2860
+ command.upload_content_type = content_type
2861
+ end
2862
+ command.response_representation = Google::Apis::AnalyticsV3::Upload::Representation
2863
+ command.response_class = Google::Apis::AnalyticsV3::Upload
2864
+ command.params['accountId'] = account_id unless account_id.nil?
2865
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2866
+ command.params['customDataSourceId'] = custom_data_source_id unless custom_data_source_id.nil?
2867
+ command.query['fields'] = fields unless fields.nil?
2868
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2869
+ command.query['userIp'] = user_ip unless user_ip.nil?
2870
+ execute_or_queue_command(command, &block)
2871
+ end
2872
+
2873
+ # Deletes a web property-AdWords link.
2874
+ # @param [String] account_id
2875
+ # ID of the account which the given web property belongs to.
2876
+ # @param [String] web_property_id
2877
+ # Web property ID to delete the AdWords link for.
2878
+ # @param [String] web_property_ad_words_link_id
2879
+ # Web property AdWords link ID.
2880
+ # @param [String] fields
2881
+ # Selector specifying which fields to include in a partial response.
2882
+ # @param [String] quota_user
2883
+ # Available to use for quota purposes for server-side applications. Can be any
2884
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2885
+ # Overrides userIp if both are provided.
2886
+ # @param [String] user_ip
2887
+ # IP address of the site where the request originates. Use this if you want to
2888
+ # enforce per-user limits.
2889
+ # @param [Google::Apis::RequestOptions] options
2890
+ # Request-specific options
2891
+ #
2892
+ # @yield [result, err] Result & error if block supplied
2893
+ # @yieldparam result [NilClass] No result returned for this method
2894
+ # @yieldparam err [StandardError] error object if request failed
2895
+ #
2896
+ # @return [void]
2897
+ #
2898
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2899
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2900
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2901
+ def delete_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2902
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}'
2903
+ command = make_simple_command(:delete, path, options)
2904
+ command.params['accountId'] = account_id unless account_id.nil?
2905
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2906
+ command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_id.nil?
2907
+ command.query['fields'] = fields unless fields.nil?
2908
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2909
+ command.query['userIp'] = user_ip unless user_ip.nil?
2910
+ execute_or_queue_command(command, &block)
2911
+ end
2912
+
2913
+ # Returns a web property-AdWords link to which the user has access.
2914
+ # @param [String] account_id
2915
+ # ID of the account which the given web property belongs to.
2916
+ # @param [String] web_property_id
2917
+ # Web property ID to retrieve the AdWords link for.
2918
+ # @param [String] web_property_ad_words_link_id
2919
+ # Web property-AdWords link ID.
2920
+ # @param [String] fields
2921
+ # Selector specifying which fields to include in a partial response.
2922
+ # @param [String] quota_user
2923
+ # Available to use for quota purposes for server-side applications. Can be any
2924
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2925
+ # Overrides userIp if both are provided.
2926
+ # @param [String] user_ip
2927
+ # IP address of the site where the request originates. Use this if you want to
2928
+ # enforce per-user limits.
2929
+ # @param [Google::Apis::RequestOptions] options
2930
+ # Request-specific options
2931
+ #
2932
+ # @yield [result, err] Result & error if block supplied
2933
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLink] parsed result object
2934
+ # @yieldparam err [StandardError] error object if request failed
2935
+ #
2936
+ # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink]
2937
+ #
2938
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2939
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2940
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2941
+ def get_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2942
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}'
2943
+ command = make_simple_command(:get, path, options)
2944
+ command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
2945
+ command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink
2946
+ command.params['accountId'] = account_id unless account_id.nil?
2947
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2948
+ command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_id.nil?
2949
+ command.query['fields'] = fields unless fields.nil?
2950
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2951
+ command.query['userIp'] = user_ip unless user_ip.nil?
2952
+ execute_or_queue_command(command, &block)
2953
+ end
2954
+
2955
+ # Creates a webProperty-AdWords link.
2956
+ # @param [String] account_id
2957
+ # ID of the Google Analytics account to create the link for.
2958
+ # @param [String] web_property_id
2959
+ # Web property ID to create the link for.
2960
+ # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_object
2961
+ # @param [String] fields
2962
+ # Selector specifying which fields to include in a partial response.
2963
+ # @param [String] quota_user
2964
+ # Available to use for quota purposes for server-side applications. Can be any
2965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2966
+ # Overrides userIp if both are provided.
2967
+ # @param [String] user_ip
2968
+ # IP address of the site where the request originates. Use this if you want to
2969
+ # enforce per-user limits.
2970
+ # @param [Google::Apis::RequestOptions] options
2971
+ # Request-specific options
2972
+ #
2973
+ # @yield [result, err] Result & error if block supplied
2974
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLink] parsed result object
2975
+ # @yieldparam err [StandardError] error object if request failed
2976
+ #
2977
+ # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink]
2978
+ #
2979
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2980
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2981
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2982
+ def insert_web_property_ad_words_link(account_id, web_property_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2983
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks'
2984
+ command = make_simple_command(:post, path, options)
2985
+ command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
2986
+ command.request_object = entity_ad_words_link_object
2987
+ command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
2988
+ command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink
2989
+ command.params['accountId'] = account_id unless account_id.nil?
2990
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
2991
+ command.query['fields'] = fields unless fields.nil?
2992
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2993
+ command.query['userIp'] = user_ip unless user_ip.nil?
2994
+ execute_or_queue_command(command, &block)
2995
+ end
2996
+
2997
+ # Lists webProperty-AdWords links for a given web property.
2998
+ # @param [String] account_id
2999
+ # ID of the account which the given web property belongs to.
3000
+ # @param [String] web_property_id
3001
+ # Web property ID to retrieve the AdWords links for.
3002
+ # @param [Fixnum] max_results
3003
+ # The maximum number of webProperty-AdWords links to include in this response.
3004
+ # @param [Fixnum] start_index
3005
+ # An index of the first webProperty-AdWords link to retrieve. Use this parameter
3006
+ # as a pagination mechanism along with the max-results parameter.
3007
+ # @param [String] fields
3008
+ # Selector specifying which fields to include in a partial response.
3009
+ # @param [String] quota_user
3010
+ # Available to use for quota purposes for server-side applications. Can be any
3011
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3012
+ # Overrides userIp if both are provided.
3013
+ # @param [String] user_ip
3014
+ # IP address of the site where the request originates. Use this if you want to
3015
+ # enforce per-user limits.
3016
+ # @param [Google::Apis::RequestOptions] options
3017
+ # Request-specific options
3018
+ #
3019
+ # @yield [result, err] Result & error if block supplied
3020
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLinks] parsed result object
3021
+ # @yieldparam err [StandardError] error object if request failed
3022
+ #
3023
+ # @return [Google::Apis::AnalyticsV3::EntityAdWordsLinks]
3024
+ #
3025
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3026
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3027
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3028
+ def list_web_property_ad_words_links(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3029
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks'
3030
+ command = make_simple_command(:get, path, options)
3031
+ command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLinks::Representation
3032
+ command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLinks
3033
+ command.params['accountId'] = account_id unless account_id.nil?
3034
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3035
+ command.query['max-results'] = max_results unless max_results.nil?
3036
+ command.query['start-index'] = start_index unless start_index.nil?
3037
+ command.query['fields'] = fields unless fields.nil?
3038
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3039
+ command.query['userIp'] = user_ip unless user_ip.nil?
3040
+ execute_or_queue_command(command, &block)
3041
+ end
3042
+
3043
+ # Updates an existing webProperty-AdWords link. This method supports patch
3044
+ # semantics.
3045
+ # @param [String] account_id
3046
+ # ID of the account which the given web property belongs to.
3047
+ # @param [String] web_property_id
3048
+ # Web property ID to retrieve the AdWords link for.
3049
+ # @param [String] web_property_ad_words_link_id
3050
+ # Web property-AdWords link ID.
3051
+ # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_object
3052
+ # @param [String] fields
3053
+ # Selector specifying which fields to include in a partial response.
3054
+ # @param [String] quota_user
3055
+ # Available to use for quota purposes for server-side applications. Can be any
3056
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3057
+ # Overrides userIp if both are provided.
3058
+ # @param [String] user_ip
3059
+ # IP address of the site where the request originates. Use this if you want to
3060
+ # enforce per-user limits.
3061
+ # @param [Google::Apis::RequestOptions] options
3062
+ # Request-specific options
3063
+ #
3064
+ # @yield [result, err] Result & error if block supplied
3065
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLink] parsed result object
3066
+ # @yieldparam err [StandardError] error object if request failed
3067
+ #
3068
+ # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink]
3069
+ #
3070
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3071
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3072
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3073
+ def patch_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3074
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}'
3075
+ command = make_simple_command(:patch, path, options)
3076
+ command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
3077
+ command.request_object = entity_ad_words_link_object
3078
+ command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
3079
+ command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink
3080
+ command.params['accountId'] = account_id unless account_id.nil?
3081
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3082
+ command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_id.nil?
3083
+ command.query['fields'] = fields unless fields.nil?
3084
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3085
+ command.query['userIp'] = user_ip unless user_ip.nil?
3086
+ execute_or_queue_command(command, &block)
3087
+ end
3088
+
3089
+ # Updates an existing webProperty-AdWords link.
3090
+ # @param [String] account_id
3091
+ # ID of the account which the given web property belongs to.
3092
+ # @param [String] web_property_id
3093
+ # Web property ID to retrieve the AdWords link for.
3094
+ # @param [String] web_property_ad_words_link_id
3095
+ # Web property-AdWords link ID.
3096
+ # @param [Google::Apis::AnalyticsV3::EntityAdWordsLink] entity_ad_words_link_object
3097
+ # @param [String] fields
3098
+ # Selector specifying which fields to include in a partial response.
3099
+ # @param [String] quota_user
3100
+ # Available to use for quota purposes for server-side applications. Can be any
3101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3102
+ # Overrides userIp if both are provided.
3103
+ # @param [String] user_ip
3104
+ # IP address of the site where the request originates. Use this if you want to
3105
+ # enforce per-user limits.
3106
+ # @param [Google::Apis::RequestOptions] options
3107
+ # Request-specific options
3108
+ #
3109
+ # @yield [result, err] Result & error if block supplied
3110
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityAdWordsLink] parsed result object
3111
+ # @yieldparam err [StandardError] error object if request failed
3112
+ #
3113
+ # @return [Google::Apis::AnalyticsV3::EntityAdWordsLink]
3114
+ #
3115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3118
+ def update_web_property_ad_words_link(account_id, web_property_id, web_property_ad_words_link_id, entity_ad_words_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3119
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}'
3120
+ command = make_simple_command(:put, path, options)
3121
+ command.request_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
3122
+ command.request_object = entity_ad_words_link_object
3123
+ command.response_representation = Google::Apis::AnalyticsV3::EntityAdWordsLink::Representation
3124
+ command.response_class = Google::Apis::AnalyticsV3::EntityAdWordsLink
3125
+ command.params['accountId'] = account_id unless account_id.nil?
3126
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3127
+ command.params['webPropertyAdWordsLinkId'] = web_property_ad_words_link_id unless web_property_ad_words_link_id.nil?
3128
+ command.query['fields'] = fields unless fields.nil?
3129
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3130
+ command.query['userIp'] = user_ip unless user_ip.nil?
3131
+ execute_or_queue_command(command, &block)
3132
+ end
3133
+
3134
+ # Gets a web property to which the user has access.
3135
+ # @param [String] account_id
3136
+ # Account ID to retrieve the web property for.
3137
+ # @param [String] web_property_id
3138
+ # ID to retrieve the web property for.
3139
+ # @param [String] fields
3140
+ # Selector specifying which fields to include in a partial response.
3141
+ # @param [String] quota_user
3142
+ # Available to use for quota purposes for server-side applications. Can be any
3143
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3144
+ # Overrides userIp if both are provided.
3145
+ # @param [String] user_ip
3146
+ # IP address of the site where the request originates. Use this if you want to
3147
+ # enforce per-user limits.
3148
+ # @param [Google::Apis::RequestOptions] options
3149
+ # Request-specific options
3150
+ #
3151
+ # @yield [result, err] Result & error if block supplied
3152
+ # @yieldparam result [Google::Apis::AnalyticsV3::Webproperty] parsed result object
3153
+ # @yieldparam err [StandardError] error object if request failed
3154
+ #
3155
+ # @return [Google::Apis::AnalyticsV3::Webproperty]
3156
+ #
3157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3160
+ def get_web_property(account_id, web_property_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3161
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}'
3162
+ command = make_simple_command(:get, path, options)
3163
+ command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3164
+ command.response_class = Google::Apis::AnalyticsV3::Webproperty
3165
+ command.params['accountId'] = account_id unless account_id.nil?
3166
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3167
+ command.query['fields'] = fields unless fields.nil?
3168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3169
+ command.query['userIp'] = user_ip unless user_ip.nil?
3170
+ execute_or_queue_command(command, &block)
3171
+ end
3172
+
3173
+ # Create a new property if the account has fewer than 20 properties. Web
3174
+ # properties are visible in the Google Analytics interface only if they have at
3175
+ # least one profile.
3176
+ # @param [String] account_id
3177
+ # Account ID to create the web property for.
3178
+ # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_object
3179
+ # @param [String] fields
3180
+ # Selector specifying which fields to include in a partial response.
3181
+ # @param [String] quota_user
3182
+ # Available to use for quota purposes for server-side applications. Can be any
3183
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3184
+ # Overrides userIp if both are provided.
3185
+ # @param [String] user_ip
3186
+ # IP address of the site where the request originates. Use this if you want to
3187
+ # enforce per-user limits.
3188
+ # @param [Google::Apis::RequestOptions] options
3189
+ # Request-specific options
3190
+ #
3191
+ # @yield [result, err] Result & error if block supplied
3192
+ # @yieldparam result [Google::Apis::AnalyticsV3::Webproperty] parsed result object
3193
+ # @yieldparam err [StandardError] error object if request failed
3194
+ #
3195
+ # @return [Google::Apis::AnalyticsV3::Webproperty]
3196
+ #
3197
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3198
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3199
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3200
+ def insert_web_property(account_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3201
+ path = 'management/accounts/{accountId}/webproperties'
3202
+ command = make_simple_command(:post, path, options)
3203
+ command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3204
+ command.request_object = webproperty_object
3205
+ command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3206
+ command.response_class = Google::Apis::AnalyticsV3::Webproperty
3207
+ command.params['accountId'] = account_id unless account_id.nil?
3208
+ command.query['fields'] = fields unless fields.nil?
3209
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3210
+ command.query['userIp'] = user_ip unless user_ip.nil?
3211
+ execute_or_queue_command(command, &block)
3212
+ end
3213
+
3214
+ # Lists web properties to which the user has access.
3215
+ # @param [String] account_id
3216
+ # Account ID to retrieve web properties for. Can either be a specific account ID
3217
+ # or '~all', which refers to all the accounts that user has access to.
3218
+ # @param [Fixnum] max_results
3219
+ # The maximum number of web properties to include in this response.
3220
+ # @param [Fixnum] start_index
3221
+ # An index of the first entity to retrieve. Use this parameter as a pagination
3222
+ # mechanism along with the max-results parameter.
3223
+ # @param [String] fields
3224
+ # Selector specifying which fields to include in a partial response.
3225
+ # @param [String] quota_user
3226
+ # Available to use for quota purposes for server-side applications. Can be any
3227
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3228
+ # Overrides userIp if both are provided.
3229
+ # @param [String] user_ip
3230
+ # IP address of the site where the request originates. Use this if you want to
3231
+ # enforce per-user limits.
3232
+ # @param [Google::Apis::RequestOptions] options
3233
+ # Request-specific options
3234
+ #
3235
+ # @yield [result, err] Result & error if block supplied
3236
+ # @yieldparam result [Google::Apis::AnalyticsV3::Webproperties] parsed result object
3237
+ # @yieldparam err [StandardError] error object if request failed
3238
+ #
3239
+ # @return [Google::Apis::AnalyticsV3::Webproperties]
3240
+ #
3241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3244
+ def list_web_properties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3245
+ path = 'management/accounts/{accountId}/webproperties'
3246
+ command = make_simple_command(:get, path, options)
3247
+ command.response_representation = Google::Apis::AnalyticsV3::Webproperties::Representation
3248
+ command.response_class = Google::Apis::AnalyticsV3::Webproperties
3249
+ command.params['accountId'] = account_id unless account_id.nil?
3250
+ command.query['max-results'] = max_results unless max_results.nil?
3251
+ command.query['start-index'] = start_index unless start_index.nil?
3252
+ command.query['fields'] = fields unless fields.nil?
3253
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3254
+ command.query['userIp'] = user_ip unless user_ip.nil?
3255
+ execute_or_queue_command(command, &block)
3256
+ end
3257
+
3258
+ # Updates an existing web property. This method supports patch semantics.
3259
+ # @param [String] account_id
3260
+ # Account ID to which the web property belongs
3261
+ # @param [String] web_property_id
3262
+ # Web property ID
3263
+ # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_object
3264
+ # @param [String] fields
3265
+ # Selector specifying which fields to include in a partial response.
3266
+ # @param [String] quota_user
3267
+ # Available to use for quota purposes for server-side applications. Can be any
3268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3269
+ # Overrides userIp if both are provided.
3270
+ # @param [String] user_ip
3271
+ # IP address of the site where the request originates. Use this if you want to
3272
+ # enforce per-user limits.
3273
+ # @param [Google::Apis::RequestOptions] options
3274
+ # Request-specific options
3275
+ #
3276
+ # @yield [result, err] Result & error if block supplied
3277
+ # @yieldparam result [Google::Apis::AnalyticsV3::Webproperty] parsed result object
3278
+ # @yieldparam err [StandardError] error object if request failed
3279
+ #
3280
+ # @return [Google::Apis::AnalyticsV3::Webproperty]
3281
+ #
3282
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3283
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3284
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3285
+ def patch_web_property(account_id, web_property_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3286
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}'
3287
+ command = make_simple_command(:patch, path, options)
3288
+ command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3289
+ command.request_object = webproperty_object
3290
+ command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3291
+ command.response_class = Google::Apis::AnalyticsV3::Webproperty
3292
+ command.params['accountId'] = account_id unless account_id.nil?
3293
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3294
+ command.query['fields'] = fields unless fields.nil?
3295
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3296
+ command.query['userIp'] = user_ip unless user_ip.nil?
3297
+ execute_or_queue_command(command, &block)
3298
+ end
3299
+
3300
+ # Updates an existing web property.
3301
+ # @param [String] account_id
3302
+ # Account ID to which the web property belongs
3303
+ # @param [String] web_property_id
3304
+ # Web property ID
3305
+ # @param [Google::Apis::AnalyticsV3::Webproperty] webproperty_object
3306
+ # @param [String] fields
3307
+ # Selector specifying which fields to include in a partial response.
3308
+ # @param [String] quota_user
3309
+ # Available to use for quota purposes for server-side applications. Can be any
3310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3311
+ # Overrides userIp if both are provided.
3312
+ # @param [String] user_ip
3313
+ # IP address of the site where the request originates. Use this if you want to
3314
+ # enforce per-user limits.
3315
+ # @param [Google::Apis::RequestOptions] options
3316
+ # Request-specific options
3317
+ #
3318
+ # @yield [result, err] Result & error if block supplied
3319
+ # @yieldparam result [Google::Apis::AnalyticsV3::Webproperty] parsed result object
3320
+ # @yieldparam err [StandardError] error object if request failed
3321
+ #
3322
+ # @return [Google::Apis::AnalyticsV3::Webproperty]
3323
+ #
3324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3327
+ def update_web_property(account_id, web_property_id, webproperty_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3328
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}'
3329
+ command = make_simple_command(:put, path, options)
3330
+ command.request_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3331
+ command.request_object = webproperty_object
3332
+ command.response_representation = Google::Apis::AnalyticsV3::Webproperty::Representation
3333
+ command.response_class = Google::Apis::AnalyticsV3::Webproperty
3334
+ command.params['accountId'] = account_id unless account_id.nil?
3335
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3336
+ command.query['fields'] = fields unless fields.nil?
3337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3338
+ command.query['userIp'] = user_ip unless user_ip.nil?
3339
+ execute_or_queue_command(command, &block)
3340
+ end
3341
+
3342
+ # Removes a user from the given web property.
3343
+ # @param [String] account_id
3344
+ # Account ID to delete the user link for.
3345
+ # @param [String] web_property_id
3346
+ # Web Property ID to delete the user link for.
3347
+ # @param [String] link_id
3348
+ # Link ID to delete the user link for.
3349
+ # @param [String] fields
3350
+ # Selector specifying which fields to include in a partial response.
3351
+ # @param [String] quota_user
3352
+ # Available to use for quota purposes for server-side applications. Can be any
3353
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3354
+ # Overrides userIp if both are provided.
3355
+ # @param [String] user_ip
3356
+ # IP address of the site where the request originates. Use this if you want to
3357
+ # enforce per-user limits.
3358
+ # @param [Google::Apis::RequestOptions] options
3359
+ # Request-specific options
3360
+ #
3361
+ # @yield [result, err] Result & error if block supplied
3362
+ # @yieldparam result [NilClass] No result returned for this method
3363
+ # @yieldparam err [StandardError] error object if request failed
3364
+ #
3365
+ # @return [void]
3366
+ #
3367
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3368
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3369
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3370
+ def delete_web_property_user_link(account_id, web_property_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3371
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}'
3372
+ command = make_simple_command(:delete, path, options)
3373
+ command.params['accountId'] = account_id unless account_id.nil?
3374
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3375
+ command.params['linkId'] = link_id unless link_id.nil?
3376
+ command.query['fields'] = fields unless fields.nil?
3377
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3378
+ command.query['userIp'] = user_ip unless user_ip.nil?
3379
+ execute_or_queue_command(command, &block)
3380
+ end
3381
+
3382
+ # Adds a new user to the given web property.
3383
+ # @param [String] account_id
3384
+ # Account ID to create the user link for.
3385
+ # @param [String] web_property_id
3386
+ # Web Property ID to create the user link for.
3387
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
3388
+ # @param [String] fields
3389
+ # Selector specifying which fields to include in a partial response.
3390
+ # @param [String] quota_user
3391
+ # Available to use for quota purposes for server-side applications. Can be any
3392
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3393
+ # Overrides userIp if both are provided.
3394
+ # @param [String] user_ip
3395
+ # IP address of the site where the request originates. Use this if you want to
3396
+ # enforce per-user limits.
3397
+ # @param [Google::Apis::RequestOptions] options
3398
+ # Request-specific options
3399
+ #
3400
+ # @yield [result, err] Result & error if block supplied
3401
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
3402
+ # @yieldparam err [StandardError] error object if request failed
3403
+ #
3404
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
3405
+ #
3406
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3407
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3408
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3409
+ def insert_web_property_user_link(account_id, web_property_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3410
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks'
3411
+ command = make_simple_command(:post, path, options)
3412
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
3413
+ command.request_object = entity_user_link_object
3414
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
3415
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
3416
+ command.params['accountId'] = account_id unless account_id.nil?
3417
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3418
+ command.query['fields'] = fields unless fields.nil?
3419
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3420
+ command.query['userIp'] = user_ip unless user_ip.nil?
3421
+ execute_or_queue_command(command, &block)
3422
+ end
3423
+
3424
+ # Lists webProperty-user links for a given web property.
3425
+ # @param [String] account_id
3426
+ # Account ID which the given web property belongs to.
3427
+ # @param [String] web_property_id
3428
+ # Web Property ID for the webProperty-user links to retrieve. Can either be a
3429
+ # specific web property ID or '~all', which refers to all the web properties
3430
+ # that user has access to.
3431
+ # @param [Fixnum] max_results
3432
+ # The maximum number of webProperty-user Links to include in this response.
3433
+ # @param [Fixnum] start_index
3434
+ # An index of the first webProperty-user link to retrieve. Use this parameter as
3435
+ # a pagination mechanism along with the max-results parameter.
3436
+ # @param [String] fields
3437
+ # Selector specifying which fields to include in a partial response.
3438
+ # @param [String] quota_user
3439
+ # Available to use for quota purposes for server-side applications. Can be any
3440
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3441
+ # Overrides userIp if both are provided.
3442
+ # @param [String] user_ip
3443
+ # IP address of the site where the request originates. Use this if you want to
3444
+ # enforce per-user limits.
3445
+ # @param [Google::Apis::RequestOptions] options
3446
+ # Request-specific options
3447
+ #
3448
+ # @yield [result, err] Result & error if block supplied
3449
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLinks] parsed result object
3450
+ # @yieldparam err [StandardError] error object if request failed
3451
+ #
3452
+ # @return [Google::Apis::AnalyticsV3::EntityUserLinks]
3453
+ #
3454
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3455
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3456
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3457
+ def list_web_property_user_links(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3458
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks'
3459
+ command = make_simple_command(:get, path, options)
3460
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLinks::Representation
3461
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLinks
3462
+ command.params['accountId'] = account_id unless account_id.nil?
3463
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3464
+ command.query['max-results'] = max_results unless max_results.nil?
3465
+ command.query['start-index'] = start_index unless start_index.nil?
3466
+ command.query['fields'] = fields unless fields.nil?
3467
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3468
+ command.query['userIp'] = user_ip unless user_ip.nil?
3469
+ execute_or_queue_command(command, &block)
3470
+ end
3471
+
3472
+ # Updates permissions for an existing user on the given web property.
3473
+ # @param [String] account_id
3474
+ # Account ID to update the account-user link for.
3475
+ # @param [String] web_property_id
3476
+ # Web property ID to update the account-user link for.
3477
+ # @param [String] link_id
3478
+ # Link ID to update the account-user link for.
3479
+ # @param [Google::Apis::AnalyticsV3::EntityUserLink] entity_user_link_object
3480
+ # @param [String] fields
3481
+ # Selector specifying which fields to include in a partial response.
3482
+ # @param [String] quota_user
3483
+ # Available to use for quota purposes for server-side applications. Can be any
3484
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3485
+ # Overrides userIp if both are provided.
3486
+ # @param [String] user_ip
3487
+ # IP address of the site where the request originates. Use this if you want to
3488
+ # enforce per-user limits.
3489
+ # @param [Google::Apis::RequestOptions] options
3490
+ # Request-specific options
3491
+ #
3492
+ # @yield [result, err] Result & error if block supplied
3493
+ # @yieldparam result [Google::Apis::AnalyticsV3::EntityUserLink] parsed result object
3494
+ # @yieldparam err [StandardError] error object if request failed
3495
+ #
3496
+ # @return [Google::Apis::AnalyticsV3::EntityUserLink]
3497
+ #
3498
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3499
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3500
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3501
+ def update_web_property_user_link(account_id, web_property_id, link_id, entity_user_link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3502
+ path = 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}'
3503
+ command = make_simple_command(:put, path, options)
3504
+ command.request_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
3505
+ command.request_object = entity_user_link_object
3506
+ command.response_representation = Google::Apis::AnalyticsV3::EntityUserLink::Representation
3507
+ command.response_class = Google::Apis::AnalyticsV3::EntityUserLink
3508
+ command.params['accountId'] = account_id unless account_id.nil?
3509
+ command.params['webPropertyId'] = web_property_id unless web_property_id.nil?
3510
+ command.params['linkId'] = link_id unless link_id.nil?
3511
+ command.query['fields'] = fields unless fields.nil?
3512
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3513
+ command.query['userIp'] = user_ip unless user_ip.nil?
3514
+ execute_or_queue_command(command, &block)
3515
+ end
3516
+
3517
+ # Lists all columns for a report type
3518
+ # @param [String] report_type
3519
+ # Report type. Allowed Values: 'ga'. Where 'ga' corresponds to the Core
3520
+ # Reporting API
3521
+ # @param [String] fields
3522
+ # Selector specifying which fields to include in a partial response.
3523
+ # @param [String] quota_user
3524
+ # Available to use for quota purposes for server-side applications. Can be any
3525
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3526
+ # Overrides userIp if both are provided.
3527
+ # @param [String] user_ip
3528
+ # IP address of the site where the request originates. Use this if you want to
3529
+ # enforce per-user limits.
3530
+ # @param [Google::Apis::RequestOptions] options
3531
+ # Request-specific options
3532
+ #
3533
+ # @yield [result, err] Result & error if block supplied
3534
+ # @yieldparam result [Google::Apis::AnalyticsV3::Columns] parsed result object
3535
+ # @yieldparam err [StandardError] error object if request failed
3536
+ #
3537
+ # @return [Google::Apis::AnalyticsV3::Columns]
3538
+ #
3539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3542
+ def list_metadata_columns(report_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3543
+ path = 'metadata/{reportType}/columns'
3544
+ command = make_simple_command(:get, path, options)
3545
+ command.response_representation = Google::Apis::AnalyticsV3::Columns::Representation
3546
+ command.response_class = Google::Apis::AnalyticsV3::Columns
3547
+ command.params['reportType'] = report_type unless report_type.nil?
3548
+ command.query['fields'] = fields unless fields.nil?
3549
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3550
+ command.query['userIp'] = user_ip unless user_ip.nil?
3551
+ execute_or_queue_command(command, &block)
3552
+ end
3553
+
3554
+ # Creates an account ticket.
3555
+ # @param [Google::Apis::AnalyticsV3::AccountTicket] account_ticket_object
3556
+ # @param [String] fields
3557
+ # Selector specifying which fields to include in a partial response.
3558
+ # @param [String] quota_user
3559
+ # Available to use for quota purposes for server-side applications. Can be any
3560
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3561
+ # Overrides userIp if both are provided.
3562
+ # @param [String] user_ip
3563
+ # IP address of the site where the request originates. Use this if you want to
3564
+ # enforce per-user limits.
3565
+ # @param [Google::Apis::RequestOptions] options
3566
+ # Request-specific options
3567
+ #
3568
+ # @yield [result, err] Result & error if block supplied
3569
+ # @yieldparam result [Google::Apis::AnalyticsV3::AccountTicket] parsed result object
3570
+ # @yieldparam err [StandardError] error object if request failed
3571
+ #
3572
+ # @return [Google::Apis::AnalyticsV3::AccountTicket]
3573
+ #
3574
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3575
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3576
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3577
+ def create_account_ticket(account_ticket_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
3578
+ path = 'provisioning/createAccountTicket'
3579
+ command = make_simple_command(:post, path, options)
3580
+ command.request_representation = Google::Apis::AnalyticsV3::AccountTicket::Representation
3581
+ command.request_object = account_ticket_object
3582
+ command.response_representation = Google::Apis::AnalyticsV3::AccountTicket::Representation
3583
+ command.response_class = Google::Apis::AnalyticsV3::AccountTicket
3584
+ command.query['fields'] = fields unless fields.nil?
3585
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3586
+ command.query['userIp'] = user_ip unless user_ip.nil?
3587
+ execute_or_queue_command(command, &block)
3588
+ end
3589
+
3590
+ protected
3591
+
3592
+ def apply_command_defaults(command)
3593
+ command.query['key'] = key unless key.nil?
3594
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3595
+ command.query['userIp'] = user_ip unless user_ip.nil?
3596
+ end
3597
+ end
3598
+ end
3599
+ end
3600
+ end