google-cloud-sql 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. google/cloud/sqladmin/__init__.py +605 -0
  2. google/cloud/sqladmin/gapic_version.py +16 -0
  3. google/cloud/sqladmin/py.typed +2 -0
  4. google/cloud/sqladmin_v1/__init__.py +616 -0
  5. google/cloud/sqladmin_v1/_compat.py +262 -0
  6. google/cloud/sqladmin_v1/gapic_metadata.json +959 -0
  7. google/cloud/sqladmin_v1/gapic_version.py +16 -0
  8. google/cloud/sqladmin_v1/py.typed +2 -0
  9. google/cloud/sqladmin_v1/services/__init__.py +15 -0
  10. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/__init__.py +22 -0
  11. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/async_client.py +336 -0
  12. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/client.py +613 -0
  13. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/__init__.py +34 -0
  14. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/base.py +159 -0
  15. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/grpc.py +339 -0
  16. google/cloud/sqladmin_v1/services/sql_available_database_versions_service/transports/grpc_asyncio.py +356 -0
  17. google/cloud/sqladmin_v1/services/sql_backup_runs_service/__init__.py +22 -0
  18. google/cloud/sqladmin_v1/services/sql_backup_runs_service/async_client.py +697 -0
  19. google/cloud/sqladmin_v1/services/sql_backup_runs_service/client.py +977 -0
  20. google/cloud/sqladmin_v1/services/sql_backup_runs_service/pagers.py +199 -0
  21. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/__init__.py +32 -0
  22. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/base.py +225 -0
  23. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/grpc.py +456 -0
  24. google/cloud/sqladmin_v1/services/sql_backup_runs_service/transports/grpc_asyncio.py +495 -0
  25. google/cloud/sqladmin_v1/services/sql_backups_service/__init__.py +22 -0
  26. google/cloud/sqladmin_v1/services/sql_backups_service/async_client.py +946 -0
  27. google/cloud/sqladmin_v1/services/sql_backups_service/client.py +1244 -0
  28. google/cloud/sqladmin_v1/services/sql_backups_service/pagers.py +197 -0
  29. google/cloud/sqladmin_v1/services/sql_backups_service/transports/__init__.py +32 -0
  30. google/cloud/sqladmin_v1/services/sql_backups_service/transports/base.py +237 -0
  31. google/cloud/sqladmin_v1/services/sql_backups_service/transports/grpc.py +478 -0
  32. google/cloud/sqladmin_v1/services/sql_backups_service/transports/grpc_asyncio.py +527 -0
  33. google/cloud/sqladmin_v1/services/sql_connect_service/__init__.py +22 -0
  34. google/cloud/sqladmin_v1/services/sql_connect_service/async_client.py +591 -0
  35. google/cloud/sqladmin_v1/services/sql_connect_service/client.py +867 -0
  36. google/cloud/sqladmin_v1/services/sql_connect_service/transports/__init__.py +32 -0
  37. google/cloud/sqladmin_v1/services/sql_connect_service/transports/base.py +215 -0
  38. google/cloud/sqladmin_v1/services/sql_connect_service/transports/grpc.py +430 -0
  39. google/cloud/sqladmin_v1/services/sql_connect_service/transports/grpc_asyncio.py +464 -0
  40. google/cloud/sqladmin_v1/services/sql_databases_service/__init__.py +22 -0
  41. google/cloud/sqladmin_v1/services/sql_databases_service/async_client.py +872 -0
  42. google/cloud/sqladmin_v1/services/sql_databases_service/client.py +1152 -0
  43. google/cloud/sqladmin_v1/services/sql_databases_service/transports/__init__.py +32 -0
  44. google/cloud/sqladmin_v1/services/sql_databases_service/transports/base.py +251 -0
  45. google/cloud/sqladmin_v1/services/sql_databases_service/transports/grpc.py +515 -0
  46. google/cloud/sqladmin_v1/services/sql_databases_service/transports/grpc_asyncio.py +568 -0
  47. google/cloud/sqladmin_v1/services/sql_events_service/__init__.py +22 -0
  48. google/cloud/sqladmin_v1/services/sql_events_service/async_client.py +311 -0
  49. google/cloud/sqladmin_v1/services/sql_events_service/client.py +593 -0
  50. google/cloud/sqladmin_v1/services/sql_events_service/transports/__init__.py +32 -0
  51. google/cloud/sqladmin_v1/services/sql_events_service/transports/base.py +159 -0
  52. google/cloud/sqladmin_v1/services/sql_events_service/transports/grpc.py +337 -0
  53. google/cloud/sqladmin_v1/services/sql_events_service/transports/grpc_asyncio.py +354 -0
  54. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/__init__.py +22 -0
  55. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/async_client.py +327 -0
  56. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/client.py +605 -0
  57. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/__init__.py +32 -0
  58. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/base.py +159 -0
  59. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/grpc.py +337 -0
  60. google/cloud/sqladmin_v1/services/sql_feature_eligibility_service/transports/grpc_asyncio.py +356 -0
  61. google/cloud/sqladmin_v1/services/sql_flags_service/__init__.py +22 -0
  62. google/cloud/sqladmin_v1/services/sql_flags_service/async_client.py +386 -0
  63. google/cloud/sqladmin_v1/services/sql_flags_service/client.py +667 -0
  64. google/cloud/sqladmin_v1/services/sql_flags_service/transports/__init__.py +32 -0
  65. google/cloud/sqladmin_v1/services/sql_flags_service/transports/base.py +181 -0
  66. google/cloud/sqladmin_v1/services/sql_flags_service/transports/grpc.py +367 -0
  67. google/cloud/sqladmin_v1/services/sql_flags_service/transports/grpc_asyncio.py +391 -0
  68. google/cloud/sqladmin_v1/services/sql_iam_policies_service/__init__.py +22 -0
  69. google/cloud/sqladmin_v1/services/sql_iam_policies_service/async_client.py +315 -0
  70. google/cloud/sqladmin_v1/services/sql_iam_policies_service/client.py +593 -0
  71. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/__init__.py +32 -0
  72. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/base.py +159 -0
  73. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/grpc.py +336 -0
  74. google/cloud/sqladmin_v1/services/sql_iam_policies_service/transports/grpc_asyncio.py +353 -0
  75. google/cloud/sqladmin_v1/services/sql_instance_names_service/__init__.py +22 -0
  76. google/cloud/sqladmin_v1/services/sql_instance_names_service/async_client.py +321 -0
  77. google/cloud/sqladmin_v1/services/sql_instance_names_service/client.py +595 -0
  78. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/__init__.py +32 -0
  79. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/base.py +159 -0
  80. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/grpc.py +336 -0
  81. google/cloud/sqladmin_v1/services/sql_instance_names_service/transports/grpc_asyncio.py +353 -0
  82. google/cloud/sqladmin_v1/services/sql_instances_service/__init__.py +22 -0
  83. google/cloud/sqladmin_v1/services/sql_instances_service/async_client.py +4519 -0
  84. google/cloud/sqladmin_v1/services/sql_instances_service/client.py +4833 -0
  85. google/cloud/sqladmin_v1/services/sql_instances_service/pagers.py +197 -0
  86. google/cloud/sqladmin_v1/services/sql_instances_service/transports/__init__.py +32 -0
  87. google/cloud/sqladmin_v1/services/sql_instances_service/transports/base.py +801 -0
  88. google/cloud/sqladmin_v1/services/sql_instances_service/transports/grpc.py +1661 -0
  89. google/cloud/sqladmin_v1/services/sql_instances_service/transports/grpc_asyncio.py +1904 -0
  90. google/cloud/sqladmin_v1/services/sql_operations_service/__init__.py +22 -0
  91. google/cloud/sqladmin_v1/services/sql_operations_service/async_client.py +591 -0
  92. google/cloud/sqladmin_v1/services/sql_operations_service/client.py +871 -0
  93. google/cloud/sqladmin_v1/services/sql_operations_service/pagers.py +197 -0
  94. google/cloud/sqladmin_v1/services/sql_operations_service/transports/__init__.py +32 -0
  95. google/cloud/sqladmin_v1/services/sql_operations_service/transports/base.py +210 -0
  96. google/cloud/sqladmin_v1/services/sql_operations_service/transports/grpc.py +426 -0
  97. google/cloud/sqladmin_v1/services/sql_operations_service/transports/grpc_asyncio.py +462 -0
  98. google/cloud/sqladmin_v1/services/sql_regions_service/__init__.py +22 -0
  99. google/cloud/sqladmin_v1/services/sql_regions_service/async_client.py +314 -0
  100. google/cloud/sqladmin_v1/services/sql_regions_service/client.py +596 -0
  101. google/cloud/sqladmin_v1/services/sql_regions_service/transports/__init__.py +32 -0
  102. google/cloud/sqladmin_v1/services/sql_regions_service/transports/base.py +159 -0
  103. google/cloud/sqladmin_v1/services/sql_regions_service/transports/grpc.py +338 -0
  104. google/cloud/sqladmin_v1/services/sql_regions_service/transports/grpc_asyncio.py +355 -0
  105. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/__init__.py +22 -0
  106. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/async_client.py +680 -0
  107. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/client.py +960 -0
  108. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/__init__.py +32 -0
  109. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/base.py +226 -0
  110. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/grpc.py +461 -0
  111. google/cloud/sqladmin_v1/services/sql_ssl_certs_service/transports/grpc_asyncio.py +501 -0
  112. google/cloud/sqladmin_v1/services/sql_tiers_service/__init__.py +22 -0
  113. google/cloud/sqladmin_v1/services/sql_tiers_service/async_client.py +395 -0
  114. google/cloud/sqladmin_v1/services/sql_tiers_service/client.py +676 -0
  115. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/__init__.py +32 -0
  116. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/base.py +181 -0
  117. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/grpc.py +369 -0
  118. google/cloud/sqladmin_v1/services/sql_tiers_service/transports/grpc_asyncio.py +393 -0
  119. google/cloud/sqladmin_v1/services/sql_users_service/__init__.py +22 -0
  120. google/cloud/sqladmin_v1/services/sql_users_service/async_client.py +754 -0
  121. google/cloud/sqladmin_v1/services/sql_users_service/client.py +1035 -0
  122. google/cloud/sqladmin_v1/services/sql_users_service/transports/__init__.py +32 -0
  123. google/cloud/sqladmin_v1/services/sql_users_service/transports/base.py +237 -0
  124. google/cloud/sqladmin_v1/services/sql_users_service/transports/grpc.py +477 -0
  125. google/cloud/sqladmin_v1/services/sql_users_service/transports/grpc_asyncio.py +526 -0
  126. google/cloud/sqladmin_v1/types/__init__.py +472 -0
  127. google/cloud/sqladmin_v1/types/cloud_sql_available_database_versions.py +24 -0
  128. google/cloud/sqladmin_v1/types/cloud_sql_backup_runs.py +438 -0
  129. google/cloud/sqladmin_v1/types/cloud_sql_backups.py +467 -0
  130. google/cloud/sqladmin_v1/types/cloud_sql_connect.py +385 -0
  131. google/cloud/sqladmin_v1/types/cloud_sql_databases.py +202 -0
  132. google/cloud/sqladmin_v1/types/cloud_sql_events.py +24 -0
  133. google/cloud/sqladmin_v1/types/cloud_sql_feature_eligibility.py +24 -0
  134. google/cloud/sqladmin_v1/types/cloud_sql_flags.py +272 -0
  135. google/cloud/sqladmin_v1/types/cloud_sql_iam_policies.py +24 -0
  136. google/cloud/sqladmin_v1/types/cloud_sql_instance_names.py +24 -0
  137. google/cloud/sqladmin_v1/types/cloud_sql_instances.py +4514 -0
  138. google/cloud/sqladmin_v1/types/cloud_sql_operations.py +164 -0
  139. google/cloud/sqladmin_v1/types/cloud_sql_regions.py +24 -0
  140. google/cloud/sqladmin_v1/types/cloud_sql_resources.py +4678 -0
  141. google/cloud/sqladmin_v1/types/cloud_sql_ssl_certs.py +220 -0
  142. google/cloud/sqladmin_v1/types/cloud_sql_tiers.py +108 -0
  143. google/cloud/sqladmin_v1/types/cloud_sql_users.py +571 -0
  144. google/cloud/sqladmin_v1beta4/__init__.py +583 -0
  145. google/cloud/sqladmin_v1beta4/_compat.py +262 -0
  146. google/cloud/sqladmin_v1beta4/gapic_metadata.json +1371 -0
  147. google/cloud/sqladmin_v1beta4/gapic_version.py +16 -0
  148. google/cloud/sqladmin_v1beta4/py.typed +2 -0
  149. google/cloud/sqladmin_v1beta4/services/__init__.py +15 -0
  150. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/__init__.py +22 -0
  151. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/async_client.py +689 -0
  152. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/client.py +971 -0
  153. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/pagers.py +197 -0
  154. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/__init__.py +36 -0
  155. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/base.py +223 -0
  156. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/grpc.py +449 -0
  157. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/grpc_asyncio.py +490 -0
  158. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/rest.py +1038 -0
  159. google/cloud/sqladmin_v1beta4/services/sql_backup_runs_service/transports/rest_base.py +150 -0
  160. google/cloud/sqladmin_v1beta4/services/sql_backups_service/__init__.py +22 -0
  161. google/cloud/sqladmin_v1beta4/services/sql_backups_service/async_client.py +941 -0
  162. google/cloud/sqladmin_v1beta4/services/sql_backups_service/client.py +1241 -0
  163. google/cloud/sqladmin_v1beta4/services/sql_backups_service/pagers.py +197 -0
  164. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/__init__.py +36 -0
  165. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/base.py +234 -0
  166. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/grpc.py +470 -0
  167. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/grpc_asyncio.py +521 -0
  168. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/rest.py +1238 -0
  169. google/cloud/sqladmin_v1beta4/services/sql_backups_service/transports/rest_base.py +175 -0
  170. google/cloud/sqladmin_v1beta4/services/sql_connect_service/__init__.py +22 -0
  171. google/cloud/sqladmin_v1beta4/services/sql_connect_service/async_client.py +591 -0
  172. google/cloud/sqladmin_v1beta4/services/sql_connect_service/client.py +869 -0
  173. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/__init__.py +36 -0
  174. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/base.py +215 -0
  175. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/grpc.py +430 -0
  176. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/grpc_asyncio.py +464 -0
  177. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/rest.py +852 -0
  178. google/cloud/sqladmin_v1beta4/services/sql_connect_service/transports/rest_base.py +138 -0
  179. google/cloud/sqladmin_v1beta4/services/sql_data_service/__init__.py +22 -0
  180. google/cloud/sqladmin_v1beta4/services/sql_data_service/async_client.py +444 -0
  181. google/cloud/sqladmin_v1beta4/services/sql_data_service/client.py +739 -0
  182. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/__init__.py +36 -0
  183. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/base.py +181 -0
  184. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/grpc.py +407 -0
  185. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/grpc_asyncio.py +431 -0
  186. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/rest.py +213 -0
  187. google/cloud/sqladmin_v1beta4/services/sql_data_service/transports/rest_base.py +97 -0
  188. google/cloud/sqladmin_v1beta4/services/sql_databases_service/__init__.py +22 -0
  189. google/cloud/sqladmin_v1beta4/services/sql_databases_service/async_client.py +860 -0
  190. google/cloud/sqladmin_v1beta4/services/sql_databases_service/client.py +1142 -0
  191. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/__init__.py +36 -0
  192. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/base.py +251 -0
  193. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/grpc.py +502 -0
  194. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/grpc_asyncio.py +561 -0
  195. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/rest.py +1468 -0
  196. google/cloud/sqladmin_v1beta4/services/sql_databases_service/transports/rest_base.py +180 -0
  197. google/cloud/sqladmin_v1beta4/services/sql_flags_service/__init__.py +22 -0
  198. google/cloud/sqladmin_v1beta4/services/sql_flags_service/async_client.py +386 -0
  199. google/cloud/sqladmin_v1beta4/services/sql_flags_service/client.py +669 -0
  200. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/__init__.py +36 -0
  201. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/base.py +181 -0
  202. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/grpc.py +365 -0
  203. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/grpc_asyncio.py +389 -0
  204. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/rest.py +392 -0
  205. google/cloud/sqladmin_v1beta4/services/sql_flags_service/transports/rest_base.py +107 -0
  206. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/__init__.py +22 -0
  207. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/async_client.py +315 -0
  208. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/client.py +595 -0
  209. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/__init__.py +39 -0
  210. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/base.py +159 -0
  211. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/grpc.py +336 -0
  212. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/grpc_asyncio.py +353 -0
  213. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/rest.py +184 -0
  214. google/cloud/sqladmin_v1beta4/services/sql_iam_policies_service/transports/rest_base.py +91 -0
  215. google/cloud/sqladmin_v1beta4/services/sql_instances_service/__init__.py +22 -0
  216. google/cloud/sqladmin_v1beta4/services/sql_instances_service/async_client.py +4399 -0
  217. google/cloud/sqladmin_v1beta4/services/sql_instances_service/client.py +4715 -0
  218. google/cloud/sqladmin_v1beta4/services/sql_instances_service/pagers.py +197 -0
  219. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/__init__.py +36 -0
  220. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/base.py +801 -0
  221. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/grpc.py +1627 -0
  222. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/grpc_asyncio.py +1895 -0
  223. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/rest.py +9625 -0
  224. google/cloud/sqladmin_v1beta4/services/sql_instances_service/transports/rest_base.py +744 -0
  225. google/cloud/sqladmin_v1beta4/services/sql_operations_service/__init__.py +22 -0
  226. google/cloud/sqladmin_v1beta4/services/sql_operations_service/async_client.py +585 -0
  227. google/cloud/sqladmin_v1beta4/services/sql_operations_service/client.py +867 -0
  228. google/cloud/sqladmin_v1beta4/services/sql_operations_service/pagers.py +197 -0
  229. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/__init__.py +36 -0
  230. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/base.py +210 -0
  231. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/grpc.py +422 -0
  232. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/grpc_asyncio.py +458 -0
  233. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/rest.py +744 -0
  234. google/cloud/sqladmin_v1beta4/services/sql_operations_service/transports/rest_base.py +136 -0
  235. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/__init__.py +22 -0
  236. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/async_client.py +672 -0
  237. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/client.py +954 -0
  238. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/__init__.py +36 -0
  239. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/base.py +226 -0
  240. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/grpc.py +453 -0
  241. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/grpc_asyncio.py +497 -0
  242. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/rest.py +1036 -0
  243. google/cloud/sqladmin_v1beta4/services/sql_ssl_certs_service/transports/rest_base.py +150 -0
  244. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/__init__.py +22 -0
  245. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/async_client.py +393 -0
  246. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/client.py +676 -0
  247. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/__init__.py +36 -0
  248. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/base.py +181 -0
  249. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/grpc.py +368 -0
  250. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/grpc_asyncio.py +392 -0
  251. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/rest.py +396 -0
  252. google/cloud/sqladmin_v1beta4/services/sql_tiers_service/transports/rest_base.py +107 -0
  253. google/cloud/sqladmin_v1beta4/services/sql_users_service/__init__.py +22 -0
  254. google/cloud/sqladmin_v1beta4/services/sql_users_service/async_client.py +754 -0
  255. google/cloud/sqladmin_v1beta4/services/sql_users_service/client.py +1037 -0
  256. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/__init__.py +36 -0
  257. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/base.py +237 -0
  258. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/grpc.py +475 -0
  259. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/grpc_asyncio.py +524 -0
  260. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/rest.py +1249 -0
  261. google/cloud/sqladmin_v1beta4/services/sql_users_service/transports/rest_base.py +165 -0
  262. google/cloud/sqladmin_v1beta4/types/__init__.py +480 -0
  263. google/cloud/sqladmin_v1beta4/types/cloud_sql.py +2666 -0
  264. google/cloud/sqladmin_v1beta4/types/cloud_sql_connect.py +386 -0
  265. google/cloud/sqladmin_v1beta4/types/cloud_sql_data.py +339 -0
  266. google/cloud/sqladmin_v1beta4/types/cloud_sql_iam_policies.py +24 -0
  267. google/cloud/sqladmin_v1beta4/types/cloud_sql_resources.py +8111 -0
  268. google/cloud/sqladmin_v1beta4/types/cloud_sql_tiers.py +108 -0
  269. google/cloud/sqladmin_v1beta4/types/cloud_sql_users.py +573 -0
  270. google_cloud_sql-0.1.1.dist-info/METADATA +239 -0
  271. google_cloud_sql-0.1.1.dist-info/RECORD +274 -0
  272. google_cloud_sql-0.1.1.dist-info/WHEEL +5 -0
  273. google_cloud_sql-0.1.1.dist-info/licenses/LICENSE +202 -0
  274. google_cloud_sql-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,941 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2026 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import logging as std_logging
