google-api-client 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/api_names.yaml +42335 -1
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +28 -28
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +12 -12
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +2 -2
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +757 -757
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +162 -162
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +48 -48
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +75 -7
  14. data/generated/google/apis/admin_directory_v1/representations.rb +20 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +61 -61
  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 +403 -403
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +36 -11
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +2 -0
  24. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  25. data/generated/google/apis/appengine_v1.rb +6 -5
  26. data/generated/google/apis/appengine_v1/classes.rb +1429 -1421
  27. data/generated/google/apis/appengine_v1/representations.rb +331 -331
  28. data/generated/google/apis/appengine_v1/service.rb +173 -168
  29. data/generated/google/apis/appstate_v1.rb +1 -1
  30. data/generated/google/apis/bigquery_v2.rb +1 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +624 -618
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +126 -125
  37. data/generated/google/apis/cloudbuild_v1/service.rb +87 -87
  38. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  39. data/generated/google/apis/clouddebugger_v2/classes.rb +267 -267
  40. data/generated/google/apis/clouddebugger_v2/representations.rb +83 -83
  41. data/generated/google/apis/clouddebugger_v2/service.rb +137 -137
  42. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  43. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +131 -131
  44. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +28 -28
  45. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +17 -17
  46. data/generated/google/apis/cloudfunctions_v1.rb +1 -4
  47. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -47
  48. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -17
  49. data/generated/google/apis/cloudfunctions_v1/service.rb +0 -30
  50. data/generated/google/apis/cloudkms_v1.rb +1 -1
  51. data/generated/google/apis/cloudkms_v1/classes.rb +625 -625
  52. data/generated/google/apis/cloudkms_v1/representations.rb +132 -132
  53. data/generated/google/apis/cloudkms_v1/service.rb +272 -272
  54. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +242 -242
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +43 -43
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +505 -505
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +172 -172
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +39 -39
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +310 -310
  63. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +96 -69
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +16 -16
  66. data/generated/google/apis/cloudtrace_v1/service.rb +42 -15
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +194 -25
  69. data/generated/google/apis/compute_beta/representations.rb +42 -0
  70. data/generated/google/apis/compute_beta/service.rb +196 -100
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +69 -18
  73. data/generated/google/apis/compute_v1/representations.rb +16 -0
  74. data/generated/google/apis/compute_v1/service.rb +84 -26
  75. data/generated/google/apis/container_v1.rb +3 -3
  76. data/generated/google/apis/container_v1/classes.rb +794 -586
  77. data/generated/google/apis/container_v1/representations.rb +202 -118
  78. data/generated/google/apis/container_v1/service.rb +396 -167
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +4 -4
  81. data/generated/google/apis/dataproc_v1.rb +1 -1
  82. data/generated/google/apis/dataproc_v1/classes.rb +487 -484
  83. data/generated/google/apis/dataproc_v1/representations.rb +83 -83
  84. data/generated/google/apis/dataproc_v1/service.rb +299 -297
  85. data/generated/google/apis/datastore_v1.rb +1 -1
  86. data/generated/google/apis/datastore_v1/classes.rb +703 -703
  87. data/generated/google/apis/datastore_v1/representations.rb +148 -148
  88. data/generated/google/apis/datastore_v1/service.rb +62 -62
  89. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  90. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -5
  91. data/generated/google/apis/dfareporting_v2_6.rb +1 -1
  92. data/generated/google/apis/dfareporting_v2_6/classes.rb +66 -53
  93. data/generated/google/apis/dfareporting_v2_6/service.rb +30 -30
  94. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  95. data/generated/google/apis/dfareporting_v2_7/classes.rb +69 -55
  96. data/generated/google/apis/dfareporting_v2_7/service.rb +38 -37
  97. data/generated/google/apis/dfareporting_v2_8.rb +40 -0
  98. data/generated/google/apis/dfareporting_v2_8/classes.rb +12046 -0
  99. data/generated/google/apis/dfareporting_v2_8/representations.rb +4310 -0
  100. data/generated/google/apis/dfareporting_v2_8/service.rb +9135 -0
  101. data/generated/google/apis/dns_v1.rb +1 -1
  102. data/generated/google/apis/dns_v2beta1.rb +1 -1
  103. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2.rb +1 -1
  105. data/generated/google/apis/drive_v2/classes.rb +15 -0
  106. data/generated/google/apis/drive_v2/representations.rb +2 -0
  107. data/generated/google/apis/drive_v2/service.rb +2 -1
  108. data/generated/google/apis/drive_v3.rb +1 -1
  109. data/generated/google/apis/drive_v3/classes.rb +16 -0
  110. data/generated/google/apis/drive_v3/representations.rb +2 -0
  111. data/generated/google/apis/drive_v3/service.rb +2 -1
  112. data/generated/google/apis/firebasedynamiclinks_v1.rb +2 -3
  113. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +159 -159
  114. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +55 -55
  115. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +5 -6
  116. data/generated/google/apis/firebaserules_v1.rb +1 -1
  117. data/generated/google/apis/firebaserules_v1/classes.rb +73 -73
  118. data/generated/google/apis/firebaserules_v1/representations.rb +25 -25
  119. data/generated/google/apis/firebaserules_v1/service.rb +118 -118
  120. data/generated/google/apis/fusiontables_v2.rb +1 -1
  121. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  122. data/generated/google/apis/games_management_v1management.rb +1 -1
  123. data/generated/google/apis/games_v1.rb +1 -1
  124. data/generated/google/apis/genomics_v1.rb +1 -1
  125. data/generated/google/apis/genomics_v1/classes.rb +920 -920
  126. data/generated/google/apis/genomics_v1/representations.rb +202 -202
  127. data/generated/google/apis/genomics_v1/service.rb +1092 -1092
  128. data/generated/google/apis/gmail_v1.rb +1 -1
  129. data/generated/google/apis/iam_v1.rb +1 -1
  130. data/generated/google/apis/iam_v1/classes.rb +455 -435
  131. data/generated/google/apis/iam_v1/representations.rb +96 -93
  132. data/generated/google/apis/iam_v1/service.rb +157 -157
  133. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  134. data/generated/google/apis/identitytoolkit_v3/classes.rb +12 -0
  135. data/generated/google/apis/identitytoolkit_v3/representations.rb +2 -0
  136. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  137. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  138. data/generated/google/apis/kgsearch_v1/service.rb +9 -9
  139. data/generated/google/apis/language_v1.rb +1 -1
  140. data/generated/google/apis/language_v1/classes.rb +455 -455
  141. data/generated/google/apis/language_v1/representations.rb +102 -102
  142. data/generated/google/apis/language_v1/service.rb +42 -42
  143. data/generated/google/apis/language_v1beta1.rb +1 -1
  144. data/generated/google/apis/language_v1beta1/classes.rb +216 -215
  145. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  146. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  147. data/generated/google/apis/logging_v2.rb +1 -1
  148. data/generated/google/apis/logging_v2/classes.rb +908 -895
  149. data/generated/google/apis/logging_v2/representations.rb +121 -120
  150. data/generated/google/apis/logging_v2/service.rb +489 -489
  151. data/generated/google/apis/logging_v2beta1.rb +4 -4
  152. data/generated/google/apis/logging_v2beta1/classes.rb +928 -915
  153. data/generated/google/apis/logging_v2beta1/representations.rb +121 -120
  154. data/generated/google/apis/logging_v2beta1/service.rb +249 -249
  155. data/generated/google/apis/manufacturers_v1.rb +1 -1
  156. data/generated/google/apis/manufacturers_v1/classes.rb +294 -294
  157. data/generated/google/apis/manufacturers_v1/representations.rb +84 -84
  158. data/generated/google/apis/manufacturers_v1/service.rb +8 -8
  159. data/generated/google/apis/mirror_v1.rb +1 -1
  160. data/generated/google/apis/ml_v1.rb +1 -1
  161. data/generated/google/apis/ml_v1/classes.rb +1186 -1183
  162. data/generated/google/apis/ml_v1/representations.rb +177 -177
  163. data/generated/google/apis/ml_v1/service.rb +244 -244
  164. data/generated/google/apis/monitoring_v3.rb +1 -1
  165. data/generated/google/apis/monitoring_v3/classes.rb +866 -866
  166. data/generated/google/apis/monitoring_v3/representations.rb +163 -163
  167. data/generated/google/apis/monitoring_v3/service.rb +355 -316
  168. data/generated/google/apis/oauth2_v2.rb +1 -1
  169. data/generated/google/apis/partners_v2.rb +1 -1
  170. data/generated/google/apis/partners_v2/classes.rb +1499 -1499
  171. data/generated/google/apis/partners_v2/representations.rb +368 -368
  172. data/generated/google/apis/partners_v2/service.rb +512 -512
  173. data/generated/google/apis/people_v1.rb +10 -10
  174. data/generated/google/apis/people_v1/classes.rb +544 -423
  175. data/generated/google/apis/people_v1/representations.rb +127 -109
  176. data/generated/google/apis/people_v1/service.rb +8 -8
  177. data/generated/google/apis/plus_domains_v1.rb +1 -1
  178. data/generated/google/apis/plus_v1.rb +1 -1
  179. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  180. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +200 -200
  181. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +41 -41
  182. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +80 -80
  183. data/generated/google/apis/pubsub_v1.rb +1 -1
  184. data/generated/google/apis/pubsub_v1/classes.rb +377 -377
  185. data/generated/google/apis/pubsub_v1/representations.rb +82 -82
  186. data/generated/google/apis/pubsub_v1/service.rb +93 -93
  187. data/generated/google/apis/runtimeconfig_v1.rb +6 -4
  188. data/generated/google/apis/runtimeconfig_v1/classes.rb +22 -22
  189. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  190. data/generated/google/apis/runtimeconfig_v1/service.rb +57 -55
  191. data/generated/google/apis/script_v1.rb +14 -14
  192. data/generated/google/apis/script_v1/classes.rb +113 -58
  193. data/generated/google/apis/script_v1/representations.rb +43 -14
  194. data/generated/google/apis/script_v1/service.rb +6 -6
  195. data/generated/google/apis/searchconsole_v1.rb +1 -1
  196. data/generated/google/apis/searchconsole_v1/classes.rb +67 -67
  197. data/generated/google/apis/searchconsole_v1/representations.rb +29 -29
  198. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  199. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +1125 -1125
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +213 -213
  202. data/generated/google/apis/servicecontrol_v1/service.rb +92 -92
  203. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  204. data/generated/google/apis/servicemanagement_v1/classes.rb +3364 -3622
  205. data/generated/google/apis/servicemanagement_v1/representations.rb +546 -530
  206. data/generated/google/apis/servicemanagement_v1/service.rb +262 -152
  207. data/generated/google/apis/serviceuser_v1.rb +4 -4
  208. data/generated/google/apis/serviceuser_v1/classes.rb +2616 -2874
  209. data/generated/google/apis/serviceuser_v1/representations.rb +294 -278
  210. data/generated/google/apis/serviceuser_v1/service.rb +19 -19
  211. data/generated/google/apis/sheets_v4.rb +4 -1
  212. data/generated/google/apis/sheets_v4/classes.rb +4315 -4313
  213. data/generated/google/apis/sheets_v4/representations.rb +858 -858
  214. data/generated/google/apis/sheets_v4/service.rb +115 -115
  215. data/generated/google/apis/slides_v1.rb +1 -1
  216. data/generated/google/apis/slides_v1/classes.rb +2890 -2890
  217. data/generated/google/apis/slides_v1/representations.rb +638 -638
  218. data/generated/google/apis/slides_v1/service.rb +36 -36
  219. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  220. data/generated/google/apis/sourcerepo_v1/classes.rb +283 -283
  221. data/generated/google/apis/sourcerepo_v1/representations.rb +67 -67
  222. data/generated/google/apis/sourcerepo_v1/service.rb +88 -88
  223. data/generated/google/apis/spanner_v1.rb +1 -1
  224. data/generated/google/apis/spanner_v1/classes.rb +2258 -2233
  225. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  226. data/generated/google/apis/spanner_v1/service.rb +466 -466
  227. data/generated/google/apis/speech_v1beta1.rb +2 -2
  228. data/generated/google/apis/speech_v1beta1/classes.rb +97 -97
  229. data/generated/google/apis/speech_v1beta1/representations.rb +29 -29
  230. data/generated/google/apis/speech_v1beta1/service.rb +49 -49
  231. data/generated/google/apis/storage_v1.rb +1 -1
  232. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  233. data/generated/google/apis/storagetransfer_v1/classes.rb +786 -786
  234. data/generated/google/apis/storagetransfer_v1/representations.rb +133 -133
  235. data/generated/google/apis/storagetransfer_v1/service.rb +30 -30
  236. data/generated/google/apis/surveys_v2.rb +1 -1
  237. data/generated/google/apis/surveys_v2/classes.rb +0 -12
  238. data/generated/google/apis/surveys_v2/representations.rb +0 -4
  239. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  240. data/generated/google/apis/vision_v1.rb +1 -1
  241. data/generated/google/apis/vision_v1/classes.rb +1301 -1302
  242. data/generated/google/apis/vision_v1/representations.rb +183 -183
  243. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_partner_v1/classes.rb +10 -0
  246. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -0
  247. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  248. data/generated/google/apis/youtubereporting_v1/classes.rb +64 -64
  249. data/generated/google/apis/youtubereporting_v1/representations.rb +12 -12
  250. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  251. data/lib/google/apis/version.rb +1 -1
  252. metadata +7 -3
