google-cloud-spanner-admin-database-v1 0.6.1 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d585ec1bbd13fc813c6029492a79421954134c1a9c9accfcebe4d01b0b3da6f
4
- data.tar.gz: a772c4977833e04397445ddfe51c95babc5eb00bb43dc858478ca22096e6049d
3
+ metadata.gz: 812a5059bcfc37d350244a986272e0c8645eb484cad1cff6b456b9cb3ab7bff1
4
+ data.tar.gz: 44f4c623513fb2773d925174f3f1e4796c1092a9d2e91a457c01d3afe3528933
5
5
  SHA512:
6
- metadata.gz: 14ced10bc624d98daff668c62b774d458631a82b1a4bdbb3cc99b4ff2a90963631b259e2d361a7a579378d034e753359ba3b768fd30b4abe9b887d07706a0857
7
- data.tar.gz: 6e6f227bccf2efde4551196c9252bd6eb1e5ca1f924206454c5126d4c6a5b6368e8df5639cc8e0a407056b06ed885140e516bba224478f4ec5cc5d82f98b4077
6
+ metadata.gz: 103cf225a285f56eef7ecbb12c53942f0e29699c79fe34c932cb5ce3cc9bdf6e1d3922beef7befae5eb645ff7747f1ca086f1f45050f6e0e0a03593936890934
7
+ data.tar.gz: 788c17bca99fc2cf7b9b76ad12bd584543f9fb9816643423130ed3bb9bc2693f1bf815db09e1189a9bd0adf95716627d2baa3ebae70cbd188122799af2ad0251
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-spanner-admin-database-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Credentials}):
68
68
 
69
- 1. `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `SPANNER_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `SPANNER_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/spanner/admin/database/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.ne
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/spanner/admin/database/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.ne
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/spanner/admin/database/v1"
data/README.md CHANGED
@@ -9,7 +9,7 @@ https://github.com/googleapis/google-cloud-ruby
9
9
  This gem is a _versioned_ client. It provides basic client classes for a
10
10
  specific version of the Cloud Spanner Database Admin V1 API. Most users should consider using
11
11
  the main client gem,
12
- [google-cloud-spanner-admin-database](https://rubygems.org/gems/google-cloud-spanner-admin-database).
12
+ [google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner).
13
13
  See the section below titled *Which client should I use?* for more information.
14
14
 
15
15
  ## Installation
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/spanner/admin/database/v1"
34
34
 
35
35
  client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_databases request
38
38
  ```
39
39
 
@@ -83,7 +83,7 @@ about the Ruby support schedule.
83
83
  ## Which client should I use?
84
84
 
85
85
  Most modern Ruby client libraries for Google APIs come in two flavors: the main
86
- client library with a name such as `google-cloud-spanner-admin-database`,
86
+ client library with a name such as `google-cloud-spanner`,
87
87
  and lower-level _versioned_ client libraries with names such as
88
88
  `google-cloud-spanner-admin-database-v1`.
89
89
  _In most cases, you should install the main client._
@@ -110,7 +110,7 @@ service version.
110
110
 
111
111
  We recommend that most users install the main client gem for a service. You can
112
112
  identify this gem as the one _without_ a version in its name, e.g.
113
- `google-cloud-spanner-admin-database`.
113
+ `google-cloud-spanner`.
114
114
  The main client is recommended because it will embody the best practices for
115
115
  accessing the service, and may also provide more convenient interfaces or
116
116
  tighter integration into frameworks and third-party libraries. In addition, the
@@ -48,13 +48,12 @@ module Google
48
48
  # See {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client::Configuration}
49
49
  # for a description of the configuration fields.
50
50
  #
51
- # ## Example
51
+ # @example
52
52
  #
53
- # To modify the configuration for all DatabaseAdmin clients:
54
- #
55
- # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
56
- # config.timeout = 10.0
57
- # end
53
+ # # Modify the configuration for all DatabaseAdmin clients
54
+ # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
58
57
  #
59
58
  # @yield [config] Configure the Client client.
60
59
  # @yieldparam config [Client::Configuration]
@@ -74,54 +73,36 @@ module Google
74
73
 
75
74
  default_config.rpcs.list_databases.timeout = 3600.0
76
75
  default_config.rpcs.list_databases.retry_policy = {
77
- initial_delay: 1.0,
78
- max_delay: 32.0,
79
- multiplier: 1.3,
80
- retry_codes: [14, 4]
76
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
81
77
  }
