google-api-client 0.8.3 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (497) 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 +22 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +52 -2
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +35 -1
  11. data/MIGRATING.md +171 -0
  12. data/README.md +181 -148
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +1036 -0
  15. data/api_names_out.yaml +26053 -0
  16. data/bin/generate-api +95 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  21. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
  24. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  25. data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
  26. data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
  27. data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
  28. data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
  29. data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
  30. data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
  31. data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
  32. data/generated/google/apis/admin_directory_v1.rb +113 -0
  33. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  34. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  35. data/generated/google/apis/admin_reports_v1/service.rb +336 -0
  36. data/generated/google/apis/admin_reports_v1.rb +38 -0
  37. data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
  38. data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
  39. data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
  40. data/generated/google/apis/adsense_v1_4.rb +38 -0
  41. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  42. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  43. data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
  44. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  45. data/generated/google/apis/analytics_v3/classes.rb +5118 -0
  46. data/generated/google/apis/analytics_v3/representations.rb +1662 -0
  47. data/generated/google/apis/analytics_v3/service.rb +3568 -0
  48. data/generated/google/apis/analytics_v3.rb +49 -0
  49. data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
  50. data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
  51. data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
  52. data/generated/google/apis/androidenterprise_v1.rb +35 -0
  53. data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
  54. data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
  55. data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
  56. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  57. data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
  58. data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
  59. data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
  60. data/generated/google/apis/appengine_v1beta4.rb +35 -0
  61. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  62. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  63. data/generated/google/apis/appsactivity_v1/service.rb +128 -0
  64. data/generated/google/apis/appsactivity_v1.rb +46 -0
  65. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  66. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  67. data/generated/google/apis/appstate_v1/service.rb +260 -0
  68. data/generated/google/apis/appstate_v1.rb +34 -0
  69. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  70. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  71. data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
  72. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  73. data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
  74. data/generated/google/apis/bigquery_v2/representations.rb +816 -0
  75. data/generated/google/apis/bigquery_v2/service.rb +982 -0
  76. data/generated/google/apis/bigquery_v2.rb +52 -0
  77. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  78. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  79. data/generated/google/apis/blogger_v3/service.rb +1587 -0
  80. data/generated/google/apis/blogger_v3.rb +37 -0
  81. data/generated/google/apis/books_v1/classes.rb +3956 -0
  82. data/generated/google/apis/books_v1/representations.rb +1538 -0
  83. data/generated/google/apis/books_v1/service.rb +2290 -0
  84. data/generated/google/apis/books_v1.rb +34 -0
  85. data/generated/google/apis/calendar_v3/classes.rb +1742 -0
  86. data/generated/google/apis/calendar_v3/representations.rb +567 -0
  87. data/generated/google/apis/calendar_v3/service.rb +1968 -0
  88. data/generated/google/apis/calendar_v3.rb +37 -0
  89. data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
  90. data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
  91. data/generated/google/apis/civicinfo_v2/service.rb +279 -0
  92. data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
  93. data/generated/google/apis/classroom_v1/classes.rb +512 -0
  94. data/generated/google/apis/classroom_v1/representations.rb +217 -0
  95. data/generated/google/apis/classroom_v1/service.rb +970 -0
  96. data/generated/google/apis/classroom_v1.rb +49 -0
  97. data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
  98. data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
  99. data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
  100. data/generated/google/apis/classroom_v1beta1.rb +49 -0
  101. data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
  102. data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
  103. data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
  104. data/generated/google/apis/cloudbilling_v1.rb +35 -0
  105. data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
  106. data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
  107. data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
  108. data/generated/google/apis/clouddebugger_v2.rb +41 -0
  109. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  110. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  111. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
  112. data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
  113. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
  114. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
  115. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
  116. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  117. data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
  118. data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
  119. data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
  120. data/generated/google/apis/cloudtrace_v1.rb +35 -0
  121. data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
  122. data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
  123. data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
  124. data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
  125. data/generated/google/apis/compute_beta/classes.rb +9128 -0
  126. data/generated/google/apis/compute_beta/representations.rb +3048 -0
  127. data/generated/google/apis/compute_beta/service.rb +10154 -0
  128. data/generated/google/apis/compute_beta.rb +49 -0
  129. data/generated/google/apis/compute_v1/classes.rb +8681 -0
  130. data/generated/google/apis/compute_v1/representations.rb +2895 -0
  131. data/generated/google/apis/compute_v1/service.rb +9252 -0
  132. data/generated/google/apis/compute_v1.rb +49 -0
  133. data/generated/google/apis/container_v1/classes.rb +463 -0
  134. data/generated/google/apis/container_v1/representations.rb +175 -0
  135. data/generated/google/apis/container_v1/service.rb +367 -0
  136. data/generated/google/apis/container_v1.rb +35 -0
  137. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  138. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  139. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  140. data/generated/google/apis/container_v1beta1.rb +35 -0
  141. data/generated/google/apis/content_v2/classes.rb +5986 -0
  142. data/generated/google/apis/content_v2/representations.rb +2288 -0
  143. data/generated/google/apis/content_v2/service.rb +2338 -0
  144. data/generated/google/apis/content_v2.rb +35 -0
  145. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  146. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  147. data/generated/google/apis/coordinate_v1/service.rb +678 -0
  148. data/generated/google/apis/coordinate_v1.rb +37 -0
  149. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  150. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  151. data/generated/google/apis/customsearch_v1/service.rb +207 -0
  152. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  153. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  154. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  155. data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
  156. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  157. data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
  158. data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
  159. data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
  160. data/generated/google/apis/deploymentmanager_v2.rb +44 -0
  161. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
  162. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
  163. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
  164. data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
  165. data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
  166. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  167. data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
  168. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  169. data/generated/google/apis/discovery_v1/classes.rb +961 -0
  170. data/generated/google/apis/discovery_v1/representations.rb +357 -0
  171. data/generated/google/apis/discovery_v1/service.rb +142 -0
  172. data/generated/google/apis/discovery_v1.rb +32 -0
  173. data/generated/google/apis/dns_v1/classes.rb +406 -0
  174. data/generated/google/apis/dns_v1/representations.rb +151 -0
  175. data/generated/google/apis/dns_v1/service.rb +454 -0
  176. data/generated/google/apis/dns_v1.rb +44 -0
  177. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
  178. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
  179. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
  180. data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
  181. data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
  182. data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
  183. data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
  184. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  185. data/generated/google/apis/drive_v2/classes.rb +2562 -0
  186. data/generated/google/apis/drive_v2/representations.rb +795 -0
  187. data/generated/google/apis/drive_v2/service.rb +2696 -0
  188. data/generated/google/apis/drive_v2.rb +58 -0
  189. data/generated/google/apis/drive_v3/classes.rb +1534 -0
  190. data/generated/google/apis/drive_v3/representations.rb +497 -0
  191. data/generated/google/apis/drive_v3/service.rb +1541 -0
  192. data/generated/google/apis/drive_v3.rb +55 -0
  193. data/generated/google/apis/fitness_v1/classes.rb +885 -0
  194. data/generated/google/apis/fitness_v1/representations.rb +320 -0
  195. data/generated/google/apis/fitness_v1/service.rb +675 -0
  196. data/generated/google/apis/fitness_v1.rb +49 -0
  197. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  198. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  199. data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
  200. data/generated/google/apis/fusiontables_v2.rb +37 -0
  201. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  202. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  203. data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
  204. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  205. data/generated/google/apis/games_management_v1management/classes.rb +524 -0
  206. data/generated/google/apis/games_management_v1management/representations.rb +231 -0
  207. data/generated/google/apis/games_management_v1management/service.rb +994 -0
  208. data/generated/google/apis/games_management_v1management.rb +37 -0
  209. data/generated/google/apis/games_v1/classes.rb +4617 -0
  210. data/generated/google/apis/games_v1/representations.rb +1584 -0
  211. data/generated/google/apis/games_v1/service.rb +2290 -0
  212. data/generated/google/apis/games_v1.rb +40 -0
  213. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  214. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  215. data/generated/google/apis/gan_v1beta1/service.rb +682 -0
  216. data/generated/google/apis/gan_v1beta1.rb +31 -0
  217. data/generated/google/apis/genomics_v1/classes.rb +2609 -0
  218. data/generated/google/apis/genomics_v1/representations.rb +909 -0
  219. data/generated/google/apis/genomics_v1/service.rb +1676 -0
  220. data/generated/google/apis/genomics_v1.rb +49 -0
  221. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  222. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  223. data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
  224. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  225. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  226. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  227. data/generated/google/apis/gmail_v1/service.rb +1470 -0
  228. data/generated/google/apis/gmail_v1.rb +52 -0
  229. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  230. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  231. data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
  232. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  233. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  234. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  235. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  236. data/generated/google/apis/groupssettings_v1.rb +34 -0
  237. data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
  238. data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
  239. data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
  240. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  241. data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
  242. data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
  243. data/generated/google/apis/kgsearch_v1/service.rb +111 -0
  244. data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
  245. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  246. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  247. data/generated/google/apis/licensing_v1/service.rb +369 -0
  248. data/generated/google/apis/licensing_v1.rb +34 -0
  249. data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
  250. data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
  251. data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
  252. data/generated/google/apis/logging_v1beta3.rb +47 -0
  253. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  254. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  255. data/generated/google/apis/manager_v1beta2/service.rb +372 -0
  256. data/generated/google/apis/manager_v1beta2.rb +53 -0
  257. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  258. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  259. data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
  260. data/generated/google/apis/mapsengine_v1.rb +38 -0
  261. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  262. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  263. data/generated/google/apis/mirror_v1/service.rb +977 -0
  264. data/generated/google/apis/mirror_v1.rb +37 -0
  265. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  266. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  267. data/generated/google/apis/oauth2_v2/service.rb +199 -0
  268. data/generated/google/apis/oauth2_v2.rb +43 -0
  269. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  270. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  271. data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
  272. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  273. data/generated/google/apis/partners_v2/classes.rb +942 -0
  274. data/generated/google/apis/partners_v2/representations.rb +402 -0
  275. data/generated/google/apis/partners_v2/service.rb +400 -0
  276. data/generated/google/apis/partners_v2.rb +32 -0
  277. data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
  278. data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
  279. data/generated/google/apis/plus_domains_v1/service.rb +904 -0
  280. data/generated/google/apis/plus_domains_v1.rb +61 -0
  281. data/generated/google/apis/plus_v1/classes.rb +2094 -0
  282. data/generated/google/apis/plus_v1/representations.rb +805 -0
  283. data/generated/google/apis/plus_v1/service.rb +470 -0
  284. data/generated/google/apis/plus_v1.rb +43 -0
  285. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  286. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  287. data/generated/google/apis/prediction_v1_6/service.rb +380 -0
  288. data/generated/google/apis/prediction_v1_6.rb +44 -0
  289. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
  290. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
  291. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
  292. data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
  293. data/generated/google/apis/pubsub_v1/classes.rb +614 -0
  294. data/generated/google/apis/pubsub_v1/representations.rb +281 -0
  295. data/generated/google/apis/pubsub_v1/service.rb +774 -0
  296. data/generated/google/apis/pubsub_v1.rb +37 -0
  297. data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
  298. data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
  299. data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
  300. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  301. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  302. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  303. data/generated/google/apis/qpx_express_v1/service.rb +100 -0
  304. data/generated/google/apis/qpx_express_v1.rb +31 -0
  305. data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
  306. data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
  307. data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
  308. data/generated/google/apis/replicapool_v1beta2.rb +44 -0
  309. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
  310. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
  311. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
  312. data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
  313. data/generated/google/apis/reseller_v1/classes.rb +520 -0
  314. data/generated/google/apis/reseller_v1/representations.rb +200 -0
  315. data/generated/google/apis/reseller_v1/service.rb +623 -0
  316. data/generated/google/apis/reseller_v1.rb +37 -0
  317. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  318. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  319. data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
  320. data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
  321. data/generated/google/apis/script_v1/classes.rb +259 -0
  322. data/generated/google/apis/script_v1/representations.rb +106 -0
  323. data/generated/google/apis/script_v1/service.rb +98 -0
  324. data/generated/google/apis/script_v1.rb +61 -0
  325. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  326. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  327. data/generated/google/apis/site_verification_v1/service.rb +315 -0
  328. data/generated/google/apis/site_verification_v1.rb +37 -0
  329. data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
  330. data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
  331. data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
  332. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  333. data/generated/google/apis/storage_v1/classes.rb +1222 -0
  334. data/generated/google/apis/storage_v1/representations.rb +445 -0
  335. data/generated/google/apis/storage_v1/service.rb +1903 -0
  336. data/generated/google/apis/storage_v1.rb +46 -0
  337. data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
  338. data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
  339. data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
  340. data/generated/google/apis/storagetransfer_v1.rb +35 -0
  341. data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
  342. data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
  343. data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
  344. data/generated/google/apis/tagmanager_v1.rb +52 -0
  345. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  346. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  347. data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
  348. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  349. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  350. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  351. data/generated/google/apis/tasks_v1/service.rb +643 -0
  352. data/generated/google/apis/tasks_v1.rb +37 -0
  353. data/generated/google/apis/translate_v2/classes.rb +168 -0
  354. data/generated/google/apis/translate_v2/representations.rb +109 -0
  355. data/generated/google/apis/translate_v2/service.rb +182 -0
  356. data/generated/google/apis/translate_v2.rb +31 -0
  357. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  358. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  359. data/generated/google/apis/urlshortener_v1/service.rb +176 -0
  360. data/generated/google/apis/urlshortener_v1.rb +34 -0
  361. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  362. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  363. data/generated/google/apis/webmasters_v3/service.rb +573 -0
  364. data/generated/google/apis/webmasters_v3.rb +37 -0
  365. data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
  366. data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
  367. data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
  368. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  369. data/generated/google/apis/youtube_v3/classes.rb +8136 -0
  370. data/generated/google/apis/youtube_v3/representations.rb +2838 -0
  371. data/generated/google/apis/youtube_v3/service.rb +4403 -0
  372. data/generated/google/apis/youtube_v3.rb +49 -0
  373. data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
  374. data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
  375. data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
  376. data/generated/google/apis/youtubereporting_v1.rb +38 -0
  377. data/google-api-client.gemspec +27 -39
  378. data/lib/google/api_client/auth/installed_app.rb +7 -5
  379. data/lib/google/api_client/auth/key_utils.rb +12 -11
  380. data/lib/google/api_client/auth/storage.rb +5 -2
  381. data/lib/google/api_client/auth/storages/file_store.rb +2 -3
  382. data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
  383. data/lib/google/api_client/client_secrets.rb +4 -5
  384. data/lib/google/apis/core/api_command.rb +135 -0
  385. data/lib/google/apis/core/base_service.rb +317 -0
  386. data/lib/google/apis/core/batch.rb +239 -0
  387. data/lib/google/apis/core/download.rb +94 -0
  388. data/lib/google/apis/core/hashable.rb +44 -0
  389. data/lib/google/apis/core/http_client_adapter.rb +82 -0
  390. data/lib/google/apis/core/http_command.rb +312 -0
  391. data/lib/google/apis/core/json_representation.rb +127 -0
  392. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  393. data/lib/google/apis/core/multipart.rb +187 -0
  394. data/lib/google/apis/core/upload.rb +288 -0
  395. data/lib/google/{api_client → apis}/errors.rb +39 -28
  396. data/lib/google/apis/generator/annotator.rb +295 -0
  397. data/lib/google/apis/generator/helpers.rb +74 -0
  398. data/lib/google/apis/generator/model.rb +143 -0
  399. data/lib/google/apis/generator/template.rb +124 -0
  400. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  401. data/lib/google/apis/generator/templates/_method.tmpl +92 -0
  402. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  403. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  404. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  405. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  406. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  407. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  408. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  409. data/lib/google/apis/generator.rb +70 -0
  410. data/lib/google/apis/options.rb +85 -0
  411. data/lib/google/apis/version.rb +39 -0
  412. data/lib/google/apis.rb +48 -0
  413. data/rakelib/metrics.rake +22 -0
  414. data/rakelib/rubocop.rake +10 -0
  415. data/rakelib/spec.rake +11 -0
  416. data/rakelib/yard.rake +11 -0
  417. data/samples/Gemfile +7 -0
  418. data/samples/README.md +51 -0
  419. data/samples/google-api-samples +32 -0
  420. data/samples/lib/base_cli.rb +94 -0
  421. data/samples/lib/samples/analytics.rb +62 -0
  422. data/samples/lib/samples/calendar.rb +83 -0
  423. data/samples/lib/samples/drive.rb +82 -0
  424. data/samples/lib/samples/gmail.rb +50 -0
  425. data/samples/lib/samples/pubsub.rb +114 -0
  426. data/samples/lib/samples/translate.rb +44 -0
  427. data/samples/lib/samples/you_tube.rb +44 -0
  428. data/script/generate +95 -0
  429. data/script/package +8 -0
  430. data/script/release +15 -0
  431. data/spec/fixtures/files/api_names.yaml +3 -0
  432. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  433. data/spec/fixtures/files/child/.gitignore +0 -0
  434. data/spec/fixtures/files/client_secrets.json +1 -0
  435. data/spec/fixtures/files/invalid.json +1 -0
  436. data/spec/fixtures/files/test.blah +1 -0
  437. data/spec/fixtures/files/test.txt +1 -0
  438. data/spec/fixtures/files/test_api.json +440 -0
  439. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  440. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  441. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  442. data/spec/google/api_client/client_secrets_spec.rb +38 -1
  443. data/spec/google/apis/core/api_command_spec.rb +209 -0
  444. data/spec/google/apis/core/batch_spec.rb +142 -0
  445. data/spec/google/apis/core/download_spec.rb +103 -0
  446. data/spec/google/apis/core/hashable_spec.rb +60 -0
  447. data/spec/google/apis/core/http_command_spec.rb +284 -0
  448. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  449. data/spec/google/apis/core/service_spec.rb +247 -0
  450. data/spec/google/apis/core/upload_spec.rb +300 -0
  451. data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
  452. data/spec/google/apis/generator/generator_spec.rb +272 -0
  453. data/spec/google/apis/logging_spec.rb +45 -0
  454. data/spec/google/apis/options_spec.rb +40 -0
  455. data/spec/integration_tests/adsense_spec.rb +29 -0
  456. data/spec/integration_tests/drive_spec.rb +35 -0
  457. data/spec/integration_tests/pubsub_spec.rb +48 -0
  458. data/spec/integration_tests/url_shortener_spec.rb +45 -0
  459. data/spec/spec_helper/load_path_spec.rb +33 -0
  460. data/spec/spec_helper.rb +131 -44
  461. data/third_party/hurley_patches.rb +103 -0
  462. metadata +533 -170
  463. data/lib/compat/multi_json.rb +0 -19
  464. data/lib/google/api_client/auth/file_storage.rb +0 -59
  465. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  466. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  467. data/lib/google/api_client/batch.rb +0 -325
  468. data/lib/google/api_client/charset.rb +0 -33
  469. data/lib/google/api_client/discovery/api.rb +0 -300
  470. data/lib/google/api_client/discovery/media.rb +0 -77
  471. data/lib/google/api_client/discovery/method.rb +0 -363
  472. data/lib/google/api_client/discovery/resource.rb +0 -156
  473. data/lib/google/api_client/discovery/schema.rb +0 -119
  474. data/lib/google/api_client/environment.rb +0 -42
  475. data/lib/google/api_client/gzip.rb +0 -28
  476. data/lib/google/api_client/logging.rb +0 -32
  477. data/lib/google/api_client/media.rb +0 -259
  478. data/lib/google/api_client/railtie.rb +0 -18
  479. data/lib/google/api_client/request.rb +0 -350
  480. data/lib/google/api_client/result.rb +0 -255
  481. data/lib/google/api_client/service/batch.rb +0 -110
  482. data/lib/google/api_client/service/request.rb +0 -144
  483. data/lib/google/api_client/service/resource.rb +0 -40
  484. data/lib/google/api_client/service/result.rb +0 -162
  485. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  486. data/lib/google/api_client/service/stub_generator.rb +0 -61
  487. data/lib/google/api_client/service.rb +0 -233
  488. data/lib/google/api_client.rb +0 -750
  489. data/spec/google/api_client/batch_spec.rb +0 -248
  490. data/spec/google/api_client/discovery_spec.rb +0 -662
  491. data/spec/google/api_client/gzip_spec.rb +0 -98
  492. data/spec/google/api_client/media_spec.rb +0 -178
  493. data/spec/google/api_client/result_spec.rb +0 -207
  494. data/spec/google/api_client/service_account_spec.rb +0 -169
  495. data/spec/google/api_client/service_spec.rb +0 -618
  496. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  497. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1625 @@
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 SqladminV1beta4
23
+ # Cloud SQL Administration API
24
+ #
25
+ # API for Cloud SQL database instance management.
26
+ #
27
+ # @example
28
+ # require 'google/apis/sqladmin_v1beta4'
29
+ #
30
+ # Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module
31
+ # service = Sqladmin::SQLAdminService.new
32
+ #
33
+ # @see https://cloud.google.com/sql/docs/reference/latest
34
+ class SQLAdminService < 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/', 'sql/v1beta4/')
53
+ end
54
+
55
+ # Deletes the backup taken by a backup run.
56
+ # @param [String] project
57
+ # Project ID of the project that contains the instance.
58
+ # @param [String] instance
59
+ # Cloud SQL instance ID. This does not include the project ID.
60
+ # @param [String] id
61
+ # The ID of the Backup Run to delete. To find a Backup Run ID, use the list
62
+ # method.
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # Overrides userIp if both are provided.
69
+ # @param [String] user_ip
70
+ # IP address of the site where the request originates. Use this if you want to
71
+ # enforce per-user limits.
72
+ # @param [Google::Apis::RequestOptions] options
73
+ # Request-specific options
74
+ #
75
+ # @yield [result, err] Result & error if block supplied
76
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
77
+ # @yieldparam err [StandardError] error object if request failed
78
+ #
79
+ # @return [Google::Apis::SqladminV1beta4::Operation]
80
+ #
81
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
84
+ def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
85
+ command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/backupRuns/{id}', options)
86
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
87
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
88
+ command.params['project'] = project unless project.nil?
89
+ command.params['instance'] = instance unless instance.nil?
90
+ command.params['id'] = id unless id.nil?
91
+ command.query['fields'] = fields unless fields.nil?
92
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
93
+ command.query['userIp'] = user_ip unless user_ip.nil?
94
+ execute_or_queue_command(command, &block)
95
+ end
96
+
97
+ # Retrieves a resource containing information about a backup run.
98
+ # @param [String] project
99
+ # Project ID of the project that contains the instance.
100
+ # @param [String] instance
101
+ # Cloud SQL instance ID. This does not include the project ID.
102
+ # @param [String] id
103
+ # The ID of this Backup Run.
104
+ # @param [String] fields
105
+ # Selector specifying which fields to include in a partial response.
106
+ # @param [String] quota_user
107
+ # Available to use for quota purposes for server-side applications. Can be any
108
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
109
+ # Overrides userIp if both are provided.
110
+ # @param [String] user_ip
111
+ # IP address of the site where the request originates. Use this if you want to
112
+ # enforce per-user limits.
113
+ # @param [Google::Apis::RequestOptions] options
114
+ # Request-specific options
115
+ #
116
+ # @yield [result, err] Result & error if block supplied
117
+ # @yieldparam result [Google::Apis::SqladminV1beta4::BackupRun] parsed result object
118
+ # @yieldparam err [StandardError] error object if request failed
119
+ #
120
+ # @return [Google::Apis::SqladminV1beta4::BackupRun]
121
+ #
122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
125
+ def get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
126
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns/{id}', options)
127
+ command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
128
+ command.response_class = Google::Apis::SqladminV1beta4::BackupRun
129
+ command.params['project'] = project unless project.nil?
130
+ command.params['instance'] = instance unless instance.nil?
131
+ command.params['id'] = id unless id.nil?
132
+ command.query['fields'] = fields unless fields.nil?
133
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
134
+ command.query['userIp'] = user_ip unless user_ip.nil?
135
+ execute_or_queue_command(command, &block)
136
+ end
137
+
138
+ # Lists all backup runs associated with a given instance and configuration in
139
+ # the reverse chronological order of the enqueued time.
140
+ # @param [String] project
141
+ # Project ID of the project that contains the instance.
142
+ # @param [String] instance
143
+ # Cloud SQL instance ID. This does not include the project ID.
144
+ # @param [Fixnum] max_results
145
+ # Maximum number of backup runs per response.
146
+ # @param [String] page_token
147
+ # A previously-returned page token representing part of the larger set of
148
+ # results to view.
149
+ # @param [String] fields
150
+ # Selector specifying which fields to include in a partial response.
151
+ # @param [String] quota_user
152
+ # Available to use for quota purposes for server-side applications. Can be any
153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
154
+ # Overrides userIp if both are provided.
155
+ # @param [String] user_ip
156
+ # IP address of the site where the request originates. Use this if you want to
157
+ # enforce per-user limits.
158
+ # @param [Google::Apis::RequestOptions] options
159
+ # Request-specific options
160
+ #
161
+ # @yield [result, err] Result & error if block supplied
162
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] parsed result object
163
+ # @yieldparam err [StandardError] error object if request failed
164
+ #
165
+ # @return [Google::Apis::SqladminV1beta4::ListBackupRunsResponse]
166
+ #
167
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
168
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
169
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
170
+ def list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
171
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns', options)
172
+ command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation
173
+ command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse
174
+ command.params['project'] = project unless project.nil?
175
+ command.params['instance'] = instance unless instance.nil?
176
+ command.query['maxResults'] = max_results unless max_results.nil?
177
+ command.query['pageToken'] = page_token unless page_token.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ command.query['userIp'] = user_ip unless user_ip.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ # Deletes a resource containing information about a database inside a Cloud SQL
185
+ # instance.
186
+ # @param [String] project
187
+ # Project ID of the project that contains the instance.
188
+ # @param [String] instance
189
+ # Database instance ID. This does not include the project ID.
190
+ # @param [String] database
191
+ # Name of the database to be deleted in the instance.
192
+ # @param [String] fields
193
+ # Selector specifying which fields to include in a partial response.
194
+ # @param [String] quota_user
195
+ # Available to use for quota purposes for server-side applications. Can be any
196
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
197
+ # Overrides userIp if both are provided.
198
+ # @param [String] user_ip
199
+ # IP address of the site where the request originates. Use this if you want to
200
+ # enforce per-user limits.
201
+ # @param [Google::Apis::RequestOptions] options
202
+ # Request-specific options
203
+ #
204
+ # @yield [result, err] Result & error if block supplied
205
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
206
+ # @yieldparam err [StandardError] error object if request failed
207
+ #
208
+ # @return [Google::Apis::SqladminV1beta4::Operation]
209
+ #
210
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
213
+ def delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
214
+ command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/databases/{database}', options)
215
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
216
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
217
+ command.params['project'] = project unless project.nil?
218
+ command.params['instance'] = instance unless instance.nil?
219
+ command.params['database'] = database unless database.nil?
220
+ command.query['fields'] = fields unless fields.nil?
221
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ command.query['userIp'] = user_ip unless user_ip.nil?
223
+ execute_or_queue_command(command, &block)
224
+ end
225
+
226
+ # Retrieves a resource containing information about a database inside a Cloud
227
+ # SQL instance.
228
+ # @param [String] project
229
+ # Project ID of the project that contains the instance.
230
+ # @param [String] instance
231
+ # Database instance ID. This does not include the project ID.
232
+ # @param [String] database
233
+ # Name of the database in the instance.
234
+ # @param [String] fields
235
+ # Selector specifying which fields to include in a partial response.
236
+ # @param [String] quota_user
237
+ # Available to use for quota purposes for server-side applications. Can be any
238
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
239
+ # Overrides userIp if both are provided.
240
+ # @param [String] user_ip
241
+ # IP address of the site where the request originates. Use this if you want to
242
+ # enforce per-user limits.
243
+ # @param [Google::Apis::RequestOptions] options
244
+ # Request-specific options
245
+ #
246
+ # @yield [result, err] Result & error if block supplied
247
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Database] parsed result object
248
+ # @yieldparam err [StandardError] error object if request failed
249
+ #
250
+ # @return [Google::Apis::SqladminV1beta4::Database]
251
+ #
252
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
255
+ def get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
256
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases/{database}', options)
257
+ command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation
258
+ command.response_class = Google::Apis::SqladminV1beta4::Database
259
+ command.params['project'] = project unless project.nil?
260
+ command.params['instance'] = instance unless instance.nil?
261
+ command.params['database'] = database unless database.nil?
262
+ command.query['fields'] = fields unless fields.nil?
263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
264
+ command.query['userIp'] = user_ip unless user_ip.nil?
265
+ execute_or_queue_command(command, &block)
266
+ end
267
+
268
+ # Inserts a resource containing information about a database inside a Cloud SQL
269
+ # instance.
270
+ # @param [String] project
271
+ # Project ID of the project that contains the instance.
272
+ # @param [String] instance
273
+ # Database instance ID. This does not include the project ID.
274
+ # @param [Google::Apis::SqladminV1beta4::Database] database_object
275
+ # @param [String] fields
276
+ # Selector specifying which fields to include in a partial response.
277
+ # @param [String] quota_user
278
+ # Available to use for quota purposes for server-side applications. Can be any
279
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
280
+ # Overrides userIp if both are provided.
281
+ # @param [String] user_ip
282
+ # IP address of the site where the request originates. Use this if you want to
283
+ # enforce per-user limits.
284
+ # @param [Google::Apis::RequestOptions] options
285
+ # Request-specific options
286
+ #
287
+ # @yield [result, err] Result & error if block supplied
288
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
289
+ # @yieldparam err [StandardError] error object if request failed
290
+ #
291
+ # @return [Google::Apis::SqladminV1beta4::Operation]
292
+ #
293
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
294
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
295
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
296
+ def insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
297
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/databases', options)
298
+ command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
299
+ command.request_object = database_object
300
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
301
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
302
+ command.params['project'] = project unless project.nil?
303
+ command.params['instance'] = instance unless instance.nil?
304
+ command.query['fields'] = fields unless fields.nil?
305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
306
+ command.query['userIp'] = user_ip unless user_ip.nil?
307
+ execute_or_queue_command(command, &block)
308
+ end
309
+
310
+ # Lists databases in the specified Cloud SQL instance.
311
+ # @param [String] project
312
+ # Project ID of the project for which to list Cloud SQL instances.
313
+ # @param [String] instance
314
+ # Cloud SQL instance ID. This does not include the project ID.
315
+ # @param [String] fields
316
+ # Selector specifying which fields to include in a partial response.
317
+ # @param [String] quota_user
318
+ # Available to use for quota purposes for server-side applications. Can be any
319
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
320
+ # Overrides userIp if both are provided.
321
+ # @param [String] user_ip
322
+ # IP address of the site where the request originates. Use this if you want to
323
+ # enforce per-user limits.
324
+ # @param [Google::Apis::RequestOptions] options
325
+ # Request-specific options
326
+ #
327
+ # @yield [result, err] Result & error if block supplied
328
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListDatabasesResponse] parsed result object
329
+ # @yieldparam err [StandardError] error object if request failed
330
+ #
331
+ # @return [Google::Apis::SqladminV1beta4::ListDatabasesResponse]
332
+ #
333
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
336
+ def list_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
337
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases', options)
338
+ command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation
339
+ command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse
340
+ command.params['project'] = project unless project.nil?
341
+ command.params['instance'] = instance unless instance.nil?
342
+ command.query['fields'] = fields unless fields.nil?
343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
344
+ command.query['userIp'] = user_ip unless user_ip.nil?
345
+ execute_or_queue_command(command, &block)
346
+ end
347
+
348
+ # Updates a resource containing information about a database inside a Cloud SQL
349
+ # instance. This method supports patch semantics.
350
+ # @param [String] project
351
+ # Project ID of the project that contains the instance.
352
+ # @param [String] instance
353
+ # Database instance ID. This does not include the project ID.
354
+ # @param [String] database
355
+ # Name of the database to be updated in the instance.
356
+ # @param [Google::Apis::SqladminV1beta4::Database] database_object
357
+ # @param [String] fields
358
+ # Selector specifying which fields to include in a partial response.
359
+ # @param [String] quota_user
360
+ # Available to use for quota purposes for server-side applications. Can be any
361
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
362
+ # Overrides userIp if both are provided.
363
+ # @param [String] user_ip
364
+ # IP address of the site where the request originates. Use this if you want to
365
+ # enforce per-user limits.
366
+ # @param [Google::Apis::RequestOptions] options
367
+ # Request-specific options
368
+ #
369
+ # @yield [result, err] Result & error if block supplied
370
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
371
+ # @yieldparam err [StandardError] error object if request failed
372
+ #
373
+ # @return [Google::Apis::SqladminV1beta4::Operation]
374
+ #
375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
378
+ def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
379
+ command = make_simple_command(:patch, 'projects/{project}/instances/{instance}/databases/{database}', options)
380
+ command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
381
+ command.request_object = database_object
382
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
383
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
384
+ command.params['project'] = project unless project.nil?
385
+ command.params['instance'] = instance unless instance.nil?
386
+ command.params['database'] = database unless database.nil?
387
+ command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
389
+ command.query['userIp'] = user_ip unless user_ip.nil?
390
+ execute_or_queue_command(command, &block)
391
+ end
392
+
393
+ # Updates a resource containing information about a database inside a Cloud SQL
394
+ # instance.
395
+ # @param [String] project
396
+ # Project ID of the project that contains the instance.
397
+ # @param [String] instance
398
+ # Database instance ID. This does not include the project ID.
399
+ # @param [String] database
400
+ # Name of the database to be updated in the instance.
401
+ # @param [Google::Apis::SqladminV1beta4::Database] database_object
402
+ # @param [String] fields
403
+ # Selector specifying which fields to include in a partial response.
404
+ # @param [String] quota_user
405
+ # Available to use for quota purposes for server-side applications. Can be any
406
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
407
+ # Overrides userIp if both are provided.
408
+ # @param [String] user_ip
409
+ # IP address of the site where the request originates. Use this if you want to
410
+ # enforce per-user limits.
411
+ # @param [Google::Apis::RequestOptions] options
412
+ # Request-specific options
413
+ #
414
+ # @yield [result, err] Result & error if block supplied
415
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [Google::Apis::SqladminV1beta4::Operation]
419
+ #
420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
423
+ def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
424
+ command = make_simple_command(:put, 'projects/{project}/instances/{instance}/databases/{database}', options)
425
+ command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
426
+ command.request_object = database_object
427
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
428
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
429
+ command.params['project'] = project unless project.nil?
430
+ command.params['instance'] = instance unless instance.nil?
431
+ command.params['database'] = database unless database.nil?
432
+ command.query['fields'] = fields unless fields.nil?
433
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
434
+ command.query['userIp'] = user_ip unless user_ip.nil?
435
+ execute_or_queue_command(command, &block)
436
+ end
437
+
438
+ # List all available database flags for Google Cloud SQL instances.
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # Overrides userIp if both are provided.
445
+ # @param [String] user_ip
446
+ # IP address of the site where the request originates. Use this if you want to
447
+ # enforce per-user limits.
448
+ # @param [Google::Apis::RequestOptions] options
449
+ # Request-specific options
450
+ #
451
+ # @yield [result, err] Result & error if block supplied
452
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListFlagsResponse] parsed result object
453
+ # @yieldparam err [StandardError] error object if request failed
454
+ #
455
+ # @return [Google::Apis::SqladminV1beta4::ListFlagsResponse]
456
+ #
457
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
460
+ def list_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
461
+ command = make_simple_command(:get, 'flags', options)
462
+ command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
463
+ command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
464
+ command.query['fields'] = fields unless fields.nil?
465
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
466
+ command.query['userIp'] = user_ip unless user_ip.nil?
467
+ execute_or_queue_command(command, &block)
468
+ end
469
+
470
+ # Creates a Cloud SQL instance as a clone of the source instance.
471
+ # @param [String] project
472
+ # Project ID of the source as well as the clone Cloud SQL instance.
473
+ # @param [String] instance
474
+ # The ID of the Cloud SQL instance to be cloned (source). This does not include
475
+ # the project ID.
476
+ # @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object
477
+ # @param [String] fields
478
+ # Selector specifying which fields to include in a partial response.
479
+ # @param [String] quota_user
480
+ # Available to use for quota purposes for server-side applications. Can be any
481
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
482
+ # Overrides userIp if both are provided.
483
+ # @param [String] user_ip
484
+ # IP address of the site where the request originates. Use this if you want to
485
+ # enforce per-user limits.
486
+ # @param [Google::Apis::RequestOptions] options
487
+ # Request-specific options
488
+ #
489
+ # @yield [result, err] Result & error if block supplied
490
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
491
+ # @yieldparam err [StandardError] error object if request failed
492
+ #
493
+ # @return [Google::Apis::SqladminV1beta4::Operation]
494
+ #
495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
498
+ def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
499
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/clone', options)
500
+ command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation
501
+ command.request_object = clone_instances_request_object
502
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
503
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
504
+ command.params['project'] = project unless project.nil?
505
+ command.params['instance'] = instance unless instance.nil?
506
+ command.query['fields'] = fields unless fields.nil?
507
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
508
+ command.query['userIp'] = user_ip unless user_ip.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Deletes a Cloud SQL instance.
513
+ # @param [String] project
514
+ # Project ID of the project that contains the instance to be deleted.
515
+ # @param [String] instance
516
+ # Cloud SQL instance ID. This does not include the project ID.
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
519
+ # @param [String] quota_user
520
+ # Available to use for quota purposes for server-side applications. Can be any
521
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
522
+ # Overrides userIp if both are provided.
523
+ # @param [String] user_ip
524
+ # IP address of the site where the request originates. Use this if you want to
525
+ # enforce per-user limits.
526
+ # @param [Google::Apis::RequestOptions] options
527
+ # Request-specific options
528
+ #
529
+ # @yield [result, err] Result & error if block supplied
530
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
531
+ # @yieldparam err [StandardError] error object if request failed
532
+ #
533
+ # @return [Google::Apis::SqladminV1beta4::Operation]
534
+ #
535
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
536
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
537
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
538
+ def delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
539
+ command = make_simple_command(:delete, 'projects/{project}/instances/{instance}', options)
540
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
541
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
542
+ command.params['project'] = project unless project.nil?
543
+ command.params['instance'] = instance unless instance.nil?
544
+ command.query['fields'] = fields unless fields.nil?
545
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
546
+ command.query['userIp'] = user_ip unless user_ip.nil?
547
+ execute_or_queue_command(command, &block)
548
+ end
549
+
550
+ # Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a
551
+ # MySQL dump file.
552
+ # @param [String] project
553
+ # Project ID of the project that contains the instance to be exported.
554
+ # @param [String] instance
555
+ # Cloud SQL instance ID. This does not include the project ID.
556
+ # @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
557
+ # @param [String] fields
558
+ # Selector specifying which fields to include in a partial response.
559
+ # @param [String] quota_user
560
+ # Available to use for quota purposes for server-side applications. Can be any
561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
562
+ # Overrides userIp if both are provided.
563
+ # @param [String] user_ip
564
+ # IP address of the site where the request originates. Use this if you want to
565
+ # enforce per-user limits.
566
+ # @param [Google::Apis::RequestOptions] options
567
+ # Request-specific options
568
+ #
569
+ # @yield [result, err] Result & error if block supplied
570
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
571
+ # @yieldparam err [StandardError] error object if request failed
572
+ #
573
+ # @return [Google::Apis::SqladminV1beta4::Operation]
574
+ #
575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
578
+ def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
579
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/export', options)
580
+ command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation
581
+ command.request_object = export_instances_request_object
582
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
583
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
584
+ command.params['project'] = project unless project.nil?
585
+ command.params['instance'] = instance unless instance.nil?
586
+ command.query['fields'] = fields unless fields.nil?
587
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
588
+ command.query['userIp'] = user_ip unless user_ip.nil?
589
+ execute_or_queue_command(command, &block)
590
+ end
591
+
592
+ # Failover the instance to its failover replica instance.
593
+ # @param [String] project
594
+ # ID of the project that contains the read replica.
595
+ # @param [String] instance
596
+ # Cloud SQL instance ID. This does not include the project ID.
597
+ # @param [Google::Apis::SqladminV1beta4::InstancesFailoverRequest] instances_failover_request_object
598
+ # @param [String] fields
599
+ # Selector specifying which fields to include in a partial response.
600
+ # @param [String] quota_user
601
+ # Available to use for quota purposes for server-side applications. Can be any
602
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
603
+ # Overrides userIp if both are provided.
604
+ # @param [String] user_ip
605
+ # IP address of the site where the request originates. Use this if you want to
606
+ # enforce per-user limits.
607
+ # @param [Google::Apis::RequestOptions] options
608
+ # Request-specific options
609
+ #
610
+ # @yield [result, err] Result & error if block supplied
611
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
612
+ # @yieldparam err [StandardError] error object if request failed
613
+ #
614
+ # @return [Google::Apis::SqladminV1beta4::Operation]
615
+ #
616
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
617
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
618
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
619
+ def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
620
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/failover', options)
621
+ command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation
622
+ command.request_object = instances_failover_request_object
623
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
624
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
625
+ command.params['project'] = project unless project.nil?
626
+ command.params['instance'] = instance unless instance.nil?
627
+ command.query['fields'] = fields unless fields.nil?
628
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
629
+ command.query['userIp'] = user_ip unless user_ip.nil?
630
+ execute_or_queue_command(command, &block)
631
+ end
632
+
633
+ # Retrieves a resource containing information about a Cloud SQL instance.
634
+ # @param [String] project
635
+ # Project ID of the project that contains the instance.
636
+ # @param [String] instance
637
+ # Database instance ID. This does not include the project ID.
638
+ # @param [String] fields
639
+ # Selector specifying which fields to include in a partial response.
640
+ # @param [String] quota_user
641
+ # Available to use for quota purposes for server-side applications. Can be any
642
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
643
+ # Overrides userIp if both are provided.
644
+ # @param [String] user_ip
645
+ # IP address of the site where the request originates. Use this if you want to
646
+ # enforce per-user limits.
647
+ # @param [Google::Apis::RequestOptions] options
648
+ # Request-specific options
649
+ #
650
+ # @yield [result, err] Result & error if block supplied
651
+ # @yieldparam result [Google::Apis::SqladminV1beta4::DatabaseInstance] parsed result object
652
+ # @yieldparam err [StandardError] error object if request failed
653
+ #
654
+ # @return [Google::Apis::SqladminV1beta4::DatabaseInstance]
655
+ #
656
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
657
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
658
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
659
+ def get_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
660
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}', options)
661
+ command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
662
+ command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance
663
+ command.params['project'] = project unless project.nil?
664
+ command.params['instance'] = instance unless instance.nil?
665
+ command.query['fields'] = fields unless fields.nil?
666
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
667
+ command.query['userIp'] = user_ip unless user_ip.nil?
668
+ execute_or_queue_command(command, &block)
669
+ end
670
+
671
+ # Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud
672
+ # Storage.
673
+ # @param [String] project
674
+ # Project ID of the project that contains the instance.
675
+ # @param [String] instance
676
+ # Cloud SQL instance ID. This does not include the project ID.
677
+ # @param [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_request_object
678
+ # @param [String] fields
679
+ # Selector specifying which fields to include in a partial response.
680
+ # @param [String] quota_user
681
+ # Available to use for quota purposes for server-side applications. Can be any
682
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
683
+ # Overrides userIp if both are provided.
684
+ # @param [String] user_ip
685
+ # IP address of the site where the request originates. Use this if you want to
686
+ # enforce per-user limits.
687
+ # @param [Google::Apis::RequestOptions] options
688
+ # Request-specific options
689
+ #
690
+ # @yield [result, err] Result & error if block supplied
691
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
692
+ # @yieldparam err [StandardError] error object if request failed
693
+ #
694
+ # @return [Google::Apis::SqladminV1beta4::Operation]
695
+ #
696
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
697
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
698
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
699
+ def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
700
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/import', options)
701
+ command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation
702
+ command.request_object = import_instances_request_object
703
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
704
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
705
+ command.params['project'] = project unless project.nil?
706
+ command.params['instance'] = instance unless instance.nil?
707
+ command.query['fields'] = fields unless fields.nil?
708
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
709
+ command.query['userIp'] = user_ip unless user_ip.nil?
710
+ execute_or_queue_command(command, &block)
711
+ end
712
+
713
+ # Creates a new Cloud SQL instance.
714
+ # @param [String] project
715
+ # Project ID of the project to which the newly created Cloud SQL instances
716
+ # should belong.
717
+ # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
718
+ # @param [String] fields
719
+ # Selector specifying which fields to include in a partial response.
720
+ # @param [String] quota_user
721
+ # Available to use for quota purposes for server-side applications. Can be any
722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
723
+ # Overrides userIp if both are provided.
724
+ # @param [String] user_ip
725
+ # IP address of the site where the request originates. Use this if you want to
726
+ # enforce per-user limits.
727
+ # @param [Google::Apis::RequestOptions] options
728
+ # Request-specific options
729
+ #
730
+ # @yield [result, err] Result & error if block supplied
731
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
732
+ # @yieldparam err [StandardError] error object if request failed
733
+ #
734
+ # @return [Google::Apis::SqladminV1beta4::Operation]
735
+ #
736
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
737
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
738
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
739
+ def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
740
+ command = make_simple_command(:post, 'projects/{project}/instances', options)
741
+ command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
742
+ command.request_object = database_instance_object
743
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
744
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
745
+ command.params['project'] = project unless project.nil?
746
+ command.query['fields'] = fields unless fields.nil?
747
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
748
+ command.query['userIp'] = user_ip unless user_ip.nil?
749
+ execute_or_queue_command(command, &block)
750
+ end
751
+
752
+ # Lists instances under a given project in the alphabetical order of the
753
+ # instance name.
754
+ # @param [String] project
755
+ # Project ID of the project for which to list Cloud SQL instances.
756
+ # @param [Fixnum] max_results
757
+ # The maximum number of results to return per response.
758
+ # @param [String] page_token
759
+ # A previously-returned page token representing part of the larger set of
760
+ # results to view.
761
+ # @param [String] fields
762
+ # Selector specifying which fields to include in a partial response.
763
+ # @param [String] quota_user
764
+ # Available to use for quota purposes for server-side applications. Can be any
765
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
766
+ # Overrides userIp if both are provided.
767
+ # @param [String] user_ip
768
+ # IP address of the site where the request originates. Use this if you want to
769
+ # enforce per-user limits.
770
+ # @param [Google::Apis::RequestOptions] options
771
+ # Request-specific options
772
+ #
773
+ # @yield [result, err] Result & error if block supplied
774
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListInstancesResponse] parsed result object
775
+ # @yieldparam err [StandardError] error object if request failed
776
+ #
777
+ # @return [Google::Apis::SqladminV1beta4::ListInstancesResponse]
778
+ #
779
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
780
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
781
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
782
+ def list_instances(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
783
+ command = make_simple_command(:get, 'projects/{project}/instances', options)
784
+ command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation
785
+ command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse
786
+ command.params['project'] = project unless project.nil?
787
+ command.query['maxResults'] = max_results unless max_results.nil?
788
+ command.query['pageToken'] = page_token unless page_token.nil?
789
+ command.query['fields'] = fields unless fields.nil?
790
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
791
+ command.query['userIp'] = user_ip unless user_ip.nil?
792
+ execute_or_queue_command(command, &block)
793
+ end
794
+
795
+ # Updates settings of a Cloud SQL instance. Caution: This is not a partial
796
+ # update, so you must include values for all the settings that you want to
797
+ # retain. For partial updates, use patch.. This method supports patch semantics.
798
+ # @param [String] project
799
+ # Project ID of the project that contains the instance.
800
+ # @param [String] instance
801
+ # Cloud SQL instance ID. This does not include the project ID.
802
+ # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
803
+ # @param [String] fields
804
+ # Selector specifying which fields to include in a partial response.
805
+ # @param [String] quota_user
806
+ # Available to use for quota purposes for server-side applications. Can be any
807
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
808
+ # Overrides userIp if both are provided.
809
+ # @param [String] user_ip
810
+ # IP address of the site where the request originates. Use this if you want to
811
+ # enforce per-user limits.
812
+ # @param [Google::Apis::RequestOptions] options
813
+ # Request-specific options
814
+ #
815
+ # @yield [result, err] Result & error if block supplied
816
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
817
+ # @yieldparam err [StandardError] error object if request failed
818
+ #
819
+ # @return [Google::Apis::SqladminV1beta4::Operation]
820
+ #
821
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
822
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
823
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
824
+ def patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
825
+ command = make_simple_command(:patch, 'projects/{project}/instances/{instance}', options)
826
+ command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
827
+ command.request_object = database_instance_object
828
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
829
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
830
+ command.params['project'] = project unless project.nil?
831
+ command.params['instance'] = instance unless instance.nil?
832
+ command.query['fields'] = fields unless fields.nil?
833
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
834
+ command.query['userIp'] = user_ip unless user_ip.nil?
835
+ execute_or_queue_command(command, &block)
836
+ end
837
+
838
+ # Promotes the read replica instance to be a stand-alone Cloud SQL instance.
839
+ # @param [String] project
840
+ # ID of the project that contains the read replica.
841
+ # @param [String] instance
842
+ # Cloud SQL read replica instance name.
843
+ # @param [String] fields
844
+ # Selector specifying which fields to include in a partial response.
845
+ # @param [String] quota_user
846
+ # Available to use for quota purposes for server-side applications. Can be any
847
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
848
+ # Overrides userIp if both are provided.
849
+ # @param [String] user_ip
850
+ # IP address of the site where the request originates. Use this if you want to
851
+ # enforce per-user limits.
852
+ # @param [Google::Apis::RequestOptions] options
853
+ # Request-specific options
854
+ #
855
+ # @yield [result, err] Result & error if block supplied
856
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
857
+ # @yieldparam err [StandardError] error object if request failed
858
+ #
859
+ # @return [Google::Apis::SqladminV1beta4::Operation]
860
+ #
861
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
862
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
863
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
864
+ def promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
865
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/promoteReplica', options)
866
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
867
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
868
+ command.params['project'] = project unless project.nil?
869
+ command.params['instance'] = instance unless instance.nil?
870
+ command.query['fields'] = fields unless fields.nil?
871
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
872
+ command.query['userIp'] = user_ip unless user_ip.nil?
873
+ execute_or_queue_command(command, &block)
874
+ end
875
+
876
+ # Deletes all client certificates and generates a new server SSL certificate for
877
+ # the instance. The changes will not take effect until the instance is restarted.
878
+ # Existing instances without a server certificate will need to call this once
879
+ # to set a server certificate.
880
+ # @param [String] project
881
+ # Project ID of the project that contains the instance.
882
+ # @param [String] instance
883
+ # Cloud SQL instance ID. This does not include the project ID.
884
+ # @param [String] fields
885
+ # Selector specifying which fields to include in a partial response.
886
+ # @param [String] quota_user
887
+ # Available to use for quota purposes for server-side applications. Can be any
888
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
889
+ # Overrides userIp if both are provided.
890
+ # @param [String] user_ip
891
+ # IP address of the site where the request originates. Use this if you want to
892
+ # enforce per-user limits.
893
+ # @param [Google::Apis::RequestOptions] options
894
+ # Request-specific options
895
+ #
896
+ # @yield [result, err] Result & error if block supplied
897
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
898
+ # @yieldparam err [StandardError] error object if request failed
899
+ #
900
+ # @return [Google::Apis::SqladminV1beta4::Operation]
901
+ #
902
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
903
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
904
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
905
+ def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
906
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/resetSslConfig', options)
907
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
908
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
909
+ command.params['project'] = project unless project.nil?
910
+ command.params['instance'] = instance unless instance.nil?
911
+ command.query['fields'] = fields unless fields.nil?
912
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
913
+ command.query['userIp'] = user_ip unless user_ip.nil?
914
+ execute_or_queue_command(command, &block)
915
+ end
916
+
917
+ # Restarts a Cloud SQL instance.
918
+ # @param [String] project
919
+ # Project ID of the project that contains the instance to be restarted.
920
+ # @param [String] instance
921
+ # Cloud SQL instance ID. This does not include the project ID.
922
+ # @param [String] fields
923
+ # Selector specifying which fields to include in a partial response.
924
+ # @param [String] quota_user
925
+ # Available to use for quota purposes for server-side applications. Can be any
926
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
927
+ # Overrides userIp if both are provided.
928
+ # @param [String] user_ip
929
+ # IP address of the site where the request originates. Use this if you want to
930
+ # enforce per-user limits.
931
+ # @param [Google::Apis::RequestOptions] options
932
+ # Request-specific options
933
+ #
934
+ # @yield [result, err] Result & error if block supplied
935
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
936
+ # @yieldparam err [StandardError] error object if request failed
937
+ #
938
+ # @return [Google::Apis::SqladminV1beta4::Operation]
939
+ #
940
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
941
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
942
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
943
+ def restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
944
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restart', options)
945
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
946
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
947
+ command.params['project'] = project unless project.nil?
948
+ command.params['instance'] = instance unless instance.nil?
949
+ command.query['fields'] = fields unless fields.nil?
950
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
951
+ command.query['userIp'] = user_ip unless user_ip.nil?
952
+ execute_or_queue_command(command, &block)
953
+ end
954
+
955
+ # Restores a backup of a Cloud SQL instance.
956
+ # @param [String] project
957
+ # Project ID of the project that contains the instance.
958
+ # @param [String] instance
959
+ # Cloud SQL instance ID. This does not include the project ID.
960
+ # @param [Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest] restore_instances_backup_request_object
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [String] quota_user
964
+ # Available to use for quota purposes for server-side applications. Can be any
965
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
966
+ # Overrides userIp if both are provided.
967
+ # @param [String] user_ip
968
+ # IP address of the site where the request originates. Use this if you want to
969
+ # enforce per-user limits.
970
+ # @param [Google::Apis::RequestOptions] options
971
+ # Request-specific options
972
+ #
973
+ # @yield [result, err] Result & error if block supplied
974
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
975
+ # @yieldparam err [StandardError] error object if request failed
976
+ #
977
+ # @return [Google::Apis::SqladminV1beta4::Operation]
978
+ #
979
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
980
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
981
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
982
+ def restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
983
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restoreBackup', options)
984
+ command.request_representation = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest::Representation
985
+ command.request_object = restore_instances_backup_request_object
986
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
987
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
988
+ command.params['project'] = project unless project.nil?
989
+ command.params['instance'] = instance unless instance.nil?
990
+ command.query['fields'] = fields unless fields.nil?
991
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
992
+ command.query['userIp'] = user_ip unless user_ip.nil?
993
+ execute_or_queue_command(command, &block)
994
+ end
995
+
996
+ # Starts the replication in the read replica instance.
997
+ # @param [String] project
998
+ # ID of the project that contains the read replica.
999
+ # @param [String] instance
1000
+ # Cloud SQL read replica instance name.
1001
+ # @param [String] fields
1002
+ # Selector specifying which fields to include in a partial response.
1003
+ # @param [String] quota_user
1004
+ # Available to use for quota purposes for server-side applications. Can be any
1005
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1006
+ # Overrides userIp if both are provided.
1007
+ # @param [String] user_ip
1008
+ # IP address of the site where the request originates. Use this if you want to
1009
+ # enforce per-user limits.
1010
+ # @param [Google::Apis::RequestOptions] options
1011
+ # Request-specific options
1012
+ #
1013
+ # @yield [result, err] Result & error if block supplied
1014
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1015
+ # @yieldparam err [StandardError] error object if request failed
1016
+ #
1017
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1018
+ #
1019
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1020
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1021
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1022
+ def start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1023
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/startReplica', options)
1024
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1025
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1026
+ command.params['project'] = project unless project.nil?
1027
+ command.params['instance'] = instance unless instance.nil?
1028
+ command.query['fields'] = fields unless fields.nil?
1029
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1030
+ command.query['userIp'] = user_ip unless user_ip.nil?
1031
+ execute_or_queue_command(command, &block)
1032
+ end
1033
+
1034
+ # Stops the replication in the read replica instance.
1035
+ # @param [String] project
1036
+ # ID of the project that contains the read replica.
1037
+ # @param [String] instance
1038
+ # Cloud SQL read replica instance name.
1039
+ # @param [String] fields
1040
+ # Selector specifying which fields to include in a partial response.
1041
+ # @param [String] quota_user
1042
+ # Available to use for quota purposes for server-side applications. Can be any
1043
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1044
+ # Overrides userIp if both are provided.
1045
+ # @param [String] user_ip
1046
+ # IP address of the site where the request originates. Use this if you want to
1047
+ # enforce per-user limits.
1048
+ # @param [Google::Apis::RequestOptions] options
1049
+ # Request-specific options
1050
+ #
1051
+ # @yield [result, err] Result & error if block supplied
1052
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1053
+ # @yieldparam err [StandardError] error object if request failed
1054
+ #
1055
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1056
+ #
1057
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1058
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1059
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1060
+ def stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1061
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/stopReplica', options)
1062
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1063
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1064
+ command.params['project'] = project unless project.nil?
1065
+ command.params['instance'] = instance unless instance.nil?
1066
+ command.query['fields'] = fields unless fields.nil?
1067
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1068
+ command.query['userIp'] = user_ip unless user_ip.nil?
1069
+ execute_or_queue_command(command, &block)
1070
+ end
1071
+
1072
+ # Updates settings of a Cloud SQL instance. Caution: This is not a partial
1073
+ # update, so you must include values for all the settings that you want to
1074
+ # retain. For partial updates, use patch.
1075
+ # @param [String] project
1076
+ # Project ID of the project that contains the instance.
1077
+ # @param [String] instance
1078
+ # Cloud SQL instance ID. This does not include the project ID.
1079
+ # @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
1080
+ # @param [String] fields
1081
+ # Selector specifying which fields to include in a partial response.
1082
+ # @param [String] quota_user
1083
+ # Available to use for quota purposes for server-side applications. Can be any
1084
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1085
+ # Overrides userIp if both are provided.
1086
+ # @param [String] user_ip
1087
+ # IP address of the site where the request originates. Use this if you want to
1088
+ # enforce per-user limits.
1089
+ # @param [Google::Apis::RequestOptions] options
1090
+ # Request-specific options
1091
+ #
1092
+ # @yield [result, err] Result & error if block supplied
1093
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1094
+ # @yieldparam err [StandardError] error object if request failed
1095
+ #
1096
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1097
+ #
1098
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1099
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1100
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1101
+ def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1102
+ command = make_simple_command(:put, 'projects/{project}/instances/{instance}', options)
1103
+ command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
1104
+ command.request_object = database_instance_object
1105
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1106
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1107
+ command.params['project'] = project unless project.nil?
1108
+ command.params['instance'] = instance unless instance.nil?
1109
+ command.query['fields'] = fields unless fields.nil?
1110
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1111
+ command.query['userIp'] = user_ip unless user_ip.nil?
1112
+ execute_or_queue_command(command, &block)
1113
+ end
1114
+
1115
+ # Retrieves an instance operation that has been performed on an instance.
1116
+ # @param [String] project
1117
+ # Project ID of the project that contains the instance.
1118
+ # @param [String] operation
1119
+ # Instance operation ID.
1120
+ # @param [String] fields
1121
+ # Selector specifying which fields to include in a partial response.
1122
+ # @param [String] quota_user
1123
+ # Available to use for quota purposes for server-side applications. Can be any
1124
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1125
+ # Overrides userIp if both are provided.
1126
+ # @param [String] user_ip
1127
+ # IP address of the site where the request originates. Use this if you want to
1128
+ # enforce per-user limits.
1129
+ # @param [Google::Apis::RequestOptions] options
1130
+ # Request-specific options
1131
+ #
1132
+ # @yield [result, err] Result & error if block supplied
1133
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1134
+ # @yieldparam err [StandardError] error object if request failed
1135
+ #
1136
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1137
+ #
1138
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1139
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1140
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1141
+ def get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1142
+ command = make_simple_command(:get, 'projects/{project}/operations/{operation}', options)
1143
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1144
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1145
+ command.params['project'] = project unless project.nil?
1146
+ command.params['operation'] = operation unless operation.nil?
1147
+ command.query['fields'] = fields unless fields.nil?
1148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1149
+ command.query['userIp'] = user_ip unless user_ip.nil?
1150
+ execute_or_queue_command(command, &block)
1151
+ end
1152
+
1153
+ # Lists all instance operations that have been performed on the given Cloud SQL
1154
+ # instance in the reverse chronological order of the start time.
1155
+ # @param [String] project
1156
+ # Project ID of the project that contains the instance.
1157
+ # @param [String] instance
1158
+ # Cloud SQL instance ID. This does not include the project ID.
1159
+ # @param [Fixnum] max_results
1160
+ # Maximum number of operations per response.
1161
+ # @param [String] page_token
1162
+ # A previously-returned page token representing part of the larger set of
1163
+ # results to view.
1164
+ # @param [String] fields
1165
+ # Selector specifying which fields to include in a partial response.
1166
+ # @param [String] quota_user
1167
+ # Available to use for quota purposes for server-side applications. Can be any
1168
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1169
+ # Overrides userIp if both are provided.
1170
+ # @param [String] user_ip
1171
+ # IP address of the site where the request originates. Use this if you want to
1172
+ # enforce per-user limits.
1173
+ # @param [Google::Apis::RequestOptions] options
1174
+ # Request-specific options
1175
+ #
1176
+ # @yield [result, err] Result & error if block supplied
1177
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListOperationsResponse] parsed result object
1178
+ # @yieldparam err [StandardError] error object if request failed
1179
+ #
1180
+ # @return [Google::Apis::SqladminV1beta4::ListOperationsResponse]
1181
+ #
1182
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1183
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1184
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1185
+ def list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1186
+ command = make_simple_command(:get, 'projects/{project}/operations', options)
1187
+ command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation
1188
+ command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse
1189
+ command.params['project'] = project unless project.nil?
1190
+ command.query['instance'] = instance unless instance.nil?
1191
+ command.query['maxResults'] = max_results unless max_results.nil?
1192
+ command.query['pageToken'] = page_token unless page_token.nil?
1193
+ command.query['fields'] = fields unless fields.nil?
1194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1195
+ command.query['userIp'] = user_ip unless user_ip.nil?
1196
+ execute_or_queue_command(command, &block)
1197
+ end
1198
+
1199
+ # Generates a short-lived X509 certificate containing the provided public key
1200
+ # and signed by a private key specific to the target instance. Users may use the
1201
+ # certificate to authenticate as themselves when connecting to the database.
1202
+ # @param [String] project
1203
+ # Project ID of the Cloud SQL project.
1204
+ # @param [String] instance
1205
+ # Cloud SQL instance ID. This does not include the project ID.
1206
+ # @param [Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest] ssl_certs_create_ephemeral_request_object
1207
+ # @param [String] fields
1208
+ # Selector specifying which fields to include in a partial response.
1209
+ # @param [String] quota_user
1210
+ # Available to use for quota purposes for server-side applications. Can be any
1211
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1212
+ # Overrides userIp if both are provided.
1213
+ # @param [String] user_ip
1214
+ # IP address of the site where the request originates. Use this if you want to
1215
+ # enforce per-user limits.
1216
+ # @param [Google::Apis::RequestOptions] options
1217
+ # Request-specific options
1218
+ #
1219
+ # @yield [result, err] Result & error if block supplied
1220
+ # @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
1221
+ # @yieldparam err [StandardError] error object if request failed
1222
+ #
1223
+ # @return [Google::Apis::SqladminV1beta4::SslCert]
1224
+ #
1225
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1226
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1227
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1228
+ def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1229
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/createEphemeral', options)
1230
+ command.request_representation = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation
1231
+ command.request_object = ssl_certs_create_ephemeral_request_object
1232
+ command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
1233
+ command.response_class = Google::Apis::SqladminV1beta4::SslCert
1234
+ command.params['project'] = project unless project.nil?
1235
+ command.params['instance'] = instance unless instance.nil?
1236
+ command.query['fields'] = fields unless fields.nil?
1237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1238
+ command.query['userIp'] = user_ip unless user_ip.nil?
1239
+ execute_or_queue_command(command, &block)
1240
+ end
1241
+
1242
+ # Deletes the SSL certificate. The change will not take effect until the
1243
+ # instance is restarted.
1244
+ # @param [String] project
1245
+ # Project ID of the project that contains the instance to be deleted.
1246
+ # @param [String] instance
1247
+ # Cloud SQL instance ID. This does not include the project ID.
1248
+ # @param [String] sha1_fingerprint
1249
+ # Sha1 FingerPrint.
1250
+ # @param [String] fields
1251
+ # Selector specifying which fields to include in a partial response.
1252
+ # @param [String] quota_user
1253
+ # Available to use for quota purposes for server-side applications. Can be any
1254
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1255
+ # Overrides userIp if both are provided.
1256
+ # @param [String] user_ip
1257
+ # IP address of the site where the request originates. Use this if you want to
1258
+ # enforce per-user limits.
1259
+ # @param [Google::Apis::RequestOptions] options
1260
+ # Request-specific options
1261
+ #
1262
+ # @yield [result, err] Result & error if block supplied
1263
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1264
+ # @yieldparam err [StandardError] error object if request failed
1265
+ #
1266
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1267
+ #
1268
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1269
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1270
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1271
+ def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1272
+ command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
1273
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1274
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1275
+ command.params['project'] = project unless project.nil?
1276
+ command.params['instance'] = instance unless instance.nil?
1277
+ command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
1278
+ command.query['fields'] = fields unless fields.nil?
1279
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1280
+ command.query['userIp'] = user_ip unless user_ip.nil?
1281
+ execute_or_queue_command(command, &block)
1282
+ end
1283
+
1284
+ # Retrieves a particular SSL certificate. Does not include the private key (
1285
+ # required for usage). The private key must be saved from the response to
1286
+ # initial creation.
1287
+ # @param [String] project
1288
+ # Project ID of the project that contains the instance.
1289
+ # @param [String] instance
1290
+ # Cloud SQL instance ID. This does not include the project ID.
1291
+ # @param [String] sha1_fingerprint
1292
+ # Sha1 FingerPrint.
1293
+ # @param [String] fields
1294
+ # Selector specifying which fields to include in a partial response.
1295
+ # @param [String] quota_user
1296
+ # Available to use for quota purposes for server-side applications. Can be any
1297
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1298
+ # Overrides userIp if both are provided.
1299
+ # @param [String] user_ip
1300
+ # IP address of the site where the request originates. Use this if you want to
1301
+ # enforce per-user limits.
1302
+ # @param [Google::Apis::RequestOptions] options
1303
+ # Request-specific options
1304
+ #
1305
+ # @yield [result, err] Result & error if block supplied
1306
+ # @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
1307
+ # @yieldparam err [StandardError] error object if request failed
1308
+ #
1309
+ # @return [Google::Apis::SqladminV1beta4::SslCert]
1310
+ #
1311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1314
+ def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1315
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
1316
+ command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
1317
+ command.response_class = Google::Apis::SqladminV1beta4::SslCert
1318
+ command.params['project'] = project unless project.nil?
1319
+ command.params['instance'] = instance unless instance.nil?
1320
+ command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
1321
+ command.query['fields'] = fields unless fields.nil?
1322
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1323
+ command.query['userIp'] = user_ip unless user_ip.nil?
1324
+ execute_or_queue_command(command, &block)
1325
+ end
1326
+
1327
+ # Creates an SSL certificate and returns it along with the private key and
1328
+ # server certificate authority. The new certificate will not be usable until the
1329
+ # instance is restarted.
1330
+ # @param [String] project
1331
+ # Project ID of the project to which the newly created Cloud SQL instances
1332
+ # should belong.
1333
+ # @param [String] instance
1334
+ # Cloud SQL instance ID. This does not include the project ID.
1335
+ # @param [Google::Apis::SqladminV1beta4::InsertSslCertsRequest] insert_ssl_certs_request_object
1336
+ # @param [String] fields
1337
+ # Selector specifying which fields to include in a partial response.
1338
+ # @param [String] quota_user
1339
+ # Available to use for quota purposes for server-side applications. Can be any
1340
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1341
+ # Overrides userIp if both are provided.
1342
+ # @param [String] user_ip
1343
+ # IP address of the site where the request originates. Use this if you want to
1344
+ # enforce per-user limits.
1345
+ # @param [Google::Apis::RequestOptions] options
1346
+ # Request-specific options
1347
+ #
1348
+ # @yield [result, err] Result & error if block supplied
1349
+ # @yieldparam result [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] parsed result object
1350
+ # @yieldparam err [StandardError] error object if request failed
1351
+ #
1352
+ # @return [Google::Apis::SqladminV1beta4::InsertSslCertsResponse]
1353
+ #
1354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1357
+ def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1358
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/sslCerts', options)
1359
+ command.request_representation = Google::Apis::SqladminV1beta4::InsertSslCertsRequest::Representation
1360
+ command.request_object = insert_ssl_certs_request_object
1361
+ command.response_representation = Google::Apis::SqladminV1beta4::InsertSslCertsResponse::Representation
1362
+ command.response_class = Google::Apis::SqladminV1beta4::InsertSslCertsResponse
1363
+ command.params['project'] = project unless project.nil?
1364
+ command.params['instance'] = instance unless instance.nil?
1365
+ command.query['fields'] = fields unless fields.nil?
1366
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1367
+ command.query['userIp'] = user_ip unless user_ip.nil?
1368
+ execute_or_queue_command(command, &block)
1369
+ end
1370
+
1371
+ # Lists all of the current SSL certificates for the instance.
1372
+ # @param [String] project
1373
+ # Project ID of the project for which to list Cloud SQL instances.
1374
+ # @param [String] instance
1375
+ # Cloud SQL instance ID. This does not include the project ID.
1376
+ # @param [String] fields
1377
+ # Selector specifying which fields to include in a partial response.
1378
+ # @param [String] quota_user
1379
+ # Available to use for quota purposes for server-side applications. Can be any
1380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1381
+ # Overrides userIp if both are provided.
1382
+ # @param [String] user_ip
1383
+ # IP address of the site where the request originates. Use this if you want to
1384
+ # enforce per-user limits.
1385
+ # @param [Google::Apis::RequestOptions] options
1386
+ # Request-specific options
1387
+ #
1388
+ # @yield [result, err] Result & error if block supplied
1389
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListSslCertsResponse] parsed result object
1390
+ # @yieldparam err [StandardError] error object if request failed
1391
+ #
1392
+ # @return [Google::Apis::SqladminV1beta4::ListSslCertsResponse]
1393
+ #
1394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1397
+ def list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1398
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts', options)
1399
+ command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation
1400
+ command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse
1401
+ command.params['project'] = project unless project.nil?
1402
+ command.params['instance'] = instance unless instance.nil?
1403
+ command.query['fields'] = fields unless fields.nil?
1404
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1405
+ command.query['userIp'] = user_ip unless user_ip.nil?
1406
+ execute_or_queue_command(command, &block)
1407
+ end
1408
+
1409
+ # Lists all available service tiers for Google Cloud SQL, for example D1, D2.
1410
+ # For related information, see Pricing.
1411
+ # @param [String] project
1412
+ # Project ID of the project for which to list tiers.
1413
+ # @param [String] fields
1414
+ # Selector specifying which fields to include in a partial response.
1415
+ # @param [String] quota_user
1416
+ # Available to use for quota purposes for server-side applications. Can be any
1417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1418
+ # Overrides userIp if both are provided.
1419
+ # @param [String] user_ip
1420
+ # IP address of the site where the request originates. Use this if you want to
1421
+ # enforce per-user limits.
1422
+ # @param [Google::Apis::RequestOptions] options
1423
+ # Request-specific options
1424
+ #
1425
+ # @yield [result, err] Result & error if block supplied
1426
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListTiersResponse] parsed result object
1427
+ # @yieldparam err [StandardError] error object if request failed
1428
+ #
1429
+ # @return [Google::Apis::SqladminV1beta4::ListTiersResponse]
1430
+ #
1431
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1432
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1433
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1434
+ def list_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1435
+ command = make_simple_command(:get, 'projects/{project}/tiers', options)
1436
+ command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation
1437
+ command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse
1438
+ command.params['project'] = project unless project.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
+ # Deletes a user from a Cloud SQL instance.
1446
+ # @param [String] project
1447
+ # Project ID of the project that contains the instance.
1448
+ # @param [String] instance
1449
+ # Database instance ID. This does not include the project ID.
1450
+ # @param [String] host
1451
+ # Host of the user in the instance.
1452
+ # @param [String] name
1453
+ # Name of the user in the instance.
1454
+ # @param [String] fields
1455
+ # Selector specifying which fields to include in a partial response.
1456
+ # @param [String] quota_user
1457
+ # Available to use for quota purposes for server-side applications. Can be any
1458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1459
+ # Overrides userIp if both are provided.
1460
+ # @param [String] user_ip
1461
+ # IP address of the site where the request originates. Use this if you want to
1462
+ # enforce per-user limits.
1463
+ # @param [Google::Apis::RequestOptions] options
1464
+ # Request-specific options
1465
+ #
1466
+ # @yield [result, err] Result & error if block supplied
1467
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1468
+ # @yieldparam err [StandardError] error object if request failed
1469
+ #
1470
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1471
+ #
1472
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1473
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1474
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1475
+ def delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1476
+ command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/users', options)
1477
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1478
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1479
+ command.params['project'] = project unless project.nil?
1480
+ command.params['instance'] = instance unless instance.nil?
1481
+ command.query['host'] = host unless host.nil?
1482
+ command.query['name'] = name unless name.nil?
1483
+ command.query['fields'] = fields unless fields.nil?
1484
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1485
+ command.query['userIp'] = user_ip unless user_ip.nil?
1486
+ execute_or_queue_command(command, &block)
1487
+ end
1488
+
1489
+ # Creates a new user in a Cloud SQL instance.
1490
+ # @param [String] project
1491
+ # Project ID of the project that contains the instance.
1492
+ # @param [String] instance
1493
+ # Database instance ID. This does not include the project ID.
1494
+ # @param [Google::Apis::SqladminV1beta4::User] user_object
1495
+ # @param [String] fields
1496
+ # Selector specifying which fields to include in a partial response.
1497
+ # @param [String] quota_user
1498
+ # Available to use for quota purposes for server-side applications. Can be any
1499
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1500
+ # Overrides userIp if both are provided.
1501
+ # @param [String] user_ip
1502
+ # IP address of the site where the request originates. Use this if you want to
1503
+ # enforce per-user limits.
1504
+ # @param [Google::Apis::RequestOptions] options
1505
+ # Request-specific options
1506
+ #
1507
+ # @yield [result, err] Result & error if block supplied
1508
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1509
+ # @yieldparam err [StandardError] error object if request failed
1510
+ #
1511
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1512
+ #
1513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1516
+ def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1517
+ command = make_simple_command(:post, 'projects/{project}/instances/{instance}/users', options)
1518
+ command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
1519
+ command.request_object = user_object
1520
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1521
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1522
+ command.params['project'] = project unless project.nil?
1523
+ command.params['instance'] = instance unless instance.nil?
1524
+ command.query['fields'] = fields unless fields.nil?
1525
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1526
+ command.query['userIp'] = user_ip unless user_ip.nil?
1527
+ execute_or_queue_command(command, &block)
1528
+ end
1529
+
1530
+ # Lists users in the specified Cloud SQL instance.
1531
+ # @param [String] project
1532
+ # Project ID of the project that contains the instance.
1533
+ # @param [String] instance
1534
+ # Database instance ID. This does not include the project ID.
1535
+ # @param [String] fields
1536
+ # Selector specifying which fields to include in a partial response.
1537
+ # @param [String] quota_user
1538
+ # Available to use for quota purposes for server-side applications. Can be any
1539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1540
+ # Overrides userIp if both are provided.
1541
+ # @param [String] user_ip
1542
+ # IP address of the site where the request originates. Use this if you want to
1543
+ # enforce per-user limits.
1544
+ # @param [Google::Apis::RequestOptions] options
1545
+ # Request-specific options
1546
+ #
1547
+ # @yield [result, err] Result & error if block supplied
1548
+ # @yieldparam result [Google::Apis::SqladminV1beta4::ListUsersResponse] parsed result object
1549
+ # @yieldparam err [StandardError] error object if request failed
1550
+ #
1551
+ # @return [Google::Apis::SqladminV1beta4::ListUsersResponse]
1552
+ #
1553
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1554
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1555
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1556
+ def list_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1557
+ command = make_simple_command(:get, 'projects/{project}/instances/{instance}/users', options)
1558
+ command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation
1559
+ command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse
1560
+ command.params['project'] = project unless project.nil?
1561
+ command.params['instance'] = instance unless instance.nil?
1562
+ command.query['fields'] = fields unless fields.nil?
1563
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1564
+ command.query['userIp'] = user_ip unless user_ip.nil?
1565
+ execute_or_queue_command(command, &block)
1566
+ end
1567
+
1568
+ # Updates an existing user in a Cloud SQL instance.
1569
+ # @param [String] project
1570
+ # Project ID of the project that contains the instance.
1571
+ # @param [String] instance
1572
+ # Database instance ID. This does not include the project ID.
1573
+ # @param [String] host
1574
+ # Host of the user in the instance.
1575
+ # @param [String] name
1576
+ # Name of the user in the instance.
1577
+ # @param [Google::Apis::SqladminV1beta4::User] user_object
1578
+ # @param [String] fields
1579
+ # Selector specifying which fields to include in a partial response.
1580
+ # @param [String] quota_user
1581
+ # Available to use for quota purposes for server-side applications. Can be any
1582
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1583
+ # Overrides userIp if both are provided.
1584
+ # @param [String] user_ip
1585
+ # IP address of the site where the request originates. Use this if you want to
1586
+ # enforce per-user limits.
1587
+ # @param [Google::Apis::RequestOptions] options
1588
+ # Request-specific options
1589
+ #
1590
+ # @yield [result, err] Result & error if block supplied
1591
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1592
+ # @yieldparam err [StandardError] error object if request failed
1593
+ #
1594
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1595
+ #
1596
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1597
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1598
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1599
+ def update_user(project, instance, host, name, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1600
+ command = make_simple_command(:put, 'projects/{project}/instances/{instance}/users', options)
1601
+ command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
1602
+ command.request_object = user_object
1603
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1604
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1605
+ command.params['project'] = project unless project.nil?
1606
+ command.params['instance'] = instance unless instance.nil?
1607
+ command.query['host'] = host unless host.nil?
1608
+ command.query['name'] = name unless name.nil?
1609
+ command.query['fields'] = fields unless fields.nil?
1610
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1611
+ command.query['userIp'] = user_ip unless user_ip.nil?
1612
+ execute_or_queue_command(command, &block)
1613
+ end
1614
+
1615
+ protected
1616
+
1617
+ def apply_command_defaults(command)
1618
+ command.query['key'] = key unless key.nil?
1619
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1620
+ command.query['userIp'] = user_ip unless user_ip.nil?
1621
+ end
1622
+ end
1623
+ end
1624
+ end
1625
+ end