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,1895 @@
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 inspect
17
+ import json
18
+ import logging as std_logging
19
+ import pickle
20
+ import warnings
21
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
22
+
23
+ import google.protobuf.message
24
+ import grpc # type: ignore
25
+ import proto # type: ignore
26
+ from google.api_core import exceptions as core_exceptions
27
+ from google.api_core import gapic_v1, grpc_helpers_async
28
+ from google.api_core import retry_async as retries
29
+ from google.auth import credentials as ga_credentials # type: ignore
30
+ from google.auth.transport.grpc import SslCredentials # type: ignore
31
+ from google.cloud.location import locations_pb2 # type: ignore
32
+ from google.longrunning import operations_pb2 # type: ignore
33
+ from google.protobuf.json_format import MessageToJson
34
+ from grpc.experimental import aio # type: ignore
35
+
36
+ from google.cloud.sqladmin_v1beta4.types import cloud_sql, cloud_sql_resources
37
+
38
+ from .base import DEFAULT_CLIENT_INFO, SqlInstancesServiceTransport
39
+ from .grpc import SqlInstancesServiceGrpcTransport
40
+
41
+ try:
42
+ from google.api_core import client_logging # type: ignore
43
+
44
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
45
+ except ImportError: # pragma: NO COVER
46
+ CLIENT_LOGGING_SUPPORTED = False
47
+
48
+ _LOGGER = std_logging.getLogger(__name__)
49
+
50
+
51
+ class _LoggingClientAIOInterceptor(
52
+ grpc.aio.UnaryUnaryClientInterceptor
53
+ ): # pragma: NO COVER
54
+ async def intercept_unary_unary(self, continuation, client_call_details, request):
55
+ logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
56
+ std_logging.DEBUG
57
+ )
58
+ if logging_enabled: # pragma: NO COVER
59
+ request_metadata = client_call_details.metadata
60
+ if isinstance(request, proto.Message):
61
+ request_payload = type(request).to_json(request)
62
+ elif isinstance(request, google.protobuf.message.Message):
63
+ request_payload = MessageToJson(request)
64
+ else:
65
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
66
+
67
+ request_metadata = {
68
+ key: value.decode("utf-8") if isinstance(value, bytes) else value
69
+ for key, value in request_metadata
70
+ }
71
+ grpc_request = {
72
+ "payload": request_payload,
73
+ "requestMethod": "grpc",
74
+ "metadata": dict(request_metadata),
75
+ }
76
+ _LOGGER.debug(
77
+ f"Sending request for {client_call_details.method}",
78
+ extra={
79
+ "serviceName": "google.cloud.sql.v1beta4.SqlInstancesService",
80
+ "rpcName": str(client_call_details.method),
81
+ "request": grpc_request,
82
+ "metadata": grpc_request["metadata"],
83
+ },
84
+ )
85
+ response = await continuation(client_call_details, request)
86
+ if logging_enabled: # pragma: NO COVER
87
+ response_metadata = await response.trailing_metadata()
88
+ # Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
89
+ metadata = (
90
+ dict([(k, str(v)) for k, v in response_metadata])
91
+ if response_metadata
92
+ else None
93
+ )
94
+ result = await response
95
+ if isinstance(result, proto.Message):
96
+ response_payload = type(result).to_json(result)
97
+ elif isinstance(result, google.protobuf.message.Message):
98
+ response_payload = MessageToJson(result)
99
+ else:
100
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
101
+ grpc_response = {
102
+ "payload": response_payload,
103
+ "metadata": metadata,
104
+ "status": "OK",
105
+ }
106
+ _LOGGER.debug(
107
+ f"Received response to rpc {client_call_details.method}.",
108
+ extra={
109
+ "serviceName": "google.cloud.sql.v1beta4.SqlInstancesService",
110
+ "rpcName": str(client_call_details.method),
111
+ "response": grpc_response,
112
+ "metadata": grpc_response["metadata"],
113
+ },
114
+ )
115
+ return response
116
+
117
+
118
+ class SqlInstancesServiceGrpcAsyncIOTransport(SqlInstancesServiceTransport):
119
+ """gRPC AsyncIO backend transport for SqlInstancesService.
120
+
121
+ This class defines the same methods as the primary client, so the
122
+ primary client can load the underlying transport implementation
123
+ and call it.
124
+
125
+ It sends protocol buffers over the wire using gRPC (which is built on
126
+ top of HTTP/2); the ``grpcio`` package must be installed.
127
+ """
128
+
129
+ _grpc_channel: aio.Channel
130
+ _stubs: Dict[str, Callable] = {}
131
+
132
+ @classmethod
133
+ def create_channel(
134
+ cls,
135
+ host: str = "sqladmin.googleapis.com",
136
+ credentials: Optional[ga_credentials.Credentials] = None,
137
+ credentials_file: Optional[str] = None,
138
+ scopes: Optional[Sequence[str]] = None,
139
+ quota_project_id: Optional[str] = None,
140
+ **kwargs,
141
+ ) -> aio.Channel:
142
+ """Create and return a gRPC AsyncIO channel object.
143
+ Args:
144
+ host (Optional[str]): The host for the channel to use.
145
+ credentials (Optional[~.Credentials]): The
146
+ authorization credentials to attach to requests. These
147
+ credentials identify this application to the service. If
148
+ none are specified, the client will attempt to ascertain
149
+ the credentials from the environment.
150
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
151
+ be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be
152
+ removed in the next major version of this library.
153
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
154
+ service. These are only used when credentials are not specified and
155
+ are passed to :func:`google.auth.default`.
156
+ quota_project_id (Optional[str]): An optional project to use for billing
157
+ and quota.
158
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
159
+ channel creation.
160
+ Returns:
161
+ aio.Channel: A gRPC AsyncIO channel object.
162
+ """
163
+
164
+ return grpc_helpers_async.create_channel(
165
+ host,
166
+ credentials=credentials,
167
+ credentials_file=credentials_file,
168
+ quota_project_id=quota_project_id,
169
+ default_scopes=cls.AUTH_SCOPES,
170
+ scopes=scopes,
171
+ default_host=cls.DEFAULT_HOST,
172
+ **kwargs,
173
+ )
174
+
175
+ def __init__(
176
+ self,
177
+ *,
178
+ host: str = "sqladmin.googleapis.com",
179
+ credentials: Optional[ga_credentials.Credentials] = None,
180
+ credentials_file: Optional[str] = None,
181
+ scopes: Optional[Sequence[str]] = None,
182
+ channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None,
183
+ api_mtls_endpoint: Optional[str] = None,
184
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
185
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
186
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
187
+ quota_project_id: Optional[str] = None,
188
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
189
+ always_use_jwt_access: Optional[bool] = False,
190
+ api_audience: Optional[str] = None,
191
+ ) -> None:
192
+ """Instantiate the transport.
193
+
194
+ Args:
195
+ host (Optional[str]):
196
+ The hostname to connect to (default: 'sqladmin.googleapis.com').
197
+ credentials (Optional[google.auth.credentials.Credentials]): The
198
+ authorization credentials to attach to requests. These
199
+ credentials identify the application to the service; if none
200
+ are specified, the client will attempt to ascertain the
201
+ credentials from the environment.
202
+ This argument is ignored if a ``channel`` instance is provided.
203
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
204
+ be loaded with :func:`google.auth.load_credentials_from_file`.
205
+ This argument is ignored if a ``channel`` instance is provided.
206
+ This argument will be removed in the next major version of this library.
207
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
208
+ service. These are only used when credentials are not specified and
209
+ are passed to :func:`google.auth.default`.
210
+ channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]):
211
+ A ``Channel`` instance through which to make calls, or a Callable
212
+ that constructs and returns one. If set to None, ``self.create_channel``
213
+ is used to create the channel. If a Callable is given, it will be called
214
+ with the same arguments as used in ``self.create_channel``.
215
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
216
+ If provided, it overrides the ``host`` argument and tries to create
217
+ a mutual TLS channel with client SSL credentials from
218
+ ``client_cert_source`` or application default SSL credentials.
219
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
220
+ Deprecated. A callback to provide client SSL certificate bytes and
221
+ private key bytes, both in PEM format. It is ignored if
222
+ ``api_mtls_endpoint`` is None.
223
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
224
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
225
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
226
+ A callback to provide client certificate bytes and private key bytes,
227
+ both in PEM format. It is used to configure a mutual TLS channel. It is
228
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
229
+ quota_project_id (Optional[str]): An optional project to use for billing
230
+ and quota.
231
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
232
+ The client info used to send a user-agent string along with
233
+ API requests. If ``None``, then default info will be used.
234
+ Generally, you only need to set this if you're developing
235
+ your own client library.
236
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
237
+ be used for service account credentials.
238
+ api_audience (Optional[str]): The intended audience for the API calls
239
+ to the service that will be set when using certain 3rd party
240
+ authentication flows. Audience is typically a resource identifier.
241
+ If not set, the host value will be used as a default.
242
+
243
+ Raises:
244
+ google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
245
+ creation failed for any reason.
246
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
247
+ and ``credentials_file`` are passed.
248
+ """
249
+ self._grpc_channel = None
250
+ self._ssl_channel_credentials = ssl_channel_credentials
251
+ self._stubs: Dict[str, Callable] = {}
252
+
253
+ if api_mtls_endpoint:
254
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
255
+ if client_cert_source:
256
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
257
+
258
+ if isinstance(channel, aio.Channel):
259
+ # Ignore credentials if a channel was passed.
260
+ credentials = None
261
+ self._ignore_credentials = True
262
+ # If a channel was explicitly provided, set it.
263
+ self._grpc_channel = channel
264
+ self._ssl_channel_credentials = None
265
+ else:
266
+ if api_mtls_endpoint:
267
+ host = api_mtls_endpoint
268
+
269
+ # Create SSL credentials with client_cert_source or application
270
+ # default SSL credentials.
271
+ if client_cert_source:
272
+ cert, key = client_cert_source()
273
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
274
+ certificate_chain=cert, private_key=key
275
+ )
276
+ else:
277
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
278
+
279
+ else:
280
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
281
+ cert, key = client_cert_source_for_mtls()
282
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
283
+ certificate_chain=cert, private_key=key
284
+ )
285
+
286
+ # The base transport sets the host, credentials and scopes
287
+ super().__init__(
288
+ host=host,
289
+ credentials=credentials,
290
+ credentials_file=credentials_file,
291
+ scopes=scopes,
292
+ quota_project_id=quota_project_id,
293
+ client_info=client_info,
294
+ always_use_jwt_access=always_use_jwt_access,
295
+ api_audience=api_audience,
296
+ )
297
+
298
+ if not self._grpc_channel:
299
+ # initialize with the provided callable or the default channel
300
+ channel_init = channel or type(self).create_channel
301
+ self._grpc_channel = channel_init(
302
+ self._host,
303
+ # use the credentials which are saved
304
+ credentials=self._credentials,
305
+ # Set ``credentials_file`` to ``None`` here as
306
+ # the credentials that we saved earlier should be used.
307
+ credentials_file=None,
308
+ scopes=self._scopes,
309
+ ssl_credentials=self._ssl_channel_credentials,
310
+ quota_project_id=quota_project_id,
311
+ options=[
312
+ ("grpc.max_send_message_length", -1),
313
+ ("grpc.max_receive_message_length", -1),
314
+ ],
315
+ )
316
+
317
+ self._interceptor = _LoggingClientAIOInterceptor()
318
+ self._grpc_channel._unary_unary_interceptors.append(self._interceptor)
319
+ self._logged_channel = self._grpc_channel
320
+ self._wrap_with_kind = (
321
+ "kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
322
+ )
323
+ # Wrap messages. This must be done after self._logged_channel exists
324
+ self._prep_wrapped_messages(client_info)
325
+
326
+ @property
327
+ def grpc_channel(self) -> aio.Channel:
328
+ """Create the channel designed to connect to this service.
329
+
330
+ This property caches on the instance; repeated calls return
331
+ the same channel.
332
+ """
333
+ # Return the channel from cache.
334
+ return self._grpc_channel
335
+
336
+ @property
337
+ def add_server_ca(
338
+ self,
339
+ ) -> Callable[
340
+ [cloud_sql.SqlInstancesAddServerCaRequest],
341
+ Awaitable[cloud_sql_resources.Operation],
342
+ ]:
343
+ r"""Return a callable for the add server ca method over gRPC.
344
+
345
+ Add a new trusted Certificate Authority (CA) version
346
+ for the specified instance. Required to prepare for a
347
+ certificate rotation. If a CA version was previously
348
+ added but never used in a certificate rotation, this
349
+ operation replaces that version. There cannot be more
350
+ than one CA version waiting to be rotated in. For
351
+ instances that have enabled Certificate Authority
352
+ Service (CAS) based server CA, use AddServerCertificate
353
+ to add a new server certificate.
354
+
355
+ Returns:
356
+ Callable[[~.SqlInstancesAddServerCaRequest],
357
+ Awaitable[~.Operation]]:
358
+ A function that, when called, will call the underlying RPC
359
+ on the server.
360
+ """
361
+ # Generate a "stub function" on-the-fly which will actually make
362
+ # the request.
363
+ # gRPC handles serialization and deserialization, so we just need
364
+ # to pass in the functions for each.
365
+ if "add_server_ca" not in self._stubs:
366
+ self._stubs["add_server_ca"] = self._logged_channel.unary_unary(
367
+ "/google.cloud.sql.v1beta4.SqlInstancesService/AddServerCa",
368
+ request_serializer=cloud_sql.SqlInstancesAddServerCaRequest.serialize,
369
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
370
+ )
371
+ return self._stubs["add_server_ca"]
372
+
373
+ @property
374
+ def add_server_certificate(
375
+ self,
376
+ ) -> Callable[
377
+ [cloud_sql.SqlInstancesAddServerCertificateRequest],
378
+ Awaitable[cloud_sql_resources.Operation],
379
+ ]:
380
+ r"""Return a callable for the add server certificate method over gRPC.
381
+
382
+ Add a new trusted server certificate version for the
383
+ specified instance using Certificate Authority Service
384
+ (CAS) server CA. Required to prepare for a certificate
385
+ rotation. If a server certificate version was previously
386
+ added but never used in a certificate rotation, this
387
+ operation replaces that version. There cannot be more
388
+ than one certificate version waiting to be rotated in.
389
+ For instances not using CAS server CA, use AddServerCa
390
+ instead.
391
+
392
+ Returns:
393
+ Callable[[~.SqlInstancesAddServerCertificateRequest],
394
+ Awaitable[~.Operation]]:
395
+ A function that, when called, will call the underlying RPC
396
+ on the server.
397
+ """
398
+ # Generate a "stub function" on-the-fly which will actually make
399
+ # the request.
400
+ # gRPC handles serialization and deserialization, so we just need
401
+ # to pass in the functions for each.
402
+ if "add_server_certificate" not in self._stubs:
403
+ self._stubs["add_server_certificate"] = self._logged_channel.unary_unary(
404
+ "/google.cloud.sql.v1beta4.SqlInstancesService/AddServerCertificate",
405
+ request_serializer=cloud_sql.SqlInstancesAddServerCertificateRequest.serialize,
406
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
407
+ )
408
+ return self._stubs["add_server_certificate"]
409
+
410
+ @property
411
+ def add_entra_id_certificate(
412
+ self,
413
+ ) -> Callable[
414
+ [cloud_sql.SqlInstancesAddEntraIdCertificateRequest],
415
+ Awaitable[cloud_sql_resources.Operation],
416
+ ]:
417
+ r"""Return a callable for the add entra id certificate method over gRPC.
418
+
419
+ Adds a new Entra ID certificate for the specified
420
+ instance. If an Entra ID certificate was previously
421
+ added but never used in a certificate rotation, this
422
+ operation replaces that version.
423
+
424
+ Returns:
425
+ Callable[[~.SqlInstancesAddEntraIdCertificateRequest],
426
+ Awaitable[~.Operation]]:
427
+ A function that, when called, will call the underlying RPC
428
+ on the server.
429
+ """
430
+ # Generate a "stub function" on-the-fly which will actually make
431
+ # the request.
432
+ # gRPC handles serialization and deserialization, so we just need
433
+ # to pass in the functions for each.
434
+ if "add_entra_id_certificate" not in self._stubs:
435
+ self._stubs["add_entra_id_certificate"] = self._logged_channel.unary_unary(
436
+ "/google.cloud.sql.v1beta4.SqlInstancesService/AddEntraIdCertificate",
437
+ request_serializer=cloud_sql.SqlInstancesAddEntraIdCertificateRequest.serialize,
438
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
439
+ )
440
+ return self._stubs["add_entra_id_certificate"]
441
+
442
+ @property
443
+ def clone(
444
+ self,
445
+ ) -> Callable[
446
+ [cloud_sql.SqlInstancesCloneRequest], Awaitable[cloud_sql_resources.Operation]
447
+ ]:
448
+ r"""Return a callable for the clone method over gRPC.
449
+
450
+ Creates a Cloud SQL instance as a clone of the source
451
+ instance. Using this operation might cause your instance
452
+ to restart.
453
+
454
+ Returns:
455
+ Callable[[~.SqlInstancesCloneRequest],
456
+ Awaitable[~.Operation]]:
457
+ A function that, when called, will call the underlying RPC
458
+ on the server.
459
+ """
460
+ # Generate a "stub function" on-the-fly which will actually make
461
+ # the request.
462
+ # gRPC handles serialization and deserialization, so we just need
463
+ # to pass in the functions for each.
464
+ if "clone" not in self._stubs:
465
+ self._stubs["clone"] = self._logged_channel.unary_unary(
466
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Clone",
467
+ request_serializer=cloud_sql.SqlInstancesCloneRequest.serialize,
468
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
469
+ )
470
+ return self._stubs["clone"]
471
+
472
+ @property
473
+ def delete(
474
+ self,
475
+ ) -> Callable[
476
+ [cloud_sql.SqlInstancesDeleteRequest], Awaitable[cloud_sql_resources.Operation]
477
+ ]:
478
+ r"""Return a callable for the delete method over gRPC.
479
+
480
+ Deletes a Cloud SQL instance.
481
+
482
+ Returns:
483
+ Callable[[~.SqlInstancesDeleteRequest],
484
+ Awaitable[~.Operation]]:
485
+ A function that, when called, will call the underlying RPC
486
+ on the server.
487
+ """
488
+ # Generate a "stub function" on-the-fly which will actually make
489
+ # the request.
490
+ # gRPC handles serialization and deserialization, so we just need
491
+ # to pass in the functions for each.
492
+ if "delete" not in self._stubs:
493
+ self._stubs["delete"] = self._logged_channel.unary_unary(
494
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Delete",
495
+ request_serializer=cloud_sql.SqlInstancesDeleteRequest.serialize,
496
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
497
+ )
498
+ return self._stubs["delete"]
499
+
500
+ @property
501
+ def demote_master(
502
+ self,
503
+ ) -> Callable[
504
+ [cloud_sql.SqlInstancesDemoteMasterRequest],
505
+ Awaitable[cloud_sql_resources.Operation],
506
+ ]:
507
+ r"""Return a callable for the demote master method over gRPC.
508
+
509
+ Demotes the stand-alone instance to be a Cloud SQL
510
+ read replica for an external database server.
511
+
512
+ Returns:
513
+ Callable[[~.SqlInstancesDemoteMasterRequest],
514
+ Awaitable[~.Operation]]:
515
+ A function that, when called, will call the underlying RPC
516
+ on the server.
517
+ """
518
+ # Generate a "stub function" on-the-fly which will actually make
519
+ # the request.
520
+ # gRPC handles serialization and deserialization, so we just need
521
+ # to pass in the functions for each.
522
+ if "demote_master" not in self._stubs:
523
+ self._stubs["demote_master"] = self._logged_channel.unary_unary(
524
+ "/google.cloud.sql.v1beta4.SqlInstancesService/DemoteMaster",
525
+ request_serializer=cloud_sql.SqlInstancesDemoteMasterRequest.serialize,
526
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
527
+ )
528
+ return self._stubs["demote_master"]
529
+
530
+ @property
531
+ def demote(
532
+ self,
533
+ ) -> Callable[
534
+ [cloud_sql.SqlInstancesDemoteRequest], Awaitable[cloud_sql_resources.Operation]
535
+ ]:
536
+ r"""Return a callable for the demote method over gRPC.
537
+
538
+ Demotes an existing standalone instance to be a Cloud
539
+ SQL read replica for an external database server.
540
+
541
+ Returns:
542
+ Callable[[~.SqlInstancesDemoteRequest],
543
+ Awaitable[~.Operation]]:
544
+ A function that, when called, will call the underlying RPC
545
+ on the server.
546
+ """
547
+ # Generate a "stub function" on-the-fly which will actually make
548
+ # the request.
549
+ # gRPC handles serialization and deserialization, so we just need
550
+ # to pass in the functions for each.
551
+ if "demote" not in self._stubs:
552
+ self._stubs["demote"] = self._logged_channel.unary_unary(
553
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Demote",
554
+ request_serializer=cloud_sql.SqlInstancesDemoteRequest.serialize,
555
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
556
+ )
557
+ return self._stubs["demote"]
558
+
559
+ @property
560
+ def export(
561
+ self,
562
+ ) -> Callable[
563
+ [cloud_sql.SqlInstancesExportRequest], Awaitable[cloud_sql_resources.Operation]
564
+ ]:
565
+ r"""Return a callable for the export method over gRPC.
566
+
567
+ Exports data from a Cloud SQL instance to a Cloud
568
+ Storage bucket as a SQL dump or CSV file.
569
+
570
+ Returns:
571
+ Callable[[~.SqlInstancesExportRequest],
572
+ Awaitable[~.Operation]]:
573
+ A function that, when called, will call the underlying RPC
574
+ on the server.
575
+ """
576
+ # Generate a "stub function" on-the-fly which will actually make
577
+ # the request.
578
+ # gRPC handles serialization and deserialization, so we just need
579
+ # to pass in the functions for each.
580
+ if "export" not in self._stubs:
581
+ self._stubs["export"] = self._logged_channel.unary_unary(
582
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Export",
583
+ request_serializer=cloud_sql.SqlInstancesExportRequest.serialize,
584
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
585
+ )
586
+ return self._stubs["export"]
587
+
588
+ @property
589
+ def failover(
590
+ self,
591
+ ) -> Callable[
592
+ [cloud_sql.SqlInstancesFailoverRequest],
593
+ Awaitable[cloud_sql_resources.Operation],
594
+ ]:
595
+ r"""Return a callable for the failover method over gRPC.
596
+
597
+ Initiates a manual failover of a high availability (HA) primary
598
+ instance to a standby instance, which becomes the primary
599
+ instance. Users are then rerouted to the new primary. For more
600
+ information, see the `Overview of high
601
+ availability <https://cloud.google.com/sql/docs/mysql/high-availability>`__
602
+ page in the Cloud SQL documentation. If using Legacy HA (MySQL
603
+ only), this causes the instance to failover to its failover
604
+ replica instance.
605
+
606
+ Returns:
607
+ Callable[[~.SqlInstancesFailoverRequest],
608
+ Awaitable[~.Operation]]:
609
+ A function that, when called, will call the underlying RPC
610
+ on the server.
611
+ """
612
+ # Generate a "stub function" on-the-fly which will actually make
613
+ # the request.
614
+ # gRPC handles serialization and deserialization, so we just need
615
+ # to pass in the functions for each.
616
+ if "failover" not in self._stubs:
617
+ self._stubs["failover"] = self._logged_channel.unary_unary(
618
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Failover",
619
+ request_serializer=cloud_sql.SqlInstancesFailoverRequest.serialize,
620
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
621
+ )
622
+ return self._stubs["failover"]
623
+
624
+ @property
625
+ def reencrypt(
626
+ self,
627
+ ) -> Callable[
628
+ [cloud_sql.SqlInstancesReencryptRequest],
629
+ Awaitable[cloud_sql_resources.Operation],
630
+ ]:
631
+ r"""Return a callable for the reencrypt method over gRPC.
632
+
633
+ Reencrypt CMEK instance with latest key version.
634
+
635
+ Returns:
636
+ Callable[[~.SqlInstancesReencryptRequest],
637
+ Awaitable[~.Operation]]:
638
+ A function that, when called, will call the underlying RPC
639
+ on the server.
640
+ """
641
+ # Generate a "stub function" on-the-fly which will actually make
642
+ # the request.
643
+ # gRPC handles serialization and deserialization, so we just need
644
+ # to pass in the functions for each.
645
+ if "reencrypt" not in self._stubs:
646
+ self._stubs["reencrypt"] = self._logged_channel.unary_unary(
647
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Reencrypt",
648
+ request_serializer=cloud_sql.SqlInstancesReencryptRequest.serialize,
649
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
650
+ )
651
+ return self._stubs["reencrypt"]
652
+
653
+ @property
654
+ def get(
655
+ self,
656
+ ) -> Callable[
657
+ [cloud_sql.SqlInstancesGetRequest],
658
+ Awaitable[cloud_sql_resources.DatabaseInstance],
659
+ ]:
660
+ r"""Return a callable for the get method over gRPC.
661
+
662
+ Retrieves a resource containing information about a
663
+ Cloud SQL instance.
664
+
665
+ Returns:
666
+ Callable[[~.SqlInstancesGetRequest],
667
+ Awaitable[~.DatabaseInstance]]:
668
+ A function that, when called, will call the underlying RPC
669
+ on the server.
670
+ """
671
+ # Generate a "stub function" on-the-fly which will actually make
672
+ # the request.
673
+ # gRPC handles serialization and deserialization, so we just need
674
+ # to pass in the functions for each.
675
+ if "get" not in self._stubs:
676
+ self._stubs["get"] = self._logged_channel.unary_unary(
677
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Get",
678
+ request_serializer=cloud_sql.SqlInstancesGetRequest.serialize,
679
+ response_deserializer=cloud_sql_resources.DatabaseInstance.deserialize,
680
+ )
681
+ return self._stubs["get"]
682
+
683
+ @property
684
+ def import_(
685
+ self,
686
+ ) -> Callable[
687
+ [cloud_sql.SqlInstancesImportRequest], Awaitable[cloud_sql_resources.Operation]
688
+ ]:
689
+ r"""Return a callable for the import method over gRPC.
690
+
691
+ Imports data into a Cloud SQL instance from a SQL
692
+ dump or CSV file in Cloud Storage.
693
+
694
+ Returns:
695
+ Callable[[~.SqlInstancesImportRequest],
696
+ Awaitable[~.Operation]]:
697
+ A function that, when called, will call the underlying RPC
698
+ on the server.
699
+ """
700
+ # Generate a "stub function" on-the-fly which will actually make
701
+ # the request.
702
+ # gRPC handles serialization and deserialization, so we just need
703
+ # to pass in the functions for each.
704
+ if "import_" not in self._stubs:
705
+ self._stubs["import_"] = self._logged_channel.unary_unary(
706
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Import",
707
+ request_serializer=cloud_sql.SqlInstancesImportRequest.serialize,
708
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
709
+ )
710
+ return self._stubs["import_"]
711
+
712
+ @property
713
+ def insert(
714
+ self,
715
+ ) -> Callable[
716
+ [cloud_sql.SqlInstancesInsertRequest], Awaitable[cloud_sql_resources.Operation]
717
+ ]:
718
+ r"""Return a callable for the insert method over gRPC.
719
+
720
+ Creates a new Cloud SQL instance.
721
+
722
+ Returns:
723
+ Callable[[~.SqlInstancesInsertRequest],
724
+ Awaitable[~.Operation]]:
725
+ A function that, when called, will call the underlying RPC
726
+ on the server.
727
+ """
728
+ # Generate a "stub function" on-the-fly which will actually make
729
+ # the request.
730
+ # gRPC handles serialization and deserialization, so we just need
731
+ # to pass in the functions for each.
732
+ if "insert" not in self._stubs:
733
+ self._stubs["insert"] = self._logged_channel.unary_unary(
734
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Insert",
735
+ request_serializer=cloud_sql.SqlInstancesInsertRequest.serialize,
736
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
737
+ )
738
+ return self._stubs["insert"]
739
+
740
+ @property
741
+ def list(
742
+ self,
743
+ ) -> Callable[
744
+ [cloud_sql.SqlInstancesListRequest],
745
+ Awaitable[cloud_sql_resources.InstancesListResponse],
746
+ ]:
747
+ r"""Return a callable for the list method over gRPC.
748
+
749
+ Lists instances under a given project.
750
+
751
+ Returns:
752
+ Callable[[~.SqlInstancesListRequest],
753
+ Awaitable[~.InstancesListResponse]]:
754
+ A function that, when called, will call the underlying RPC
755
+ on the server.
756
+ """
757
+ # Generate a "stub function" on-the-fly which will actually make
758
+ # the request.
759
+ # gRPC handles serialization and deserialization, so we just need
760
+ # to pass in the functions for each.
761
+ if "list" not in self._stubs:
762
+ self._stubs["list"] = self._logged_channel.unary_unary(
763
+ "/google.cloud.sql.v1beta4.SqlInstancesService/List",
764
+ request_serializer=cloud_sql.SqlInstancesListRequest.serialize,
765
+ response_deserializer=cloud_sql_resources.InstancesListResponse.deserialize,
766
+ )
767
+ return self._stubs["list"]
768
+
769
+ @property
770
+ def list_server_cas(
771
+ self,
772
+ ) -> Callable[
773
+ [cloud_sql.SqlInstancesListServerCasRequest],
774
+ Awaitable[cloud_sql_resources.InstancesListServerCasResponse],
775
+ ]:
776
+ r"""Return a callable for the list server cas method over gRPC.
777
+
778
+ Lists all of the trusted Certificate Authorities
779
+ (CAs) for the specified instance. There can be up to
780
+ three CAs listed: the CA that was used to sign the
781
+ certificate that is currently in use, a CA that has been
782
+ added but not yet used to sign a certificate, and a CA
783
+ used to sign a certificate that has previously rotated
784
+ out.
785
+
786
+ Returns:
787
+ Callable[[~.SqlInstancesListServerCasRequest],
788
+ Awaitable[~.InstancesListServerCasResponse]]:
789
+ A function that, when called, will call the underlying RPC
790
+ on the server.
791
+ """
792
+ # Generate a "stub function" on-the-fly which will actually make
793
+ # the request.
794
+ # gRPC handles serialization and deserialization, so we just need
795
+ # to pass in the functions for each.
796
+ if "list_server_cas" not in self._stubs:
797
+ self._stubs["list_server_cas"] = self._logged_channel.unary_unary(
798
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ListServerCas",
799
+ request_serializer=cloud_sql.SqlInstancesListServerCasRequest.serialize,
800
+ response_deserializer=cloud_sql_resources.InstancesListServerCasResponse.deserialize,
801
+ )
802
+ return self._stubs["list_server_cas"]
803
+
804
+ @property
805
+ def list_server_certificates(
806
+ self,
807
+ ) -> Callable[
808
+ [cloud_sql.SqlInstancesListServerCertificatesRequest],
809
+ Awaitable[cloud_sql_resources.InstancesListServerCertificatesResponse],
810
+ ]:
811
+ r"""Return a callable for the list server certificates method over gRPC.
812
+
813
+ Lists all versions of server certificates and
814
+ certificate authorities (CAs) for the specified
815
+ instance. There can be up to three sets of certs listed:
816
+
817
+ the certificate that is currently in use, a future that
818
+ has been added but not yet used to sign a certificate,
819
+ and a certificate that has been rotated out. For
820
+ instances not using Certificate Authority Service (CAS)
821
+ server CA, use ListServerCas instead.
822
+
823
+ Returns:
824
+ Callable[[~.SqlInstancesListServerCertificatesRequest],
825
+ Awaitable[~.InstancesListServerCertificatesResponse]]:
826
+ A function that, when called, will call the underlying RPC
827
+ on the server.
828
+ """
829
+ # Generate a "stub function" on-the-fly which will actually make
830
+ # the request.
831
+ # gRPC handles serialization and deserialization, so we just need
832
+ # to pass in the functions for each.
833
+ if "list_server_certificates" not in self._stubs:
834
+ self._stubs["list_server_certificates"] = self._logged_channel.unary_unary(
835
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ListServerCertificates",
836
+ request_serializer=cloud_sql.SqlInstancesListServerCertificatesRequest.serialize,
837
+ response_deserializer=cloud_sql_resources.InstancesListServerCertificatesResponse.deserialize,
838
+ )
839
+ return self._stubs["list_server_certificates"]
840
+
841
+ @property
842
+ def list_entra_id_certificates(
843
+ self,
844
+ ) -> Callable[
845
+ [cloud_sql.SqlInstancesListEntraIdCertificatesRequest],
846
+ Awaitable[cloud_sql_resources.InstancesListEntraIdCertificatesResponse],
847
+ ]:
848
+ r"""Return a callable for the list entra id certificates method over gRPC.
849
+
850
+ Lists all versions of EntraID certificates for the
851
+ specified instance. There can be up to three sets of
852
+ certificates listed: the certificate that is currently
853
+ in use, a future that has been added but not yet used to
854
+ sign a certificate, and a certificate that has been
855
+ rotated out.
856
+
857
+ Returns:
858
+ Callable[[~.SqlInstancesListEntraIdCertificatesRequest],
859
+ Awaitable[~.InstancesListEntraIdCertificatesResponse]]:
860
+ A function that, when called, will call the underlying RPC
861
+ on the server.
862
+ """
863
+ # Generate a "stub function" on-the-fly which will actually make
864
+ # the request.
865
+ # gRPC handles serialization and deserialization, so we just need
866
+ # to pass in the functions for each.
867
+ if "list_entra_id_certificates" not in self._stubs:
868
+ self._stubs["list_entra_id_certificates"] = (
869
+ self._logged_channel.unary_unary(
870
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ListEntraIdCertificates",
871
+ request_serializer=cloud_sql.SqlInstancesListEntraIdCertificatesRequest.serialize,
872
+ response_deserializer=cloud_sql_resources.InstancesListEntraIdCertificatesResponse.deserialize,
873
+ )
874
+ )
875
+ return self._stubs["list_entra_id_certificates"]
876
+
877
+ @property
878
+ def patch(
879
+ self,
880
+ ) -> Callable[
881
+ [cloud_sql.SqlInstancesPatchRequest], Awaitable[cloud_sql_resources.Operation]
882
+ ]:
883
+ r"""Return a callable for the patch method over gRPC.
884
+
885
+ Partially updates settings of a Cloud SQL instance by
886
+ merging the request with the current configuration. This
887
+ method supports patch semantics.
888
+
889
+ Returns:
890
+ Callable[[~.SqlInstancesPatchRequest],
891
+ Awaitable[~.Operation]]:
892
+ A function that, when called, will call the underlying RPC
893
+ on the server.
894
+ """
895
+ # Generate a "stub function" on-the-fly which will actually make
896
+ # the request.
897
+ # gRPC handles serialization and deserialization, so we just need
898
+ # to pass in the functions for each.
899
+ if "patch" not in self._stubs:
900
+ self._stubs["patch"] = self._logged_channel.unary_unary(
901
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Patch",
902
+ request_serializer=cloud_sql.SqlInstancesPatchRequest.serialize,
903
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
904
+ )
905
+ return self._stubs["patch"]
906
+
907
+ @property
908
+ def promote_replica(
909
+ self,
910
+ ) -> Callable[
911
+ [cloud_sql.SqlInstancesPromoteReplicaRequest],
912
+ Awaitable[cloud_sql_resources.Operation],
913
+ ]:
914
+ r"""Return a callable for the promote replica method over gRPC.
915
+
916
+ Promotes the read replica instance to be an
917
+ independent Cloud SQL primary instance.
918
+ Using this operation might cause your instance to
919
+ restart.
920
+
921
+ Returns:
922
+ Callable[[~.SqlInstancesPromoteReplicaRequest],
923
+ Awaitable[~.Operation]]:
924
+ A function that, when called, will call the underlying RPC
925
+ on the server.
926
+ """
927
+ # Generate a "stub function" on-the-fly which will actually make
928
+ # the request.
929
+ # gRPC handles serialization and deserialization, so we just need
930
+ # to pass in the functions for each.
931
+ if "promote_replica" not in self._stubs:
932
+ self._stubs["promote_replica"] = self._logged_channel.unary_unary(
933
+ "/google.cloud.sql.v1beta4.SqlInstancesService/PromoteReplica",
934
+ request_serializer=cloud_sql.SqlInstancesPromoteReplicaRequest.serialize,
935
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
936
+ )
937
+ return self._stubs["promote_replica"]
938
+
939
+ @property
940
+ def switchover(
941
+ self,
942
+ ) -> Callable[
943
+ [cloud_sql.SqlInstancesSwitchoverRequest],
944
+ Awaitable[cloud_sql_resources.Operation],
945
+ ]:
946
+ r"""Return a callable for the switchover method over gRPC.
947
+
948
+ Switches over from the primary instance to the DR
949
+ replica instance.
950
+
951
+ Returns:
952
+ Callable[[~.SqlInstancesSwitchoverRequest],
953
+ Awaitable[~.Operation]]:
954
+ A function that, when called, will call the underlying RPC
955
+ on the server.
956
+ """
957
+ # Generate a "stub function" on-the-fly which will actually make
958
+ # the request.
959
+ # gRPC handles serialization and deserialization, so we just need
960
+ # to pass in the functions for each.
961
+ if "switchover" not in self._stubs:
962
+ self._stubs["switchover"] = self._logged_channel.unary_unary(
963
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Switchover",
964
+ request_serializer=cloud_sql.SqlInstancesSwitchoverRequest.serialize,
965
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
966
+ )
967
+ return self._stubs["switchover"]
968
+
969
+ @property
970
+ def reset_ssl_config(
971
+ self,
972
+ ) -> Callable[
973
+ [cloud_sql.SqlInstancesResetSslConfigRequest],
974
+ Awaitable[cloud_sql_resources.Operation],
975
+ ]:
976
+ r"""Return a callable for the reset ssl config method over gRPC.
977
+
978
+ Deletes all client certificates and generates a new
979
+ server SSL certificate for the instance.
980
+
981
+ Returns:
982
+ Callable[[~.SqlInstancesResetSslConfigRequest],
983
+ Awaitable[~.Operation]]:
984
+ A function that, when called, will call the underlying RPC
985
+ on the server.
986
+ """
987
+ # Generate a "stub function" on-the-fly which will actually make
988
+ # the request.
989
+ # gRPC handles serialization and deserialization, so we just need
990
+ # to pass in the functions for each.
991
+ if "reset_ssl_config" not in self._stubs:
992
+ self._stubs["reset_ssl_config"] = self._logged_channel.unary_unary(
993
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ResetSslConfig",
994
+ request_serializer=cloud_sql.SqlInstancesResetSslConfigRequest.serialize,
995
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
996
+ )
997
+ return self._stubs["reset_ssl_config"]
998
+
999
+ @property
1000
+ def restart(
1001
+ self,
1002
+ ) -> Callable[
1003
+ [cloud_sql.SqlInstancesRestartRequest], Awaitable[cloud_sql_resources.Operation]
1004
+ ]:
1005
+ r"""Return a callable for the restart method over gRPC.
1006
+
1007
+ Restarts a Cloud SQL instance.
1008
+
1009
+ Returns:
1010
+ Callable[[~.SqlInstancesRestartRequest],
1011
+ Awaitable[~.Operation]]:
1012
+ A function that, when called, will call the underlying RPC
1013
+ on the server.
1014
+ """
1015
+ # Generate a "stub function" on-the-fly which will actually make
1016
+ # the request.
1017
+ # gRPC handles serialization and deserialization, so we just need
1018
+ # to pass in the functions for each.
1019
+ if "restart" not in self._stubs:
1020
+ self._stubs["restart"] = self._logged_channel.unary_unary(
1021
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Restart",
1022
+ request_serializer=cloud_sql.SqlInstancesRestartRequest.serialize,
1023
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1024
+ )
1025
+ return self._stubs["restart"]
1026
+
1027
+ @property
1028
+ def restore_backup(
1029
+ self,
1030
+ ) -> Callable[
1031
+ [cloud_sql.SqlInstancesRestoreBackupRequest],
1032
+ Awaitable[cloud_sql_resources.Operation],
1033
+ ]:
1034
+ r"""Return a callable for the restore backup method over gRPC.
1035
+
1036
+ Restores a backup of a Cloud SQL instance. Using this
1037
+ operation might cause your instance to restart.
1038
+
1039
+ Returns:
1040
+ Callable[[~.SqlInstancesRestoreBackupRequest],
1041
+ Awaitable[~.Operation]]:
1042
+ A function that, when called, will call the underlying RPC
1043
+ on the server.
1044
+ """
1045
+ # Generate a "stub function" on-the-fly which will actually make
1046
+ # the request.
1047
+ # gRPC handles serialization and deserialization, so we just need
1048
+ # to pass in the functions for each.
1049
+ if "restore_backup" not in self._stubs:
1050
+ self._stubs["restore_backup"] = self._logged_channel.unary_unary(
1051
+ "/google.cloud.sql.v1beta4.SqlInstancesService/RestoreBackup",
1052
+ request_serializer=cloud_sql.SqlInstancesRestoreBackupRequest.serialize,
1053
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1054
+ )
1055
+ return self._stubs["restore_backup"]
1056
+
1057
+ @property
1058
+ def rotate_server_ca(
1059
+ self,
1060
+ ) -> Callable[
1061
+ [cloud_sql.SqlInstancesRotateServerCaRequest],
1062
+ Awaitable[cloud_sql_resources.Operation],
1063
+ ]:
1064
+ r"""Return a callable for the rotate server ca method over gRPC.
1065
+
1066
+ Rotates the server certificate to one signed by the
1067
+ Certificate Authority (CA) version previously added with
1068
+ the addServerCA method. For instances that have enabled
1069
+ Certificate Authority Service (CAS) based server CA, use
1070
+ RotateServerCertificate to rotate the server
1071
+ certificate.
1072
+
1073
+ Returns:
1074
+ Callable[[~.SqlInstancesRotateServerCaRequest],
1075
+ Awaitable[~.Operation]]:
1076
+ A function that, when called, will call the underlying RPC
1077
+ on the server.
1078
+ """
1079
+ # Generate a "stub function" on-the-fly which will actually make
1080
+ # the request.
1081
+ # gRPC handles serialization and deserialization, so we just need
1082
+ # to pass in the functions for each.
1083
+ if "rotate_server_ca" not in self._stubs:
1084
+ self._stubs["rotate_server_ca"] = self._logged_channel.unary_unary(
1085
+ "/google.cloud.sql.v1beta4.SqlInstancesService/RotateServerCa",
1086
+ request_serializer=cloud_sql.SqlInstancesRotateServerCaRequest.serialize,
1087
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1088
+ )
1089
+ return self._stubs["rotate_server_ca"]
1090
+
1091
+ @property
1092
+ def rotate_server_certificate(
1093
+ self,
1094
+ ) -> Callable[
1095
+ [cloud_sql.SqlInstancesRotateServerCertificateRequest],
1096
+ Awaitable[cloud_sql_resources.Operation],
1097
+ ]:
1098
+ r"""Return a callable for the rotate server certificate method over gRPC.
1099
+
1100
+ Rotates the server certificate version to one
1101
+ previously added with the addServerCertificate method.
1102
+ For instances not using Certificate Authority Service
1103
+ (CAS) server CA, use RotateServerCa instead.
1104
+
1105
+ Returns:
1106
+ Callable[[~.SqlInstancesRotateServerCertificateRequest],
1107
+ Awaitable[~.Operation]]:
1108
+ A function that, when called, will call the underlying RPC
1109
+ on the server.
1110
+ """
1111
+ # Generate a "stub function" on-the-fly which will actually make
1112
+ # the request.
1113
+ # gRPC handles serialization and deserialization, so we just need
1114
+ # to pass in the functions for each.
1115
+ if "rotate_server_certificate" not in self._stubs:
1116
+ self._stubs["rotate_server_certificate"] = self._logged_channel.unary_unary(
1117
+ "/google.cloud.sql.v1beta4.SqlInstancesService/RotateServerCertificate",
1118
+ request_serializer=cloud_sql.SqlInstancesRotateServerCertificateRequest.serialize,
1119
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1120
+ )
1121
+ return self._stubs["rotate_server_certificate"]
1122
+
1123
+ @property
1124
+ def rotate_entra_id_certificate(
1125
+ self,
1126
+ ) -> Callable[
1127
+ [cloud_sql.SqlInstancesRotateEntraIdCertificateRequest],
1128
+ Awaitable[cloud_sql_resources.Operation],
1129
+ ]:
1130
+ r"""Return a callable for the rotate entra id certificate method over gRPC.
1131
+
1132
+ Rotates the Entra Id certificate version to one
1133
+ previously added with the addEntraIdCertificate method.
1134
+
1135
+ Returns:
1136
+ Callable[[~.SqlInstancesRotateEntraIdCertificateRequest],
1137
+ Awaitable[~.Operation]]:
1138
+ A function that, when called, will call the underlying RPC
1139
+ on the server.
1140
+ """
1141
+ # Generate a "stub function" on-the-fly which will actually make
1142
+ # the request.
1143
+ # gRPC handles serialization and deserialization, so we just need
1144
+ # to pass in the functions for each.
1145
+ if "rotate_entra_id_certificate" not in self._stubs:
1146
+ self._stubs["rotate_entra_id_certificate"] = (
1147
+ self._logged_channel.unary_unary(
1148
+ "/google.cloud.sql.v1beta4.SqlInstancesService/RotateEntraIdCertificate",
1149
+ request_serializer=cloud_sql.SqlInstancesRotateEntraIdCertificateRequest.serialize,
1150
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1151
+ )
1152
+ )
1153
+ return self._stubs["rotate_entra_id_certificate"]
1154
+
1155
+ @property
1156
+ def start_replica(
1157
+ self,
1158
+ ) -> Callable[
1159
+ [cloud_sql.SqlInstancesStartReplicaRequest],
1160
+ Awaitable[cloud_sql_resources.Operation],
1161
+ ]:
1162
+ r"""Return a callable for the start replica method over gRPC.
1163
+
1164
+ Starts the replication in the read replica instance.
1165
+
1166
+ Returns:
1167
+ Callable[[~.SqlInstancesStartReplicaRequest],
1168
+ Awaitable[~.Operation]]:
1169
+ A function that, when called, will call the underlying RPC
1170
+ on the server.
1171
+ """
1172
+ # Generate a "stub function" on-the-fly which will actually make
1173
+ # the request.
1174
+ # gRPC handles serialization and deserialization, so we just need
1175
+ # to pass in the functions for each.
1176
+ if "start_replica" not in self._stubs:
1177
+ self._stubs["start_replica"] = self._logged_channel.unary_unary(
1178
+ "/google.cloud.sql.v1beta4.SqlInstancesService/StartReplica",
1179
+ request_serializer=cloud_sql.SqlInstancesStartReplicaRequest.serialize,
1180
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1181
+ )
1182
+ return self._stubs["start_replica"]
1183
+
1184
+ @property
1185
+ def stop_replica(
1186
+ self,
1187
+ ) -> Callable[
1188
+ [cloud_sql.SqlInstancesStopReplicaRequest],
1189
+ Awaitable[cloud_sql_resources.Operation],
1190
+ ]:
1191
+ r"""Return a callable for the stop replica method over gRPC.
1192
+
1193
+ Stops the replication in the read replica instance.
1194
+
1195
+ Returns:
1196
+ Callable[[~.SqlInstancesStopReplicaRequest],
1197
+ Awaitable[~.Operation]]:
1198
+ A function that, when called, will call the underlying RPC
1199
+ on the server.
1200
+ """
1201
+ # Generate a "stub function" on-the-fly which will actually make
1202
+ # the request.
1203
+ # gRPC handles serialization and deserialization, so we just need
1204
+ # to pass in the functions for each.
1205
+ if "stop_replica" not in self._stubs:
1206
+ self._stubs["stop_replica"] = self._logged_channel.unary_unary(
1207
+ "/google.cloud.sql.v1beta4.SqlInstancesService/StopReplica",
1208
+ request_serializer=cloud_sql.SqlInstancesStopReplicaRequest.serialize,
1209
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1210
+ )
1211
+ return self._stubs["stop_replica"]
1212
+
1213
+ @property
1214
+ def truncate_log(
1215
+ self,
1216
+ ) -> Callable[
1217
+ [cloud_sql.SqlInstancesTruncateLogRequest],
1218
+ Awaitable[cloud_sql_resources.Operation],
1219
+ ]:
1220
+ r"""Return a callable for the truncate log method over gRPC.
1221
+
1222
+ Truncate MySQL general and slow query log tables
1223
+ MySQL only.
1224
+
1225
+ Returns:
1226
+ Callable[[~.SqlInstancesTruncateLogRequest],
1227
+ Awaitable[~.Operation]]:
1228
+ A function that, when called, will call the underlying RPC
1229
+ on the server.
1230
+ """
1231
+ # Generate a "stub function" on-the-fly which will actually make
1232
+ # the request.
1233
+ # gRPC handles serialization and deserialization, so we just need
1234
+ # to pass in the functions for each.
1235
+ if "truncate_log" not in self._stubs:
1236
+ self._stubs["truncate_log"] = self._logged_channel.unary_unary(
1237
+ "/google.cloud.sql.v1beta4.SqlInstancesService/TruncateLog",
1238
+ request_serializer=cloud_sql.SqlInstancesTruncateLogRequest.serialize,
1239
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1240
+ )
1241
+ return self._stubs["truncate_log"]
1242
+
1243
+ @property
1244
+ def update(
1245
+ self,
1246
+ ) -> Callable[
1247
+ [cloud_sql.SqlInstancesUpdateRequest], Awaitable[cloud_sql_resources.Operation]
1248
+ ]:
1249
+ r"""Return a callable for the update method over gRPC.
1250
+
1251
+ Updates settings of a Cloud SQL instance. Using this
1252
+ operation might cause your instance to restart.
1253
+
1254
+ Returns:
1255
+ Callable[[~.SqlInstancesUpdateRequest],
1256
+ Awaitable[~.Operation]]:
1257
+ A function that, when called, will call the underlying RPC
1258
+ on the server.
1259
+ """
1260
+ # Generate a "stub function" on-the-fly which will actually make
1261
+ # the request.
1262
+ # gRPC handles serialization and deserialization, so we just need
1263
+ # to pass in the functions for each.
1264
+ if "update" not in self._stubs:
1265
+ self._stubs["update"] = self._logged_channel.unary_unary(
1266
+ "/google.cloud.sql.v1beta4.SqlInstancesService/Update",
1267
+ request_serializer=cloud_sql.SqlInstancesUpdateRequest.serialize,
1268
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1269
+ )
1270
+ return self._stubs["update"]
1271
+
1272
+ @property
1273
+ def create_ephemeral(
1274
+ self,
1275
+ ) -> Callable[
1276
+ [cloud_sql.SqlInstancesCreateEphemeralCertRequest],
1277
+ Awaitable[cloud_sql_resources.SslCert],
1278
+ ]:
1279
+ r"""Return a callable for the create ephemeral method over gRPC.
1280
+
1281
+ Generates a short-lived X509 certificate containing
1282
+ the provided public key and signed by a private key
1283
+ specific to the target instance. Users may use the
1284
+ certificate to authenticate as themselves when
1285
+ connecting to the database.
1286
+
1287
+ Returns:
1288
+ Callable[[~.SqlInstancesCreateEphemeralCertRequest],
1289
+ Awaitable[~.SslCert]]:
1290
+ A function that, when called, will call the underlying RPC
1291
+ on the server.
1292
+ """
1293
+ # Generate a "stub function" on-the-fly which will actually make
1294
+ # the request.
1295
+ # gRPC handles serialization and deserialization, so we just need
1296
+ # to pass in the functions for each.
1297
+ if "create_ephemeral" not in self._stubs:
1298
+ self._stubs["create_ephemeral"] = self._logged_channel.unary_unary(
1299
+ "/google.cloud.sql.v1beta4.SqlInstancesService/CreateEphemeral",
1300
+ request_serializer=cloud_sql.SqlInstancesCreateEphemeralCertRequest.serialize,
1301
+ response_deserializer=cloud_sql_resources.SslCert.deserialize,
1302
+ )
1303
+ return self._stubs["create_ephemeral"]
1304
+
1305
+ @property
1306
+ def reschedule_maintenance(
1307
+ self,
1308
+ ) -> Callable[
1309
+ [cloud_sql.SqlInstancesRescheduleMaintenanceRequest],
1310
+ Awaitable[cloud_sql_resources.Operation],
1311
+ ]:
1312
+ r"""Return a callable for the reschedule maintenance method over gRPC.
1313
+
1314
+ Reschedules the maintenance on the given instance.
1315
+
1316
+ Returns:
1317
+ Callable[[~.SqlInstancesRescheduleMaintenanceRequest],
1318
+ Awaitable[~.Operation]]:
1319
+ A function that, when called, will call the underlying RPC
1320
+ on the server.
1321
+ """
1322
+ # Generate a "stub function" on-the-fly which will actually make
1323
+ # the request.
1324
+ # gRPC handles serialization and deserialization, so we just need
1325
+ # to pass in the functions for each.
1326
+ if "reschedule_maintenance" not in self._stubs:
1327
+ self._stubs["reschedule_maintenance"] = self._logged_channel.unary_unary(
1328
+ "/google.cloud.sql.v1beta4.SqlInstancesService/RescheduleMaintenance",
1329
+ request_serializer=cloud_sql.SqlInstancesRescheduleMaintenanceRequest.serialize,
1330
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1331
+ )
1332
+ return self._stubs["reschedule_maintenance"]
1333
+
1334
+ @property
1335
+ def verify_external_sync_settings(
1336
+ self,
1337
+ ) -> Callable[
1338
+ [cloud_sql.SqlInstancesVerifyExternalSyncSettingsRequest],
1339
+ Awaitable[cloud_sql_resources.SqlInstancesVerifyExternalSyncSettingsResponse],
1340
+ ]:
1341
+ r"""Return a callable for the verify external sync settings method over gRPC.
1342
+
1343
+ Verify External primary instance external sync
1344
+ settings.
1345
+
1346
+ Returns:
1347
+ Callable[[~.SqlInstancesVerifyExternalSyncSettingsRequest],
1348
+ Awaitable[~.SqlInstancesVerifyExternalSyncSettingsResponse]]:
1349
+ A function that, when called, will call the underlying RPC
1350
+ on the server.
1351
+ """
1352
+ # Generate a "stub function" on-the-fly which will actually make
1353
+ # the request.
1354
+ # gRPC handles serialization and deserialization, so we just need
1355
+ # to pass in the functions for each.
1356
+ if "verify_external_sync_settings" not in self._stubs:
1357
+ self._stubs["verify_external_sync_settings"] = (
1358
+ self._logged_channel.unary_unary(
1359
+ "/google.cloud.sql.v1beta4.SqlInstancesService/VerifyExternalSyncSettings",
1360
+ request_serializer=cloud_sql.SqlInstancesVerifyExternalSyncSettingsRequest.serialize,
1361
+ response_deserializer=cloud_sql_resources.SqlInstancesVerifyExternalSyncSettingsResponse.deserialize,
1362
+ )
1363
+ )
1364
+ return self._stubs["verify_external_sync_settings"]
1365
+
1366
+ @property
1367
+ def start_external_sync(
1368
+ self,
1369
+ ) -> Callable[
1370
+ [cloud_sql.SqlInstancesStartExternalSyncRequest],
1371
+ Awaitable[cloud_sql_resources.Operation],
1372
+ ]:
1373
+ r"""Return a callable for the start external sync method over gRPC.
1374
+
1375
+ Start External primary instance migration.
1376
+
1377
+ Returns:
1378
+ Callable[[~.SqlInstancesStartExternalSyncRequest],
1379
+ Awaitable[~.Operation]]:
1380
+ A function that, when called, will call the underlying RPC
1381
+ on the server.
1382
+ """
1383
+ # Generate a "stub function" on-the-fly which will actually make
1384
+ # the request.
1385
+ # gRPC handles serialization and deserialization, so we just need
1386
+ # to pass in the functions for each.
1387
+ if "start_external_sync" not in self._stubs:
1388
+ self._stubs["start_external_sync"] = self._logged_channel.unary_unary(
1389
+ "/google.cloud.sql.v1beta4.SqlInstancesService/StartExternalSync",
1390
+ request_serializer=cloud_sql.SqlInstancesStartExternalSyncRequest.serialize,
1391
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1392
+ )
1393
+ return self._stubs["start_external_sync"]
1394
+
1395
+ @property
1396
+ def perform_disk_shrink(
1397
+ self,
1398
+ ) -> Callable[
1399
+ [cloud_sql.SqlInstancesPerformDiskShrinkRequest],
1400
+ Awaitable[cloud_sql_resources.Operation],
1401
+ ]:
1402
+ r"""Return a callable for the perform disk shrink method over gRPC.
1403
+
1404
+ Perform Disk Shrink on primary instance.
1405
+
1406
+ Returns:
1407
+ Callable[[~.SqlInstancesPerformDiskShrinkRequest],
1408
+ Awaitable[~.Operation]]:
1409
+ A function that, when called, will call the underlying RPC
1410
+ on the server.
1411
+ """
1412
+ # Generate a "stub function" on-the-fly which will actually make
1413
+ # the request.
1414
+ # gRPC handles serialization and deserialization, so we just need
1415
+ # to pass in the functions for each.
1416
+ if "perform_disk_shrink" not in self._stubs:
1417
+ self._stubs["perform_disk_shrink"] = self._logged_channel.unary_unary(
1418
+ "/google.cloud.sql.v1beta4.SqlInstancesService/PerformDiskShrink",
1419
+ request_serializer=cloud_sql.SqlInstancesPerformDiskShrinkRequest.serialize,
1420
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1421
+ )
1422
+ return self._stubs["perform_disk_shrink"]
1423
+
1424
+ @property
1425
+ def get_disk_shrink_config(
1426
+ self,
1427
+ ) -> Callable[
1428
+ [cloud_sql.SqlInstancesGetDiskShrinkConfigRequest],
1429
+ Awaitable[cloud_sql_resources.SqlInstancesGetDiskShrinkConfigResponse],
1430
+ ]:
1431
+ r"""Return a callable for the get disk shrink config method over gRPC.
1432
+
1433
+ Get Disk Shrink Config for a given instance.
1434
+
1435
+ Returns:
1436
+ Callable[[~.SqlInstancesGetDiskShrinkConfigRequest],
1437
+ Awaitable[~.SqlInstancesGetDiskShrinkConfigResponse]]:
1438
+ A function that, when called, will call the underlying RPC
1439
+ on the server.
1440
+ """
1441
+ # Generate a "stub function" on-the-fly which will actually make
1442
+ # the request.
1443
+ # gRPC handles serialization and deserialization, so we just need
1444
+ # to pass in the functions for each.
1445
+ if "get_disk_shrink_config" not in self._stubs:
1446
+ self._stubs["get_disk_shrink_config"] = self._logged_channel.unary_unary(
1447
+ "/google.cloud.sql.v1beta4.SqlInstancesService/GetDiskShrinkConfig",
1448
+ request_serializer=cloud_sql.SqlInstancesGetDiskShrinkConfigRequest.serialize,
1449
+ response_deserializer=cloud_sql_resources.SqlInstancesGetDiskShrinkConfigResponse.deserialize,
1450
+ )
1451
+ return self._stubs["get_disk_shrink_config"]
1452
+
1453
+ @property
1454
+ def reset_replica_size(
1455
+ self,
1456
+ ) -> Callable[
1457
+ [cloud_sql.SqlInstancesResetReplicaSizeRequest],
1458
+ Awaitable[cloud_sql_resources.Operation],
1459
+ ]:
1460
+ r"""Return a callable for the reset replica size method over gRPC.
1461
+
1462
+ Reset Replica Size to primary instance disk size.
1463
+
1464
+ Returns:
1465
+ Callable[[~.SqlInstancesResetReplicaSizeRequest],
1466
+ Awaitable[~.Operation]]:
1467
+ A function that, when called, will call the underlying RPC
1468
+ on the server.
1469
+ """
1470
+ # Generate a "stub function" on-the-fly which will actually make
1471
+ # the request.
1472
+ # gRPC handles serialization and deserialization, so we just need
1473
+ # to pass in the functions for each.
1474
+ if "reset_replica_size" not in self._stubs:
1475
+ self._stubs["reset_replica_size"] = self._logged_channel.unary_unary(
1476
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ResetReplicaSize",
1477
+ request_serializer=cloud_sql.SqlInstancesResetReplicaSizeRequest.serialize,
1478
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1479
+ )
1480
+ return self._stubs["reset_replica_size"]
1481
+
1482
+ @property
1483
+ def get_latest_recovery_time(
1484
+ self,
1485
+ ) -> Callable[
1486
+ [cloud_sql.SqlInstancesGetLatestRecoveryTimeRequest],
1487
+ Awaitable[cloud_sql.SqlInstancesGetLatestRecoveryTimeResponse],
1488
+ ]:
1489
+ r"""Return a callable for the get latest recovery time method over gRPC.
1490
+
1491
+ Get Latest Recovery Time for a given instance.
1492
+
1493
+ Returns:
1494
+ Callable[[~.SqlInstancesGetLatestRecoveryTimeRequest],
1495
+ Awaitable[~.SqlInstancesGetLatestRecoveryTimeResponse]]:
1496
+ A function that, when called, will call the underlying RPC
1497
+ on the server.
1498
+ """
1499
+ # Generate a "stub function" on-the-fly which will actually make
1500
+ # the request.
1501
+ # gRPC handles serialization and deserialization, so we just need
1502
+ # to pass in the functions for each.
1503
+ if "get_latest_recovery_time" not in self._stubs:
1504
+ self._stubs["get_latest_recovery_time"] = self._logged_channel.unary_unary(
1505
+ "/google.cloud.sql.v1beta4.SqlInstancesService/GetLatestRecoveryTime",
1506
+ request_serializer=cloud_sql.SqlInstancesGetLatestRecoveryTimeRequest.serialize,
1507
+ response_deserializer=cloud_sql.SqlInstancesGetLatestRecoveryTimeResponse.deserialize,
1508
+ )
1509
+ return self._stubs["get_latest_recovery_time"]
1510
+
1511
+ @property
1512
+ def execute_sql(
1513
+ self,
1514
+ ) -> Callable[
1515
+ [cloud_sql.SqlInstancesExecuteSqlRequest],
1516
+ Awaitable[cloud_sql.SqlInstancesExecuteSqlResponse],
1517
+ ]:
1518
+ r"""Return a callable for the execute sql method over gRPC.
1519
+
1520
+ Execute SQL statements.
1521
+
1522
+ Returns:
1523
+ Callable[[~.SqlInstancesExecuteSqlRequest],
1524
+ Awaitable[~.SqlInstancesExecuteSqlResponse]]:
1525
+ A function that, when called, will call the underlying RPC
1526
+ on the server.
1527
+ """
1528
+ # Generate a "stub function" on-the-fly which will actually make
1529
+ # the request.
1530
+ # gRPC handles serialization and deserialization, so we just need
1531
+ # to pass in the functions for each.
1532
+ if "execute_sql" not in self._stubs:
1533
+ self._stubs["execute_sql"] = self._logged_channel.unary_unary(
1534
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ExecuteSql",
1535
+ request_serializer=cloud_sql.SqlInstancesExecuteSqlRequest.serialize,
1536
+ response_deserializer=cloud_sql.SqlInstancesExecuteSqlResponse.deserialize,
1537
+ )
1538
+ return self._stubs["execute_sql"]
1539
+
1540
+ @property
1541
+ def acquire_ssrs_lease(
1542
+ self,
1543
+ ) -> Callable[
1544
+ [cloud_sql.SqlInstancesAcquireSsrsLeaseRequest],
1545
+ Awaitable[cloud_sql.SqlInstancesAcquireSsrsLeaseResponse],
1546
+ ]:
1547
+ r"""Return a callable for the acquire ssrs lease method over gRPC.
1548
+
1549
+ Acquire a lease for the setup of SQL Server Reporting
1550
+ Services (SSRS).
1551
+
1552
+ Returns:
1553
+ Callable[[~.SqlInstancesAcquireSsrsLeaseRequest],
1554
+ Awaitable[~.SqlInstancesAcquireSsrsLeaseResponse]]:
1555
+ A function that, when called, will call the underlying RPC
1556
+ on the server.
1557
+ """
1558
+ # Generate a "stub function" on-the-fly which will actually make
1559
+ # the request.
1560
+ # gRPC handles serialization and deserialization, so we just need
1561
+ # to pass in the functions for each.
1562
+ if "acquire_ssrs_lease" not in self._stubs:
1563
+ self._stubs["acquire_ssrs_lease"] = self._logged_channel.unary_unary(
1564
+ "/google.cloud.sql.v1beta4.SqlInstancesService/AcquireSsrsLease",
1565
+ request_serializer=cloud_sql.SqlInstancesAcquireSsrsLeaseRequest.serialize,
1566
+ response_deserializer=cloud_sql.SqlInstancesAcquireSsrsLeaseResponse.deserialize,
1567
+ )
1568
+ return self._stubs["acquire_ssrs_lease"]
1569
+
1570
+ @property
1571
+ def release_ssrs_lease(
1572
+ self,
1573
+ ) -> Callable[
1574
+ [cloud_sql.SqlInstancesReleaseSsrsLeaseRequest],
1575
+ Awaitable[cloud_sql.SqlInstancesReleaseSsrsLeaseResponse],
1576
+ ]:
1577
+ r"""Return a callable for the release ssrs lease method over gRPC.
1578
+
1579
+ Release a lease for the setup of SQL Server Reporting
1580
+ Services (SSRS).
1581
+
1582
+ Returns:
1583
+ Callable[[~.SqlInstancesReleaseSsrsLeaseRequest],
1584
+ Awaitable[~.SqlInstancesReleaseSsrsLeaseResponse]]:
1585
+ A function that, when called, will call the underlying RPC
1586
+ on the server.
1587
+ """
1588
+ # Generate a "stub function" on-the-fly which will actually make
1589
+ # the request.
1590
+ # gRPC handles serialization and deserialization, so we just need
1591
+ # to pass in the functions for each.
1592
+ if "release_ssrs_lease" not in self._stubs:
1593
+ self._stubs["release_ssrs_lease"] = self._logged_channel.unary_unary(
1594
+ "/google.cloud.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease",
1595
+ request_serializer=cloud_sql.SqlInstancesReleaseSsrsLeaseRequest.serialize,
1596
+ response_deserializer=cloud_sql.SqlInstancesReleaseSsrsLeaseResponse.deserialize,
1597
+ )
1598
+ return self._stubs["release_ssrs_lease"]
1599
+
1600
+ @property
1601
+ def pre_check_major_version_upgrade(
1602
+ self,
1603
+ ) -> Callable[
1604
+ [cloud_sql.SqlInstancesPreCheckMajorVersionUpgradeRequest],
1605
+ Awaitable[cloud_sql_resources.Operation],
1606
+ ]:
1607
+ r"""Return a callable for the pre check major version
1608
+ upgrade method over gRPC.
1609
+
1610
+ Execute MVU Pre-checks
1611
+
1612
+ Returns:
1613
+ Callable[[~.SqlInstancesPreCheckMajorVersionUpgradeRequest],
1614
+ Awaitable[~.Operation]]:
1615
+ A function that, when called, will call the underlying RPC
1616
+ on the server.
1617
+ """
1618
+ # Generate a "stub function" on-the-fly which will actually make
1619
+ # the request.
1620
+ # gRPC handles serialization and deserialization, so we just need
1621
+ # to pass in the functions for each.
1622
+ if "pre_check_major_version_upgrade" not in self._stubs:
1623
+ self._stubs["pre_check_major_version_upgrade"] = (
1624
+ self._logged_channel.unary_unary(
1625
+ "/google.cloud.sql.v1beta4.SqlInstancesService/PreCheckMajorVersionUpgrade",
1626
+ request_serializer=cloud_sql.SqlInstancesPreCheckMajorVersionUpgradeRequest.serialize,
1627
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1628
+ )
1629
+ )
1630
+ return self._stubs["pre_check_major_version_upgrade"]
1631
+
1632
+ @property
1633
+ def point_in_time_restore(
1634
+ self,
1635
+ ) -> Callable[
1636
+ [cloud_sql.SqlInstancesPointInTimeRestoreRequest],
1637
+ Awaitable[cloud_sql_resources.Operation],
1638
+ ]:
1639
+ r"""Return a callable for the point in time restore method over gRPC.
1640
+
1641
+ Point in time restore for an instance managed by
1642
+ Google Cloud Backup and Disaster Recovery.
1643
+
1644
+ Returns:
1645
+ Callable[[~.SqlInstancesPointInTimeRestoreRequest],
1646
+ Awaitable[~.Operation]]:
1647
+ A function that, when called, will call the underlying RPC
1648
+ on the server.
1649
+ """
1650
+ # Generate a "stub function" on-the-fly which will actually make
1651
+ # the request.
1652
+ # gRPC handles serialization and deserialization, so we just need
1653
+ # to pass in the functions for each.
1654
+ if "point_in_time_restore" not in self._stubs:
1655
+ self._stubs["point_in_time_restore"] = self._logged_channel.unary_unary(
1656
+ "/google.cloud.sql.v1beta4.SqlInstancesService/PointInTimeRestore",
1657
+ request_serializer=cloud_sql.SqlInstancesPointInTimeRestoreRequest.serialize,
1658
+ response_deserializer=cloud_sql_resources.Operation.deserialize,
1659
+ )
1660
+ return self._stubs["point_in_time_restore"]
1661
+
1662
+ def _prep_wrapped_messages(self, client_info):
1663
+ """Precompute the wrapped methods, overriding the base class method to use async wrappers."""
1664
+ self._wrapped_methods = {
1665
+ self.add_server_ca: self._wrap_method(
1666
+ self.add_server_ca,
1667
+ default_timeout=None,
1668
+ client_info=client_info,
1669
+ ),
1670
+ self.add_server_certificate: self._wrap_method(
1671
+ self.add_server_certificate,
1672
+ default_timeout=None,
1673
+ client_info=client_info,
1674
+ ),
1675
+ self.add_entra_id_certificate: self._wrap_method(
1676
+ self.add_entra_id_certificate,
1677
+ default_timeout=None,
1678
+ client_info=client_info,
1679
+ ),
1680
+ self.clone: self._wrap_method(
1681
+ self.clone,
1682
+ default_timeout=None,
1683
+ client_info=client_info,
1684
+ ),
1685
+ self.delete: self._wrap_method(
1686
+ self.delete,
1687
+ default_timeout=None,
1688
+ client_info=client_info,
1689
+ ),
1690
+ self.demote_master: self._wrap_method(
1691
+ self.demote_master,
1692
+ default_timeout=None,
1693
+ client_info=client_info,
1694
+ ),
1695
+ self.demote: self._wrap_method(
1696
+ self.demote,
1697
+ default_timeout=None,
1698
+ client_info=client_info,
1699
+ ),
1700
+ self.export: self._wrap_method(
1701
+ self.export,
1702
+ default_timeout=None,
1703
+ client_info=client_info,
1704
+ ),
1705
+ self.failover: self._wrap_method(
1706
+ self.failover,
1707
+ default_timeout=None,
1708
+ client_info=client_info,
1709
+ ),
1710
+ self.reencrypt: self._wrap_method(
1711
+ self.reencrypt,
1712
+ default_timeout=None,
1713
+ client_info=client_info,
1714
+ ),
1715
+ self.get: self._wrap_method(
1716
+ self.get,
1717
+ default_timeout=None,
1718
+ client_info=client_info,
1719
+ ),
1720
+ self.import_: self._wrap_method(
1721
+ self.import_,
1722
+ default_timeout=None,
1723
+ client_info=client_info,
1724
+ ),
1725
+ self.insert: self._wrap_method(
1726
+ self.insert,
1727
+ default_timeout=None,
1728
+ client_info=client_info,
1729
+ ),
1730
+ self.list: self._wrap_method(
1731
+ self.list,
1732
+ default_timeout=None,
1733
+ client_info=client_info,
1734
+ ),
1735
+ self.list_server_cas: self._wrap_method(
1736
+ self.list_server_cas,
1737
+ default_timeout=None,
1738
+ client_info=client_info,
1739
+ ),
1740
+ self.list_server_certificates: self._wrap_method(
1741
+ self.list_server_certificates,
1742
+ default_timeout=None,
1743
+ client_info=client_info,
1744
+ ),
1745
+ self.list_entra_id_certificates: self._wrap_method(
1746
+ self.list_entra_id_certificates,
1747
+ default_timeout=None,
1748
+ client_info=client_info,
1749
+ ),
1750
+ self.patch: self._wrap_method(
1751
+ self.patch,
1752
+ default_timeout=None,
1753
+ client_info=client_info,
1754
+ ),
1755
+ self.promote_replica: self._wrap_method(
1756
+ self.promote_replica,
1757
+ default_timeout=None,
1758
+ client_info=client_info,
1759
+ ),
1760
+ self.switchover: self._wrap_method(
1761
+ self.switchover,
1762
+ default_timeout=None,
1763
+ client_info=client_info,
1764
+ ),
1765
+ self.reset_ssl_config: self._wrap_method(
1766
+ self.reset_ssl_config,
1767
+ default_timeout=None,
1768
+ client_info=client_info,
1769
+ ),
1770
+ self.restart: self._wrap_method(
1771
+ self.restart,
1772
+ default_timeout=None,
1773
+ client_info=client_info,
1774
+ ),
1775
+ self.restore_backup: self._wrap_method(
1776
+ self.restore_backup,
1777
+ default_timeout=None,
1778
+ client_info=client_info,
1779
+ ),
1780
+ self.rotate_server_ca: self._wrap_method(
1781
+ self.rotate_server_ca,
1782
+ default_timeout=None,
1783
+ client_info=client_info,
1784
+ ),
1785
+ self.rotate_server_certificate: self._wrap_method(
1786
+ self.rotate_server_certificate,
1787
+ default_timeout=None,
1788
+ client_info=client_info,
1789
+ ),
1790
+ self.rotate_entra_id_certificate: self._wrap_method(
1791
+ self.rotate_entra_id_certificate,
1792
+ default_timeout=None,
1793
+ client_info=client_info,
1794
+ ),
1795
+ self.start_replica: self._wrap_method(
1796
+ self.start_replica,
1797
+ default_timeout=None,
1798
+ client_info=client_info,
1799
+ ),
1800
+ self.stop_replica: self._wrap_method(
1801
+ self.stop_replica,
1802
+ default_timeout=None,
1803
+ client_info=client_info,
1804
+ ),
1805
+ self.truncate_log: self._wrap_method(
1806
+ self.truncate_log,
1807
+ default_timeout=None,
1808
+ client_info=client_info,
1809
+ ),
1810
+ self.update: self._wrap_method(
1811
+ self.update,
1812
+ default_timeout=None,
1813
+ client_info=client_info,
1814
+ ),
1815
+ self.create_ephemeral: self._wrap_method(
1816
+ self.create_ephemeral,
1817
+ default_timeout=None,
1818
+ client_info=client_info,
1819
+ ),
1820
+ self.reschedule_maintenance: self._wrap_method(
1821
+ self.reschedule_maintenance,
1822
+ default_timeout=None,
1823
+ client_info=client_info,
1824
+ ),
1825
+ self.verify_external_sync_settings: self._wrap_method(
1826
+ self.verify_external_sync_settings,
1827
+ default_timeout=None,
1828
+ client_info=client_info,
1829
+ ),
1830
+ self.start_external_sync: self._wrap_method(
1831
+ self.start_external_sync,
1832
+ default_timeout=None,
1833
+ client_info=client_info,
1834
+ ),
1835
+ self.perform_disk_shrink: self._wrap_method(
1836
+ self.perform_disk_shrink,
1837
+ default_timeout=None,
1838
+ client_info=client_info,
1839
+ ),
1840
+ self.get_disk_shrink_config: self._wrap_method(
1841
+ self.get_disk_shrink_config,
1842
+ default_timeout=None,
1843
+ client_info=client_info,
1844
+ ),
1845
+ self.reset_replica_size: self._wrap_method(
1846
+ self.reset_replica_size,
1847
+ default_timeout=None,
1848
+ client_info=client_info,
1849
+ ),
1850
+ self.get_latest_recovery_time: self._wrap_method(
1851
+ self.get_latest_recovery_time,
1852
+ default_timeout=None,
1853
+ client_info=client_info,
1854
+ ),
1855
+ self.execute_sql: self._wrap_method(
1856
+ self.execute_sql,
1857
+ default_timeout=None,
1858
+ client_info=client_info,
1859
+ ),
1860
+ self.acquire_ssrs_lease: self._wrap_method(
1861
+ self.acquire_ssrs_lease,
1862
+ default_timeout=None,
1863
+ client_info=client_info,
1864
+ ),
1865
+ self.release_ssrs_lease: self._wrap_method(
1866
+ self.release_ssrs_lease,
1867
+ default_timeout=None,
1868
+ client_info=client_info,
1869
+ ),
1870
+ self.pre_check_major_version_upgrade: self._wrap_method(
1871
+ self.pre_check_major_version_upgrade,
1872
+ default_timeout=None,
1873
+ client_info=client_info,
1874
+ ),
1875
+ self.point_in_time_restore: self._wrap_method(
1876
+ self.point_in_time_restore,
1877
+ default_timeout=None,
1878
+ client_info=client_info,
1879
+ ),
1880
+ }
1881
+
1882
+ def _wrap_method(self, func, *args, **kwargs):
1883
+ if self._wrap_with_kind: # pragma: NO COVER
1884
+ kwargs["kind"] = self.kind
1885
+ return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
1886
+
1887
+ def close(self):
1888
+ return self._logged_channel.close()
1889
+
1890
+ @property
1891
+ def kind(self) -> str:
1892
+ return "grpc_asyncio"
1893
+
1894
+
1895
+ __all__ = ("SqlInstancesServiceGrpcAsyncIOTransport",)