google-cloud-spanner-admin-database-v1 0.6.0 → 0.7.2

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: e3a91fe2dae20a29fb57719f939afdd13779a56bd274e416f71a6027c51cd7a8
4
- data.tar.gz: 5a06a7ec4f985cc5c019a24e1e591c9157134f367fe5a2d6a9fb5c8160c35fa6
3
+ metadata.gz: e667a0721a791dcde0187312d332b41a7a98ee2a424a9996ee11e4c384b769eb
4
+ data.tar.gz: dcc846c6376006f40f0c7590b18be135b44ffaa69070eedca6605ce9ef83a520
5
5
  SHA512:
6
- metadata.gz: a23ea863cb22ec509a3c8052f0f58e65b357913da7ce1ba34d9a58341b8e621d88e0651d3aab4b1bd8c30786656123ce461d142588084a65e734a1f16755c110
7
- data.tar.gz: 9001cee8f8548a71aa66065e748dae30ab8c92389aa784998fd548f984b98c2284a12e67508feb1e0a7c276d3307e0aea24b8055b807054e55b0b868850f5e38
6
+ metadata.gz: 4a3be5fe9c5dc14bc99505d5bd064c20643742d52ca152abf786f462660d8e7bfb52b5016716ab37d5560216fd6cc9224d088ed147787c593da7a709c75cc6a1
7
+ data.tar.gz: efffbfcead68f490708c964bb9d8eab0147fff28cc280c35ada2d63b081cdf8547328ef63a155041b3502c7219ff40d11ed7b513564f542e4f7201e995850248
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
@@ -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
 
@@ -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.0"
26
+ VERSION = "0.7.2"
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
@@ -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,29 +1,35 @@
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.0
4
+ version: 0.7.2
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-04-23 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.4'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.4'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -47,7 +53,7 @@ dependencies:
47
53
  version: 0.6.10
48
54
  - - "<"
49
55
  - !ruby/object:Gem::Version
50
- version: '2.0'
56
+ version: 2.a
51
57
  type: :runtime
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +63,7 @@ dependencies:
57
63
  version: 0.6.10
58
64
  - - "<"
59
65
  - !ruby/object:Gem::Version
60
- version: '2.0'
66
+ version: 2.a
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: google-style
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -232,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
238
  - !ruby/object:Gem::Version
233
239
  version: '0'
234
240
  requirements: []
235
- rubygems_version: 3.2.13
241
+ rubygems_version: 3.2.17
236
242
  signing_key:
237
243
  specification_version: 4
238
244
  summary: API Client library for the Cloud Spanner Database Admin V1 API