17
+ import re
18
+ from collections import OrderedDict
19
+ from typing import (
20
+ Callable,
21
+ Dict,
22
+ Mapping,
23
+ MutableMapping,
24
+ MutableSequence,
25
+ Optional,
26
+ Sequence,
27
+ Tuple,
28
+ Type,
29
+ Union,
30
+ )
31
+
32
+ import google.protobuf
33
+ from google.api_core import exceptions as core_exceptions
34
+ from google.api_core import gapic_v1
35
+ from google.api_core import retry_async as retries
36
+ from google.api_core.client_options import ClientOptions
37
+ from google.auth import credentials as ga_credentials # type: ignore
38
+ from google.oauth2 import service_account # type: ignore
39
+
40
+ from google.cloud.sqladmin_v1beta4 import gapic_version as package_version
41
+
42
+ try:
43
+ OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
44
+ except AttributeError: # pragma: NO COVER
45
+ OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
46
+
47
+ import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
48
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
49
+ import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore
50
+ import google.type.interval_pb2 as interval_pb2 # type: ignore
51
+ from google.cloud.location import locations_pb2 # type: ignore
52
+ from google.longrunning import operations_pb2 # type: ignore
53
+
54
+ from google.cloud.sqladmin_v1beta4.services.sql_backups_service import pagers
55
+ from google.cloud.sqladmin_v1beta4.types import cloud_sql, cloud_sql_resources
56
+
57
+ from .client import SqlBackupsServiceClient
58
+ from .transports.base import DEFAULT_CLIENT_INFO, SqlBackupsServiceTransport
59
+ from .transports.grpc_asyncio import SqlBackupsServiceGrpcAsyncIOTransport
60
+
61
+ try:
62
+ from google.api_core import client_logging # type: ignore
63
+
64
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
65
+ except ImportError: # pragma: NO COVER
66
+ CLIENT_LOGGING_SUPPORTED = False
67
+
68
+ _LOGGER = std_logging.getLogger(__name__)
69
+
70
+
71
+ class SqlBackupsServiceAsyncClient:
72
+ """"""
73
+
74
+ _client: SqlBackupsServiceClient
75
+
76
+ # Copy defaults from the synchronous client for use here.
77
+ # Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead.
78
+ DEFAULT_ENDPOINT = SqlBackupsServiceClient.DEFAULT_ENDPOINT
79
+ DEFAULT_MTLS_ENDPOINT = SqlBackupsServiceClient.DEFAULT_MTLS_ENDPOINT
80
+ _DEFAULT_ENDPOINT_TEMPLATE = SqlBackupsServiceClient._DEFAULT_ENDPOINT_TEMPLATE
81
+ _DEFAULT_UNIVERSE = SqlBackupsServiceClient._DEFAULT_UNIVERSE
82
+
83
+ backup_path = staticmethod(SqlBackupsServiceClient.backup_path)
84
+ parse_backup_path = staticmethod(SqlBackupsServiceClient.parse_backup_path)
85
+ service_connection_policy_path = staticmethod(
86
+ SqlBackupsServiceClient.service_connection_policy_path
87
+ )
88
+ parse_service_connection_policy_path = staticmethod(
89
+ SqlBackupsServiceClient.parse_service_connection_policy_path
90
+ )
91
+ common_billing_account_path = staticmethod(
92
+ SqlBackupsServiceClient.common_billing_account_path
93
+ )
94
+ parse_common_billing_account_path = staticmethod(
95
+ SqlBackupsServiceClient.parse_common_billing_account_path
96
+ )
97
+ common_folder_path = staticmethod(SqlBackupsServiceClient.common_folder_path)
98
+ parse_common_folder_path = staticmethod(
99
+ SqlBackupsServiceClient.parse_common_folder_path
100
+ )
101
+ common_organization_path = staticmethod(
102
+ SqlBackupsServiceClient.common_organization_path
103
+ )
104
+ parse_common_organization_path = staticmethod(
105
+ SqlBackupsServiceClient.parse_common_organization_path
106
+ )
107
+ common_project_path = staticmethod(SqlBackupsServiceClient.common_project_path)
108
+ parse_common_project_path = staticmethod(
109
+ SqlBackupsServiceClient.parse_common_project_path
110
+ )
111
+ common_location_path = staticmethod(SqlBackupsServiceClient.common_location_path)
112
+ parse_common_location_path = staticmethod(
113
+ SqlBackupsServiceClient.parse_common_location_path
114
+ )
115
+
116
+ @classmethod
117
+ def from_service_account_info(cls, info: dict, *args, **kwargs):
118
+ """Creates an instance of this client using the provided credentials
119
+ info.
120
+
121
+ Args:
122
+ info (dict): The service account private key info.
123
+ args: Additional arguments to pass to the constructor.
124
+ kwargs: Additional arguments to pass to the constructor.
125
+
126
+ Returns:
127
+ SqlBackupsServiceAsyncClient: The constructed client.
128
+ """
129
+ sa_info_func = (
130
+ SqlBackupsServiceClient.from_service_account_info.__func__ # type: ignore
131
+ )
132
+ return sa_info_func(SqlBackupsServiceAsyncClient, info, *args, **kwargs)
133
+
134
+ @classmethod
135
+ def from_service_account_file(cls, filename: str, *args, **kwargs):
136
+ """Creates an instance of this client using the provided credentials
137
+ file.
138
+
139
+ Args:
140
+ filename (str): The path to the service account private key json
141
+ file.
142
+ args: Additional arguments to pass to the constructor.
143
+ kwargs: Additional arguments to pass to the constructor.
144
+
145
+ Returns:
146
+ SqlBackupsServiceAsyncClient: The constructed client.
147
+ """
148
+ sa_file_func = (
149
+ SqlBackupsServiceClient.from_service_account_file.__func__ # type: ignore
150
+ )
151
+ return sa_file_func(SqlBackupsServiceAsyncClient, filename, *args, **kwargs)
152
+
153
+ from_service_account_json = from_service_account_file
154
+
155
+ @classmethod
156
+ def get_mtls_endpoint_and_cert_source(
157
+ cls, client_options: Optional[ClientOptions] = None
158
+ ):
159
+ """Return the API endpoint and client cert source for mutual TLS.
160
+
161
+ The client cert source is determined in the following order:
162
+ (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the
163
+ client cert source is None.
164
+ (2) if `client_options.client_cert_source` is provided, use the provided one; if the
165
+ default client cert source exists, use the default one; otherwise the client cert
166
+ source is None.
167
+
168
+ The API endpoint is determined in the following order:
169
+ (1) if `client_options.api_endpoint` if provided, use the provided one.
170
+ (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
171
+ default mTLS endpoint; if the environment variable is "never", use the default API
172
+ endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
173
+ use the default API endpoint.
174
+
175
+ More details can be found at https://google.aip.dev/auth/4114.
176
+
177
+ Args:
178
+ client_options (google.api_core.client_options.ClientOptions): Custom options for the
179
+ client. Only the `api_endpoint` and `client_cert_source` properties may be used
180
+ in this method.
181
+
182
+ Returns:
183
+ Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the
184
+ client cert source to use.
185
+
186
+ Raises:
187
+ google.auth.exceptions.MutualTLSChannelError: If any errors happen.
188
+ """
189
+ return SqlBackupsServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore
190
+
191
+ @property
192
+ def transport(self) -> SqlBackupsServiceTransport:
193
+ """Returns the transport used by the client instance.
194
+
195
+ Returns:
196
+ SqlBackupsServiceTransport: The transport used by the client instance.
197
+ """
198
+ return self._client.transport
199
+
200
+ @property
201
+ def api_endpoint(self) -> str:
202
+ """Return the API endpoint used by the client instance.
203
+
204
+ Returns:
205
+ str: The API endpoint used by the client instance.
206
+ """
207
+ return self._client._api_endpoint
208
+
209
+ @property
210
+ def universe_domain(self) -> str:
211
+ """Return the universe domain used by the client instance.
212
+
213
+ Returns:
214
+ str: The universe domain used
215
+ by the client instance.
216
+ """
217
+ return self._client._universe_domain
218
+
219
+ get_transport_class = SqlBackupsServiceClient.get_transport_class
220
+
221
+ def __init__(
222
+ self,
223
+ *,
224
+ credentials: Optional[ga_credentials.Credentials] = None,
225
+ transport: Optional[
226
+ Union[
227
+ str,
228
+ SqlBackupsServiceTransport,
229
+ Callable[..., SqlBackupsServiceTransport],
230
+ ]
231
+ ] = "grpc_asyncio",
232
+ client_options: Optional[ClientOptions] = None,
233
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
234
+ ) -> None:
235
+ """Instantiates the sql backups service async client.
236
+
237
+ Args:
238
+ credentials (Optional[google.auth.credentials.Credentials]): The
239
+ authorization credentials to attach to requests. These
240
+ credentials identify the application to the service; if none
241
+ are specified, the client will attempt to ascertain the
242
+ credentials from the environment.
243
+ transport (Optional[Union[str,SqlBackupsServiceTransport,Callable[..., SqlBackupsServiceTransport]]]):
244
+ The transport to use, or a Callable that constructs and returns a new transport to use.
245
+ If a Callable is given, it will be called with the same set of initialization
246
+ arguments as used in the SqlBackupsServiceTransport constructor.
247
+ If set to None, a transport is chosen automatically.
248
+ client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]):
249
+ Custom options for the client.
250
+
251
+ 1. The ``api_endpoint`` property can be used to override the
252
+ default endpoint provided by the client when ``transport`` is
253
+ not explicitly provided. Only if this property is not set and
254
+ ``transport`` was not explicitly provided, the endpoint is
255
+ determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment
256
+ variable, which have one of the following values:
257
+ "always" (always use the default mTLS endpoint), "never" (always
258
+ use the default regular endpoint) and "auto" (auto-switch to the
259
+ default mTLS endpoint if client certificate is present; this is
260
+ the default value).
261
+
262
+ 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable
263
+ is "true", then the ``client_cert_source`` property can be used
264
+ to provide a client certificate for mTLS transport. If
265
+ not provided, the default SSL client certificate will be used if
266
+ present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not
267
+ set, no client certificate will be used.
268
+
269
+ 3. The ``universe_domain`` property can be used to override the
270
+ default "googleapis.com" universe. Note that ``api_endpoint``
271
+ property still takes precedence; and ``universe_domain`` is
272
+ currently not supported for mTLS.
273
+
274
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
275
+ The client info used to send a user-agent string along with
276
+ API requests. If ``None``, then default info will be used.
277
+ Generally, you only need to set this if you're developing
278
+ your own client library.
279
+
280
+ Raises:
281
+ google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
282
+ creation failed for any reason.
283
+ """
284
+ self._client = SqlBackupsServiceClient(
285
+ credentials=credentials,
286
+ transport=transport,
287
+ client_options=client_options,
288
+ client_info=client_info,
289
+ )
290
+
291
+ if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
292
+ std_logging.DEBUG
293
+ ): # pragma: NO COVER
294
+ _LOGGER.debug(
295
+ "Created client `google.cloud.sql_v1beta4.SqlBackupsServiceAsyncClient`.",
296
+ extra={
297
+ "serviceName": "google.cloud.sql.v1beta4.SqlBackupsService",
298
+ "universeDomain": getattr(
299
+ self._client._transport._credentials, "universe_domain", ""
300
+ ),
301
+ "credentialsType": f"{type(self._client._transport._credentials).__module__}.{type(self._client._transport._credentials).__qualname__}",
302
+ "credentialsInfo": getattr(
303
+ self.transport._credentials, "get_cred_info", lambda: None
304
+ )(),
305
+ }
306
+ if hasattr(self._client._transport, "_credentials")
307
+ else {
308
+ "serviceName": "google.cloud.sql.v1beta4.SqlBackupsService",
309
+ "credentialsType": None,
310
+ },
311
+ )
312
+
313
+ async def create_backup(
314
+ self,
315
+ request: Optional[Union[cloud_sql.CreateBackupRequest, dict]] = None,
316
+ *,
317
+ parent: Optional[str] = None,
318
+ backup: Optional[cloud_sql_resources.Backup] = None,
319
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
320
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
321
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
322
+ ) -> cloud_sql_resources.Operation:
323
+ r"""Creates a backup for a Cloud SQL instance. This API
324
+ can be used only to create on-demand backups.
325
+
326
+ .. code-block:: python
327
+
328
+ # This snippet has been automatically generated and should be regarded as a
329
+ # code template only.
330
+ # It will require modifications to work:
331
+ # - It may require correct/in-range values for request initialization.
332
+ # - It may require specifying regional endpoints when creating the service
333
+ # client as shown in:
334
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
335
+ from google.cloud import sqladmin_v1beta4
336
+
337
+ async def sample_create_backup():
338
+ # Create a client
339
+ client = sqladmin_v1beta4.SqlBackupsServiceAsyncClient()
340
+
341
+ # Initialize request argument(s)
342
+ backup = sqladmin_v1beta4.Backup()
343
+ backup.ttl_days = 868
344
+
345
+ request = sqladmin_v1beta4.CreateBackupRequest(
346
+ parent="parent_value",
347
+ backup=backup,
348
+ )
349
+
350
+ # Make the request
351
+ response = await client.create_backup(request=request)
352
+
353
+ # Handle the response
354
+ print(response)
355
+
356
+ Args:
357
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.CreateBackupRequest, dict]]):
358
+ The request object. The request payload to create the
359
+ backup
360
+ parent (:class:`str`):
361
+ Required. The parent resource where
362
+ this backup is created. Format:
363
+ projects/{project}
364
+
365
+ This corresponds to the ``parent`` field
366
+ on the ``request`` instance; if ``request`` is provided, this
367
+ should not be set.
368
+ backup (:class:`google.cloud.sqladmin_v1beta4.types.Backup`):
369
+ Required. The Backup to create.
370
+ This corresponds to the ``backup`` field
371
+ on the ``request`` instance; if ``request`` is provided, this
372
+ should not be set.
373
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
374
+ should be retried.
375
+ timeout (float): The timeout for this request.
376
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
377
+ sent along with the request as metadata. Normally, each value must be of type `str`,
378
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
379
+ be of type `bytes`.
380
+
381
+ Returns:
382
+ google.cloud.sqladmin_v1beta4.types.Operation:
383
+ An Operation resource. For
384
+ successful operations that return an
385
+ Operation resource, only the fields
386
+ relevant to the operation are populated
387
+ in the resource.
388
+
389
+ """
390
+ # Create or coerce a protobuf request object.
391
+ # - Quick check: If we got a request object, we should *not* have
392
+ # gotten any keyword arguments that map to the request.
393
+ flattened_params = [parent, backup]
394
+ has_flattened_params = (
395
+ len([param for param in flattened_params if param is not None]) > 0
396
+ )
397
+ if request is not None and has_flattened_params:
398
+ raise ValueError(
399
+ "If the `request` argument is set, then none of "
400
+ "the individual field arguments should be set."
401
+ )
402
+
403
+ # - Use the request object if provided (there's no risk of modifying the input as
404
+ # there are no flattened fields), or create one.
405
+ if not isinstance(request, cloud_sql.CreateBackupRequest):
406
+ request = cloud_sql.CreateBackupRequest(request)
407
+
408
+ # If we have keyword arguments corresponding to fields on the
409
+ # request, apply these.
410
+ if parent is not None:
411
+ request.parent = parent
412
+ if backup is not None:
413
+ request.backup = backup
414
+
415
+ # Wrap the RPC method; this adds retry and timeout information,
416
+ # and friendly error handling.
417
+ rpc = self._client._transport._wrapped_methods[
418
+ self._client._transport.create_backup
419
+ ]
420
+
421
+ # Certain fields should be provided within the metadata header;
422
+ # add these here.
423
+ metadata = tuple(metadata) + (
424
+ gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
425
+ )
426
+
427
+ # Validate the universe domain.
428
+ self._client._validate_universe_domain()
429
+
430
+ # Send the request.
431
+ response = await rpc(
432
+ request,
433
+ retry=retry,
434
+ timeout=timeout,
435
+ metadata=metadata,
436
+ )
437
+
438
+ # Done; return the response.
439
+ return response
440
+
441
+ async def get_backup(
442
+ self,
443
+ request: Optional[Union[cloud_sql.GetBackupRequest, dict]] = None,
444
+ *,
445
+ name: Optional[str] = None,
446
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
447
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
448
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
449
+ ) -> cloud_sql_resources.Backup:
450
+ r"""Retrieves a resource containing information about a
451
+ backup.
452
+
453
+ .. code-block:: python
454
+
455
+ # This snippet has been automatically generated and should be regarded as a
456
+ # code template only.
457
+ # It will require modifications to work:
458
+ # - It may require correct/in-range values for request initialization.
459
+ # - It may require specifying regional endpoints when creating the service
460
+ # client as shown in:
461
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
462
+ from google.cloud import sqladmin_v1beta4
463
+
464
+ async def sample_get_backup():
465
+ # Create a client
466
+ client = sqladmin_v1beta4.SqlBackupsServiceAsyncClient()
467
+
468
+ # Initialize request argument(s)
469
+ request = sqladmin_v1beta4.GetBackupRequest(
470
+ name="name_value",
471
+ )
472
+
473
+ # Make the request
474
+ response = await client.get_backup(request=request)
475
+
476
+ # Handle the response
477
+ print(response)
478
+
479
+ Args:
480
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.GetBackupRequest, dict]]):
481
+ The request object. The request payload to get the
482
+ backup.
483
+ name (:class:`str`):
484
+ Required. The name of the backup to
485
+ retrieve. Format:
486
+ projects/{project}/backups/{backup}
487
+
488
+ This corresponds to the ``name`` field
489
+ on the ``request`` instance; if ``request`` is provided, this
490
+ should not be set.
491
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
492
+ should be retried.
493
+ timeout (float): The timeout for this request.
494
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
495
+ sent along with the request as metadata. Normally, each value must be of type `str`,
496
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
497
+ be of type `bytes`.
498
+
499
+ Returns:
500
+ google.cloud.sqladmin_v1beta4.types.Backup:
501
+ A backup resource.
502
+ """
503
+ # Create or coerce a protobuf request object.
504
+ # - Quick check: If we got a request object, we should *not* have
505
+ # gotten any keyword arguments that map to the request.
506
+ flattened_params = [name]
507
+ has_flattened_params = (
508
+ len([param for param in flattened_params if param is not None]) > 0
509
+ )
510
+ if request is not None and has_flattened_params:
511
+ raise ValueError(
512
+ "If the `request` argument is set, then none of "
513
+ "the individual field arguments should be set."
514
+ )
515
+
516
+ # - Use the request object if provided (there's no risk of modifying the input as
517
+ # there are no flattened fields), or create one.
518
+ if not isinstance(request, cloud_sql.GetBackupRequest):
519
+ request = cloud_sql.GetBackupRequest(request)
520
+
521
+ # If we have keyword arguments corresponding to fields on the
522
+ # request, apply these.
523
+ if name is not None:
524
+ request.name = name
525
+
526
+ # Wrap the RPC method; this adds retry and timeout information,
527
+ # and friendly error handling.
528
+ rpc = self._client._transport._wrapped_methods[
529
+ self._client._transport.get_backup
530
+ ]
531
+
532
+ # Certain fields should be provided within the metadata header;
533
+ # add these here.
534
+ metadata = tuple(metadata) + (
535
+ gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
536
+ )
537
+
538
+ # Validate the universe domain.
539
+ self._client._validate_universe_domain()
540
+
541
+ # Send the request.
542
+ response = await rpc(
543
+ request,
544
+ retry=retry,
545
+ timeout=timeout,
546
+ metadata=metadata,
547
+ )
548
+
549
+ # Done; return the response.
550
+ return response
551
+
552
+ async def list_backups(
553
+ self,
554
+ request: Optional[Union[cloud_sql.ListBackupsRequest, dict]] = None,
555
+ *,
556
+ parent: Optional[str] = None,
557
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
558
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
559
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
560
+ ) -> pagers.ListBackupsAsyncPager:
561
+ r"""Lists all backups associated with the project.
562
+
563
+ .. code-block:: python
564
+
565
+ # This snippet has been automatically generated and should be regarded as a
566
+ # code template only.
567
+ # It will require modifications to work:
568
+ # - It may require correct/in-range values for request initialization.
569
+ # - It may require specifying regional endpoints when creating the service
570
+ # client as shown in:
571
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
572
+ from google.cloud import sqladmin_v1beta4
573
+
574
+ async def sample_list_backups():
575
+ # Create a client
576
+ client = sqladmin_v1beta4.SqlBackupsServiceAsyncClient()
577
+
578
+ # Initialize request argument(s)
579
+ request = sqladmin_v1beta4.ListBackupsRequest(
580
+ parent="parent_value",
581
+ )
582
+
583
+ # Make the request
584
+ page_result = client.list_backups(request=request)
585
+
586
+ # Handle the response
587
+ async for response in page_result:
588
+ print(response)
589
+
590
+ Args:
591
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.ListBackupsRequest, dict]]):
592
+ The request object. The request payload to list the
593
+ backups.
594
+ parent (:class:`str`):
595
+ Required. The parent that owns this
596
+ collection of backups. Format:
597
+ projects/{project}
598
+
599
+ This corresponds to the ``parent`` field
600
+ on the ``request`` instance; if ``request`` is provided, this
601
+ should not be set.
602
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
603
+ should be retried.
604
+ timeout (float): The timeout for this request.
605
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
606
+ sent along with the request as metadata. Normally, each value must be of type `str`,
607
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
608
+ be of type `bytes`.
609
+
610
+ Returns:
611
+ google.cloud.sqladmin_v1beta4.services.sql_backups_service.pagers.ListBackupsAsyncPager:
612
+ The response payload containing a
613
+ list of the backups.
614
+ Iterating over this object will yield
615
+ results and resolve additional pages
616
+ automatically.
617
+
618
+ """
619
+ # Create or coerce a protobuf request object.
620
+ # - Quick check: If we got a request object, we should *not* have
621
+ # gotten any keyword arguments that map to the request.
622
+ flattened_params = [parent]
623
+ has_flattened_params = (
624
+ len([param for param in flattened_params if param is not None]) > 0
625
+ )
626
+ if request is not None and has_flattened_params:
627
+ raise ValueError(
628
+ "If the `request` argument is set, then none of "
629
+ "the individual field arguments should be set."
630
+ )
631
+
632
+ # - Use the request object if provided (there's no risk of modifying the input as
633
+ # there are no flattened fields), or create one.
634
+ if not isinstance(request, cloud_sql.ListBackupsRequest):
635
+ request = cloud_sql.ListBackupsRequest(request)
636
+
637
+ # If we have keyword arguments corresponding to fields on the
638
+ # request, apply these.
639
+ if parent is not None:
640
+ request.parent = parent
641
+
642
+ # Wrap the RPC method; this adds retry and timeout information,
643
+ # and friendly error handling.
644
+ rpc = self._client._transport._wrapped_methods[
645
+ self._client._transport.list_backups
646
+ ]
647
+
648
+ # Certain fields should be provided within the metadata header;
649
+ # add these here.
650
+ metadata = tuple(metadata) + (
651
+ gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)),
652
+ )
653
+
654
+ # Validate the universe domain.
655
+ self._client._validate_universe_domain()
656
+
657
+ # Send the request.
658
+ response = await rpc(
659
+ request,
660
+ retry=retry,
661
+ timeout=timeout,
662
+ metadata=metadata,
663
+ )
664
+
665
+ # This method is paged; wrap the response in a pager, which provides
666
+ # an `__aiter__` convenience method.
667
+ response = pagers.ListBackupsAsyncPager(
668
+ method=rpc,
669
+ request=request,
670
+ response=response,
671
+ retry=retry,
672
+ timeout=timeout,
673
+ metadata=metadata,
674
+ )
675
+
676
+ # Done; return the response.
677
+ return response
678
+
679
+ async def update_backup(
680
+ self,
681
+ request: Optional[Union[cloud_sql.UpdateBackupRequest, dict]] = None,
682
+ *,
683
+ backup: Optional[cloud_sql_resources.Backup] = None,
684
+ update_mask: Optional[field_mask_pb2.FieldMask] = None,
685
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
686
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
687
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
688
+ ) -> cloud_sql_resources.Operation:
689
+ r"""Updates the retention period and the description of
690
+ the backup. You can use this API to update final backups
691
+ only.
692
+
693
+ .. code-block:: python
694
+
695
+ # This snippet has been automatically generated and should be regarded as a
696
+ # code template only.
697
+ # It will require modifications to work:
698
+ # - It may require correct/in-range values for request initialization.
699
+ # - It may require specifying regional endpoints when creating the service
700
+ # client as shown in:
701
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
702
+ from google.cloud import sqladmin_v1beta4
703
+
704
+ async def sample_update_backup():
705
+ # Create a client
706
+ client = sqladmin_v1beta4.SqlBackupsServiceAsyncClient()
707
+
708
+ # Initialize request argument(s)
709
+ backup = sqladmin_v1beta4.Backup()
710
+ backup.ttl_days = 868
711
+
712
+ request = sqladmin_v1beta4.UpdateBackupRequest(
713
+ backup=backup,
714
+ )
715
+
716
+ # Make the request
717
+ response = await client.update_backup(request=request)
718
+
719
+ # Handle the response
720
+ print(response)
721
+
722
+ Args:
723
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.UpdateBackupRequest, dict]]):
724
+ The request object. The request payload to update the
725
+ backup.
726
+ backup (:class:`google.cloud.sqladmin_v1beta4.types.Backup`):
727
+ Required. The backup to update. The backup’s ``name``
728
+ field is used to identify the backup to update. Format:
729
+ projects/{project}/backups/{backup}
730
+
731
+ This corresponds to the ``backup`` field
732
+ on the ``request`` instance; if ``request`` is provided, this
733
+ should not be set.
734
+ update_mask (:class:`google.protobuf.field_mask_pb2.FieldMask`):
735
+ The list of fields that you can
736
+ update. You can update only the
737
+ description and retention period of the
738
+ final backup.
739
+
740
+ This corresponds to the ``update_mask`` field
741
+ on the ``request`` instance; if ``request`` is provided, this
742
+ should not be set.
743
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
744
+ should be retried.
745
+ timeout (float): The timeout for this request.
746
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
747
+ sent along with the request as metadata. Normally, each value must be of type `str`,
748
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
749
+ be of type `bytes`.
750
+
751
+ Returns:
752
+ google.cloud.sqladmin_v1beta4.types.Operation:
753
+ An Operation resource. For
754
+ successful operations that return an
755
+ Operation resource, only the fields
756
+ relevant to the operation are populated
757
+ in the resource.
758
+
759
+ """
760
+ # Create or coerce a protobuf request object.
761
+ # - Quick check: If we got a request object, we should *not* have
762
+ # gotten any keyword arguments that map to the request.
763
+ flattened_params = [backup, update_mask]
764
+ has_flattened_params = (
765
+ len([param for param in flattened_params if param is not None]) > 0
766
+ )
767
+ if request is not None and has_flattened_params:
768
+ raise ValueError(
769
+ "If the `request` argument is set, then none of "
770
+ "the individual field arguments should be set."
771
+ )
772
+
773
+ # - Use the request object if provided (there's no risk of modifying the input as
774
+ # there are no flattened fields), or create one.
775
+ if not isinstance(request, cloud_sql.UpdateBackupRequest):
776
+ request = cloud_sql.UpdateBackupRequest(request)
777
+
778
+ # If we have keyword arguments corresponding to fields on the
779
+ # request, apply these.
780
+ if backup is not None:
781
+ request.backup = backup
782
+ if update_mask is not None:
783
+ request.update_mask = update_mask
784
+
785
+ # Wrap the RPC method; this adds retry and timeout information,
786
+ # and friendly error handling.
787
+ rpc = self._client._transport._wrapped_methods[
788
+ self._client._transport.update_backup
789
+ ]
790
+
791
+ # Certain fields should be provided within the metadata header;
792
+ # add these here.
793
+ metadata = tuple(metadata) + (
794
+ gapic_v1.routing_header.to_grpc_metadata(
795
+ (("backup.name", request.backup.name),)
796
+ ),
797
+ )
798
+
799
+ # Validate the universe domain.
800
+ self._client._validate_universe_domain()
801
+
802
+ # Send the request.
803
+ response = await rpc(
804
+ request,
805
+ retry=retry,
806
+ timeout=timeout,
807
+ metadata=metadata,
808
+ )
809
+
810
+ # Done; return the response.
811
+ return response
812
+
813
+ async def delete_backup(
814
+ self,
815
+ request: Optional[Union[cloud_sql.DeleteBackupRequest, dict]] = None,
816
+ *,
817
+ name: Optional[str] = None,
818
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
819
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
820
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
821
+ ) -> cloud_sql_resources.Operation:
822
+ r"""Deletes the backup.
823
+
824
+ .. code-block:: python
825
+
826
+ # This snippet has been automatically generated and should be regarded as a
827
+ # code template only.
828
+ # It will require modifications to work:
829
+ # - It may require correct/in-range values for request initialization.
830
+ # - It may require specifying regional endpoints when creating the service
831
+ # client as shown in:
832
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
833
+ from google.cloud import sqladmin_v1beta4
834
+
835
+ async def sample_delete_backup():
836
+ # Create a client
837
+ client = sqladmin_v1beta4.SqlBackupsServiceAsyncClient()
838
+
839
+ # Initialize request argument(s)
840
+ request = sqladmin_v1beta4.DeleteBackupRequest(
841
+ name="name_value",
842
+ )
843
+
844
+ # Make the request
845
+ response = await client.delete_backup(request=request)
846
+
847
+ # Handle the response
848
+ print(response)
849
+
850
+ Args:
851
+ request (Optional[Union[google.cloud.sqladmin_v1beta4.types.DeleteBackupRequest, dict]]):
852
+ The request object. The request payload to delete the
853
+ backup.
854
+ name (:class:`str`):
855
+ Required. The name of the backup to
856
+ delete. Format:
857
+ projects/{project}/backups/{backup}
858
+
859
+ This corresponds to the ``name`` field
860
+ on the ``request`` instance; if ``request`` is provided, this
861
+ should not be set.
862
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
863
+ should be retried.
864
+ timeout (float): The timeout for this request.
865
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
866
+ sent along with the request as metadata. Normally, each value must be of type `str`,
867
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
868
+ be of type `bytes`.
869
+
870
+ Returns:
871
+ google.cloud.sqladmin_v1beta4.types.Operation:
872
+ An Operation resource. For
873
+ successful operations that return an
874
+ Operation resource, only the fields
875
+ relevant to the operation are populated
876
+ in the resource.
877
+
878
+ """
879
+ # Create or coerce a protobuf request object.
880
+ # - Quick check: If we got a request object, we should *not* have
881
+ # gotten any keyword arguments that map to the request.
882
+ flattened_params = [name]
883
+ has_flattened_params = (
884
+ len([param for param in flattened_params if param is not None]) > 0
885
+ )
886
+ if request is not None and has_flattened_params:
887
+ raise ValueError(
888
+ "If the `request` argument is set, then none of "
889
+ "the individual field arguments should be set."
890
+ )
891
+
892
+ # - Use the request object if provided (there's no risk of modifying the input as
893
+ # there are no flattened fields), or create one.
894
+ if not isinstance(request, cloud_sql.DeleteBackupRequest):
895
+ request = cloud_sql.DeleteBackupRequest(request)
896
+
897
+ # If we have keyword arguments corresponding to fields on the
898
+ # request, apply these.
899
+ if name is not None:
900
+ request.name = name
901
+
902
+ # Wrap the RPC method; this adds retry and timeout information,
903
+ # and friendly error handling.
904
+ rpc = self._client._transport._wrapped_methods[
905
+ self._client._transport.delete_backup
906
+ ]
907
+
908
+ # Certain fields should be provided within the metadata header;
909
+ # add these here.
910
+ metadata = tuple(metadata) + (
911
+ gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
912
+ )
913
+
914
+ # Validate the universe domain.
915
+ self._client._validate_universe_domain()
916
+
917
+ # Send the request.
918
+ response = await rpc(
919
+ request,
920
+ retry=retry,
921
+ timeout=timeout,
922
+ metadata=metadata,
923
+ )
924
+
925
+ # Done; return the response.
926
+ return response
927
+
928
+ async def __aenter__(self) -> "SqlBackupsServiceAsyncClient":
929
+ return self
930
+
931
+ async def __aexit__(self, exc_type, exc, tb):
932
+ await self.transport.close()
933
+
934
+
935
+ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
936
+ gapic_version=package_version.__version__
937
+ )
938
+ DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
939
+
940
+
941
+ __all__ = ("SqlBackupsServiceAsyncClient",)