google-api-client 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +6 -2
  4. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +46 -46
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +15 -15
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +4 -4
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +404 -435
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +107 -121
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +657 -713
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/admin_directory_v1/classes.rb +45 -5
  13. data/generated/google/apis/admin_directory_v1/representations.rb +16 -0
  14. data/generated/google/apis/admin_directory_v1/service.rb +4 -1
  15. data/generated/google/apis/admin_reports_v1.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +399 -399
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +101 -101
  21. data/generated/google/apis/analyticsreporting_v4/service.rb +10 -10
  22. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  23. data/generated/google/apis/appengine_v1.rb +4 -4
  24. data/generated/google/apis/appengine_v1/classes.rb +747 -747
  25. data/generated/google/apis/appengine_v1/representations.rb +158 -158
  26. data/generated/google/apis/appengine_v1/service.rb +214 -214
  27. data/generated/google/apis/appsactivity_v1.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +6 -0
  31. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/classroom_v1.rb +7 -7
  34. data/generated/google/apis/classroom_v1/classes.rb +517 -515
  35. data/generated/google/apis/classroom_v1/representations.rb +147 -147
  36. data/generated/google/apis/classroom_v1/service.rb +1144 -1143
  37. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  38. data/generated/google/apis/cloudbuild_v1/classes.rb +435 -386
  39. data/generated/google/apis/cloudbuild_v1/representations.rb +133 -115
  40. data/generated/google/apis/cloudbuild_v1/service.rb +148 -148
  41. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  42. data/generated/google/apis/clouddebugger_v2/classes.rb +708 -708
  43. data/generated/google/apis/clouddebugger_v2/representations.rb +146 -146
  44. data/generated/google/apis/clouddebugger_v2/service.rb +124 -124
  45. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  46. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +142 -142
  47. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +29 -29
  48. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +87 -87
  49. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  50. data/generated/google/apis/cloudfunctions_v1/service.rb +6 -6
  51. data/generated/google/apis/cloudkms_v1.rb +1 -1
  52. data/generated/google/apis/cloudkms_v1/classes.rb +692 -675
  53. data/generated/google/apis/cloudkms_v1/representations.rb +144 -144
  54. data/generated/google/apis/cloudkms_v1/service.rb +276 -276
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1168 -1168
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +190 -190
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +311 -288
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +406 -406
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +95 -95
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +242 -234
  63. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +68 -68
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +22 -22
  66. data/generated/google/apis/cloudtrace_v1/service.rb +48 -48
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +82 -6
  69. data/generated/google/apis/compute_beta/representations.rb +4 -0
  70. data/generated/google/apis/compute_beta/service.rb +1177 -834
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +371 -1
  73. data/generated/google/apis/compute_v1/representations.rb +139 -0
  74. data/generated/google/apis/compute_v1/service.rb +257 -9
  75. data/generated/google/apis/container_v1.rb +1 -1
  76. data/generated/google/apis/container_v1/classes.rb +1122 -826
  77. data/generated/google/apis/container_v1/representations.rb +279 -135
  78. data/generated/google/apis/container_v1/service.rb +440 -98
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +3 -1
  81. data/generated/google/apis/customsearch_v1.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3.rb +4 -4
  83. data/generated/google/apis/dataflow_v1b3/classes.rb +3423 -3423
  84. data/generated/google/apis/dataflow_v1b3/representations.rb +813 -813
  85. data/generated/google/apis/dataflow_v1b3/service.rb +410 -410
  86. data/generated/google/apis/dataproc_v1.rb +1 -1
  87. data/generated/google/apis/dataproc_v1/classes.rb +450 -431
  88. data/generated/google/apis/dataproc_v1/representations.rb +92 -92
  89. data/generated/google/apis/dataproc_v1/service.rb +200 -200
  90. data/generated/google/apis/datastore_v1.rb +4 -4
  91. data/generated/google/apis/datastore_v1/classes.rb +397 -397
  92. data/generated/google/apis/datastore_v1/representations.rb +100 -100
  93. data/generated/google/apis/datastore_v1/service.rb +62 -62
  94. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  95. data/generated/google/apis/deploymentmanager_v2/classes.rb +79 -3
  96. data/generated/google/apis/deploymentmanager_v2/representations.rb +33 -0
  97. data/generated/google/apis/deploymentmanager_v2/service.rb +15 -20
  98. data/generated/google/apis/dns_v1.rb +1 -1
  99. data/generated/google/apis/dns_v2beta1.rb +1 -1
  100. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  101. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +2 -2
  102. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  103. data/generated/google/apis/drive_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2/service.rb +1 -1
  105. data/generated/google/apis/drive_v3.rb +1 -1
  106. data/generated/google/apis/drive_v3/service.rb +1 -1
  107. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  108. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +87 -87
  109. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +27 -27
  110. data/generated/google/apis/firebaserules_v1/classes.rb +271 -271
  111. data/generated/google/apis/firebaserules_v1/representations.rb +82 -82
  112. data/generated/google/apis/firebaserules_v1/service.rb +151 -151
  113. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  114. data/generated/google/apis/games_management_v1management.rb +1 -1
  115. data/generated/google/apis/games_v1.rb +1 -1
  116. data/generated/google/apis/genomics_v1.rb +9 -9
  117. data/generated/google/apis/genomics_v1/classes.rb +2242 -2242
  118. data/generated/google/apis/genomics_v1/representations.rb +306 -306
  119. data/generated/google/apis/genomics_v1/service.rb +1172 -1172
  120. data/generated/google/apis/gmail_v1.rb +1 -1
  121. data/generated/google/apis/iam_v1.rb +1 -1
  122. data/generated/google/apis/iam_v1/classes.rb +243 -243
  123. data/generated/google/apis/iam_v1/representations.rb +79 -79
  124. data/generated/google/apis/iam_v1/service.rb +137 -137
  125. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  126. data/generated/google/apis/identitytoolkit_v3/classes.rb +18 -0
  127. data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -0
  128. data/generated/google/apis/kgsearch_v1/classes.rb +9 -9
  129. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  130. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  131. data/generated/google/apis/language_v1.rb +1 -1
  132. data/generated/google/apis/language_v1/classes.rb +451 -451
  133. data/generated/google/apis/language_v1/representations.rb +103 -103
  134. data/generated/google/apis/language_v1/service.rb +49 -49
  135. data/generated/google/apis/language_v1beta1.rb +1 -1
  136. data/generated/google/apis/language_v1beta1/classes.rb +459 -459
  137. data/generated/google/apis/language_v1beta1/representations.rb +110 -110
  138. data/generated/google/apis/language_v1beta1/service.rb +43 -43
  139. data/generated/google/apis/logging_v2.rb +8 -8
  140. data/generated/google/apis/logging_v2/classes.rb +915 -915
  141. data/generated/google/apis/logging_v2/representations.rb +142 -142
  142. data/generated/google/apis/logging_v2/service.rb +415 -415
  143. data/generated/google/apis/logging_v2beta1.rb +8 -8
  144. data/generated/google/apis/logging_v2beta1/classes.rb +905 -905
  145. data/generated/google/apis/logging_v2beta1/representations.rb +150 -150
  146. data/generated/google/apis/logging_v2beta1/service.rb +221 -221
  147. data/generated/google/apis/manufacturers_v1.rb +1 -1
  148. data/generated/google/apis/manufacturers_v1/classes.rb +334 -315
  149. data/generated/google/apis/manufacturers_v1/representations.rb +99 -87
  150. data/generated/google/apis/manufacturers_v1/service.rb +101 -4
  151. data/generated/google/apis/ml_v1.rb +1 -1
  152. data/generated/google/apis/ml_v1/classes.rb +709 -673
  153. data/generated/google/apis/ml_v1/representations.rb +154 -151
  154. data/generated/google/apis/ml_v1/service.rb +341 -354
  155. data/generated/google/apis/monitoring_v3.rb +6 -6
  156. data/generated/google/apis/monitoring_v3/classes.rb +869 -869
  157. data/generated/google/apis/monitoring_v3/representations.rb +171 -171
  158. data/generated/google/apis/monitoring_v3/service.rb +340 -340
  159. data/generated/google/apis/partners_v2.rb +1 -1
  160. data/generated/google/apis/partners_v2/classes.rb +1569 -1569
  161. data/generated/google/apis/partners_v2/representations.rb +256 -256
  162. data/generated/google/apis/partners_v2/service.rb +530 -530
  163. data/generated/google/apis/people_v1.rb +7 -7
  164. data/generated/google/apis/people_v1/classes.rb +1287 -946
  165. data/generated/google/apis/people_v1/representations.rb +355 -203
  166. data/generated/google/apis/people_v1/service.rb +409 -32
  167. data/generated/google/apis/plus_domains_v1.rb +1 -1
  168. data/generated/google/apis/plus_v1.rb +1 -1
  169. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  170. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +445 -445
  171. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +104 -104
  172. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +241 -241
  173. data/generated/google/apis/pubsub_v1.rb +4 -4
  174. data/generated/google/apis/pubsub_v1/classes.rb +286 -287
  175. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  176. data/generated/google/apis/pubsub_v1/service.rb +178 -178
  177. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  178. data/generated/google/apis/runtimeconfig_v1/classes.rb +52 -52
  179. data/generated/google/apis/runtimeconfig_v1/representations.rb +15 -15
  180. data/generated/google/apis/runtimeconfig_v1/service.rb +21 -21
  181. data/generated/google/apis/script_v1.rb +4 -4
  182. data/generated/google/apis/script_v1/classes.rb +172 -172
  183. data/generated/google/apis/script_v1/representations.rb +41 -41
  184. data/generated/google/apis/script_v1/service.rb +6 -6
  185. data/generated/google/apis/searchconsole_v1.rb +1 -1
  186. data/generated/google/apis/searchconsole_v1/classes.rb +6 -6
  187. data/generated/google/apis/searchconsole_v1/representations.rb +1 -1
  188. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  189. data/generated/google/apis/servicecontrol_v1/classes.rb +1110 -1110
  190. data/generated/google/apis/servicecontrol_v1/representations.rb +215 -215
  191. data/generated/google/apis/servicecontrol_v1/service.rb +65 -65
  192. data/generated/google/apis/servicemanagement_v1.rb +6 -6
  193. data/generated/google/apis/servicemanagement_v1/classes.rb +3594 -3562
  194. data/generated/google/apis/servicemanagement_v1/representations.rb +564 -562
  195. data/generated/google/apis/servicemanagement_v1/service.rb +253 -253
  196. data/generated/google/apis/serviceuser_v1.rb +1 -1
  197. data/generated/google/apis/serviceuser_v1/classes.rb +2678 -2670
  198. data/generated/google/apis/serviceuser_v1/representations.rb +269 -268
  199. data/generated/google/apis/serviceuser_v1/service.rb +59 -59
  200. data/generated/google/apis/sheets_v4.rb +5 -5
  201. data/generated/google/apis/sheets_v4/classes.rb +5155 -5104
  202. data/generated/google/apis/sheets_v4/representations.rb +957 -940
  203. data/generated/google/apis/sheets_v4/service.rb +175 -175
  204. data/generated/google/apis/slides_v1.rb +1 -1
  205. data/generated/google/apis/slides_v1/classes.rb +2932 -2905
  206. data/generated/google/apis/slides_v1/representations.rb +709 -694
  207. data/generated/google/apis/slides_v1/service.rb +50 -50
  208. data/generated/google/apis/sourcerepo_v1/classes.rb +139 -139
  209. data/generated/google/apis/sourcerepo_v1/representations.rb +40 -40
  210. data/generated/google/apis/sourcerepo_v1/service.rb +61 -61
  211. data/generated/google/apis/spanner_v1.rb +7 -1
  212. data/generated/google/apis/spanner_v1/classes.rb +2362 -2299
  213. data/generated/google/apis/spanner_v1/representations.rb +342 -323
  214. data/generated/google/apis/spanner_v1/service.rb +502 -492
  215. data/generated/google/apis/speech_v1beta1.rb +1 -1
  216. data/generated/google/apis/speech_v1beta1/classes.rb +244 -244
  217. data/generated/google/apis/speech_v1beta1/representations.rb +52 -52
  218. data/generated/google/apis/speech_v1beta1/service.rb +91 -91
  219. data/generated/google/apis/storage_v1.rb +1 -1
  220. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  221. data/generated/google/apis/storagetransfer_v1/classes.rb +784 -781
  222. data/generated/google/apis/storagetransfer_v1/representations.rb +88 -88
  223. data/generated/google/apis/storagetransfer_v1/service.rb +154 -154
  224. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  225. data/generated/google/apis/toolresults_v1beta3/classes.rb +90 -1
  226. data/generated/google/apis/toolresults_v1beta3/representations.rb +18 -0
  227. data/generated/google/apis/translate_v2/classes.rb +107 -107
  228. data/generated/google/apis/translate_v2/representations.rb +49 -49
  229. data/generated/google/apis/translate_v2/service.rb +81 -81
  230. data/generated/google/apis/vision_v1.rb +4 -1
  231. data/generated/google/apis/vision_v1/classes.rb +527 -527
  232. data/generated/google/apis/vision_v1/representations.rb +115 -115
  233. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  234. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  235. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  236. data/generated/google/apis/youtubereporting_v1/classes.rb +124 -124
  237. data/generated/google/apis/youtubereporting_v1/representations.rb +30 -30
  238. data/generated/google/apis/youtubereporting_v1/service.rb +113 -113
  239. data/lib/google/apis/version.rb +1 -1
  240. data/samples/cli/lib/samples/analytics.rb +2 -2
  241. metadata +2 -2