@@ -33,69 +33,30 @@ module Google
33
33
  #
34
34
  # @see https://cloud.google.com/spanner/
35
35
  class SpannerService < Google::Apis::Core::BaseService
36
- # @return [String]
37
- # API key. Your API key identifies your project and provides you with API access,
38
- # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
- attr_accessor :key
40
-
41
36
  # @return [String]
42
37
  # Available to use for quota purposes for server-side applications. Can be any
43
38
  # arbitrary string assigned to a user, but should not exceed 40 characters.
44
39
  attr_accessor :quota_user
45
40
 
41
+ # @return [String]
42
+ # API key. Your API key identifies your project and provides you with API access,
43
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
44
+ attr_accessor :key
45
+
46
46
  def initialize
47
47
  super('https://spanner.googleapis.com/', '')
48
48
  @batch_path = 'batch'
49
49
  end
50
50
 
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
61
- # @param [String] fields
62
- # Selector specifying which fields to include in a partial response.
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 [Google::Apis::RequestOptions] options
67
- # Request-specific options
68
- #
69
- # @yield [result, err] Result & error if block supplied
70
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
71
- # @yieldparam err [StandardError] error object if request failed
72
- #
73
- # @return [Google::Apis::SpannerV1::Policy]
74
- #
75
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
- # @raise [Google::Apis::AuthorizationError] Authorization is required
78
- def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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?
85
- command.query['fields'] = fields unless fields.nil?
86
- command.query['quotaUser'] = quota_user unless quota_user.nil?
87
- execute_or_queue_command(command, &block)
88
- end
89
-
90
51
  # Gets information about a particular instance.
91
52
  # @param [String] name
92
53
  # Required. The name of the requested instance. Values are of the form
93
54
  # `projects/<project>/instances/<instance>`.
94
- # @param [String] fields
95
- # Selector specifying which fields to include in a partial response.
96
55
  # @param [String] quota_user
97
56
  # Available to use for quota purposes for server-side applications. Can be any
98
57
  # arbitrary string assigned to a user, but should not exceed 40 characters.
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
99
60
  # @param [Google::Apis::RequestOptions] options
100
61
  # Request-specific options
101
62
  #
@@ -108,13 +69,13 @@ module Google
108
69
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
109
70
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
110
71
  # @raise [Google::Apis::AuthorizationError] Authorization is required
111
- def get_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
72
+ def get_project_instance(name, quota_user: nil, fields: nil, options: nil, &block)
112
73
  command = make_simple_command(:get, 'v1/{+name}', options)
113
74
  command.response_representation = Google::Apis::SpannerV1::Instance::Representation
114
75
  command.response_class = Google::Apis::SpannerV1::Instance
115
76
  command.params['name'] = name unless name.nil?
116
- command.query['fields'] = fields unless fields.nil?
117
77
  command.query['quotaUser'] = quota_user unless quota_user.nil?
78
+ command.query['fields'] = fields unless fields.nil?
118
79
  execute_or_queue_command(command, &block)
119
80
  end
120
81
 
@@ -156,11 +117,11 @@ module Google
156
117
  # `projects/<project>/instances/a-z*[a-z0-9]`. The final
157
118
  # segment of the name must be between 6 and 30 characters in length.
158
119
  # @param [Google::Apis::SpannerV1::UpdateInstanceRequest] update_instance_request_object
159
- # @param [String] fields
160
- # Selector specifying which fields to include in a partial response.
161
120
  # @param [String] quota_user
162
121
  # Available to use for quota purposes for server-side applications. Can be any
163
122
  # arbitrary string assigned to a user, but should not exceed 40 characters.
123
+ # @param [String] fields
124
+ # Selector specifying which fields to include in a partial response.
164
125
  # @param [Google::Apis::RequestOptions] options
165
126
  # Request-specific options
166
127
  #
@@ -173,15 +134,15 @@ module Google
173
134
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
135
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
136
  # @raise [Google::Apis::AuthorizationError] Authorization is required