82
78
 
83
79
  default_config.rpcs.create_database.timeout = 3600.0
84
80
 
85
81
  default_config.rpcs.get_database.timeout = 3600.0
86
82
  default_config.rpcs.get_database.retry_policy = {
87
- initial_delay: 1.0,
88
- max_delay: 32.0,
89
- multiplier: 1.3,
90
- retry_codes: [14, 4]
83
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
91
84
  }
92
85
 
93
86
  default_config.rpcs.update_database_ddl.timeout = 3600.0
94
87
  default_config.rpcs.update_database_ddl.retry_policy = {
95
- initial_delay: 1.0,
96
- max_delay: 32.0,
97
- multiplier: 1.3,
98
- retry_codes: [14, 4]
88
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
99
89
  }
100
90
 
101
91
  default_config.rpcs.drop_database.timeout = 3600.0
102
92
  default_config.rpcs.drop_database.retry_policy = {
103
- initial_delay: 1.0,
104
- max_delay: 32.0,
105
- multiplier: 1.3,
106
- retry_codes: [14, 4]
93
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
107
94
  }
108
95
 
109
96
  default_config.rpcs.get_database_ddl.timeout = 3600.0
110
97
  default_config.rpcs.get_database_ddl.retry_policy = {
111
- initial_delay: 1.0,
112
- max_delay: 32.0,
113
- multiplier: 1.3,
114
- retry_codes: [14, 4]
98
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
115
99
  }
116
100
 
117
101
  default_config.rpcs.set_iam_policy.timeout = 30.0
118
102
 
119
103
  default_config.rpcs.get_iam_policy.timeout = 30.0
120
104
  default_config.rpcs.get_iam_policy.retry_policy = {
121
- initial_delay: 1.0,
122
- max_delay: 32.0,
123
- multiplier: 1.3,
124
- retry_codes: [14, 4]
105
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
125
106
  }
126
107
 
127
108
  default_config.rpcs.test_iam_permissions.timeout = 30.0
@@ -130,52 +111,34 @@ module Google
130
111
 
131
112
  default_config.rpcs.get_backup.timeout = 3600.0
132
113
  default_config.rpcs.get_backup.retry_policy = {
133
- initial_delay: 1.0,
134
- max_delay: 32.0,
135
- multiplier: 1.3,
136
- retry_codes: [14, 4]
114
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
137
115
  }
138
116
 
139
117
  default_config.rpcs.update_backup.timeout = 3600.0
140
118
  default_config.rpcs.update_backup.retry_policy = {
141
- initial_delay: 1.0,
142
- max_delay: 32.0,
143
- multiplier: 1.3,
144
- retry_codes: [14, 4]
119
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
145
120
  }
146
121
 
147
122
  default_config.rpcs.delete_backup.timeout = 3600.0
148
123
  default_config.rpcs.delete_backup.retry_policy = {
149
- initial_delay: 1.0,
150
- max_delay: 32.0,
151
- multiplier: 1.3,
152
- retry_codes: [14, 4]
124
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
153
125
  }
154
126
 
155
127
  default_config.rpcs.list_backups.timeout = 3600.0
156
128
  default_config.rpcs.list_backups.retry_policy = {
157
- initial_delay: 1.0,
158
- max_delay: 32.0,
159
- multiplier: 1.3,
160
- retry_codes: [14, 4]
129
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
161
130
  }
162
131
 
163
132
  default_config.rpcs.restore_database.timeout = 3600.0
164
133
 
165
134
  default_config.rpcs.list_database_operations.timeout = 3600.0
166
135
  default_config.rpcs.list_database_operations.retry_policy = {
167
- initial_delay: 1.0,
168
- max_delay: 32.0,
169
- multiplier: 1.3,
170
- retry_codes: [14, 4]
136
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
171
137
  }
172
138
 
173
139
  default_config.rpcs.list_backup_operations.timeout = 3600.0
174
140
  default_config.rpcs.list_backup_operations.retry_policy = {
175
- initial_delay: 1.0,
176
- max_delay: 32.0,
177
- multiplier: 1.3,
178
- retry_codes: [14, 4]
141
+ initial_delay: 1.0, max_delay: 32.0, multiplier: 1.3, retry_codes: [14, 4]
179
142
  }