@@ -48,51 +48,16 @@ module Google
48
48
  @batch_path = 'batch'
49
49
  end
50
50
 
51
- # Lists the supported instance configurations for a given project.
52
- # @param [String] parent
53
- # Required. The name of the project for which a list of supported instance
54
- # configurations is requested. Values are of the form
55
- # `projects/<project>`.
56
- # @param [String] page_token
57
- # If non-empty, `page_token` should contain a
58
- # next_page_token
59
- # from a previous ListInstanceConfigsResponse.
60
- # @param [Fixnum] page_size
61
- # Number of instance configurations to be returned in the response. If 0 or
62
- # less, defaults to the server's maximum allowed page size.
63
- # @param [String] quota_user
64
- # Available to use for quota purposes for server-side applications. Can be any
65
- # arbitrary string assigned to a user, but should not exceed 40 characters.
66
- # @param [String] fields
67
- # Selector specifying which fields to include in a partial response.
68
- # @param [Google::Apis::RequestOptions] options
69
- # Request-specific options
70
- #
71
- # @yield [result, err] Result & error if block supplied
72
- # @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigsResponse] parsed result object
73
- # @yieldparam err [StandardError] error object if request failed
74
- #
75
- # @return [Google::Apis::SpannerV1::ListInstanceConfigsResponse]
76
- #
77
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
- # @raise [Google::Apis::AuthorizationError] Authorization is required
80
- def list_project_instance_configs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
81
- command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options)
82
- command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation
83
- command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse
84
- command.params['parent'] = parent unless parent.nil?
85
- command.query['pageToken'] = page_token unless page_token.nil?
86
- command.query['pageSize'] = page_size unless page_size.nil?
87
- command.query['quotaUser'] = quota_user unless quota_user.nil?
88
- command.query['fields'] = fields unless fields.nil?
89
- execute_or_queue_command(command, &block)
90
- end
91
-
92
- # Gets information about a particular instance configuration.
93
- # @param [String] name
94
- # Required. The name of the requested instance configuration. Values are of
95
- # the form `projects/<project>/instanceConfigs/<config>`.
51
+ # Gets the access control policy for an instance resource. Returns an empty
52
+ # policy if an instance exists but does not have a policy set.
53
+ # Authorization requires `spanner.instances.getIamPolicy` on
54
+ # resource.
55
+ # @param [String] resource
56
+ # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
57
+ # The format is `projects/<project ID>/instances/<instance ID>` for instance
58
+ # resources and `projects/<project ID>/instances/<instance ID>/databases/<
59
+ # database ID>` for database resources.
60
+ # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
96
61
  # @param [String] quota_user
97
62
  # Available to use for quota purposes for server-side applications. Can be any
98
63
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -102,19 +67,21 @@ module Google
102
67
  # Request-specific options
103
68
  #
104
69
  # @yield [result, err] Result & error if block supplied
105
- # @yieldparam result [Google::Apis::SpannerV1::InstanceConfig] parsed result object
70
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
106
71
  # @yieldparam err [StandardError] error object if request failed
107
72
  #
108
- # @return [Google::Apis::SpannerV1::InstanceConfig]
73
+ # @return [Google::Apis::SpannerV1::Policy]
109
74
  #
110
75
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
76
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
77
  # @raise [Google::Apis::AuthorizationError] Authorization is required
113
- def get_project_instance_config(name, quota_user: nil, fields: nil, options: nil, &block)
114
- command = make_simple_command(:get, 'v1/{+name}', options)
115
- command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation
116
- command.response_class = Google::Apis::SpannerV1::InstanceConfig
117
- command.params['name'] = name unless name.nil?
78
+ def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
80
+ command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
81
+ command.request_object = get_iam_policy_request_object
82
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
83
+ command.response_class = Google::Apis::SpannerV1::Policy
84
+ command.params['resource'] = resource unless resource.nil?
118
85
  command.query['quotaUser'] = quota_user unless quota_user.nil?
119
86
  command.query['fields'] = fields unless fields.nil?
120
87
  execute_or_queue_command(command, &block)
@@ -299,13 +266,6 @@ module Google
299
266
  # @param [String] parent
300
267
  # Required. The name of the project for which a list of instances is