176
- def patch_project_instance(name, update_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
137
+ def patch_project_instance(name, update_instance_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
177
138
  command = make_simple_command(:patch, 'v1/{+name}', options)
178
139
  command.request_representation = Google::Apis::SpannerV1::UpdateInstanceRequest::Representation
179
140
  command.request_object = update_instance_request_object
180
141
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
181
142
  command.response_class = Google::Apis::SpannerV1::Operation
182
143
  command.params['name'] = name unless name.nil?
183
- command.query['fields'] = fields unless fields.nil?
184
144
  command.query['quotaUser'] = quota_user unless quota_user.nil?
145
+ command.query['fields'] = fields unless fields.nil?
185
146
  execute_or_queue_command(command, &block)
186
147
  end
187
148
 
@@ -196,11 +157,11 @@ module Google
196
157
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
197
158
  # database ID>` for database resources.
198
159
  # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
199
- # @param [String] fields
200
- # Selector specifying which fields to include in a partial response.
201
160
  # @param [String] quota_user
202
161
  # Available to use for quota purposes for server-side applications. Can be any
203
162
  # arbitrary string assigned to a user, but should not exceed 40 characters.
163
+ # @param [String] fields
164
+ # Selector specifying which fields to include in a partial response.
204
165
  # @param [Google::Apis::RequestOptions] options
205
166
  # Request-specific options
206
167
  #
@@ -213,15 +174,15 @@ module Google
213
174
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
214
175
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
215
176
  # @raise [Google::Apis::AuthorizationError] Authorization is required
216
- def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
177
+ def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
217
178
  command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
218
179
  command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
219
180
  command.request_object = test_iam_permissions_request_object
220
181
  command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
221
182
  command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
222
183
  command.params['resource'] = resource unless resource.nil?
223
- command.query['fields'] = fields unless fields.nil?
224
184
  command.query['quotaUser'] = quota_user unless quota_user.nil?
185
+ command.query['fields'] = fields unless fields.nil?
225
186
  execute_or_queue_command(command, &block)
226
187
  end
227
188
 
@@ -235,11 +196,11 @@ module Google
235
196
  # @param [String] name
236
197
  # Required. The name of the instance to be deleted. Values are of the form
237
198
  # `projects/<project>/instances/<instance>`
238
- # @param [String] fields
239
- # Selector specifying which fields to include in a partial response.
240
199
  # @param [String] quota_user
241
200
  # Available to use for quota purposes for server-side applications. Can be any
242
201
  # arbitrary string assigned to a user, but should not exceed 40 characters.
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
243
204
  # @param [Google::Apis::RequestOptions] options
244
205
  # Request-specific options
245
206
  #
@@ -252,13 +213,13 @@ module Google
252
213
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
214
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
215
  # @raise [Google::Apis::AuthorizationError] Authorization is required
255
- def delete_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
216
+ def delete_project_instance(name, quota_user: nil, fields: nil, options: nil, &block)
256
217
  command = make_simple_command(:delete, 'v1/{+name}', options)
257
218
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
258
219
  command.response_class = Google::Apis::SpannerV1::Empty
259
220
  command.params['name'] = name unless name.nil?
260
- command.query['fields'] = fields unless fields.nil?
261
221
  command.query['quotaUser'] = quota_user unless quota_user.nil?
222
+ command.query['fields'] = fields unless fields.nil?
262
223
  execute_or_queue_command(command, &block)
263
224
  end
264
225
 
@@ -266,6 +227,9 @@ module Google
266
227
  # @param [String] parent
267
228
  # Required. The name of the project for which a list of instances is
268
229
  # requested. Values are of the form `projects/<project>`.
230
+ # @param [Fixnum] page_size
231
+ # Number of instances to be returned in the response. If 0 or less, defaults
232
+ # to the server's maximum allowed page size.
269
233
  # @param [String] filter
270
234
  # An expression for filtering the results of the request. Filter rules are
271
235
  # case insensitive. The fields eligible for filtering are:
@@ -287,14 +251,11 @@ module Google
287
251
  # If non-empty, `page_token` should contain a
288
252
  # next_page_token from a
289
253
  # 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.
293
- # @param [String] fields
294
- # Selector specifying which fields to include in a partial response.
295
254
  # @param [String] quota_user
296
255
  # Available to use for quota purposes for server-side applications. Can be any
297
256
  # arbitrary string assigned to a user, but should not exceed 40 characters.
257
+ # @param [String] fields
258
+ # Selector specifying which fields to include in a partial response.
298
259
  # @param [Google::Apis::RequestOptions] options
299
260
  # Request-specific options
300
261
  #
@@ -307,16 +268,16 @@ module Google
307
268
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
308
269
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
309
270
  # @raise [Google::Apis::AuthorizationError] Authorization is required
310
- def list_project_instances(parent, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
271
+ def list_project_instances(parent, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
311
272
  command = make_simple_command(:get, 'v1/{+parent}/instances', options)
312
273
  command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation
313
274
  command.response_class = Google::Apis::SpannerV1::ListInstancesResponse
314
275
  command.params['parent'] = parent unless parent.nil?
276
+ command.query['pageSize'] = page_size unless page_size.nil?
315
277
  command.query['filter'] = filter unless filter.nil?
316
278
  command.query['pageToken'] = page_token unless page_token.nil?
317
- command.query['pageSize'] = page_size unless page_size.nil?
318
- command.query['fields'] = fields unless fields.nil?
319
279
  command.query['quotaUser'] = quota_user unless quota_user.nil?
280
+ command.query['fields'] = fields unless fields.nil?
320
281
  execute_or_queue_command(command, &block)
321
282
  end
322
283
 
@@ -351,11 +312,11 @@ module Google
351
312
  # Required. The name of the project in which to create the instance. Values
352
313
  # are of the form `projects/<project>`.
353
314
  # @param [Google::Apis::SpannerV1::CreateInstanceRequest] create_instance_request_object
354
- # @param [String] fields
355
- # Selector specifying which fields to include in a partial response.
356
315
  # @param [String] quota_user
357
316
  # Available to use for quota purposes for server-side applications. Can be any
358
317
  # arbitrary string assigned to a user, but should not exceed 40 characters.
318
+ # @param [String] fields
319
+ # Selector specifying which fields to include in a partial response.
359
320
  # @param [Google::Apis::RequestOptions] options
360
321
  # Request-specific options
361
322
  #
@@ -368,15 +329,15 @@ module Google
368
329
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
369
330
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
370
331
  # @raise [Google::Apis::AuthorizationError] Authorization is required
371
- def create_instance(parent, create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
332
+ def create_instance(parent, create_instance_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
372
333
  command = make_simple_command(:post, 'v1/{+parent}/instances', options)
373
334
  command.request_representation = Google::Apis::SpannerV1::CreateInstanceRequest::Representation
374
335
  command.request_object = create_instance_request_object
375
336
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
376
337
  command.response_class = Google::Apis::SpannerV1::Operation
377
338
  command.params['parent'] = parent unless parent.nil?
378
- command.query['fields'] = fields unless fields.nil?
379
339
  command.query['quotaUser'] = quota_user unless quota_user.nil?
340
+ command.query['fields'] = fields unless fields.nil?
380
341
  execute_or_queue_command(command, &block)
381
342
  end
382
343
 
@@ -390,11 +351,11 @@ module Google
390
351
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
391
352
  # database ID>` for databases resources.
392
353
  # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
393
- # @param [String] fields
394
- # Selector specifying which fields to include in a partial response.
395
354
  # @param [String] quota_user
396
355
  # Available to use for quota purposes for server-side applications. Can be any
397
356
  # arbitrary string assigned to a user, but should not exceed 40 characters.
357
+ # @param [String] fields
358
+ # Selector specifying which fields to include in a partial response.
398
359
  # @param [Google::Apis::RequestOptions] options
399
360
  # Request-specific options
400
361
  #
@@ -407,21 +368,21 @@ module Google
407
368
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
369
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
370
  # @raise [Google::Apis::AuthorizationError] Authorization is required
410
- def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
371
+ def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
411
372
  command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
412
373
  command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
413
374
  command.request_object = set_iam_policy_request_object
414
375
  command.response_representation = Google::Apis::SpannerV1::Policy::Representation
415
376
  command.response_class = Google::Apis::SpannerV1::Policy
416
377
  command.params['resource'] = resource unless resource.nil?
417
- command.query['fields'] = fields unless fields.nil?
418
378
  command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ command.query['fields'] = fields unless fields.nil?
419
380
  execute_or_queue_command(command, &block)
420
381
  end
421
382
 
422
- # Gets the access control policy for a database resource. Returns an empty
423
- # policy if a database exists but does not have a policy set.
424
- # Authorization requires `spanner.databases.getIamPolicy` permission on
383
+ # Gets the access control policy for an instance resource. Returns an empty
384
+ # policy if an instance exists but does not have a policy set.
385
+ # Authorization requires `spanner.instances.getIamPolicy` on
425
386
  # resource.
426
387
  # @param [String] resource
427
388
  # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
@@ -429,11 +390,11 @@ module Google
429
390
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
430
391
  # database ID>` for database resources.
431
392
  # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
432
- # @param [String] fields
433
- # Selector specifying which fields to include in a partial response.
434
393
  # @param [String] quota_user
435
394
  # Available to use for quota purposes for server-side applications. Can be any
436
395
  # arbitrary string assigned to a user, but should not exceed 40 characters.
396
+ # @param [String] fields
397
+ # Selector specifying which fields to include in a partial response.
437
398
  # @param [Google::Apis::RequestOptions] options
438
399
  # Request-specific options
439
400
  #
@@ -446,286 +407,253 @@ module Google
446
407
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
447
408
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
448
409
  # @raise [Google::Apis::AuthorizationError] Authorization is required
449
- def get_database_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
410
+ def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
450
411
  command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
451
412
  command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
452
413
  command.request_object = get_iam_policy_request_object
453
414
  command.response_representation = Google::Apis::SpannerV1::Policy::Representation
454
415
  command.response_class = Google::Apis::SpannerV1::Policy
455
416
  command.params['resource'] = resource unless resource.nil?
456
- command.query['fields'] = fields unless fields.nil?
457
417
  command.query['quotaUser'] = quota_user unless quota_user.nil?
418
+ command.query['fields'] = fields unless fields.nil?
458
419
  execute_or_queue_command(command, &block)
459
420
  end
460
421
 
461
- # Gets the state of a Cloud Spanner database.
462
- # @param [String] name
463
- # Required. The name of the requested database. Values are of the form
464
- # `projects/<project>/instances/<instance>/databases/<database>`.
465
- # @param [String] fields
466
- # Selector specifying which fields to include in a partial response.
422
+ # Lists Cloud Spanner databases.
423
+ # @param [String] parent
424
+ # Required. The instance whose databases should be listed.
425
+ # Values are of the form `projects/<project>/instances/<instance>`.
426
+ # @param [Fixnum] page_size
427
+ # Number of databases to be returned in the response. If 0 or less,
428
+ # defaults to the server's maximum allowed page size.
429
+ # @param [String] page_token
430
+ # If non-empty, `page_token` should contain a
431
+ # next_page_token from a
432
+ # previous ListDatabasesResponse.
467
433
  # @param [String] quota_user
468
434
  # Available to use for quota purposes for server-side applications. Can be any
469
435
  # arbitrary string assigned to a user, but should not exceed 40 characters.
436
+ # @param [String] fields
437
+ # Selector specifying which fields to include in a partial response.
470
438
  # @param [Google::Apis::RequestOptions] options
471
439
  # Request-specific options
472
440
  #
473
441
  # @yield [result, err] Result & error if block supplied
474
- # @yieldparam result [Google::Apis::SpannerV1::Database] parsed result object
442
+ # @yieldparam result [Google::Apis::SpannerV1::ListDatabasesResponse] parsed result object
475
443
  # @yieldparam err [StandardError] error object if request failed
476
444
  #
477
- # @return [Google::Apis::SpannerV1::Database]
445
+ # @return [Google::Apis::SpannerV1::ListDatabasesResponse]
478
446
  #
479
447
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
448
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
449
  # @raise [Google::Apis::AuthorizationError] Authorization is required
482
- def get_project_instance_database(name, fields: nil, quota_user: nil, options: nil, &block)
483
- command = make_simple_command(:get, 'v1/{+name}', options)
484
- command.response_representation = Google::Apis::SpannerV1::Database::Representation
485
- command.response_class = Google::Apis::SpannerV1::Database
486
- command.params['name'] = name unless name.nil?
487
- command.query['fields'] = fields unless fields.nil?
450
+ def list_project_instance_databases(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
451
+ command = make_simple_command(:get, 'v1/{+parent}/databases', options)
452
+ command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation
453
+ command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse
454
+ command.params['parent'] = parent unless parent.nil?
455
+ command.query['pageSize'] = page_size unless page_size.nil?
456
+ command.query['pageToken'] = page_token unless page_token.nil?
488
457
  command.query['quotaUser'] = quota_user unless quota_user.nil?
458
+ command.query['fields'] = fields unless fields.nil?
489
459
  execute_or_queue_command(command, &block)
490
460
  end
491
461
 
492
- # Drops (aka deletes) a Cloud Spanner database.
493
- # @param [String] database
494
- # Required. The database to be dropped.
495
- # @param [String] fields
496
- # Selector specifying which fields to include in a partial response.
462
+ # Creates a new Cloud Spanner database and starts to prepare it for serving.
463
+ # The returned long-running operation will
464
+ # have a name of the format `<database_name>/operations/<operation_id>` and
465
+ # can be used to track preparation of the database. The
466
+ # metadata field type is
467
+ # CreateDatabaseMetadata. The
468
+ # response field type is
469
+ # Database, if successful.
470
+ # @param [String] parent
471
+ # Required. The name of the instance that will serve the new database.
472
+ # Values are of the form `projects/<project>/instances/<instance>`.
473
+ # @param [Google::Apis::SpannerV1::CreateDatabaseRequest] create_database_request_object
497
474
  # @param [String] quota_user
498
475
  # Available to use for quota purposes for server-side applications. Can be any
499
476
  # arbitrary string assigned to a user, but should not exceed 40 characters.
477
+ # @param [String] fields
478
+ # Selector specifying which fields to include in a partial response.
500
479
  # @param [Google::Apis::RequestOptions] options
501
480
  # Request-specific options
502
481
  #
503
482
  # @yield [result, err] Result & error if block supplied
504
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
483
+ # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
505
484
  # @yieldparam err [StandardError] error object if request failed
506
485
  #
507
- # @return [Google::Apis::SpannerV1::Empty]
486
+ # @return [Google::Apis::SpannerV1::Operation]
508
487
  #
509
488
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
510
489
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
511
490
  # @raise [Google::Apis::AuthorizationError] Authorization is required
512
- def drop_project_instance_database_database(database, fields: nil, quota_user: nil, options: nil, &block)
513
- command = make_simple_command(:delete, 'v1/{+database}', options)
514
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
515
- command.response_class = Google::Apis::SpannerV1::Empty
516
- command.params['database'] = database unless database.nil?
517
- command.query['fields'] = fields unless fields.nil?
491
+ def create_database(parent, create_database_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
492
+ command = make_simple_command(:post, 'v1/{+parent}/databases', options)
493
+ command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation
494
+ command.request_object = create_database_request_object
495
+ command.response_representation = Google::Apis::SpannerV1::Operation::Representation
496
+ command.response_class = Google::Apis::SpannerV1::Operation
497
+ command.params['parent'] = parent unless parent.nil?
518
498
  command.query['quotaUser'] = quota_user unless quota_user.nil?
499
+ command.query['fields'] = fields unless fields.nil?
519
500
  execute_or_queue_command(command, &block)
520
501
  end
521
502
 
522
- # Updates the schema of a Cloud Spanner database by
523
- # creating/altering/dropping tables, columns, indexes, etc. The returned
524
- # long-running operation will have a name of
525
- # the format `<database_name>/operations/<operation_id>` and can be used to
526
- # track execution of the schema change(s). The
527
- # metadata field type is
528
- # UpdateDatabaseDdlMetadata. The operation has no response.
529
- # @param [String] database
530
- # Required. The database to update.
531
- # @param [Google::Apis::SpannerV1::UpdateDatabaseDdlRequest] update_database_ddl_request_object
532
- # @param [String] fields
533
- # Selector specifying which fields to include in a partial response.
503
+ # Sets the access control policy on a database resource. Replaces any
504
+ # existing policy.
505
+ # Authorization requires `spanner.databases.setIamPolicy` permission on
506
+ # resource.
507
+ # @param [String] resource
508
+ # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
509
+ # format is `projects/<project ID>/instances/<instance ID>` for instance
510
+ # resources and `projects/<project ID>/instances/<instance ID>/databases/<
511
+ # database ID>` for databases resources.
512
+ # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
534
513
  # @param [String] quota_user
535
514
  # Available to use for quota purposes for server-side applications. Can be any
536
515
  # arbitrary string assigned to a user, but should not exceed 40 characters.
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
537
518
  # @param [Google::Apis::RequestOptions] options
538
519
  # Request-specific options
539
520
  #
540
521
  # @yield [result, err] Result & error if block supplied
541
- # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object
522
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
542
523
  # @yieldparam err [StandardError] error object if request failed
543
524
  #
544
- # @return [Google::Apis::SpannerV1::Operation]
525
+ # @return [Google::Apis::SpannerV1::Policy]
545
526
  #
546
527
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
547
528
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
548
529
  # @raise [Google::Apis::AuthorizationError] Authorization is required
549
- def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
550
- command = make_simple_command(:patch, 'v1/{+database}/ddl', options)
551
- command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation
552
- command.request_object = update_database_ddl_request_object
553
- command.response_representation = Google::Apis::SpannerV1::Operation::Representation
554
- command.response_class = Google::Apis::SpannerV1::Operation
555
- command.params['database'] = database unless database.nil?
556
- command.query['fields'] = fields unless fields.nil?
530
+ def set_database_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
531
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
532
+ command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
533
+ command.request_object = set_iam_policy_request_object
534
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
535
+ command.response_class = Google::Apis::SpannerV1::Policy
536
+ command.params['resource'] = resource unless resource.nil?
557
537
  command.query['quotaUser'] = quota_user unless quota_user.nil?
538
+ command.query['fields'] = fields unless fields.nil?
558
539
  execute_or_queue_command(command, &block)
559
540
  end
560
541
 
561
- # Returns permissions that the caller has on the specified database resource.
562
- # Attempting this RPC on a non-existent Cloud Spanner database will result in
563
- # a NOT_FOUND error if the user has `spanner.databases.list` permission on
564
- # the containing Cloud Spanner instance. Otherwise returns an empty set of
565
- # permissions.
542
+ # Gets the access control policy for a database resource. Returns an empty
543
+ # policy if a database exists but does not have a policy set.
544
+ # Authorization requires `spanner.databases.getIamPolicy` permission on
545
+ # resource.
566
546
  # @param [String] resource
567
- # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
547
+ # REQUIRED: The Cloud Spanner resource for which the policy is being retrieved.
568
548
  # The format is `projects/<project ID>/instances/<instance ID>` for instance
569
549
  # resources and `projects/<project ID>/instances/<instance ID>/databases/<
570
550
  # database ID>` for database resources.
571
- # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
572
- # @param [String] fields
573
- # Selector specifying which fields to include in a partial response.
551
+ # @param [Google::Apis::SpannerV1::GetIamPolicyRequest] get_iam_policy_request_object
574
552
  # @param [String] quota_user
575
553
  # Available to use for quota purposes for server-side applications. Can be any
576
554
  # arbitrary string assigned to a user, but should not exceed 40 characters.
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
577
557
  # @param [Google::Apis::RequestOptions] options
578
558
  # Request-specific options
579
559
  #
580
560
  # @yield [result, err] Result & error if block supplied
581
- # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
561
+ # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
582
562
  # @yieldparam err [StandardError] error object if request failed
583
563
  #
584
- # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
564
+ # @return [Google::Apis::SpannerV1::Policy]
585
565
  #
586
566
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
567
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
568
  # @raise [Google::Apis::AuthorizationError] Authorization is required
589
- def test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
590
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
591
- command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
592
- command.request_object = test_iam_permissions_request_object
593
- command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
594
- command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
569
+ def get_database_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
570
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
571
+ command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation
572
+ command.request_object = get_iam_policy_request_object
573
+ command.response_representation = Google::Apis::SpannerV1::Policy::Representation
574
+ command.response_class = Google::Apis::SpannerV1::Policy
595
575
  command.params['resource'] = resource unless resource.nil?
596
- command.query['fields'] = fields unless fields.nil?
597
576
  command.query['quotaUser'] = quota_user unless quota_user.nil?
577
+ command.query['fields'] = fields unless fields.nil?
598
578
  execute_or_queue_command(command, &block)
599
579
  end
600
580
 
601
- # Returns the schema of a Cloud Spanner database as a list of formatted
602
- # DDL statements. This method does not show pending schema updates, those may
603
- # be queried using the Operations API.
604
- # @param [String] database
605
- # Required. The database whose schema we wish to get.
606
- # @param [String] fields
607
- # Selector specifying which fields to include in a partial response.
581
+ # Gets the state of a Cloud Spanner database.
582
+ # @param [String] name
583
+ # Required. The name of the requested database. Values are of the form
584
+ # `projects/<project>/instances/<instance>/databases/<database>`.
608
585
  # @param [String] quota_user
609
586
  # Available to use for quota purposes for server-side applications. Can be any
610
587
  # arbitrary string assigned to a user, but should not exceed 40 characters.
611
- # @param [Google::Apis::RequestOptions] options
612
- # Request-specific options
613
- #
614
- # @yield [result, err] Result & error if block supplied
615
- # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object
616
- # @yieldparam err [StandardError] error object if request failed
617
- #
618
- # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse]
619
- #
620
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
621
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
622
- # @raise [Google::Apis::AuthorizationError] Authorization is required
623
- def get_project_instance_database_ddl(database, fields: nil, quota_user: nil, options: nil, &block)
624
- command = make_simple_command(:get, 'v1/{+database}/ddl', options)
625
- command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation
626
- command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse
627
- command.params['database'] = database unless database.nil?
628
- command.query['fields'] = fields unless fields.nil?
629
- command.query['quotaUser'] = quota_user unless quota_user.nil?
630
- execute_or_queue_command(command, &block)
631
- end
632
-
633
- # Lists Cloud Spanner databases.
634
- # @param [String] parent
635
- # Required. The instance whose databases should be listed.
636
- # Values are of the form `projects/<project>/instances/<instance>`.
637
- # @param [String] page_token
638
- # If non-empty, `page_token` should contain a
639
- # next_page_token from a
640
- # previous ListDatabasesResponse.
641
- # @param [Fixnum] page_size
642
- # Number of databases to be returned in the response. If 0 or less,
643
- # defaults to the server's maximum allowed page size.
644
588
  # @param [String] fields
645
589
  # Selector specifying which fields to include in a partial response.
646
- # @param [String] quota_user
647
- # Available to use for quota purposes for server-side applications. Can be any
648
- # arbitrary string assigned to a user, but should not exceed 40 characters.
649
590
  # @param [Google::Apis::RequestOptions] options
650
591
  # Request-specific options
651
592
  #
652
593
  # @yield [result, err] Result & error if block supplied
653
- # @yieldparam result [Google::Apis::SpannerV1::ListDatabasesResponse] parsed result object
594
+ # @yieldparam result [Google::Apis::SpannerV1::Database] parsed result object
654
595
  # @yieldparam err [StandardError] error object if request failed
655
596
  #
656
- # @return [Google::Apis::SpannerV1::ListDatabasesResponse]
597
+ # @return [Google::Apis::SpannerV1::Database]
657
598
  #
658
599
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
659
600
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
660
601
  # @raise [Google::Apis::AuthorizationError] Authorization is required
661
- def list_project_instance_databases(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
662
- command = make_simple_command(:get, 'v1/{+parent}/databases', options)
663
- command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation
664
- command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse
665
- command.params['parent'] = parent unless parent.nil?
666
- command.query['pageToken'] = page_token unless page_token.nil?
667
- command.query['pageSize'] = page_size unless page_size.nil?
668
- command.query['fields'] = fields unless fields.nil?
602
+ def get_project_instance_database(name, quota_user: nil, fields: nil, options: nil, &block)
603
+ command = make_simple_command(:get, 'v1/{+name}', options)
604
+ command.response_representation = Google::Apis::SpannerV1::Database::Representation
605
+ command.response_class = Google::Apis::SpannerV1::Database
606
+ command.params['name'] = name unless name.nil?
669
607
  command.query['quotaUser'] = quota_user unless quota_user.nil?
608
+ command.query['fields'] = fields unless fields.nil?
670
609
  execute_or_queue_command(command, &block)
671
610
  end
672
611
 
673
- # Sets the access control policy on a database resource. Replaces any
674
- # existing policy.
675
- # Authorization requires `spanner.databases.setIamPolicy` permission on
676
- # resource.
677
- # @param [String] resource
678
- # REQUIRED: The Cloud Spanner resource for which the policy is being set. The
679
- # format is `projects/<project ID>/instances/<instance ID>` for instance
680
- # resources and `projects/<project ID>/instances/<instance ID>/databases/<
681
- # database ID>` for databases resources.
682
- # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object
683
- # @param [String] fields
684
- # Selector specifying which fields to include in a partial response.
612
+ # Drops (aka deletes) a Cloud Spanner database.
613
+ # @param [String] database
614
+ # Required. The database to be dropped.
685
615
  # @param [String] quota_user
686
616
  # Available to use for quota purposes for server-side applications. Can be any
687
617
  # arbitrary string assigned to a user, but should not exceed 40 characters.
618
+ # @param [String] fields
619
+ # Selector specifying which fields to include in a partial response.
688
620
  # @param [Google::Apis::RequestOptions] options
689
621
  # Request-specific options
690
622
  #
691
623
  # @yield [result, err] Result & error if block supplied
692
- # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object
624
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
693
625
  # @yieldparam err [StandardError] error object if request failed
694
626
  #
695
- # @return [Google::Apis::SpannerV1::Policy]
627
+ # @return [Google::Apis::SpannerV1::Empty]
696
628
  #
697
629
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
698
630
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
699
631
  # @raise [Google::Apis::AuthorizationError] Authorization is required
700
- def set_database_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
701
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
702
- command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation
703
- command.request_object = set_iam_policy_request_object
704
- command.response_representation = Google::Apis::SpannerV1::Policy::Representation
705
- command.response_class = Google::Apis::SpannerV1::Policy
706
- command.params['resource'] = resource unless resource.nil?
707
- command.query['fields'] = fields unless fields.nil?
632
+ def drop_project_instance_database_database(database, quota_user: nil, fields: nil, options: nil, &block)
633
+ command = make_simple_command(:delete, 'v1/{+database}', options)
634
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
635
+ command.response_class = Google::Apis::SpannerV1::Empty
636
+ command.params['database'] = database unless database.nil?
708
637
  command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ command.query['fields'] = fields unless fields.nil?
709
639
  execute_or_queue_command(command, &block)
710
640
  end
711
641
 
712
- # Creates a new Cloud Spanner database and starts to prepare it for serving.
713
- # The returned long-running operation will
714
- # have a name of the format `<database_name>/operations/<operation_id>` and
715
- # can be used to track preparation of the database. The
642
+ # Updates the schema of a Cloud Spanner database by
643
+ # creating/altering/dropping tables, columns, indexes, etc. The returned
644
+ # long-running operation will have a name of
645
+ # the format `<database_name>/operations/<operation_id>` and can be used to
646
+ # track execution of the schema change(s). The
716
647
  # metadata field type is
717
- # CreateDatabaseMetadata. The
718
- # response field type is
719
- # Database, if successful.
720
- # @param [String] parent
721
- # Required. The name of the instance that will serve the new database.
722
- # Values are of the form `projects/<project>/instances/<instance>`.
723
- # @param [Google::Apis::SpannerV1::CreateDatabaseRequest] create_database_request_object
724
- # @param [String] fields
725
- # Selector specifying which fields to include in a partial response.
648
+ # UpdateDatabaseDdlMetadata. The operation has no response.
649
+ # @param [String] database
650
+ # Required. The database to update.
651
+ # @param [Google::Apis::SpannerV1::UpdateDatabaseDdlRequest] update_database_ddl_request_object
726
652
  # @param [String] quota_user
727
653
  # Available to use for quota purposes for server-side applications. Can be any
728
654
  # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [String] fields
656
+ # Selector specifying which fields to include in a partial response.
729
657
  # @param [Google::Apis::RequestOptions] options
730
658
  # Request-specific options
731
659
  #
@@ -738,87 +666,87 @@ module Google
738
666
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
739
667
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
740
668
  # @raise [Google::Apis::AuthorizationError] Authorization is required
741
- def create_database(parent, create_database_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
742
- command = make_simple_command(:post, 'v1/{+parent}/databases', options)
743
- command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation
744
- command.request_object = create_database_request_object
669
+ def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
670
+ command = make_simple_command(:patch, 'v1/{+database}/ddl', options)
671
+ command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation
672
+ command.request_object = update_database_ddl_request_object
745
673
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
746
674
  command.response_class = Google::Apis::SpannerV1::Operation
747
- command.params['parent'] = parent unless parent.nil?
748
- command.query['fields'] = fields unless fields.nil?
675
+ command.params['database'] = database unless database.nil?
749
676
  command.query['quotaUser'] = quota_user unless quota_user.nil?
677
+ command.query['fields'] = fields unless fields.nil?
750
678
  execute_or_queue_command(command, &block)
751
679
  end
752
680
 
753
- # Starts asynchronous cancellation on a long-running operation. The server
754
- # makes a best effort to cancel the operation, but success is not
755
- # guaranteed. If the server doesn't support this method, it returns
756
- # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
757
- # Operations.GetOperation or
758
- # other methods to check whether the cancellation succeeded or whether the
759
- # operation completed despite cancellation. On successful cancellation,
760
- # the operation is not deleted; instead, it becomes an operation with
761
- # an Operation.error value with a google.rpc.Status.code of 1,
762
- # corresponding to `Code.CANCELLED`.
763
- # @param [String] name
764
- # The name of the operation resource to be cancelled.
765
- # @param [String] fields
766
- # Selector specifying which fields to include in a partial response.
681
+ # Returns permissions that the caller has on the specified database resource.
682
+ # Attempting this RPC on a non-existent Cloud Spanner database will result in
683
+ # a NOT_FOUND error if the user has `spanner.databases.list` permission on
684
+ # the containing Cloud Spanner instance. Otherwise returns an empty set of
685
+ # permissions.
686
+ # @param [String] resource
687
+ # REQUIRED: The Cloud Spanner resource for which permissions are being tested.
688
+ # The format is `projects/<project ID>/instances/<instance ID>` for instance
689
+ # resources and `projects/<project ID>/instances/<instance ID>/databases/<
690
+ # database ID>` for database resources.
691
+ # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
767
692
  # @param [String] quota_user
768
693
  # Available to use for quota purposes for server-side applications. Can be any
769
694
  # arbitrary string assigned to a user, but should not exceed 40 characters.
695
+ # @param [String] fields
696
+ # Selector specifying which fields to include in a partial response.
770
697
  # @param [Google::Apis::RequestOptions] options
771
698
  # Request-specific options
772
699
  #
773
700
  # @yield [result, err] Result & error if block supplied
774
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
701
+ # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object
775
702
  # @yieldparam err [StandardError] error object if request failed
776
703
  #
777
- # @return [Google::Apis::SpannerV1::Empty]
704
+ # @return [Google::Apis::SpannerV1::TestIamPermissionsResponse]
778
705
  #
779
706
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
780
707
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
781
708
  # @raise [Google::Apis::AuthorizationError] Authorization is required
782
- def cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
783
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
784
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
785
- command.response_class = Google::Apis::SpannerV1::Empty
786
- command.params['name'] = name unless name.nil?
787
- command.query['fields'] = fields unless fields.nil?
709
+ def test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
710
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
711
+ command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation
712
+ command.request_object = test_iam_permissions_request_object
713
+ command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation
714
+ command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse
715
+ command.params['resource'] = resource unless resource.nil?
788
716
  command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ command.query['fields'] = fields unless fields.nil?
789
718
  execute_or_queue_command(command, &block)
790
719
  end
791
720
 
792
- # Deletes a long-running operation. This method indicates that the client is
793
- # no longer interested in the operation result. It does not cancel the
794
- # operation. If the server doesn't support this method, it returns
795
- # `google.rpc.Code.UNIMPLEMENTED`.
796
- # @param [String] name
797
- # The name of the operation resource to be deleted.
798
- # @param [String] fields
799
- # Selector specifying which fields to include in a partial response.
721
+ # Returns the schema of a Cloud Spanner database as a list of formatted
722
+ # DDL statements. This method does not show pending schema updates, those may
723
+ # be queried using the Operations API.
724
+ # @param [String] database
725
+ # Required. The database whose schema we wish to get.
800
726
  # @param [String] quota_user
801
727
  # Available to use for quota purposes for server-side applications. Can be any
802
728
  # arbitrary string assigned to a user, but should not exceed 40 characters.
729
+ # @param [String] fields
730
+ # Selector specifying which fields to include in a partial response.
803
731
  # @param [Google::Apis::RequestOptions] options
804
732
  # Request-specific options
805
733
  #
806
734
  # @yield [result, err] Result & error if block supplied
807
- # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
735
+ # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object
808
736
  # @yieldparam err [StandardError] error object if request failed
809
737
  #
810
- # @return [Google::Apis::SpannerV1::Empty]
738
+ # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse]
811
739
  #
812
740
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
813
741
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
814
742
  # @raise [Google::Apis::AuthorizationError] Authorization is required
815
- def delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
816
- command = make_simple_command(:delete, 'v1/{+name}', options)
817
- command.response_representation = Google::Apis::SpannerV1::Empty::Representation
818
- command.response_class = Google::Apis::SpannerV1::Empty
819
- command.params['name'] = name unless name.nil?
820
- command.query['fields'] = fields unless fields.nil?
743
+ def get_project_instance_database_ddl(database, quota_user: nil, fields: nil, options: nil, &block)
744
+ command = make_simple_command(:get, 'v1/{+database}/ddl', options)
745
+ command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation
746
+ command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse
747
+ command.params['database'] = database unless database.nil?
821
748
  command.query['quotaUser'] = quota_user unless quota_user.nil?
749
+ command.query['fields'] = fields unless fields.nil?
822
750
  execute_or_queue_command(command, &block)
823
751
  end
824
752
 
@@ -828,17 +756,17 @@ module Google
828
756
  # to use different resource name schemes, such as `users/*/operations`.
829
757
  # @param [String] name
830
758
  # The name of the operation collection.
759
+ # @param [Fixnum] page_size
760
+ # The standard list page size.
831
761
  # @param [String] filter
832
762
  # The standard list filter.
833
763
  # @param [String] page_token
834
764
  # The standard list page token.
835
- # @param [Fixnum] page_size
836
- # The standard list page size.
837
- # @param [String] fields
838
- # Selector specifying which fields to include in a partial response.
839
765
  # @param [String] quota_user
840
766
  # Available to use for quota purposes for server-side applications. Can be any
841
767
  # arbitrary string assigned to a user, but should not exceed 40 characters.
768
+ # @param [String] fields
769
+ # Selector specifying which fields to include in a partial response.
842
770
  # @param [Google::Apis::RequestOptions] options
843
771
  # Request-specific options
844
772
  #
@@ -851,16 +779,16 @@ module Google
851
779
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
852
780
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
853
781
  # @raise [Google::Apis::AuthorizationError] Authorization is required
854
- def list_project_instance_database_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
782
+ def list_project_instance_database_operations(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
855
783
  command = make_simple_command(:get, 'v1/{+name}', options)
856
784
  command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
857
785
  command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
858
786
  command.params['name'] = name unless name.nil?
787
+ command.query['pageSize'] = page_size unless page_size.nil?
859
788
  command.query['filter'] = filter unless filter.nil?
860
789
  command.query['pageToken'] = page_token unless page_token.nil?
861
- command.query['pageSize'] = page_size unless page_size.nil?
862
- command.query['fields'] = fields unless fields.nil?
863
790
  command.query['quotaUser'] = quota_user unless quota_user.nil?
791
+ command.query['fields'] = fields unless fields.nil?
864
792
  execute_or_queue_command(command, &block)
865
793
  end
866
794
 
@@ -869,11 +797,11 @@ module Google
869
797
  # service.
870
798
  # @param [String] name
871
799
  # The name of the operation resource.
872
- # @param [String] fields
873
- # Selector specifying which fields to include in a partial response.
874
800
  # @param [String] quota_user
875
801
  # Available to use for quota purposes for server-side applications. Can be any
876
802
  # arbitrary string assigned to a user, but should not exceed 40 characters.
803
+ # @param [String] fields
804
+ # Selector specifying which fields to include in a partial response.
877
805
  # @param [Google::Apis::RequestOptions] options
878
806
  # Request-specific options
879
807
  #
@@ -886,31 +814,33 @@ module Google
886
814
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
887
815
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
888
816
  # @raise [Google::Apis::AuthorizationError] Authorization is required
889
- def get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block)
817
+ def get_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
890
818
  command = make_simple_command(:get, 'v1/{+name}', options)
891
819
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
892
820
  command.response_class = Google::Apis::SpannerV1::Operation
893
821
  command.params['name'] = name unless name.nil?
894
- command.query['fields'] = fields unless fields.nil?
895
822
  command.query['quotaUser'] = quota_user unless quota_user.nil?
823
+ command.query['fields'] = fields unless fields.nil?
896
824
  execute_or_queue_command(command, &block)
897
825
  end
898
826
 
899
- # Rolls back a transaction, releasing any locks it holds. It is a good
900
- # idea to call this for any transaction that includes one or more
901
- # Read or ExecuteSql requests and
902
- # ultimately decides not to commit.
903
- # `Rollback` returns `OK` if it successfully aborts the transaction, the
904
- # transaction was already aborted, or the transaction is not
905
- # found. `Rollback` never returns `ABORTED`.
906
- # @param [String] session
907
- # Required. The session in which the transaction to roll back is running.
908
- # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
909
- # @param [String] fields
910
- # Selector specifying which fields to include in a partial response.
827
+ # Starts asynchronous cancellation on a long-running operation. The server
828
+ # makes a best effort to cancel the operation, but success is not
829
+ # guaranteed. If the server doesn't support this method, it returns
830
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
831
+ # Operations.GetOperation or
832
+ # other methods to check whether the cancellation succeeded or whether the
833
+ # operation completed despite cancellation. On successful cancellation,
834
+ # the operation is not deleted; instead, it becomes an operation with
835
+ # an Operation.error value with a google.rpc.Status.code of 1,
836
+ # corresponding to `Code.CANCELLED`.
837
+ # @param [String] name
838
+ # The name of the operation resource to be cancelled.
911
839
  # @param [String] quota_user
912
840
  # Available to use for quota purposes for server-side applications. Can be any
913
841
  # arbitrary string assigned to a user, but should not exceed 40 characters.
842
+ # @param [String] fields
843
+ # Selector specifying which fields to include in a partial response.
914
844
  # @param [Google::Apis::RequestOptions] options
915
845
  # Request-specific options
916
846
  #
@@ -923,140 +853,46 @@ module Google
923
853
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
924
854
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
925
855
  # @raise [Google::Apis::AuthorizationError] Authorization is required
926
- def rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
927
- command = make_simple_command(:post, 'v1/{+session}:rollback', options)
928
- command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
929
- command.request_object = rollback_request_object
856
+ def cancel_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
857
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
930
858
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
931
859
  command.response_class = Google::Apis::SpannerV1::Empty
932
- command.params['session'] = session unless session.nil?
933
- command.query['fields'] = fields unless fields.nil?
934
- command.query['quotaUser'] = quota_user unless quota_user.nil?
935
- execute_or_queue_command(command, &block)
936
- end
937
-
938
- # Like Read, except returns the result set as a
939
- # stream. Unlike Read, there is no limit on the
940
- # size of the returned result set. However, no individual row in
941
- # the result set can exceed 100 MiB, and no column value can exceed
942
- # 10 MiB.
943
- # @param [String] session
944
- # Required. The session in which the read should be performed.
945
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
946
- # @param [String] fields
947
- # Selector specifying which fields to include in a partial response.
948
- # @param [String] quota_user
949
- # Available to use for quota purposes for server-side applications. Can be any
950
- # arbitrary string assigned to a user, but should not exceed 40 characters.
951
- # @param [Google::Apis::RequestOptions] options
952
- # Request-specific options
953
- #
954
- # @yield [result, err] Result & error if block supplied
955
- # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
956
- # @yieldparam err [StandardError] error object if request failed
957
- #
958
- # @return [Google::Apis::SpannerV1::PartialResultSet]
959
- #
960
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
961
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
962
- # @raise [Google::Apis::AuthorizationError] Authorization is required
963
- def streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
964
- command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
965
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
966
- command.request_object = read_request_object
967
- command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
968
- command.response_class = Google::Apis::SpannerV1::PartialResultSet
969
- command.params['session'] = session unless session.nil?
970
- command.query['fields'] = fields unless fields.nil?
860
+ command.params['name'] = name unless name.nil?
971
861
  command.query['quotaUser'] = quota_user unless quota_user.nil?
972
- execute_or_queue_command(command, &block)
973
- end
974
-
975
- # Creates a new session. A session can be used to perform
976
- # transactions that read and/or modify data in a Cloud Spanner database.
977
- # Sessions are meant to be reused for many consecutive
978
- # transactions.
979
- # Sessions can only execute one transaction at a time. To execute
980
- # multiple concurrent read-write/write-only transactions, create
981
- # multiple sessions. Note that standalone reads and queries use a
982
- # transaction internally, and count toward the one transaction
983
- # limit.
984
- # Cloud Spanner limits the number of sessions that can exist at any given
985
- # time; thus, it is a good idea to delete idle and/or unneeded sessions.
986
- # Aside from explicit deletes, Cloud Spanner can delete sessions for which no
987
- # operations are sent for more than an hour. If a session is deleted,
988
- # requests to it return `NOT_FOUND`.
989
- # Idle sessions can be kept alive by sending a trivial SQL query
990
- # periodically, e.g., `"SELECT 1"`.
991
- # @param [String] database
992
- # Required. The database in which the new session is created.
993
- # @param [String] fields
994
- # Selector specifying which fields to include in a partial response.
995
- # @param [String] quota_user
996
- # Available to use for quota purposes for server-side applications. Can be any
997
- # arbitrary string assigned to a user, but should not exceed 40 characters.
998
- # @param [Google::Apis::RequestOptions] options
999
- # Request-specific options
1000
- #
1001
- # @yield [result, err] Result & error if block supplied
1002
- # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
1003
- # @yieldparam err [StandardError] error object if request failed
1004
- #
1005
- # @return [Google::Apis::SpannerV1::Session]
1006
- #
1007
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1008
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1009
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1010
- def create_project_instance_database_session(database, fields: nil, quota_user: nil, options: nil, &block)
1011
- command = make_simple_command(:post, 'v1/{+database}/sessions', options)
1012
- command.response_representation = Google::Apis::SpannerV1::Session::Representation
1013
- command.response_class = Google::Apis::SpannerV1::Session
1014
- command.params['database'] = database unless database.nil?
1015
862
  command.query['fields'] = fields unless fields.nil?
1016
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1017
863
  execute_or_queue_command(command, &block)
1018
864
  end
1019
865
 
1020
- # Reads rows from the database using key lookups and scans, as a
1021
- # simple key/value style alternative to
1022
- # ExecuteSql. This method cannot be used to
1023
- # return a result set larger than 10 MiB; if the read matches more
1024
- # data than that, the read fails with a `FAILED_PRECONDITION`
1025
- # error.
1026
- # Reads inside read-write transactions might return `ABORTED`. If
1027
- # this occurs, the application should restart the transaction from
1028
- # the beginning. See Transaction for more details.
1029
- # Larger result sets can be yielded in streaming fashion by calling
1030
- # StreamingRead instead.
1031
- # @param [String] session
1032
- # Required. The session in which the read should be performed.
1033
- # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1034
- # @param [String] fields
1035
- # Selector specifying which fields to include in a partial response.
866
+ # Deletes a long-running operation. This method indicates that the client is
867
+ # no longer interested in the operation result. It does not cancel the
868
+ # operation. If the server doesn't support this method, it returns
869
+ # `google.rpc.Code.UNIMPLEMENTED`.
870
+ # @param [String] name
871
+ # The name of the operation resource to be deleted.
1036
872
  # @param [String] quota_user
1037
873
  # Available to use for quota purposes for server-side applications. Can be any
1038
874
  # arbitrary string assigned to a user, but should not exceed 40 characters.
875
+ # @param [String] fields
876
+ # Selector specifying which fields to include in a partial response.
1039
877
  # @param [Google::Apis::RequestOptions] options
1040
878
  # Request-specific options
1041
879
  #
1042
880
  # @yield [result, err] Result & error if block supplied
1043
- # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
881
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1044
882
  # @yieldparam err [StandardError] error object if request failed
1045
883
  #
1046
- # @return [Google::Apis::SpannerV1::ResultSet]
884
+ # @return [Google::Apis::SpannerV1::Empty]
1047
885
  #
1048
886
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1049
887
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1050
888
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1051
- def read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1052
- command = make_simple_command(:post, 'v1/{+session}:read', options)
1053
- command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1054
- command.request_object = read_request_object
1055
- command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
1056
- command.response_class = Google::Apis::SpannerV1::ResultSet
1057
- command.params['session'] = session unless session.nil?
1058
- command.query['fields'] = fields unless fields.nil?
889
+ def delete_project_instance_database_operation(name, quota_user: nil, fields: nil, options: nil, &block)
890
+ command = make_simple_command(:delete, 'v1/{+name}', options)
891
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
892
+ command.response_class = Google::Apis::SpannerV1::Empty
893
+ command.params['name'] = name unless name.nil?
1059
894
  command.query['quotaUser'] = quota_user unless quota_user.nil?
895
+ command.query['fields'] = fields unless fields.nil?
1060
896
  execute_or_queue_command(command, &block)
1061
897
  end
1062
898
 
@@ -1065,11 +901,11 @@ module Google
1065
901
  # alive.
1066
902
  # @param [String] name
1067
903
  # Required. The name of the session to retrieve.
1068
- # @param [String] fields
1069
- # Selector specifying which fields to include in a partial response.
1070
904
  # @param [String] quota_user
1071
905
  # Available to use for quota purposes for server-side applications. Can be any
1072
906
  # arbitrary string assigned to a user, but should not exceed 40 characters.
907
+ # @param [String] fields
908
+ # Selector specifying which fields to include in a partial response.
1073
909
  # @param [Google::Apis::RequestOptions] options
1074
910
  # Request-specific options
1075
911
  #
@@ -1082,13 +918,13 @@ module Google
1082
918
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1083
919
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1084
920
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1085
- def get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
921
+ def get_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block)
1086
922
  command = make_simple_command(:get, 'v1/{+name}', options)
1087
923
  command.response_representation = Google::Apis::SpannerV1::Session::Representation
1088
924
  command.response_class = Google::Apis::SpannerV1::Session
1089
925
  command.params['name'] = name unless name.nil?
1090
- command.query['fields'] = fields unless fields.nil?
1091
926
  command.query['quotaUser'] = quota_user unless quota_user.nil?
927
+ command.query['fields'] = fields unless fields.nil?
1092
928
  execute_or_queue_command(command, &block)
1093
929
  end
1094
930
 
@@ -1100,11 +936,11 @@ module Google
1100
936
  # @param [String] session
1101
937
  # Required. The session in which the SQL query should be performed.
1102
938
  # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
1103
- # @param [String] fields
1104
- # Selector specifying which fields to include in a partial response.
1105
939
  # @param [String] quota_user
1106
940
  # Available to use for quota purposes for server-side applications. Can be any
1107
941
  # arbitrary string assigned to a user, but should not exceed 40 characters.
942
+ # @param [String] fields
943
+ # Selector specifying which fields to include in a partial response.
1108
944
  # @param [Google::Apis::RequestOptions] options
1109
945
  # Request-specific options
1110
946
  #
@@ -1117,26 +953,26 @@ module Google
1117
953
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1118
954
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1119
955
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1120
- def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
956
+ def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1121
957
  command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options)
1122
958
  command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
1123
959
  command.request_object = execute_sql_request_object
1124
960
  command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
1125
961
  command.response_class = Google::Apis::SpannerV1::PartialResultSet
1126
962
  command.params['session'] = session unless session.nil?
1127
- command.query['fields'] = fields unless fields.nil?
1128
963
  command.query['quotaUser'] = quota_user unless quota_user.nil?
964
+ command.query['fields'] = fields unless fields.nil?
1129
965
  execute_or_queue_command(command, &block)
1130
966
  end
1131
967
 
1132
968
  # Ends a session, releasing server resources associated with it.
1133
969
  # @param [String] name
1134
970
  # Required. The name of the session to delete.
1135
- # @param [String] fields
1136
- # Selector specifying which fields to include in a partial response.
1137
971
  # @param [String] quota_user
1138
972
  # Available to use for quota purposes for server-side applications. Can be any
1139
973
  # arbitrary string assigned to a user, but should not exceed 40 characters.
974
+ # @param [String] fields
975
+ # Selector specifying which fields to include in a partial response.
1140
976
  # @param [Google::Apis::RequestOptions] options
1141
977
  # Request-specific options
1142
978
  #
@@ -1149,13 +985,13 @@ module Google
1149
985
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1150
986
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1151
987
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1152
- def delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block)
988
+ def delete_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block)
1153
989
  command = make_simple_command(:delete, 'v1/{+name}', options)
1154
990
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1155
991
  command.response_class = Google::Apis::SpannerV1::Empty
1156
992
  command.params['name'] = name unless name.nil?
1157
- command.query['fields'] = fields unless fields.nil?
1158
993
  command.query['quotaUser'] = quota_user unless quota_user.nil?
994
+ command.query['fields'] = fields unless fields.nil?
1159
995
  execute_or_queue_command(command, &block)
1160
996
  end
1161
997
 
@@ -1166,11 +1002,11 @@ module Google
1166
1002
  # @param [String] session
1167
1003
  # Required. The session in which the transaction runs.
1168
1004
  # @param [Google::Apis::SpannerV1::BeginTransactionRequest] begin_transaction_request_object
1169
- # @param [String] fields
1170
- # Selector specifying which fields to include in a partial response.
1171
1005
  # @param [String] quota_user
1172
1006
  # Available to use for quota purposes for server-side applications. Can be any
1173
1007
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1008
+ # @param [String] fields
1009
+ # Selector specifying which fields to include in a partial response.
1174
1010
  # @param [Google::Apis::RequestOptions] options
1175
1011
  # Request-specific options
1176
1012
  #
@@ -1183,15 +1019,15 @@ module Google
1183
1019
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1184
1020
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1185
1021
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1186
- def begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1022
+ def begin_session_transaction(session, begin_transaction_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1187
1023
  command = make_simple_command(:post, 'v1/{+session}:beginTransaction', options)
1188
1024
  command.request_representation = Google::Apis::SpannerV1::BeginTransactionRequest::Representation
1189
1025
  command.request_object = begin_transaction_request_object
1190
1026
  command.response_representation = Google::Apis::SpannerV1::Transaction::Representation
1191
1027
  command.response_class = Google::Apis::SpannerV1::Transaction
1192
1028
  command.params['session'] = session unless session.nil?
1193
- command.query['fields'] = fields unless fields.nil?
1194
1029
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1030
+ command.query['fields'] = fields unless fields.nil?
1195
1031
  execute_or_queue_command(command, &block)
1196
1032
  end
1197
1033
 
@@ -1205,11 +1041,11 @@ module Google
1205
1041
  # @param [String] session
1206
1042
  # Required. The session in which the transaction to be committed is running.
1207
1043
  # @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object
1208
- # @param [String] fields
1209
- # Selector specifying which fields to include in a partial response.
1210
1044
  # @param [String] quota_user
1211
1045
  # Available to use for quota purposes for server-side applications. Can be any
1212
1046
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1047
+ # @param [String] fields
1048
+ # Selector specifying which fields to include in a partial response.
1213
1049
  # @param [Google::Apis::RequestOptions] options
1214
1050
  # Request-specific options
1215
1051
  #
@@ -1222,15 +1058,15 @@ module Google
1222
1058
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1223
1059
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1224
1060
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1225
- def commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1061
+ def commit_session(session, commit_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1226
1062
  command = make_simple_command(:post, 'v1/{+session}:commit', options)
1227
1063
  command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation
1228
1064
  command.request_object = commit_request_object
1229
1065
  command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation
1230
1066
  command.response_class = Google::Apis::SpannerV1::CommitResponse
1231
1067
  command.params['session'] = session unless session.nil?
1232
- command.query['fields'] = fields unless fields.nil?
1233
1068
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1069
+ command.query['fields'] = fields unless fields.nil?
1234
1070
  execute_or_queue_command(command, &block)
1235
1071
  end
1236
1072
 
@@ -1246,11 +1082,11 @@ module Google
1246
1082
  # @param [String] session
1247
1083
  # Required. The session in which the SQL query should be performed.
1248
1084
  # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object
1249
- # @param [String] fields
1250
- # Selector specifying which fields to include in a partial response.
1251
1085
  # @param [String] quota_user
1252
1086
  # Available to use for quota purposes for server-side applications. Can be any
1253
1087
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1088
+ # @param [String] fields
1089
+ # Selector specifying which fields to include in a partial response.
1254
1090
  # @param [Google::Apis::RequestOptions] options
1255
1091
  # Request-specific options
1256
1092
  #
@@ -1263,15 +1099,179 @@ module Google
1263
1099
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1264
1100
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1265
1101
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1266
- def execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1102
+ def execute_session_sql(session, execute_sql_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1267
1103
  command = make_simple_command(:post, 'v1/{+session}:executeSql', options)
1268
1104
  command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation
1269
1105
  command.request_object = execute_sql_request_object
1270
1106
  command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
1271
1107
  command.response_class = Google::Apis::SpannerV1::ResultSet
1272
1108
  command.params['session'] = session unless session.nil?
1109
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1110
+ command.query['fields'] = fields unless fields.nil?
1111
+ execute_or_queue_command(command, &block)
1112
+ end
1113
+
1114
+ # Rolls back a transaction, releasing any locks it holds. It is a good
1115
+ # idea to call this for any transaction that includes one or more
1116
+ # Read or ExecuteSql requests and
1117
+ # ultimately decides not to commit.
1118
+ # `Rollback` returns `OK` if it successfully aborts the transaction, the
1119
+ # transaction was already aborted, or the transaction is not
1120
+ # found. `Rollback` never returns `ABORTED`.
1121
+ # @param [String] session
1122
+ # Required. The session in which the transaction to roll back is running.
1123
+ # @param [Google::Apis::SpannerV1::RollbackRequest] rollback_request_object
1124
+ # @param [String] quota_user
1125
+ # Available to use for quota purposes for server-side applications. Can be any
1126
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1127
+ # @param [String] fields
1128
+ # Selector specifying which fields to include in a partial response.
1129
+ # @param [Google::Apis::RequestOptions] options
1130
+ # Request-specific options
1131
+ #
1132
+ # @yield [result, err] Result & error if block supplied
1133
+ # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object
1134
+ # @yieldparam err [StandardError] error object if request failed
1135
+ #
1136
+ # @return [Google::Apis::SpannerV1::Empty]
1137
+ #
1138
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1139
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1140
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1141
+ def rollback_session(session, rollback_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1142
+ command = make_simple_command(:post, 'v1/{+session}:rollback', options)
1143
+ command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation
1144
+ command.request_object = rollback_request_object
1145
+ command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1146
+ command.response_class = Google::Apis::SpannerV1::Empty
1147
+ command.params['session'] = session unless session.nil?
1148
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1149
+ command.query['fields'] = fields unless fields.nil?
1150
+ execute_or_queue_command(command, &block)
1151
+ end
1152
+
1153
+ # Like Read, except returns the result set as a
1154
+ # stream. Unlike Read, there is no limit on the
1155
+ # size of the returned result set. However, no individual row in
1156
+ # the result set can exceed 100 MiB, and no column value can exceed
1157
+ # 10 MiB.
1158
+ # @param [String] session
1159
+ # Required. The session in which the read should be performed.
1160
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1161
+ # @param [String] quota_user
1162
+ # Available to use for quota purposes for server-side applications. Can be any
1163
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1164
+ # @param [String] fields
1165
+ # Selector specifying which fields to include in a partial response.
1166
+ # @param [Google::Apis::RequestOptions] options
1167
+ # Request-specific options
1168
+ #
1169
+ # @yield [result, err] Result & error if block supplied
1170
+ # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object
1171
+ # @yieldparam err [StandardError] error object if request failed
1172
+ #
1173
+ # @return [Google::Apis::SpannerV1::PartialResultSet]
1174
+ #
1175
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1176
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1177
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1178
+ def streaming_project_instance_database_session_read(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1179
+ command = make_simple_command(:post, 'v1/{+session}:streamingRead', options)
1180
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1181
+ command.request_object = read_request_object
1182
+ command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation
1183
+ command.response_class = Google::Apis::SpannerV1::PartialResultSet
1184
+ command.params['session'] = session unless session.nil?
1185
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1186
+ command.query['fields'] = fields unless fields.nil?
1187
+ execute_or_queue_command(command, &block)
1188
+ end
1189
+
1190
+ # Creates a new session. A session can be used to perform
1191
+ # transactions that read and/or modify data in a Cloud Spanner database.
1192
+ # Sessions are meant to be reused for many consecutive
1193
+ # transactions.
1194
+ # Sessions can only execute one transaction at a time. To execute
1195
+ # multiple concurrent read-write/write-only transactions, create
1196
+ # multiple sessions. Note that standalone reads and queries use a
1197
+ # transaction internally, and count toward the one transaction
1198
+ # limit.
1199
+ # Cloud Spanner limits the number of sessions that can exist at any given
1200
+ # time; thus, it is a good idea to delete idle and/or unneeded sessions.
1201
+ # Aside from explicit deletes, Cloud Spanner can delete sessions for which no
1202
+ # operations are sent for more than an hour. If a session is deleted,
1203
+ # requests to it return `NOT_FOUND`.
1204
+ # Idle sessions can be kept alive by sending a trivial SQL query
1205
+ # periodically, e.g., `"SELECT 1"`.
1206
+ # @param [String] database
1207
+ # Required. The database in which the new session is created.
1208
+ # @param [String] quota_user
1209
+ # Available to use for quota purposes for server-side applications. Can be any
1210
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1211
+ # @param [String] fields
1212
+ # Selector specifying which fields to include in a partial response.
1213
+ # @param [Google::Apis::RequestOptions] options
1214
+ # Request-specific options
1215
+ #
1216
+ # @yield [result, err] Result & error if block supplied
1217
+ # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object
1218
+ # @yieldparam err [StandardError] error object if request failed
1219
+ #
1220
+ # @return [Google::Apis::SpannerV1::Session]
1221
+ #
1222
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1223
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1224
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1225
+ def create_project_instance_database_session(database, quota_user: nil, fields: nil, options: nil, &block)
1226
+ command = make_simple_command(:post, 'v1/{+database}/sessions', options)
1227
+ command.response_representation = Google::Apis::SpannerV1::Session::Representation
1228
+ command.response_class = Google::Apis::SpannerV1::Session
1229
+ command.params['database'] = database unless database.nil?
1230
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
1231
  command.query['fields'] = fields unless fields.nil?
1232
+ execute_or_queue_command(command, &block)
1233
+ end
1234
+
1235
+ # Reads rows from the database using key lookups and scans, as a
1236
+ # simple key/value style alternative to
1237
+ # ExecuteSql. This method cannot be used to
1238
+ # return a result set larger than 10 MiB; if the read matches more
1239
+ # data than that, the read fails with a `FAILED_PRECONDITION`
1240
+ # error.
1241
+ # Reads inside read-write transactions might return `ABORTED`. If
1242
+ # this occurs, the application should restart the transaction from
1243
+ # the beginning. See Transaction for more details.
1244
+ # Larger result sets can be yielded in streaming fashion by calling
1245
+ # StreamingRead instead.
1246
+ # @param [String] session
1247
+ # Required. The session in which the read should be performed.
1248
+ # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object
1249
+ # @param [String] quota_user
1250
+ # Available to use for quota purposes for server-side applications. Can be any
1251
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1252
+ # @param [String] fields
1253
+ # Selector specifying which fields to include in a partial response.
1254
+ # @param [Google::Apis::RequestOptions] options
1255
+ # Request-specific options
1256
+ #
1257
+ # @yield [result, err] Result & error if block supplied
1258
+ # @yieldparam result [Google::Apis::SpannerV1::ResultSet] parsed result object
1259
+ # @yieldparam err [StandardError] error object if request failed
1260
+ #
1261
+ # @return [Google::Apis::SpannerV1::ResultSet]
1262
+ #
1263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1266
+ def read_session(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1267
+ command = make_simple_command(:post, 'v1/{+session}:read', options)
1268
+ command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation
1269
+ command.request_object = read_request_object
1270
+ command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation
1271
+ command.response_class = Google::Apis::SpannerV1::ResultSet
1272
+ command.params['session'] = session unless session.nil?
1274
1273
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1274
+ command.query['fields'] = fields unless fields.nil?
1275
1275
  execute_or_queue_command(command, &block)
1276
1276
  end
1277
1277
 
@@ -1287,11 +1287,11 @@ module Google
1287
1287
  # corresponding to `Code.CANCELLED`.
1288
1288
  # @param [String] name
1289
1289
  # The name of the operation resource to be cancelled.
1290
- # @param [String] fields
1291
- # Selector specifying which fields to include in a partial response.
1292
1290
  # @param [String] quota_user
1293
1291
  # Available to use for quota purposes for server-side applications. Can be any
1294
1292
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1293
+ # @param [String] fields
1294
+ # Selector specifying which fields to include in a partial response.
1295
1295
  # @param [Google::Apis::RequestOptions] options
1296
1296
  # Request-specific options
1297
1297
  #
@@ -1304,13 +1304,13 @@ module Google
1304
1304
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1305
1305
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1306
1306
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1307
- def cancel_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1307
+ def cancel_project_instance_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1308
1308
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1309
1309
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1310
1310
  command.response_class = Google::Apis::SpannerV1::Empty
1311
1311
  command.params['name'] = name unless name.nil?
1312
- command.query['fields'] = fields unless fields.nil?
1313
1312
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1313
+ command.query['fields'] = fields unless fields.nil?
1314
1314
  execute_or_queue_command(command, &block)
1315
1315
  end
1316
1316
 
@@ -1320,11 +1320,11 @@ module Google
1320
1320
  # `google.rpc.Code.UNIMPLEMENTED`.
1321
1321
  # @param [String] name
1322
1322
  # The name of the operation resource to be deleted.
1323
- # @param [String] fields
1324
- # Selector specifying which fields to include in a partial response.
1325
1323
  # @param [String] quota_user
1326
1324
  # Available to use for quota purposes for server-side applications. Can be any
1327
1325
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1326
+ # @param [String] fields
1327
+ # Selector specifying which fields to include in a partial response.
1328
1328
  # @param [Google::Apis::RequestOptions] options
1329
1329
  # Request-specific options
1330
1330
  #
@@ -1337,13 +1337,13 @@ module Google
1337
1337
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1338
1338
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1339
1339
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1340
- def delete_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1340
+ def delete_project_instance_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1341
1341
  command = make_simple_command(:delete, 'v1/{+name}', options)
1342
1342
  command.response_representation = Google::Apis::SpannerV1::Empty::Representation
1343
1343
  command.response_class = Google::Apis::SpannerV1::Empty
1344
1344
  command.params['name'] = name unless name.nil?
1345
- command.query['fields'] = fields unless fields.nil?
1346
1345
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1346
+ command.query['fields'] = fields unless fields.nil?
1347
1347
  execute_or_queue_command(command, &block)
1348
1348
  end
1349
1349
 
@@ -1359,11 +1359,11 @@ module Google
1359
1359
  # The standard list page token.
1360
1360
  # @param [Fixnum] page_size
1361
1361
  # The standard list page size.
1362
- # @param [String] fields
1363
- # Selector specifying which fields to include in a partial response.
1364
1362
  # @param [String] quota_user
1365
1363
  # Available to use for quota purposes for server-side applications. Can be any
1366
1364
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1365
+ # @param [String] fields
1366
+ # Selector specifying which fields to include in a partial response.
1367
1367
  # @param [Google::Apis::RequestOptions] options
1368
1368
  # Request-specific options
1369
1369
  #
@@ -1376,7 +1376,7 @@ module Google
1376
1376
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1377
1377
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1378
1378
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1379
- def list_project_instance_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1379
+ def list_project_instance_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1380
1380
  command = make_simple_command(:get, 'v1/{+name}', options)
1381
1381
  command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation
1382
1382
  command.response_class = Google::Apis::SpannerV1::ListOperationsResponse
@@ -1384,8 +1384,8 @@ module Google
1384
1384
  command.query['filter'] = filter unless filter.nil?
1385
1385
  command.query['pageToken'] = page_token unless page_token.nil?
1386
1386
  command.query['pageSize'] = page_size unless page_size.nil?
1387
- command.query['fields'] = fields unless fields.nil?
1388
1387
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1388
+ command.query['fields'] = fields unless fields.nil?
1389
1389
  execute_or_queue_command(command, &block)
1390
1390
  end
1391
1391
 
@@ -1394,11 +1394,11 @@ module Google
1394
1394
  # service.
1395
1395
  # @param [String] name
1396
1396
  # The name of the operation resource.
1397
- # @param [String] fields
1398
- # Selector specifying which fields to include in a partial response.
1399
1397
  # @param [String] quota_user
1400
1398
  # Available to use for quota purposes for server-side applications. Can be any
1401
1399
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1400
+ # @param [String] fields
1401
+ # Selector specifying which fields to include in a partial response.
1402
1402
  # @param [Google::Apis::RequestOptions] options
1403
1403
  # Request-specific options
1404
1404
  #
@@ -1411,13 +1411,13 @@ module Google
1411
1411
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1412
1412
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1413
1413
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1414
- def get_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1414
+ def get_project_instance_operation(name, quota_user: nil, fields: nil, options: nil, &block)
1415
1415
  command = make_simple_command(:get, 'v1/{+name}', options)
1416
1416
  command.response_representation = Google::Apis::SpannerV1::Operation::Representation
1417
1417
  command.response_class = Google::Apis::SpannerV1::Operation
1418
1418
  command.params['name'] = name unless name.nil?
1419
- command.query['fields'] = fields unless fields.nil?
1420
1419
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1420
+ command.query['fields'] = fields unless fields.nil?
1421
1421
  execute_or_queue_command(command, &block)
1422
1422
  end
1423
1423
 
@@ -1433,11 +1433,11 @@ module Google
1433
1433
  # @param [Fixnum] page_size
1434
1434
  # Number of instance configurations to be returned in the response. If 0 or
1435
1435
  # less, defaults to the server's maximum allowed page size.
1436
- # @param [String] fields
1437
- # Selector specifying which fields to include in a partial response.
1438
1436
  # @param [String] quota_user
1439
1437
  # Available to use for quota purposes for server-side applications. Can be any
1440
1438
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1439
+ # @param [String] fields
1440
+ # Selector specifying which fields to include in a partial response.
1441
1441
  # @param [Google::Apis::RequestOptions] options
1442
1442
  # Request-specific options
1443
1443
  #
@@ -1450,15 +1450,15 @@ module Google
1450
1450
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1451
1451
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1452
1452
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1453
- def list_project_instance_configs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1453
+ def list_project_instance_configs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1454
1454
  command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options)
1455
1455
  command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation
1456
1456
  command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse
1457
1457
  command.params['parent'] = parent unless parent.nil?
1458
1458
  command.query['pageToken'] = page_token unless page_token.nil?
1459
1459
  command.query['pageSize'] = page_size unless page_size.nil?
1460
- command.query['fields'] = fields unless fields.nil?
1461
1460
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1461
+ command.query['fields'] = fields unless fields.nil?
1462
1462
  execute_or_queue_command(command, &block)
1463
1463
  end
1464
1464
 
@@ -1466,11 +1466,11 @@ module Google
1466
1466
  # @param [String] name
1467
1467
  # Required. The name of the requested instance configuration. Values are of
1468
1468
  # the form `projects/<project>/instanceConfigs/<config>`.
1469
- # @param [String] fields
1470
- # Selector specifying which fields to include in a partial response.
1471
1469
  # @param [String] quota_user
1472
1470
  # Available to use for quota purposes for server-side applications. Can be any
1473
1471
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1472
+ # @param [String] fields
1473
+ # Selector specifying which fields to include in a partial response.
1474
1474
  # @param [Google::Apis::RequestOptions] options
1475
1475
  # Request-specific options
1476
1476
  #
@@ -1483,21 +1483,21 @@ module Google
1483
1483
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1484
1484
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1485
1485
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1486
- def get_project_instance_config(name, fields: nil, quota_user: nil, options: nil, &block)
1486
+ def get_project_instance_config(name, quota_user: nil, fields: nil, options: nil, &block)
1487
1487
  command = make_simple_command(:get, 'v1/{+name}', options)
1488
1488
  command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation
1489
1489
  command.response_class = Google::Apis::SpannerV1::InstanceConfig
1490
1490
  command.params['name'] = name unless name.nil?
1491
- command.query['fields'] = fields unless fields.nil?
1492
1491
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1492
+ command.query['fields'] = fields unless fields.nil?
1493
1493
  execute_or_queue_command(command, &block)
1494
1494
  end
1495
1495
 
1496
1496
  protected
1497
1497
 
1498
1498
  def apply_command_defaults(command)
1499
- command.query['key'] = key unless key.nil?
1500
1499
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1500
+ command.query['key'] = key unless key.nil?
1501
1501
  end
1502
1502
  end
1503
1503
  end