180
143
 
181
144
  default_config
@@ -207,19 +170,15 @@ module Google
207
170
  ##
208
171
  # Create a new DatabaseAdmin client object.
209
172
  #
210
- # ## Examples
211
- #
212
- # To create a new DatabaseAdmin client with the default
213
- # configuration:
214
- #
215
- # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
173
+ # @example
216
174
  #
217
- # To create a new DatabaseAdmin client with a custom
218
- # configuration:
175
+ # # Create a client using the default configuration
176
+ # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
219
177
  #
220
- # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
221
- # config.timeout = 10.0
222
- # end
178
+ # # Create a client using a custom configuration
179
+ # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
180
+ # config.timeout = 10.0
181
+ # end
223
182
  #
224
183
  # @yield [config] Configure the DatabaseAdmin client.
225
184
  # @yieldparam config [Client::Configuration]
@@ -239,14 +198,13 @@ module Google
239
198
 
240
199
  # Create credentials
241
200
  credentials = @config.credentials
242
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
201
+ # Use self-signed JWT if the endpoint is unchanged from default,
243
202
  # but only if the default endpoint does not have a region prefix.
244
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
245
- @config.endpoint == Client.configure.endpoint &&
203
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
246
204
  !@config.endpoint.split(".").first.include?("-")
247
205
  credentials ||= Credentials.default scope: @config.scope,
248
206
  enable_self_signed_jwt: enable_self_signed_jwt
249
- if credentials.is_a?(String) || credentials.is_a?(Hash)
207
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
250
208
  credentials = Credentials.new credentials, scope: @config.scope
251
209
  end
252
210
  @quota_project_id = @config.quota_project
@@ -338,7 +296,9 @@ module Google
338
296
  options.apply_defaults timeout: @config.rpcs.list_databases.timeout,
339
297
  metadata: metadata,
340
298
  retry_policy: @config.rpcs.list_databases.retry_policy
341
- options.apply_defaults metadata: @config.metadata,
299
+
300
+ options.apply_defaults timeout: @config.timeout,
301
+ metadata: @config.metadata,
342
302
  retry_policy: @config.retry_policy
343
303
 
344
304
  @database_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
@@ -428,7 +388,9 @@ module Google
428
388
  options.apply_defaults timeout: @config.rpcs.create_database.timeout,
429
389
  metadata: metadata,
430
390
  retry_policy: @config.rpcs.create_database.retry_policy
431
- options.apply_defaults metadata: @config.metadata,
391
+
392
+ options.apply_defaults timeout: @config.timeout,
393
+ metadata: @config.metadata,
432
394
  retry_policy: @config.retry_policy
433
395
 
434
396
  @database_admin_stub.call_rpc :create_database, request, options: options do |response, operation|
@@ -496,7 +458,9 @@ module Google
496
458
  options.apply_defaults timeout: @config.rpcs.get_database.timeout,
497
459
  metadata: metadata,
498
460
  retry_policy: @config.rpcs.get_database.retry_policy
499
- options.apply_defaults metadata: @config.metadata,
461
+
462
+ options.apply_defaults timeout: @config.timeout,
463
+ metadata: @config.metadata,
500
464
  retry_policy: @config.retry_policy
501
465
 
502
466
  @database_admin_stub.call_rpc :get_database, request, options: options do |response, operation|
@@ -590,7 +554,9 @@ module Google
590
554
  options.apply_defaults timeout: @config.rpcs.update_database_ddl.timeout,
591
555
  metadata: metadata,
592
556
  retry_policy: @config.rpcs.update_database_ddl.retry_policy
593
- options.apply_defaults metadata: @config.metadata,
557
+
558
+ options.apply_defaults timeout: @config.timeout,
559
+ metadata: @config.metadata,
594
560
  retry_policy: @config.retry_policy
595
561
 
596
562
  @database_admin_stub.call_rpc :update_database_ddl, request, options: options do |response, operation|
@@ -659,7 +625,9 @@ module Google
659
625
  options.apply_defaults timeout: @config.rpcs.drop_database.timeout,
660
626
  metadata: metadata,
661
627
  retry_policy: @config.rpcs.drop_database.retry_policy
662
- options.apply_defaults metadata: @config.metadata,
628
+
629
+ options.apply_defaults timeout: @config.timeout,
630
+ metadata: @config.metadata,
663
631
  retry_policy: @config.retry_policy