301
268
  # requested. Values are of the form `projects/<project>`.
302
- # @param [String] page_token
303
- # If non-empty, `page_token` should contain a
304
- # next_page_token from a
305
- # previous ListInstancesResponse.
306
- # @param [Fixnum] page_size
307
- # Number of instances to be returned in the response. If 0 or less, defaults
308
- # to the server's maximum allowed page size.
309
269
  # @param [String] filter
310
270
  # An expression for filtering the results of the request. Filter rules are
311
271
  # case insensitive. The fields eligible for filtering are:
@@ -323,6 +283,13 @@ module Google
323
283
  # * name:howl labels.env:dev --> The instance's name contains "howl" and
324
284
  # it has the label "env" with its value
325
285
  # containing "dev".
286
+ # @param [String] page_token
287
+ # If non-empty, `page_token` should contain a
288
+ # next_page_token from a
289
+ # previous ListInstancesResponse.
290
+ # @param [Fixnum] page_size
291
+ # Number of instances to be returned in the response. If 0 or less, defaults
292
+ # to the server's maximum allowed page size.
326
293
  # @param [String] quota_user
327
294
  # Available to use for quota purposes for server-side applications. Can be any
328
295
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -340,14 +307,53 @@ module Google
340
307
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
341
308
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
342
309
  # @raise [Google::Apis::AuthorizationError] Authorization is required