664
632
 
665
633
  @database_admin_stub.call_rpc :drop_database, request, options: options do |response, operation|
@@ -729,7 +697,9 @@ module Google
729
697
  options.apply_defaults timeout: @config.rpcs.get_database_ddl.timeout,
730
698
  metadata: metadata,
731
699
  retry_policy: @config.rpcs.get_database_ddl.retry_policy
732
- options.apply_defaults metadata: @config.metadata,
700
+
701
+ options.apply_defaults timeout: @config.timeout,
702
+ metadata: @config.metadata,
733
703
  retry_policy: @config.retry_policy
734
704
 
735
705
  @database_admin_stub.call_rpc :get_database_ddl, request, options: options do |response, operation|
@@ -807,7 +777,9 @@ module Google
807
777
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
808
778
  metadata: metadata,
809
779
  retry_policy: @config.rpcs.set_iam_policy.retry_policy
810
- options.apply_defaults metadata: @config.metadata,
780
+
781
+ options.apply_defaults timeout: @config.timeout,
782
+ metadata: @config.metadata,
811
783
  retry_policy: @config.retry_policy
812
784
 
813
785
  @database_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
@@ -884,7 +856,9 @@ module Google
884
856
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
885
857
  metadata: metadata,
886
858
  retry_policy: @config.rpcs.get_iam_policy.retry_policy
887
- options.apply_defaults metadata: @config.metadata,
859
+
860
+ options.apply_defaults timeout: @config.timeout,
861
+ metadata: @config.metadata,
888
862
  retry_policy: @config.retry_policy
889
863
 
890
864
  @database_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
@@ -965,7 +939,9 @@ module Google
965
939
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
966
940
  metadata: metadata,
967
941
  retry_policy: @config.rpcs.test_iam_permissions.retry_policy
968
- options.apply_defaults metadata: @config.metadata,
942
+
943
+ options.apply_defaults timeout: @config.timeout,
944
+ metadata: @config.metadata,
969
945
  retry_policy: @config.retry_policy
970
946
 
971
947
  @database_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
@@ -1059,7 +1035,9 @@ module Google
1059
1035
  options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
1060
1036
  metadata: metadata,
1061
1037
  retry_policy: @config.rpcs.create_backup.retry_policy
1062
- options.apply_defaults metadata: @config.metadata,
1038
+
1039
+ options.apply_defaults timeout: @config.timeout,
1040
+ metadata: @config.metadata,
1063
1041
  retry_policy: @config.retry_policy
1064
1042
 
1065
1043
  @database_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
@@ -1128,7 +1106,9 @@ module Google
1128
1106
  options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
1129
1107
  metadata: metadata,
1130
1108
  retry_policy: @config.rpcs.get_backup.retry_policy
1131
- options.apply_defaults metadata: @config.metadata,
1109
+
1110
+ options.apply_defaults timeout: @config.timeout,
1111
+ metadata: @config.metadata,
1132
1112
  retry_policy: @config.retry_policy
1133
1113
 
1134
1114
  @database_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
@@ -1203,7 +1183,9 @@ module Google
1203
1183
  options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
1204
1184
  metadata: metadata,
1205
1185
  retry_policy: @config.rpcs.update_backup.retry_policy
1206
- options.apply_defaults metadata: @config.metadata,
1186
+
1187
+ options.apply_defaults timeout: @config.timeout,
1188
+ metadata: @config.metadata,
1207
1189
  retry_policy: @config.retry_policy
1208
1190
 
1209
1191
  @database_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
@@ -1271,7 +1253,9 @@ module Google
1271
1253
  options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
1272
1254
  metadata: metadata,
1273
1255
  retry_policy: @config.rpcs.delete_backup.retry_policy
1274
- options.apply_defaults metadata: @config.metadata,
1256
+
1257
+ options.apply_defaults timeout: @config.timeout,
1258
+ metadata: @config.metadata,
1275
1259
  retry_policy: @config.retry_policy
1276
1260
 
1277
1261
  @database_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
@@ -1384,7 +1368,9 @@ module Google
1384
1368
  options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
1385
1369
  metadata: metadata,
1386
1370
  retry_policy: @config.rpcs.list_backups.retry_policy
1387
- options.apply_defaults metadata: @config.metadata,
1371
+
1372
+ options.apply_defaults timeout: @config.timeout,
1373
+ metadata: @config.metadata,
1388
1374
  retry_policy: @config.retry_policy
1389
1375
 
1390
1376
  @database_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
@@ -1486,7 +1472,9 @@ module Google
1486
1472
  options.apply_defaults timeout: @config.rpcs.restore_database.timeout,
1487
1473
  metadata: metadata,
1488
1474
  retry_policy: @config.rpcs.restore_database.retry_policy
1489
- options.apply_defaults metadata: @config.metadata,
1475
+
1476
+ options.apply_defaults timeout: @config.timeout,
1477
+ metadata: @config.metadata,
1490
1478
  retry_policy: @config.retry_policy
1491
1479
 
1492
1480
  @database_admin_stub.call_rpc :restore_database, request, options: options do |response, operation|
@@ -1610,7 +1598,9 @@ module Google
1610
1598
  options.apply_defaults timeout: @config.rpcs.list_database_operations.timeout,
1611
1599
  metadata: metadata,
1612
1600
  retry_policy: @config.rpcs.list_database_operations.retry_policy
1613
- options.apply_defaults metadata: @config.metadata,
1601
+
1602
+ options.apply_defaults timeout: @config.timeout,
1603
+ metadata: @config.metadata,
1614
1604
  retry_policy: @config.retry_policy
1615
1605
 
1616
1606
  @database_admin_stub.call_rpc :list_database_operations, request, options: options do |response, operation|
@@ -1735,7 +1725,9 @@ module Google
1735
1725
  options.apply_defaults timeout: @config.rpcs.list_backup_operations.timeout,
1736
1726
  metadata: metadata,
1737
1727
  retry_policy: @config.rpcs.list_backup_operations.retry_policy
1738
- options.apply_defaults metadata: @config.metadata,
1728
+
1729
+ options.apply_defaults timeout: @config.timeout,
1730
+ metadata: @config.metadata,
1739
1731
  retry_policy: @config.retry_policy
1740
1732
 
1741
1733
  @database_admin_stub.call_rpc :list_backup_operations, request, options: options do |response, operation|
@@ -1761,22 +1753,21 @@ module Google
1761
1753
  # Configuration can be applied globally to all clients, or to a single client
1762
1754
  # on construction.
1763
1755
  #
1764
- # # Examples
1765
- #
1766
- # To modify the global config, setting the timeout for list_databases
1767
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1768
- #
1769
- # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
1770
- # config.timeout = 10.0
1771
- # config.rpcs.list_databases.timeout = 20.0
1772
- # end
1773
- #
1774
- # To apply the above configuration only to a new client:
1775
- #
1776
- # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
1777
- # config.timeout = 10.0
1778
- # config.rpcs.list_databases.timeout = 20.0
1779
- # end
1756
+ # @example
1757
+ #
1758
+ # # Modify the global config, setting the timeout for
1759
+ # # list_databases to 20 seconds,
1760
+ # # and all remaining timeouts to 10 seconds.
1761
+ # ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.configure do |config|
1762
+ # config.timeout = 10.0
1763
+ # config.rpcs.list_databases.timeout = 20.0
1764
+ # end
1765
+ #
1766
+ # # Apply the above configuration only to a new client.
1767
+ # client = ::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new do |config|
1768
+ # config.timeout = 10.0
1769
+ # config.rpcs.list_databases.timeout = 20.0
1770
+ # end
1780
1771
  #
1781
1772
  # @!attribute [rw] endpoint
1782
1773
  # The hostname or hostname:port of the service endpoint.
@@ -84,7 +84,7 @@ module Google
84
84
  # Create credentials
85
85
  credentials = @config.credentials
86
86
  credentials ||= Credentials.default scope: @config.scope
87
- if credentials.is_a?(String) || credentials.is_a?(Hash)
87
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
88
88
  credentials = Credentials.new credentials, scope: @config.scope
89
89
  end
90
90
  @quota_project_id = @config.quota_project
@@ -171,7 +171,9 @@ module Google
171
171
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
172
172
  metadata: metadata,
173
173
  retry_policy: @config.rpcs.list_operations.retry_policy
174
- options.apply_defaults metadata: @config.metadata,
174
+
175
+ options.apply_defaults timeout: @config.timeout,
176
+ metadata: @config.metadata,
175
177
  retry_policy: @config.retry_policy