343
- def list_project_instances(parent, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block)
310
+ def list_project_instances(parent, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
344
311
  command = make_simple_command(:get, 'v1/{+parent}/instances', options)
345
312
  command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation
346
313
  command.response_class = Google::Apis::SpannerV1::ListInstancesResponse
347
314
  command.params['parent'] = parent unless parent.nil?
315
+ command.query['filter'] = filter unless filter.nil?
348
316
  command.query['pageToken'] = page_token unless page_token.nil?
349
317
  command.query['pageSize'] = page_size unless page_size.nil?
350
- command.query['filter'] = filter unless filter.nil?
318
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
319
+ command.query['fields'] = fields unless fields.nil?
320
+ execute_or_queue_command(command, &block)
321
+ end
322
+
323
+ # Sets the access control policy on an instance resource. Replaces any
324
+ # existing policy.
325
+ # Authorization requires `spanner.instances.setIamPolicy` on
326
+ # resource.
327
+ # @param [String] resource
328
+ # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
329
+ # format is `projects/<project ID>/instances/<instance ID>` for instance
330
+ # resources and `projects/<project ID>/instances/<instance ID>/databases/<
331
+ # database ID>` for databases resources.
332
+ # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
333
+ # @param [String] quota_user
334
+ # Available to use for quota purposes for server-side applications. Can be any
335
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
336
+ # @param [String] fields
337
+ # Selector specifying which fields to include in a partial response.
338
+ # @param [Google::Apis::RequestOptions] options
339
+ # Request-specific options
340
+ #
341
+ # @yield [result, err] Result & error if block supplied
342
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
343
+ # @yieldparam err [StandardError] error object if request failed
344
+ #
345
+ # @return [Google::Apis::SpannerV1::Policy]
346
+ #
347
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
348
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
349
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
350
+ def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
351
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
352
+ command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
353
+ command.request_object = set_iam_policy_request_object
354
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
355
+ command.response_class = Google::Apis::SpannerV1::Policy
356
+ command.params['resource'] = resource unless resource.nil?
351
357
  command.query['quotaUser'] = quota_user unless quota_user.nil?
352
358
  command.query['fields'] = fields unless fields.nil?
353
359
  execute_or_queue_command(command, &block)
@@ -413,16 +419,11 @@ module Google
413
419
  execute_or_queue_command(command, &block)
414
420
  end
415
421
 
416
- # Sets the access control policy on an instance resource. Replaces any
417
- # existing policy.
418
- # Authorization requires `spanner.instances.setIamPolicy` on
419
- # resource.
420
- # @param [String] resource
421
- # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
422
- # format is `projects/<project ID>/instances/<instance ID>` for instance
423
- # resources and `projects/<project ID>/instances/<instance ID>/databases/<
424
- # database ID>` for databases resources.
425
- # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
422
+ # Returns the schema of a Cloud Spanner database as a list of formatted
423
+ # DDL statements. This method does not show pending schema updates, those may
424
+ # be queried using the Operations API.
425
+ # @param [String] database
426
+ # Required. The database whose schema we wish to get.
426
427
  # @param [String] quota_user
427
428
  # Available to use for quota purposes for server-side applications. Can be any
428
429
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -432,36 +433,35 @@ module Google
432
433
  # Request-specific options
433
434
  #
434
435
  # @yield [result, err] Result & error if block supplied
435
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
436
+ # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object
436
437
  # @yieldparam err [StandardError] error object if request failed
437
438
  #
438
- # @return [Google::Apis::SpannerV1::Policy]
439
+ # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse]
439
440
  #
440
441
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
441
442
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
442
443
  # @raise [Google::Apis::AuthorizationError] Authorization is required
443
- def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
444
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
445
- command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
446
- command.request_object = set_iam_policy_request_object
447
- command.response_representation = Google::Apis::SpannerV1::Policy::Representation
448
- command.response_class = Google::Apis::SpannerV1::Policy
449
- command.params['resource'] = resource unless resource.nil?
444
+ def get_project_instance_database_ddl(database, quota_user: nil, fields: nil, options: nil, &block)
445
+ command = make_simple_command(:get, 'v1/{+database}/ddl', options)
446
+ command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation
447
+ command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse
448
+ command.params['database'] = database unless database.nil?
450
449
  command.query['quotaUser'] = quota_user unless quota_user.nil?
451
450
  command.query['fields'] = fields unless fields.nil?
452
451
  execute_or_queue_command(command, &block)
453
452
  end
454
453
 
455
- # Gets the access control policy for an instance resource. Returns an empty
456
- # policy if an instance exists but does not have a policy set.
457
- # Authorization requires `spanner.instances.getIamPolicy` on
458
- # resource.
459
- # @param [String] resource
460
- # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
461
- # The format is `projects/<project ID>/instances/<instance ID>` for instance
462
- # resources and `projects/<project ID>/instances/<instance ID>/databases/<
463
- # database ID>` for database resources.
464
- # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
454
+ # Lists Cloud Spanner databases.
455
+ # @param [String] parent
456
+ # Required. The instance whose databases should be listed.
457
+ # Values are of the form `projects/<project>/instances/<instance>`.
458
+ # @param [String] page_token
459
+ # If non-empty, `page_token` should contain a
460
+ # next_page_token from a
461
+ # previous ListDatabasesResponse.
462
+ # @param [Fixnum] page_size
463
+ # Number of databases to be returned in the response. If 0 or less,
464
+ # defaults to the server's maximum allowed page size.
465
465
  # @param [String] quota_user
466
466
  # Available to use for quota purposes for server-side applications. Can be any
467
467
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -471,36 +471,38 @@ module Google
471
471
  # Request-specific options
472
472
  #
473
473
  # @yield [result, err] Result & error if block supplied
474
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
474
+ # @yieldparam result [Google::Apis::SpannerV1::ListDatabasesResponse] parsed result object
475
475
  # @yieldparam err [StandardError] error object if request failed
476
476
  #
477
- # @return [Google::Apis::SpannerV1::Policy]
477
+ # @return [Google::Apis::SpannerV1::ListDatabasesResponse]
478
478
  #
479
479
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
480
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
481
  # @raise [Google::Apis::AuthorizationError] Authorization is required
482
- def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
483
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
484
- command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
485
- command.request_object = get_iam_policy_request_object
486
- command.response_representation = Google::Apis::SpannerV1::Policy::Representation
487
- command.response_class = Google::Apis::SpannerV1::Policy
488
- command.params['resource'] = resource unless resource.nil?
482
+ def list_project_instance_databases(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
483
+ command = make_simple_command(:get, 'v1/{+parent}/databases', options)
484
+ command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation
485
+ command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse
486
+ command.params['parent'] = parent unless parent.nil?
487
+ command.query['pageToken'] = page_token unless page_token.nil?
488
+ command.query['pageSize'] = page_size unless page_size.nil?
489
489
  command.query['quotaUser'] = quota_user unless quota_user.nil?
490
490
  command.query['fields'] = fields unless fields.nil?
491
491
  execute_or_queue_command(command, &block)
492
492
  end
493
493
 
494
- # Gets the access control policy for a database resource. Returns an empty
495
- # policy if a database exists but does not have a policy set.
496
- # Authorization requires `spanner.databases.getIamPolicy` permission on
497
- # resource.
498
- # @param [String] resource
499
- # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
500
- # The format is `projects/<project ID>/instances/<instance ID>` for instance
501
- # resources and `projects/<project ID>/instances/<instance ID>/databases/<
502
- # database ID>` for database resources.
503
- # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
494
+ # Creates a new Cloud Spanner database and starts to prepare it for serving.
495
+ # The returned long-running operation will
496
+ # have a name of the format `<database_name>/operations/<operation_id>` and
497
+ # can be used to track preparation of the database. The
498
+ # metadata field type is
499
+ # CreateDatabaseMetadata. The
500
+ # response field type is
501
+ # Database, if successful.
502
+ # @param [String] parent
503
+ # Required. The name of the instance that will serve the new database.
504
+ # Values are of the form `projects/<project>/instances/<instance>`.
505
+ # @param [Google::Apis::SpannerV1::CreateDatabaseRequest] create_database_request_object
504
506
  # @param [String] quota_user
505
507
  # Available to use for quota purposes for server-side applications. Can be any
506
508
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -510,30 +512,36 @@ module Google
510
512
  # Request-specific options
511
513
  #
512
514
  # @yield [result, err] Result & error if block supplied
513
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
515
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
514
516
  # @yieldparam err [StandardError] error object if request failed
515
517
  #
516
- # @return [Google::Apis::SpannerV1::Policy]
518
+ # @return [Google::Apis::SpannerV1::Operation]
517
519
  #
518
520
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
519
521
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
520
522
  # @raise [Google::Apis::AuthorizationError] Authorization is required
521
- def get_database_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
522
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
523
- command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
524
- command.request_object = get_iam_policy_request_object
525
- command.response_representation = Google::Apis::SpannerV1::Policy::Representation
526
- command.response_class = Google::Apis::SpannerV1::Policy
527
- command.params['resource'] = resource unless resource.nil?
523
+ def create_database(parent, create_database_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
524
+ command = make_simple_command(:post, 'v1/{+parent}/databases', options)
525
+ command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation
526
+ command.request_object = create_database_request_object
527
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
528
+ command.response_class = Google::Apis::SpannerV1::Operation
529
+ command.params['parent'] = parent unless parent.nil?
528
530
  command.query['quotaUser'] = quota_user unless quota_user.nil?
529
531
  command.query['fields'] = fields unless fields.nil?
530
532
  execute_or_queue_command(command, &block)
531
533
  end
532
534
 
533
- # Gets the state of a Cloud Spanner database.
534
- # @param [String] name
535
- # Required. The name of the requested database. Values are of the form
536
- # `projects/<project>/instances/<instance>/databases/<database>`.
535
+ # Sets the access control policy on a database resource. Replaces any
536
+ # existing policy.
537
+ # Authorization requires `spanner.databases.setIamPolicy` permission on
538
+ # resource.
539
+ # @param [String] resource
540
+ # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
541
+ # format is `projects/<project ID>/instances/<instance ID>` for instance
542
+ # resources and `projects/<project ID>/instances/<instance ID>/databases/<
543
+ # database ID>` for databases resources.
544
+ # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
537
545
  # @param [String] quota_user
538
546
  # Available to use for quota purposes for server-side applications. Can be any
539
547
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -543,104 +551,36 @@ module Google
543
551
  # Request-specific options
544
552
  #
545
553
  # @yield [result, err] Result & error if block supplied
546
- # @yieldparam result [Google::Apis::SpannerV1::Database] parsed result object
554
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
547
555
  # @yieldparam err [StandardError] error object if request failed
548
556
  #
549
- # @return [Google::Apis::SpannerV1::Database]
557
+ # @return [Google::Apis::SpannerV1::Policy]
550
558
  #
551
559
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
552
560
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
553
561
  # @raise [Google::Apis::AuthorizationError] Authorization is required
554
- def get_project_instance_database(name, quota_user: nil, fields: nil, options: nil, &block)
555
- command = make_simple_command(:get, 'v1/{+name}', options)
556
- command.response_representation = Google::Apis::SpannerV1::Database::Representation
557
- command.response_class = Google::Apis::SpannerV1::Database
558
- command.params['name'] = name unless name.nil?
559
- command.query['quotaUser'] = quota_user unless quota_user.nil?
560
- command.query['fields'] = fields unless fields.nil?
561
- execute_or_queue_command(command, &block)
562
- end
563
-
564
- # Drops (aka deletes) a Cloud Spanner database.
565
- # @param [String] database
566
- # Required. The database to be dropped.
567
- # @param [String] quota_user
568
- # Available to use for quota purposes for server-side applications. Can be any
569
- # arbitrary string assigned to a user, but should not exceed 40 characters.
570
- # @param [String] fields
571
- # Selector specifying which fields to include in a partial response.
572
- # @param [Google::Apis::RequestOptions] options
573
- # Request-specific options
574
- #
575
- # @yield [result, err] Result & error if block supplied
576
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
577
- # @yieldparam err [StandardError] error object if request failed
578
- #
579
- # @return [Google::Apis::SpannerV1::Empty]
580
- #
581
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
582
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
583
- # @raise [Google::Apis::AuthorizationError] Authorization is required
584
- def drop_project_instance_database_database(database, quota_user: nil, fields: nil, options: nil, &block)
585
- command = make_simple_command(:delete, 'v1/{+database}', options)
586
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
587
- command.response_class = Google::Apis::SpannerV1::Empty
588
- command.params['database'] = database unless database.nil?
589
- command.query['quotaUser'] = quota_user unless quota_user.nil?
590
- command.query['fields'] = fields unless fields.nil?
591
- execute_or_queue_command(command, &block)
592
- end
593
-
594
- # Updates the schema of a Cloud Spanner database by
595
- # creating/altering/dropping tables, columns, indexes, etc. The returned
596
- # long-running operation will have a name of
597
- # the format `<database_name>/operations/<operation_id>` and can be used to
598
- # track execution of the schema change(s). The
599
- # metadata field type is
600
- # UpdateDatabaseDdlMetadata. The operation has no response.
601
- # @param [String] database
602
- # Required. The database to update.
603
- # @param [Google::Apis::SpannerV1::UpdateDatabaseDdlRequest] update_database_ddl_request_object
604
- # @param [String] quota_user
605
- # Available to use for quota purposes for server-side applications. Can be any
606
- # arbitrary string assigned to a user, but should not exceed 40 characters.
607
- # @param [String] fields
608
- # Selector specifying which fields to include in a partial response.
609
- # @param [Google::Apis::RequestOptions] options
610
- # Request-specific options
611
- #
612
- # @yield [result, err] Result & error if block supplied
613
- # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
614
- # @yieldparam err [StandardError] error object if request failed
615
- #
616
- # @return [Google::Apis::SpannerV1::Operation]
617
- #
618
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
619
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
620
- # @raise [Google::Apis::AuthorizationError] Authorization is required
621
- def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
622
- command = make_simple_command(:patch, 'v1/{+database}/ddl', options)
623
- command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation
624
- command.request_object = update_database_ddl_request_object
625
- command.response_representation = Google::Apis::SpannerV1::Operation::Representation
626
- command.response_class = Google::Apis::SpannerV1::Operation
627
- command.params['database'] = database unless database.nil?
562
+ def set_database_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
563
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
564
+ command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
565
+ command.request_object = set_iam_policy_request_object
566
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
567
+ command.response_class = Google::Apis::SpannerV1::Policy
568
+ command.params['resource'] = resource unless resource.nil?
628
569
  command.query['quotaUser'] = quota_user unless quota_user.nil?
629
570
  command.query['fields'] = fields unless fields.nil?
630
571
  execute_or_queue_command(command, &block)
631
572
  end
632
573
 
633
- # Returns permissions that the caller has on the specified database resource.
634
- # Attempting this RPC on a non-existent Cloud Spanner database will result in
635
- # a NOT_FOUND error if the user has `spanner.databases.list` permission on
636
- # the containing Cloud Spanner instance. Otherwise returns an empty set of
637
- # permissions.
574
+ # Gets the access control policy for a database resource. Returns an empty
575
+ # policy if a database exists but does not have a policy set.
576
+ # Authorization requires `spanner.databases.getIamPolicy` permission on
577
+ # resource.
638
578
  # @param [String] resource
639
- # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
579
+ # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
640
580
  # The format is `projects/<project ID>/instances/<instance ID>` for instance
641
581
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
642
582
  # database ID>` for database resources.
643
- # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
583
+ # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
644
584
  # @param [String] quota_user
645
585
  # Available to use for quota purposes for server-side applications. Can be any
646
586
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -650,31 +590,30 @@ module Google
650
590
  # Request-specific options
651
591
  #
652
592
  # @yield [result, err] Result & error if block supplied
653
- # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
593
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
654
594
  # @yieldparam err [StandardError] error object if request failed
655
595
  #
656
- # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
596
+ # @return [Google::Apis::SpannerV1::Policy]
657
597
  #
658
598
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
659
599
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
660
600
  # @raise [Google::Apis::AuthorizationError] Authorization is required
661
- def test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
662
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
663
- command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
664
- command.request_object = test_iam_permissions_request_object
665
- command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
666
- command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
601
+ def get_database_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
602
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
603
+ command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
604
+ command.request_object = get_iam_policy_request_object
605
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
606
+ command.response_class = Google::Apis::SpannerV1::Policy
667
607
  command.params['resource'] = resource unless resource.nil?
668
608
  command.query['quotaUser'] = quota_user unless quota_user.nil?
669
609
  command.query['fields'] = fields unless fields.nil?
670
610
  execute_or_queue_command(command, &block)
671
611
  end
672
612
 
673
- # Returns the schema of a Cloud Spanner database as a list of formatted
674
- # DDL statements. This method does not show pending schema updates, those may
675
- # be queried using the Operations API.
676
- # @param [String] database
677
- # Required. The database whose schema we wish to get.
613
+ # Gets the state of a Cloud Spanner database.
614
+ # @param [String] name
615
+ # Required. The name of the requested database. Values are of the form
616
+ # `projects/<project>/instances/<instance>/databases/<database>`.
678
617
  # @param [String] quota_user
679
618
  # Available to use for quota purposes for server-side applications. Can be any
680
619
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -684,35 +623,27 @@ module Google
684
623
  # Request-specific options
685
624
  #
686
625
  # @yield [result, err] Result & error if block supplied
687
- # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object
626
+ # @yieldparam result [Google::Apis::SpannerV1::Database] parsed result object
688
627
  # @yieldparam err [StandardError] error object if request failed
689
628
  #
690
- # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse]
629
+ # @return [Google::Apis::SpannerV1::Database]
691
630
  #
692
631
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
693
632
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
694
633
  # @raise [Google::Apis::AuthorizationError] Authorization is required
695
- def get_project_instance_database_ddl(database, quota_user: nil, fields: nil, options: nil, &block)
696
- command = make_simple_command(:get, 'v1/{+database}/ddl', options)
697
- command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation
698
- command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse
699
- command.params['database'] = database unless database.nil?
634
+ def get_project_instance_database(name, quota_user: nil, fields: nil, options: nil, &block)
635
+ command = make_simple_command(:get, 'v1/{+name}', options)
636
+ command.response_representation = Google::Apis::SpannerV1::Database::Representation
637
+ command.response_class = Google::Apis::SpannerV1::Database
638
+ command.params['name'] = name unless name.nil?
700
639
  command.query['quotaUser'] = quota_user unless quota_user.nil?
701
640
  command.query['fields'] = fields unless fields.nil?
702
641
  execute_or_queue_command(command, &block)
703
642
  end
704
643
 
705
- # Lists Cloud Spanner databases.
706
- # @param [String] parent
707
- # Required. The instance whose databases should be listed.
708
- # Values are of the form `projects/<project>/instances/<instance>`.
709
- # @param [String] page_token
710
- # If non-empty, `page_token` should contain a
711
- # next_page_token from a
712
- # previous ListDatabasesResponse.
713
- # @param [Fixnum] page_size
714
- # Number of databases to be returned in the response. If 0 or less,
715
- # defaults to the server's maximum allowed page size.
644
+ # Drops (aka deletes) a Cloud Spanner database.
645
+ # @param [String] database
646
+ # Required. The database to be dropped.
716
647
  # @param [String] quota_user
717
648
  # Available to use for quota purposes for server-side applications. Can be any
718
649
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -722,38 +653,34 @@ module Google
722
653
  # Request-specific options
723
654
  #
724
655
  # @yield [result, err] Result & error if block supplied
725
- # @yieldparam result [Google::Apis::SpannerV1::ListDatabasesResponse] parsed result object
656
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
726
657
  # @yieldparam err [StandardError] error object if request failed
727
658
  #
728
- # @return [Google::Apis::SpannerV1::ListDatabasesResponse]
659
+ # @return [Google::Apis::SpannerV1::Empty]
729
660
  #
730
661
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
731
662
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
732
663
  # @raise [Google::Apis::AuthorizationError] Authorization is required
733
- def list_project_instance_databases(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
734
- command = make_simple_command(:get, 'v1/{+parent}/databases', options)
735
- command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation
736
- command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse
737
- command.params['parent'] = parent unless parent.nil?
738
- command.query['pageToken'] = page_token unless page_token.nil?
739
- command.query['pageSize'] = page_size unless page_size.nil?
664
+ def drop_project_instance_database_database(database, quota_user: nil, fields: nil, options: nil, &block)
665
+ command = make_simple_command(:delete, 'v1/{+database}', options)
666
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
667
+ command.response_class = Google::Apis::SpannerV1::Empty
668
+ command.params['database'] = database unless database.nil?
740
669
  command.query['quotaUser'] = quota_user unless quota_user.nil?
741
670
  command.query['fields'] = fields unless fields.nil?
742
671
  execute_or_queue_command(command, &block)
743
672
  end
744
673
 
745
- # Creates a new Cloud Spanner database and starts to prepare it for serving.
746
- # The returned long-running operation will
747
- # have a name of the format `<database_name>/operations/<operation_id>` and
748
- # can be used to track preparation of the database. The
674
+ # Updates the schema of a Cloud Spanner database by
675
+ # creating/altering/dropping tables, columns, indexes, etc. The returned
676
+ # long-running operation will have a name of
677
+ # the format `<database_name>/operations/<operation_id>` and can be used to
678
+ # track execution of the schema change(s). The
749
679
  # metadata field type is
750
- # CreateDatabaseMetadata. The
751
- # response field type is
752
- # Database, if successful.
753
- # @param [String] parent
754
- # Required. The name of the instance that will serve the new database.
755
- # Values are of the form `projects/<project>/instances/<instance>`.
756
- # @param [Google::Apis::SpannerV1::CreateDatabaseRequest] create_database_request_object
680
+ # UpdateDatabaseDdlMetadata. The operation has no response.
681
+ # @param [String] database
682
+ # Required. The database to update.
683
+ # @param [Google::Apis::SpannerV1::UpdateDatabaseDdlRequest] update_database_ddl_request_object
757
684
  # @param [String] quota_user
758
685
  # Available to use for quota purposes for server-side applications. Can be any
759
686
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -771,28 +698,29 @@ module Google
771
698
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
772
699
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
773
700
  # @raise [Google::Apis::AuthorizationError] Authorization is required
774
- def create_database(parent, create_database_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
775
- command = make_simple_command(:post, 'v1/{+parent}/databases', options)
776
- command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation
777
- command.request_object = create_database_request_object
701
+ def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
702
+ command = make_simple_command(:patch, 'v1/{+database}/ddl', options)
703
+ command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation
704
+ command.request_object = update_database_ddl_request_object
778
705
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
779
706
  command.response_class = Google::Apis::SpannerV1::Operation
780
- command.params['parent'] = parent unless parent.nil?
707
+ command.params['database'] = database unless database.nil?
781
708
  command.query['quotaUser'] = quota_user unless quota_user.nil?
782
709
  command.query['fields'] = fields unless fields.nil?
783
710
  execute_or_queue_command(command, &block)
784
711
  end
785
712
 
786
- # Sets the access control policy on a database resource. Replaces any
787
- # existing policy.
788
- # Authorization requires `spanner.databases.setIamPolicy` permission on
789
- # resource.
713
+ # Returns permissions that the caller has on the specified database resource.
714
+ # Attempting this RPC on a non-existent Cloud Spanner database will result in
715
+ # a NOT_FOUND error if the user has `spanner.databases.list` permission on
716
+ # the containing Cloud Spanner instance. Otherwise returns an empty set of
717
+ # permissions.
790
718
  # @param [String] resource
791
- # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
792
- # format is `projects/<project ID>/instances/<instance ID>` for instance
719
+ # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
720
+ # The format is `projects/<project ID>/instances/<instance ID>` for instance
793
721
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
794
- # database ID>` for databases resources.
795
- # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
722
+ # database ID>` for database resources.
723
+ # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
796
724
  # @param [String] quota_user
797
725
  # Available to use for quota purposes for server-side applications. Can be any
798
726
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -802,145 +730,40 @@ module Google
802
730
  # Request-specific options
803
731
  #
804
732
  # @yield [result, err] Result & error if block supplied
805
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
733
+ # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
806
734
  # @yieldparam err [StandardError] error object if request failed
807
735
  #
808
- # @return [Google::Apis::SpannerV1::Policy]
736
+ # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
809
737
  #
810
738
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
811
739
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
812
740
  # @raise [Google::Apis::AuthorizationError] Authorization is required
813
- def set_database_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
814
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
815
- command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
816
- command.request_object = set_iam_policy_request_object
817
- command.response_representation = Google::Apis::SpannerV1::Policy::Representation
818
- command.response_class = Google::Apis::SpannerV1::Policy
741
+ def test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
742
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
743
+ command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
744
+ command.request_object = test_iam_permissions_request_object
745
+ command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
746
+ command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
819
747
  command.params['resource'] = resource unless resource.nil?
820
748
  command.query['quotaUser'] = quota_user unless quota_user.nil?
821
749
  command.query['fields'] = fields unless fields.nil?
822
750
  execute_or_queue_command(command, &block)
823
751
  end
824
752
 
825
- # Starts asynchronous cancellation on a long-running operation. The server
826
- # makes a best effort to cancel the operation, but success is not
827
- # guaranteed. If the server doesn't support this method, it returns
828
- # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
829
- # Operations.GetOperation or
830
- # other methods to check whether the cancellation succeeded or whether the
831
- # operation completed despite cancellation. On successful cancellation,
832
- # the operation is not deleted; instead, it becomes an operation with
833
- # an Operation.error value with a google.rpc.Status.code of 1,
834
- # corresponding to `Code.CANCELLED`.
835
- # @param [String] name
836
- # The name of the operation resource to be cancelled.
837
- # @param [String] quota_user
838
- # Available to use for quota purposes for server-side applications. Can be any
839
- # arbitrary string assigned to a user, but should not exceed 40 characters.
840
- # @param [String] fields
841
- # Selector specifying which fields to include in a partial response.
842
- # @param [Google::Apis::RequestOptions] options
843
- # Request-specific options
844
- #
845
- # @yield [result, err] Result & error if block supplied
846
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
847
- # @yieldparam err [StandardError] error object if request failed
848
- #
849
- # @return [Google::Apis::SpannerV1::Empty]
850
- #
851
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
852
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
853
- # @raise [Google::Apis::AuthorizationError] Authorization is required
854
- def cancel_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
855
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
856
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
857
- command.response_class = Google::Apis::SpannerV1::Empty
858
- command.params['name'] = name unless name.nil?
859
- command.query['quotaUser'] = quota_user unless quota_user.nil?
860
- command.query['fields'] = fields unless fields.nil?
861
- execute_or_queue_command(command, &block)
862
- end
863
-
864
- # Deletes a long-running operation. This method indicates that the client is
865
- # no longer interested in the operation result. It does not cancel the
866
- # operation. If the server doesn't support this method, it returns
867
- # `google.rpc.Code.UNIMPLEMENTED`.
868
- # @param [String] name
869
- # The name of the operation resource to be deleted.
870
- # @param [String] quota_user
871
- # Available to use for quota purposes for server-side applications. Can be any
872
- # arbitrary string assigned to a user, but should not exceed 40 characters.
873
- # @param [String] fields
874
- # Selector specifying which fields to include in a partial response.
875
- # @param [Google::Apis::RequestOptions] options
876
- # Request-specific options
877
- #
878
- # @yield [result, err] Result & error if block supplied
879
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
880
- # @yieldparam err [StandardError] error object if request failed
881
- #
882
- # @return [Google::Apis::SpannerV1::Empty]
883
- #
884
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
885
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
886
- # @raise [Google::Apis::AuthorizationError] Authorization is required
887
- def delete_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
888
- command = make_simple_command(:delete, 'v1/{+name}', options)
889
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
890
- command.response_class = Google::Apis::SpannerV1::Empty
891
- command.params['name'] = name unless name.nil?
892
- command.query['quotaUser'] = quota_user unless quota_user.nil?
893
- command.query['fields'] = fields unless fields.nil?
894
- execute_or_queue_command(command, &block)
895
- end
896
-
897
- # Lists operations that match the specified filter in the request. If the
898
- # server doesn't support this method, it returns `UNIMPLEMENTED`.
899
- # NOTE: the `name` binding below allows API services to override the binding
900
- # to use different resource name schemes, such as `users/*/operations`.
901
- # @param [String] name
902
- # The name of the operation collection.
903
- # @param [String] filter
904
- # The standard list filter.
905
- # @param [String] page_token
906
- # The standard list page token.
907
- # @param [Fixnum] page_size
908
- # The standard list page size.
909
- # @param [String] quota_user
910
- # Available to use for quota purposes for server-side applications. Can be any
911
- # arbitrary string assigned to a user, but should not exceed 40 characters.
912
- # @param [String] fields
913
- # Selector specifying which fields to include in a partial response.
914
- # @param [Google::Apis::RequestOptions] options
915
- # Request-specific options
916
- #
917
- # @yield [result, err] Result & error if block supplied
918
- # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
919
- # @yieldparam err [StandardError] error object if request failed
920
- #
921
- # @return [Google::Apis::SpannerV1::ListOperationsResponse]
922
- #
923
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
924
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
925
- # @raise [Google::Apis::AuthorizationError] Authorization is required
926
- def list_project_instance_database_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
927
- command = make_simple_command(:get, 'v1/{+name}', options)
928
- command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
929
- command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
930
- command.params['name'] = name unless name.nil?
931
- command.query['filter'] = filter unless filter.nil?
932
- command.query['pageToken'] = page_token unless page_token.nil?
933
- command.query['pageSize'] = page_size unless page_size.nil?
934
- command.query['quotaUser'] = quota_user unless quota_user.nil?
935
- command.query['fields'] = fields unless fields.nil?
936
- execute_or_queue_command(command, &block)
937
- end
938
-
939
- # Gets the latest state of a long-running operation. Clients can use this
940
- # method to poll the operation result at intervals as recommended by the API
941
- # service.
942
- # @param [String] name
943
- # The name of the operation resource.
753
+ # Reads rows from the database using key lookups and scans, as a
754
+ # simple key/value style alternative to
755
+ # ExecuteSql. This method cannot be used to
756
+ # return a result set larger than 10 MiB; if the read matches more
757
+ # data than that, the read fails with a `FAILED_PRECONDITION`
758
+ # error.
759
+ # Reads inside read-write transactions might return `ABORTED`. If
760
+ # this occurs, the application should restart the transaction from
761
+ # the beginning. See Transaction for more details.
762
+ # Larger result sets can be yielded in streaming fashion by calling
763
+ # StreamingRead instead.
764
+ # @param [String] session
765
+ # Required. The session in which the read should be performed.
766
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
944
767
  # @param [String] quota_user
945
768
  # Available to use for quota purposes for server-side applications. Can be any
946
769
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -950,19 +773,21 @@ module Google
950
773
  # Request-specific options
951
774
  #
952
775
  # @yield [result, err] Result & error if block supplied
953
- # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
776
+ # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
954
777
  # @yieldparam err [StandardError] error object if request failed
955
778
  #
956
- # @return [Google::Apis::SpannerV1::Operation]
779
+ # @return [Google::Apis::SpannerV1::ResultSet]
957
780
  #
958
781
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
959
782
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
960
783
  # @raise [Google::Apis::AuthorizationError] Authorization is required
961
- def get_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
962
- command = make_simple_command(:get, 'v1/{+name}', options)
963
- command.response_representation = Google::Apis::SpannerV1::Operation::Representation
964
- command.response_class = Google::Apis::SpannerV1::Operation
965
- command.params['name'] = name unless name.nil?
784
+ def read_session(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
785
+ command = make_simple_command(:post, 'v1/{+session}:read', options)
786
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
787
+ command.request_object = read_request_object
788
+ command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
789
+ command.response_class = Google::Apis::SpannerV1::ResultSet
790
+ command.params['session'] = session unless session.nil?
966
791
  command.query['quotaUser'] = quota_user unless quota_user.nil?
967
792
  command.query['fields'] = fields unless fields.nil?
968
793
  execute_or_queue_command(command, &block)
@@ -1000,36 +825,6 @@ module Google
1000
825
  execute_or_queue_command(command, &block)
1001
826
  end
1002
827
 
1003
- # Ends a session, releasing server resources associated with it.
1004
- # @param [String] name
1005
- # Required. The name of the session to delete.
1006
- # @param [String] quota_user
1007
- # Available to use for quota purposes for server-side applications. Can be any
1008
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1009
- # @param [String] fields
1010
- # Selector specifying which fields to include in a partial response.
1011
- # @param [Google::Apis::RequestOptions] options
1012
- # Request-specific options
1013
- #
1014
- # @yield [result, err] Result & error if block supplied
1015
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1016
- # @yieldparam err [StandardError] error object if request failed
1017
- #
1018
- # @return [Google::Apis::SpannerV1::Empty]
1019
- #
1020
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1021
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1022
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1023
- def delete_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block)
1024
- command = make_simple_command(:delete, 'v1/{+name}', options)
1025
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1026
- command.response_class = Google::Apis::SpannerV1::Empty
1027
- command.params['name'] = name unless name.nil?
1028
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1029
- command.query['fields'] = fields unless fields.nil?
1030
- execute_or_queue_command(command, &block)
1031
- end
1032
-
1033
828
  # Like ExecuteSql, except returns the result
1034
829
  # set as a stream. Unlike ExecuteSql, there
1035
830
  # is no limit on the size of the returned result set. However, no
@@ -1142,6 +937,36 @@ module Google
1142
937
  execute_or_queue_command(command, &block)
1143
938
  end
1144
939
 
940
+ # Ends a session, releasing server resources associated with it.
941
+ # @param [String] name
942
+ # Required. The name of the session to delete.
943
+ # @param [String] quota_user
944
+ # Available to use for quota purposes for server-side applications. Can be any
945
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
946
+ # @param [String] fields
947
+ # Selector specifying which fields to include in a partial response.
948
+ # @param [Google::Apis::RequestOptions] options
949
+ # Request-specific options
950
+ #
951
+ # @yield [result, err] Result & error if block supplied
952
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
953
+ # @yieldparam err [StandardError] error object if request failed
954
+ #
955
+ # @return [Google::Apis::SpannerV1::Empty]
956
+ #
957
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
958
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
959
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
960
+ def delete_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block)
961
+ command = make_simple_command(:delete, 'v1/{+name}', options)
962
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
963
+ command.response_class = Google::Apis::SpannerV1::Empty
964
+ command.params['name'] = name unless name.nil?
965
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
966
+ command.query['fields'] = fields unless fields.nil?
967
+ execute_or_queue_command(command, &block)
968
+ end
969
+
1145
970
  # Executes an SQL query, returning all rows in a single reply. This
1146
971
  # method cannot be used to return a result set larger than 10 MiB;
1147
972
  # if the query yields more data than that, the query fails with
@@ -1183,14 +1008,16 @@ module Google
1183
1008
  execute_or_queue_command(command, &block)
1184
1009
  end
1185
1010
 
1186
- # Like Read, except returns the result set as a
1187
- # stream. Unlike Read, there is no limit on the
1188
- # size of the returned result set. However, no individual row in
1189
- # the result set can exceed 100 MiB, and no column value can exceed
1190
- # 10 MiB.
1011
+ # Rolls back a transaction, releasing any locks it holds. It is a good
1012
+ # idea to call this for any transaction that includes one or more
1013
+ # Read or ExecuteSql requests and
1014
+ # ultimately decides not to commit.
1015
+ # `Rollback` returns `OK` if it successfully aborts the transaction, the
1016
+ # transaction was already aborted, or the transaction is not
1017
+ # found. `Rollback` never returns `ABORTED`.
1191
1018
  # @param [String] session
1192
- # Required. The session in which the read should be performed.
1193
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1019
+ # Required. The session in which the transaction to roll back is running.
1020
+ # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
1194
1021
  # @param [String] quota_user
1195
1022
  # Available to use for quota purposes for server-side applications. Can be any
1196
1023
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1200,36 +1027,34 @@ module Google
1200
1027
  # Request-specific options
1201
1028
  #
1202
1029
  # @yield [result, err] Result & error if block supplied
1203
- # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
1030
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1204
1031
  # @yieldparam err [StandardError] error object if request failed
1205
1032
  #
1206
- # @return [Google::Apis::SpannerV1::PartialResultSet]
1033
+ # @return [Google::Apis::SpannerV1::Empty]
1207
1034
  #
1208
1035
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1209
1036
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1210
1037
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1211
- def streaming_project_instance_database_session_read(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1212
- command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
1213
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1214
- command.request_object = read_request_object
1215
- command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
1216
- command.response_class = Google::Apis::SpannerV1::PartialResultSet
1038
+ def rollback_session(session, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1039
+ command = make_simple_command(:post, 'v1/{+session}:rollback', options)
1040
+ command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
1041
+ command.request_object = rollback_request_object
1042
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1043
+ command.response_class = Google::Apis::SpannerV1::Empty
1217
1044
  command.params['session'] = session unless session.nil?
1218
1045
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1219
1046
  command.query['fields'] = fields unless fields.nil?
1220
1047
  execute_or_queue_command(command, &block)
1221
1048
  end
1222
1049
 
1223
- # Rolls back a transaction, releasing any locks it holds. It is a good
1224
- # idea to call this for any transaction that includes one or more
1225
- # Read or ExecuteSql requests and
1226
- # ultimately decides not to commit.
1227
- # `Rollback` returns `OK` if it successfully aborts the transaction, the
1228
- # transaction was already aborted, or the transaction is not
1229
- # found. `Rollback` never returns `ABORTED`.
1050
+ # Like Read, except returns the result set as a
1051
+ # stream. Unlike Read, there is no limit on the
1052
+ # size of the returned result set. However, no individual row in
1053
+ # the result set can exceed 100 MiB, and no column value can exceed
1054
+ # 10 MiB.
1230
1055
  # @param [String] session
1231
- # Required. The session in which the transaction to roll back is running.
1232
- # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
1056
+ # Required. The session in which the read should be performed.
1057
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1233
1058
  # @param [String] quota_user
1234
1059
  # Available to use for quota purposes for server-side applications. Can be any
1235
1060
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1239,20 +1064,20 @@ module Google
1239
1064
  # Request-specific options
1240
1065
  #
1241
1066
  # @yield [result, err] Result & error if block supplied
1242
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1067
+ # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
1243
1068
  # @yieldparam err [StandardError] error object if request failed
1244
1069
  #
1245
- # @return [Google::Apis::SpannerV1::Empty]
1070
+ # @return [Google::Apis::SpannerV1::PartialResultSet]
1246
1071
  #
1247
1072
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1248
1073
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1249
1074
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1250
- def rollback_session(session, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1251
- command = make_simple_command(:post, 'v1/{+session}:rollback', options)
1252
- command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
1253
- command.request_object = rollback_request_object
1254
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1255
- command.response_class = Google::Apis::SpannerV1::Empty
1075
+ def streaming_project_instance_database_session_read(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1076
+ command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
1077
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1078
+ command.request_object = read_request_object
1079
+ command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
1080
+ command.response_class = Google::Apis::SpannerV1::PartialResultSet
1256
1081
  command.params['session'] = session unless session.nil?
1257
1082
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1258
1083
  command.query['fields'] = fields unless fields.nil?
@@ -1304,20 +1129,18 @@ module Google
1304
1129
  execute_or_queue_command(command, &block)
1305
1130
  end
1306
1131
 
1307
- # Reads rows from the database using key lookups and scans, as a
1308
- # simple key/value style alternative to
1309
- # ExecuteSql. This method cannot be used to
1310
- # return a result set larger than 10 MiB; if the read matches more
1311
- # data than that, the read fails with a `FAILED_PRECONDITION`
1312
- # error.
1313
- # Reads inside read-write transactions might return `ABORTED`. If
1314
- # this occurs, the application should restart the transaction from
1315
- # the beginning. See Transaction for more details.
1316
- # Larger result sets can be yielded in streaming fashion by calling
1317
- # StreamingRead instead.
1318
- # @param [String] session
1319
- # Required. The session in which the read should be performed.
1320
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1132
+ # Starts asynchronous cancellation on a long-running operation. The server
1133
+ # makes a best effort to cancel the operation, but success is not
1134
+ # guaranteed. If the server doesn't support this method, it returns
1135
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1136
+ # Operations.GetOperation or
1137
+ # other methods to check whether the cancellation succeeded or whether the
1138
+ # operation completed despite cancellation. On successful cancellation,
1139
+ # the operation is not deleted; instead, it becomes an operation with
1140
+ # an Operation.error value with a google.rpc.Status.code of 1,
1141
+ # corresponding to `Code.CANCELLED`.
1142
+ # @param [String] name
1143
+ # The name of the operation resource to be cancelled.
1321
1144
  # @param [String] quota_user
1322
1145
  # Available to use for quota purposes for server-side applications. Can be any
1323
1146
  # arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1327,21 +1150,84 @@ module Google
1327
1150
  # Request-specific options
1328
1151
  #
1329
1152
  # @yield [result, err] Result & error if block supplied
1330
- # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
1153
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1331
1154
  # @yieldparam err [StandardError] error object if request failed
1332
1155
  #
1333
- # @return [Google::Apis::SpannerV1::ResultSet]
1156
+ # @return [Google::Apis::SpannerV1::Empty]
1334
1157
  #
1335
1158
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1336
1159
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1337
1160
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1338
- def read_session(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1339
- command = make_simple_command(:post, 'v1/{+session}:read', options)
1340
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1341
- command.request_object = read_request_object
1342
- command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
1343
- command.response_class = Google::Apis::SpannerV1::ResultSet
1344
- command.params['session'] = session unless session.nil?
1161
+ def cancel_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1162
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1163
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1164
+ command.response_class = Google::Apis::SpannerV1::Empty
1165
+ command.params['name'] = name unless name.nil?
1166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1167
+ command.query['fields'] = fields unless fields.nil?
1168
+ execute_or_queue_command(command, &block)
1169
+ end
1170
+
1171
+ # Deletes a long-running operation. This method indicates that the client is
1172
+ # no longer interested in the operation result. It does not cancel the
1173
+ # operation. If the server doesn't support this method, it returns
1174
+ # `google.rpc.Code.UNIMPLEMENTED`.
1175
+ # @param [String] name
1176
+ # The name of the operation resource to be deleted.
1177
+ # @param [String] quota_user
1178
+ # Available to use for quota purposes for server-side applications. Can be any
1179
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1180
+ # @param [String] fields
1181
+ # Selector specifying which fields to include in a partial response.
1182
+ # @param [Google::Apis::RequestOptions] options
1183
+ # Request-specific options
1184
+ #
1185
+ # @yield [result, err] Result & error if block supplied
1186
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1187
+ # @yieldparam err [StandardError] error object if request failed
1188
+ #
1189
+ # @return [Google::Apis::SpannerV1::Empty]
1190
+ #
1191
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1192
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1193
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1194
+ def delete_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1195
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1196
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1197
+ command.response_class = Google::Apis::SpannerV1::Empty
1198
+ command.params['name'] = name unless name.nil?
1199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1200
+ command.query['fields'] = fields unless fields.nil?
1201
+ execute_or_queue_command(command, &block)
1202
+ end
1203
+
1204
+ # Gets the latest state of a long-running operation. Clients can use this
1205
+ # method to poll the operation result at intervals as recommended by the API
1206
+ # service.
1207
+ # @param [String] name
1208
+ # The name of the operation resource.
1209
+ # @param [String] quota_user
1210
+ # Available to use for quota purposes for server-side applications. Can be any
1211
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1212
+ # @param [String] fields
1213
+ # Selector specifying which fields to include in a partial response.
1214
+ # @param [Google::Apis::RequestOptions] options
1215
+ # Request-specific options
1216
+ #
1217
+ # @yield [result, err] Result & error if block supplied
1218
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
1219
+ # @yieldparam err [StandardError] error object if request failed
1220
+ #
1221
+ # @return [Google::Apis::SpannerV1::Operation]
1222
+ #
1223
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1224
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1225
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1226
+ def get_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1227
+ command = make_simple_command(:get, 'v1/{+name}', options)
1228
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
1229
+ command.response_class = Google::Apis::SpannerV1::Operation
1230
+ command.params['name'] = name unless name.nil?
1345
1231
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1346
1232
  command.query['fields'] = fields unless fields.nil?
1347
1233
  execute_or_queue_command(command, &block)
@@ -1349,10 +1235,15 @@ module Google
1349
1235
 
1350
1236
  # Lists operations that match the specified filter in the request. If the
1351
1237
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
1352
- # NOTE: the `name` binding below allows API services to override the binding
1353
- # to use different resource name schemes, such as `users/*/operations`.
1238
+ # NOTE: the `name` binding allows API services to override the binding
1239
+ # to use different resource name schemes, such as `users/*/operations`. To
1240
+ # override the binding, API services can add a binding such as
1241
+ # `"/v1/`name=users/*`/operations"` to their service configuration.
1242
+ # For backwards compatibility, the default name includes the operations
1243
+ # collection id, however overriding users must ensure the name binding
1244
+ # is the parent resource, without the operations collection id.
1354
1245
  # @param [String] name
1355
- # The name of the operation collection.
1246
+ # The name of the operation's parent resource.
1356
1247
  # @param [String] filter
1357
1248
  # The standard list filter.
1358
1249
  # @param [String] page_token
@@ -1376,7 +1267,7 @@ module Google
1376
1267
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1377
1268
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1378
1269
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1379
- def list_project_instance_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1270
+ def list_project_instance_database_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1380
1271
  command = make_simple_command(:get, 'v1/{+name}', options)
1381
1272
  command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
1382
1273
  command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
@@ -1421,6 +1312,53 @@ module Google
1421
1312
  execute_or_queue_command(command, &block)
1422
1313
  end
1423
1314
 
1315
+ # Lists operations that match the specified filter in the request. If the
1316
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
1317
+ # NOTE: the `name` binding allows API services to override the binding
1318
+ # to use different resource name schemes, such as `users/*/operations`. To
1319
+ # override the binding, API services can add a binding such as
1320
+ # `"/v1/`name=users/*`/operations"` to their service configuration.
1321
+ # For backwards compatibility, the default name includes the operations
1322
+ # collection id, however overriding users must ensure the name binding
1323
+ # is the parent resource, without the operations collection id.
1324
+ # @param [String] name
1325
+ # The name of the operation's parent resource.
1326
+ # @param [String] filter
1327
+ # The standard list filter.
1328
+ # @param [String] page_token
1329
+ # The standard list page token.
1330
+ # @param [Fixnum] page_size
1331
+ # The standard list page size.
1332
+ # @param [String] quota_user
1333
+ # Available to use for quota purposes for server-side applications. Can be any
1334
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1335
+ # @param [String] fields
1336
+ # Selector specifying which fields to include in a partial response.
1337
+ # @param [Google::Apis::RequestOptions] options
1338
+ # Request-specific options
1339
+ #
1340
+ # @yield [result, err] Result & error if block supplied
1341
+ # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object
1342
+ # @yieldparam err [StandardError] error object if request failed
1343
+ #
1344
+ # @return [Google::Apis::SpannerV1::ListOperationsResponse]
1345
+ #
1346
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1347
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1348
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1349
+ def list_project_instance_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1350
+ command = make_simple_command(:get, 'v1/{+name}', options)
1351
+ command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
1352
+ command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
1353
+ command.params['name'] = name unless name.nil?
1354
+ command.query['filter'] = filter unless filter.nil?
1355
+ command.query['pageToken'] = page_token unless page_token.nil?
1356
+ command.query['pageSize'] = page_size unless page_size.nil?
1357
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1358
+ command.query['fields'] = fields unless fields.nil?
1359
+ execute_or_queue_command(command, &block)
1360
+ end
1361
+
1424
1362
  # Starts asynchronous cancellation on a long-running operation. The server
1425
1363
  # makes a best effort to cancel the operation, but success is not
1426
1364
  # guaranteed. If the server doesn't support this method, it returns
@@ -1492,6 +1430,78 @@ module Google
1492
1430
  command.query['fields'] = fields unless fields.nil?
1493
1431
  execute_or_queue_command(command, &block)
1494
1432
  end
1433
+
1434
+ # Gets information about a particular instance configuration.
1435
+ # @param [String] name
1436
+ # Required. The name of the requested instance configuration. Values are of
1437
+ # the form `projects/<project>/instanceConfigs/<config>`.
1438
+ # @param [String] quota_user
1439
+ # Available to use for quota purposes for server-side applications. Can be any
1440
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1441
+ # @param [String] fields
1442
+ # Selector specifying which fields to include in a partial response.
1443
+ # @param [Google::Apis::RequestOptions] options
1444
+ # Request-specific options
1445
+ #
1446
+ # @yield [result, err] Result & error if block supplied
1447
+ # @yieldparam result [Google::Apis::SpannerV1::InstanceConfig] parsed result object
1448
+ # @yieldparam err [StandardError] error object if request failed
1449
+ #
1450
+ # @return [Google::Apis::SpannerV1::InstanceConfig]
1451
+ #
1452
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1453
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1454
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1455
+ def get_project_instance_config(name, quota_user: nil, fields: nil, options: nil, &block)
1456
+ command = make_simple_command(:get, 'v1/{+name}', options)
1457
+ command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation
1458
+ command.response_class = Google::Apis::SpannerV1::InstanceConfig
1459
+ command.params['name'] = name unless name.nil?
1460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1461
+ command.query['fields'] = fields unless fields.nil?
1462
+ execute_or_queue_command(command, &block)
1463
+ end
1464
+
1465
+ # Lists the supported instance configurations for a given project.
1466
+ # @param [String] parent
1467
+ # Required. The name of the project for which a list of supported instance
1468
+ # configurations is requested. Values are of the form
1469
+ # `projects/<project>`.
1470
+ # @param [String] page_token
1471
+ # If non-empty, `page_token` should contain a
1472
+ # next_page_token
1473
+ # from a previous ListInstanceConfigsResponse.
1474
+ # @param [Fixnum] page_size
1475
+ # Number of instance configurations to be returned in the response. If 0 or
1476
+ # less, defaults to the server's maximum allowed page size.
1477
+ # @param [String] quota_user
1478
+ # Available to use for quota purposes for server-side applications. Can be any
1479
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1480
+ # @param [String] fields
1481
+ # Selector specifying which fields to include in a partial response.
1482
+ # @param [Google::Apis::RequestOptions] options
1483
+ # Request-specific options
1484
+ #
1485
+ # @yield [result, err] Result & error if block supplied
1486
+ # @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigsResponse] parsed result object
1487
+ # @yieldparam err [StandardError] error object if request failed
1488
+ #
1489
+ # @return [Google::Apis::SpannerV1::ListInstanceConfigsResponse]
1490
+ #
1491
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1492
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1493
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1494
+ def list_project_instance_configs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1495
+ command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options)
1496
+ command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation
1497
+ command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse
1498
+ command.params['parent'] = parent unless parent.nil?
1499
+ command.query['pageToken'] = page_token unless page_token.nil?
1500
+ command.query['pageSize'] = page_size unless page_size.nil?
1501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1502
+ command.query['fields'] = fields unless fields.nil?
1503
+ execute_or_queue_command(command, &block)
1504
+ end
1495
1505
 
1496
1506
  protected
1497
1507