176
178
 
177
179
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -241,7 +243,9 @@ module Google
241
243
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
242
244
  metadata: metadata,
243
245
  retry_policy: @config.rpcs.get_operation.retry_policy
244
- options.apply_defaults metadata: @config.metadata,
246
+
247
+ options.apply_defaults timeout: @config.timeout,
248
+ metadata: @config.metadata,
245
249
  retry_policy: @config.retry_policy
246
250
 
247
251
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -311,7 +315,9 @@ module Google
311
315
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
312
316
  metadata: metadata,
313
317
  retry_policy: @config.rpcs.delete_operation.retry_policy
314
- options.apply_defaults metadata: @config.metadata,
318
+
319
+ options.apply_defaults timeout: @config.timeout,
320
+ metadata: @config.metadata,
315
321
  retry_policy: @config.retry_policy
316
322
 
317
323
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -386,7 +392,9 @@ module Google
386
392
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
387
393
  metadata: metadata,
388
394
  retry_policy: @config.rpcs.cancel_operation.retry_policy
389
- options.apply_defaults metadata: @config.metadata,
395
+
396
+ options.apply_defaults timeout: @config.timeout,
397
+ metadata: @config.metadata,
390
398
  retry_policy: @config.retry_policy
391
399
 
392
400
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -398,9 +406,9 @@ module Google
398
406
  end
399
407
 
400
408
  ##
401
- # Waits for the specified long-running operation until it is done or reaches
402
- # at most a specified timeout, returning the latest state. If the operation
403
- # is already done, the latest state is immediately returned. If the timeout
409
+ # Waits until the specified long-running operation is done or reaches at most
410
+ # a specified timeout, returning the latest state. If the operation is
411
+ # already done, the latest state is immediately returned. If the timeout
404
412
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
405
413
  # timeout is used. If the server does not support this method, it returns
406
414
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -458,7 +466,9 @@ module Google
458
466
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
459
467
  metadata: metadata,
460
468
  retry_policy: @config.rpcs.wait_operation.retry_policy
461
- options.apply_defaults metadata: @config.metadata,
469
+
470
+ options.apply_defaults timeout: @config.timeout,
471
+ metadata: @config.metadata,
462
472
  retry_policy: @config.retry_policy
463
473
 
464
474
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -483,22 +493,21 @@ module Google
483
493
  # Configuration can be applied globally to all clients, or to a single client
484
494
  # on construction.
485
495
  #
486
- # # Examples
487
- #
488
- # To modify the global config, setting the timeout for list_operations
489
- # to 20 seconds, and all remaining timeouts to 10 seconds:
490
- #
491
- # ::Google::Longrunning::Operations::Client.configure do |config|
492
- # config.timeout = 10.0
493
- # config.rpcs.list_operations.timeout = 20.0
494
- # end
495
- #
496
- # To apply the above configuration only to a new client:
497
- #
498
- # client = ::Google::Longrunning::Operations::Client.new do |config|
499
- # config.timeout = 10.0
500
- # config.rpcs.list_operations.timeout = 20.0
501
- # end
496
+ # @example
497
+ #
498
+ # # Modify the global config, setting the timeout for
499
+ # # list_operations to 20 seconds,
500
+ # # and all remaining timeouts to 10 seconds.
501
+ # ::Google::Longrunning::Operations::Client.configure do |config|
502
+ # config.timeout = 10.0
503
+ # config.rpcs.list_operations.timeout = 20.0
504
+ # end
505
+ #
506
+ # # Apply the above configuration only to a new client.
507
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
508
+ # config.timeout = 10.0
509
+ # config.rpcs.list_operations.timeout = 20.0
510
+ # end
502
511
  #
503
512
  # @!attribute [rw] endpoint
504
513
  # The hostname or hostname:port of the service endpoint.
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Database
25
25
  module V1
26
- VERSION = "0.6.1"
26
+ VERSION = "0.7.3"
27
27
  end
28
28
  end
29
29
  end
@@ -31,6 +31,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
31
  repeated :encryption_info, :message, 8, "google.spanner.admin.database.v1.EncryptionInfo"
32
32
  optional :version_retention_period, :string, 6
33
33
  optional :earliest_version_time, :message, 7, "google.protobuf.Timestamp"
34
+ optional :default_leader, :string, 9
34
35
  end
35
36
  add_enum "google.spanner.admin.database.v1.Database.State" do
36
37
  value :STATE_UNSPECIFIED, 0
@@ -34,7 +34,7 @@ module Google
34
34
  # database and to restore from an existing backup.
35
35
  class Service
36
36
 
37
- include ::GRPC::GenericService
37
+ include GRPC::GenericService
38
38
 
39
39
  self.marshal_class_method = :encode
40
40
  self.unmarshal_class_method = :decode
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -85,6 +85,14 @@ module Google
85
85
  # the moment it is queried. If you are using this value to recover data, make
86
86
  # sure to account for the time from the moment when the value is queried to
87
87
  # the moment when you initiate the recovery.
88
+ # @!attribute [r] default_leader
89
+ # @return [::String]
90
+ # Output only. The read-write region which contains the database's leader
91
+ # replicas.
92
+ #
93
+ # This is the same as the value of default_leader
94
+ # database option set using DatabaseAdmin.CreateDatabase or
95
+ # DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
88
96
  class Database
89
97
  include ::Google::Protobuf::MessageExts
90
98
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -19,30 +19,53 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents an expression text. Example:
22
+ # Represents a textual expression in the Common Expression Language (CEL)
23
+ # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
24
+ # are documented at https://github.com/google/cel-spec.
23
25
  #
24
- # title: "User account presence"
25
- # description: "Determines whether the request has a user account"
26
- # expression: "size(request.user) > 0"
26
+ # Example (Comparison):
27
+ #
28
+ # title: "Summary size limit"
29
+ # description: "Determines if a summary is less than 100 chars"
30
+ # expression: "document.summary.size() < 100"
31
+ #
32
+ # Example (Equality):
33
+ #
34
+ # title: "Requestor is owner"
35
+ # description: "Determines if requestor is the document owner"
36
+ # expression: "document.owner == request.auth.claims.email"
37
+ #
38
+ # Example (Logic):
39
+ #
40
+ # title: "Public documents"
41
+ # description: "Determine whether the document should be publicly visible"
42
+ # expression: "document.type != 'private' && document.type != 'internal'"
43
+ #
44
+ # Example (Data Manipulation):
45
+ #
46
+ # title: "Notification string"
47
+ # description: "Create a notification string with a timestamp."
48
+ # expression: "'New message received at ' + string(document.create_time)"
49
+ #
50
+ # The exact variables and functions that may be referenced within an expression
51
+ # are determined by the service that evaluates it. See the service
52
+ # documentation for additional information.
27
53
  # @!attribute [rw] expression
28
54
  # @return [::String]
29
- # Textual representation of an expression in
30
- # Common Expression Language syntax.
31
- #
32
- # The application context of the containing message determines which
33
- # well-known feature set of CEL is supported.
55
+ # Textual representation of an expression in Common Expression Language
56
+ # syntax.
34
57
  # @!attribute [rw] title
35
58
  # @return [::String]
36
- # An optional title for the expression, i.e. a short string describing
59
+ # Optional. Title for the expression, i.e. a short string describing
37
60
  # its purpose. This can be used e.g. in UIs which allow to enter the
38
61
  # expression.
39
62
  # @!attribute [rw] description
40
63
  # @return [::String]
41
- # An optional description of the expression. This is a longer text which
64
+ # Optional. Description of the expression. This is a longer text which
42
65
  # describes the expression, e.g. when hovered over it in a UI.
43
66
  # @!attribute [rw] location
44
67
  # @return [::String]
45
- # An optional string indicating the location of the expression for error
68
+ # Optional. String indicating the location of the expression for error
46
69
  # reporting, e.g. a file name and a position in the file.
47
70
  class Expr
48
71
  include ::Google::Protobuf::MessageExts
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner-admin-database-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -179,8 +179,7 @@ dependencies:
179
179
  description: Cloud Spanner is a managed, mission-critical, globally consistent and
180
180
  scalable relational database service. Note that google-cloud-spanner-admin-database-v1
181
181
  is a version-specific client library. For most uses, we recommend installing the
182
- main client library google-cloud-spanner-admin-database instead. See the readme
183
- for more details.
182
+ main client library google-cloud-spanner instead. See the readme for more details.
184
183
  email: googleapis-packages@google.com
185
184
  executables: []
186
185
  extensions: []