google-cloud-spanner 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/lib/google-cloud-spanner.rb +106 -0
  3. data/lib/google/cloud/spanner.rb +382 -0
  4. data/lib/google/cloud/spanner/admin/database/v1.rb +17 -0
  5. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +703 -0
  6. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client_config.json +73 -0
  7. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +139 -0
  8. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +114 -0
  9. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +83 -0
  10. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +188 -0
  11. data/lib/google/cloud/spanner/admin/instance/v1.rb +17 -0
  12. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +139 -0
  13. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +114 -0
  14. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +223 -0
  15. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +83 -0
  16. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +268 -0
  17. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +868 -0
  18. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client_config.json +78 -0
  19. data/lib/google/cloud/spanner/client.rb +1034 -0
  20. data/lib/google/cloud/spanner/commit.rb +351 -0
  21. data/lib/google/cloud/spanner/convert.rb +311 -0
  22. data/lib/google/cloud/spanner/credentials.rb +32 -0
  23. data/lib/google/cloud/spanner/data.rb +199 -0
  24. data/lib/google/cloud/spanner/database.rb +377 -0
  25. data/lib/google/cloud/spanner/database/job.rb +179 -0
  26. data/lib/google/cloud/spanner/database/list.rb +171 -0
  27. data/lib/google/cloud/spanner/errors.rb +73 -0
  28. data/lib/google/cloud/spanner/fields.rb +252 -0
  29. data/lib/google/cloud/spanner/instance.rb +472 -0
  30. data/lib/google/cloud/spanner/instance/config.rb +99 -0
  31. data/lib/google/cloud/spanner/instance/config/list.rb +171 -0
  32. data/lib/google/cloud/spanner/instance/job.rb +197 -0
  33. data/lib/google/cloud/spanner/instance/list.rb +167 -0
  34. data/lib/google/cloud/spanner/policy.rb +201 -0
  35. data/lib/google/cloud/spanner/pool.rb +279 -0
  36. data/lib/google/cloud/spanner/project.rb +480 -0
  37. data/lib/google/cloud/spanner/range.rb +99 -0
  38. data/lib/google/cloud/spanner/results.rb +280 -0
  39. data/lib/google/cloud/spanner/service.rb +458 -0
  40. data/lib/google/cloud/spanner/session.rb +565 -0
  41. data/lib/google/cloud/spanner/snapshot.rb +260 -0
  42. data/lib/google/cloud/spanner/transaction.rb +533 -0
  43. data/lib/google/cloud/spanner/v1.rb +17 -0
  44. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +77 -0
  45. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +73 -0
  46. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +81 -0
  47. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +148 -0
  48. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +80 -0
  49. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +120 -0
  50. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +175 -0
  51. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +206 -0
  52. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +351 -0
  53. data/lib/google/cloud/spanner/v1/spanner_client.rb +850 -0
  54. data/lib/google/cloud/spanner/v1/spanner_client_config.json +78 -0
  55. data/lib/google/cloud/spanner/version.rb +22 -0
  56. data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +85 -0
  57. data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +95 -0
  58. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +106 -0
  59. data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +180 -0
  60. data/lib/google/spanner/v1/keys_pb.rb +33 -0
  61. data/lib/google/spanner/v1/mutation_pb.rb +38 -0
  62. data/lib/google/spanner/v1/query_plan_pb.rb +47 -0
  63. data/lib/google/spanner/v1/result_set_pb.rb +43 -0
  64. data/lib/google/spanner/v1/spanner_pb.rb +90 -0
  65. data/lib/google/spanner/v1/spanner_services_pb.rb +131 -0
  66. data/lib/google/spanner/v1/transaction_pb.rb +51 -0
  67. data/lib/google/spanner/v1/type_pb.rb +43 -0
  68. metadata +309 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "interfaces": {
3
+ "google.spanner.admin.database.v1.DatabaseAdmin": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": [
10
+ "UNAVAILABLE"
11
+ ]
12
+ },
13
+ "retry_params": {
14
+ "default": {
15
+ "initial_retry_delay_millis": 1000,
16
+ "retry_delay_multiplier": 1.3,
17
+ "max_retry_delay_millis": 32000,
18
+ "initial_rpc_timeout_millis": 60000,
19
+ "rpc_timeout_multiplier": 1.0,
20
+ "max_rpc_timeout_millis": 60000,
21
+ "total_timeout_millis": 600000
22
+ }
23
+ },
24
+ "methods": {
25
+ "ListDatabases": {
26
+ "timeout_millis": 30000,
27
+ "retry_codes_name": "idempotent",
28
+ "retry_params_name": "default"
29
+ },
30
+ "CreateDatabase": {
31
+ "timeout_millis": 30000,
32
+ "retry_codes_name": "non_idempotent",
33
+ "retry_params_name": "default"
34
+ },
35
+ "GetDatabase": {
36
+ "timeout_millis": 30000,
37
+ "retry_codes_name": "idempotent",
38
+ "retry_params_name": "default"
39
+ },
40
+ "UpdateDatabaseDdl": {
41
+ "timeout_millis": 30000,
42
+ "retry_codes_name": "idempotent",
43
+ "retry_params_name": "default"
44
+ },
45
+ "DropDatabase": {
46
+ "timeout_millis": 30000,
47
+ "retry_codes_name": "idempotent",
48
+ "retry_params_name": "default"
49
+ },
50
+ "GetDatabaseDdl": {
51
+ "timeout_millis": 30000,
52
+ "retry_codes_name": "idempotent",
53
+ "retry_params_name": "default"
54
+ },
55
+ "SetIamPolicy": {
56
+ "timeout_millis": 30000,
57
+ "retry_codes_name": "non_idempotent",
58
+ "retry_params_name": "default"
59
+ },
60
+ "GetIamPolicy": {
61
+ "timeout_millis": 30000,
62
+ "retry_codes_name": "idempotent",
63
+ "retry_params_name": "default"
64
+ },
65
+ "TestIamPermissions": {
66
+ "timeout_millis": 30000,
67
+ "retry_codes_name": "non_idempotent",
68
+ "retry_params_name": "default"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,139 @@
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Iam
17
+ module V1
18
+ # Defines an Identity and Access Management (IAM) policy. It is used to
19
+ # specify access control policies for Cloud Platform resources.
20
+ #
21
+ #
22
+ # A +Policy+ consists of a list of +bindings+. A +Binding+ binds a list of
23
+ # +members+ to a +role+, where the members can be user accounts, Google groups,
24
+ # Google domains, and service accounts. A +role+ is a named list of permissions
25
+ # defined by IAM.
26
+ #
27
+ # **Example**
28
+ #
29
+ # {
30
+ # "bindings": [
31
+ # {
32
+ # "role": "roles/owner",
33
+ # "members": [
34
+ # "user:mike@example.com",
35
+ # "group:admins@example.com",
36
+ # "domain:google.com",
37
+ # "serviceAccount:my-other-app@appspot.gserviceaccount.com",
38
+ # ]
39
+ # },
40
+ # {
41
+ # "role": "roles/viewer",
42
+ # "members": ["user:sean@example.com"]
43
+ # }
44
+ # ]
45
+ # }
46
+ #
47
+ # For a description of IAM and its features, see the
48
+ # {IAM developer's guide}[https://cloud.google.com/iam].
49
+ # @!attribute [rw] version
50
+ # @return [Integer]
51
+ # Version of the +Policy+. The default version is 0.
52
+ # @!attribute [rw] bindings
53
+ # @return [Array<Google::Iam::V1::Binding>]
54
+ # Associates a list of +members+ to a +role+.
55
+ # Multiple +bindings+ must not be specified for the same +role+.
56
+ # +bindings+ with no members will result in an error.
57
+ # @!attribute [rw] etag
58
+ # @return [String]
59
+ # +etag+ is used for optimistic concurrency control as a way to help
60
+ # prevent simultaneous updates of a policy from overwriting each other.
61
+ # It is strongly suggested that systems make use of the +etag+ in the
62
+ # read-modify-write cycle to perform policy updates in order to avoid race
63
+ # conditions: An +etag+ is returned in the response to +getIamPolicy+, and
64
+ # systems are expected to put that etag in the request to +setIamPolicy+ to
65
+ # ensure that their change will be applied to the same version of the policy.
66
+ #
67
+ # If no +etag+ is provided in the call to +setIamPolicy+, then the existing
68
+ # policy is overwritten blindly.
69
+ class Policy; end
70
+
71
+ # Associates +members+ with a +role+.
72
+ # @!attribute [rw] role
73
+ # @return [String]
74
+ # Role that is assigned to +members+.
75
+ # For example, +roles/viewer+, +roles/editor+, or +roles/owner+.
76
+ # Required
77
+ # @!attribute [rw] members
78
+ # @return [Array<String>]
79
+ # Specifies the identities requesting access for a Cloud Platform resource.
80
+ # +members+ can have the following values:
81
+ #
82
+ # * +allUsers+: A special identifier that represents anyone who is
83
+ # on the internet; with or without a Google account.
84
+ #
85
+ # * +allAuthenticatedUsers+: A special identifier that represents anyone
86
+ # who is authenticated with a Google account or a service account.
87
+ #
88
+ # * +user:{emailid}+: An email address that represents a specific Google
89
+ # account. For example, +alice@gmail.com+ or +joe@example.com+.
90
+ #
91
+ #
92
+ # * +serviceAccount:{emailid}+: An email address that represents a service
93
+ # account. For example, +my-other-app@appspot.gserviceaccount.com+.
94
+ #
95
+ # * +group:{emailid}+: An email address that represents a Google group.
96
+ # For example, +admins@example.com+.
97
+ #
98
+ # * +domain:{domain}+: A Google Apps domain name that represents all the
99
+ # users of that domain. For example, +google.com+ or +example.com+.
100
+ class Binding; end
101
+
102
+ # The difference delta between two policies.
103
+ # @!attribute [rw] binding_deltas
104
+ # @return [Array<Google::Iam::V1::BindingDelta>]
105
+ # The delta for Bindings between two policies.
106
+ class PolicyDelta; end
107
+
108
+ # One delta entry for Binding. Each individual change (only one member in each
109
+ # entry) to a binding will be a separate entry.
110
+ # @!attribute [rw] action
111
+ # @return [Google::Iam::V1::BindingDelta::Action]
112
+ # The action that was performed on a Binding.
113
+ # Required
114
+ # @!attribute [rw] role
115
+ # @return [String]
116
+ # Role that is assigned to +members+.
117
+ # For example, +roles/viewer+, +roles/editor+, or +roles/owner+.
118
+ # Required
119
+ # @!attribute [rw] member
120
+ # @return [String]
121
+ # A single identity requesting access for a Cloud Platform resource.
122
+ # Follows the same format of Binding.members.
123
+ # Required
124
+ class BindingDelta
125
+ # The type of action performed on a Binding in a policy.
126
+ module Action
127
+ # Unspecified.
128
+ ACTION_UNSPECIFIED = 0
129
+
130
+ # Addition of a Binding.
131
+ ADD = 1
132
+
133
+ # Removal of a Binding.
134
+ REMOVE = 2
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,114 @@
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Protobuf
17
+ # +Any+ contains an arbitrary serialized protocol buffer message along with a
18
+ # URL that describes the type of the serialized message.
19
+ #
20
+ # Protobuf library provides support to pack/unpack Any values in the form
21
+ # of utility functions or additional generated methods of the Any type.
22
+ #
23
+ # Example 1: Pack and unpack a message in C++.
24
+ #
25
+ # Foo foo = ...;
26
+ # Any any;
27
+ # any.PackFrom(foo);
28
+ # ...
29
+ # if (any.UnpackTo(&foo)) {
30
+ # ...
31
+ # }
32
+ #
33
+ # Example 2: Pack and unpack a message in Java.
34
+ #
35
+ # Foo foo = ...;
36
+ # Any any = Any.pack(foo);
37
+ # ...
38
+ # if (any.is(Foo.class)) {
39
+ # foo = any.unpack(Foo.class);
40
+ # }
41
+ #
42
+ # Example 3: Pack and unpack a message in Python.
43
+ #
44
+ # foo = Foo(...)
45
+ # any = Any()
46
+ # any.Pack(foo)
47
+ # ...
48
+ # if any.Is(Foo.DESCRIPTOR):
49
+ # any.Unpack(foo)
50
+ # ...
51
+ #
52
+ # The pack methods provided by protobuf library will by default use
53
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
54
+ # methods only use the fully qualified type name after the last '/'
55
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
56
+ # name "y.z".
57
+ #
58
+ #
59
+ # = JSON
60
+ #
61
+ # The JSON representation of an +Any+ value uses the regular
62
+ # representation of the deserialized, embedded message, with an
63
+ # additional field +@type+ which contains the type URL. Example:
64
+ #
65
+ # package google.profile;
66
+ # message Person {
67
+ # string first_name = 1;
68
+ # string last_name = 2;
69
+ # }
70
+ #
71
+ # {
72
+ # "@type": "type.googleapis.com/google.profile.Person",
73
+ # "firstName": <string>,
74
+ # "lastName": <string>
75
+ # }
76
+ #
77
+ # If the embedded message type is well-known and has a custom JSON
78
+ # representation, that representation will be embedded adding a field
79
+ # +value+ which holds the custom JSON in addition to the +@type+
80
+ # field. Example (for message Google::Protobuf::Duration):
81
+ #
82
+ # {
83
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
84
+ # "value": "1.212s"
85
+ # }
86
+ # @!attribute [rw] type_url
87
+ # @return [String]
88
+ # A URL/resource name whose content describes the type of the
89
+ # serialized protocol buffer message.
90
+ #
91
+ # For URLs which use the scheme +http+, +https+, or no scheme, the
92
+ # following restrictions and interpretations apply:
93
+ #
94
+ # * If no scheme is provided, +https+ is assumed.
95
+ # * The last segment of the URL's path must represent the fully
96
+ # qualified name of the type (as in +path/google.protobuf.Duration+).
97
+ # The name should be in a canonical form (e.g., leading "." is
98
+ # not accepted).
99
+ # * An HTTP GET on the URL must yield a Google::Protobuf::Type
100
+ # value in binary format, or produce an error.
101
+ # * Applications are allowed to cache lookup results based on the
102
+ # URL, or have them precompiled into a binary to avoid any
103
+ # lookup. Therefore, binary compatibility needs to be preserved
104
+ # on changes to types. (Use versioned type names to manage
105
+ # breaking changes.)
106
+ #
107
+ # Schemes other than +http+, +https+ (or the empty scheme) might be
108
+ # used with implementation specific semantics.
109
+ # @!attribute [rw] value
110
+ # @return [String]
111
+ # Must be a valid serialized protocol buffer of the above specified type.
112
+ class Any; end
113
+ end
114
+ end
@@ -0,0 +1,83 @@
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Rpc
17
+ # The +Status+ type defines a logical error model that is suitable for different
18
+ # programming environments, including REST APIs and RPC APIs. It is used by
19
+ # {gRPC}[https://github.com/grpc]. The error model is designed to be:
20
+ #
21
+ # - Simple to use and understand for most users
22
+ # - Flexible enough to meet unexpected needs
23
+ #
24
+ # = Overview
25
+ #
26
+ # The +Status+ message contains three pieces of data: error code, error message,
27
+ # and error details. The error code should be an enum value of
28
+ # Google::Rpc::Code, but it may accept additional error codes if needed. The
29
+ # error message should be a developer-facing English message that helps
30
+ # developers *understand* and *resolve* the error. If a localized user-facing
31
+ # error message is needed, put the localized message in the error details or
32
+ # localize it in the client. The optional error details may contain arbitrary
33
+ # information about the error. There is a predefined set of error detail types
34
+ # in the package +google.rpc+ which can be used for common error conditions.
35
+ #
36
+ # = Language mapping
37
+ #
38
+ # The +Status+ message is the logical representation of the error model, but it
39
+ # is not necessarily the actual wire format. When the +Status+ message is
40
+ # exposed in different client libraries and different wire protocols, it can be
41
+ # mapped differently. For example, it will likely be mapped to some exceptions
42
+ # in Java, but more likely mapped to some error codes in C.
43
+ #
44
+ # = Other uses
45
+ #
46
+ # The error model and the +Status+ message can be used in a variety of
47
+ # environments, either with or without APIs, to provide a
48
+ # consistent developer experience across different environments.
49
+ #
50
+ # Example uses of this error model include:
51
+ #
52
+ # - Partial errors. If a service needs to return partial errors to the client,
53
+ # it may embed the +Status+ in the normal response to indicate the partial
54
+ # errors.
55
+ #
56
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
57
+ # have a +Status+ message for error reporting purpose.
58
+ #
59
+ # - Batch operations. If a client uses batch request and batch response, the
60
+ # +Status+ message should be used directly inside batch response, one for
61
+ # each error sub-response.
62
+ #
63
+ # - Asynchronous operations. If an API call embeds asynchronous operation
64
+ # results in its response, the status of those operations should be
65
+ # represented directly using the +Status+ message.
66
+ #
67
+ # - Logging. If some API errors are stored in logs, the message +Status+ could
68
+ # be used directly after any stripping needed for security/privacy reasons.
69
+ # @!attribute [rw] code
70
+ # @return [Integer]
71
+ # The status code, which should be an enum value of Google::Rpc::Code.
72
+ # @!attribute [rw] message
73
+ # @return [String]
74
+ # A developer-facing error message, which should be in English. Any
75
+ # user-facing error message should be localized and sent in the
76
+ # Google::Rpc::Status#details field, or localized by the client.
77
+ # @!attribute [rw] details
78
+ # @return [Array<Google::Protobuf::Any>]
79
+ # A list of messages that carry the error details. There will be a
80
+ # common set of message types for APIs to use.
81
+ class Status; end
82
+ end
83
+ end
@@ -0,0 +1,188 @@
1
+ # Copyright 2017, Google Inc. All rights reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Spanner
17
+ module Admin
18
+ module Database
19
+ module V1
20
+ # A Cloud Spanner database.
21
+ # @!attribute [rw] name
22
+ # @return [String]
23
+ # Required. The name of the database. Values are of the form
24
+ # +projects/<project>/instances/<instance>/databases/<database>+,
25
+ # where +<database>+ is as specified in the +CREATE DATABASE+
26
+ # statement. This name can be passed to other API methods to
27
+ # identify the database.
28
+ # @!attribute [rw] state
29
+ # @return [Google::Spanner::Admin::Database::V1::Database::State]
30
+ # Output only. The current database state.
31
+ class Database
32
+ # Indicates the current state of the database.
33
+ module State
34
+ # Not specified.
35
+ STATE_UNSPECIFIED = 0
36
+
37
+ # The database is still being created. Operations on the database may fail
38
+ # with +FAILED_PRECONDITION+ in this state.
39
+ CREATING = 1
40
+
41
+ # The database is fully created and ready for use.
42
+ READY = 2
43
+ end
44
+ end
45
+
46
+ # The request for ListDatabases.
47
+ # @!attribute [rw] parent
48
+ # @return [String]
49
+ # Required. The instance whose databases should be listed.
50
+ # Values are of the form +projects/<project>/instances/<instance>+.
51
+ # @!attribute [rw] page_size
52
+ # @return [Integer]
53
+ # Number of databases to be returned in the response. If 0 or less,
54
+ # defaults to the server's maximum allowed page size.
55
+ # @!attribute [rw] page_token
56
+ # @return [String]
57
+ # If non-empty, +page_token+ should contain a
58
+ # Next_page_token from a
59
+ # previous ListDatabasesResponse.
60
+ class ListDatabasesRequest; end
61
+
62
+ # The response for ListDatabases.
63
+ # @!attribute [rw] databases
64
+ # @return [Array<Google::Spanner::Admin::Database::V1::Database>]
65
+ # Databases that matched the request.
66
+ # @!attribute [rw] next_page_token
67
+ # @return [String]
68
+ # +next_page_token+ can be sent in a subsequent
69
+ # ListDatabases call to fetch more
70
+ # of the matching databases.
71
+ class ListDatabasesResponse; end
72
+
73
+ # The request for CreateDatabase.
74
+ # @!attribute [rw] parent
75
+ # @return [String]
76
+ # Required. The name of the instance that will serve the new database.
77
+ # Values are of the form +projects/<project>/instances/<instance>+.
78
+ # @!attribute [rw] create_statement
79
+ # @return [String]
80
+ # Required. A +CREATE DATABASE+ statement, which specifies the ID of the
81
+ # new database. The database ID must conform to the regular expression
82
+ # +[a-z][a-z0-9_\-]*[a-z0-9]+ and be between 2 and 30 characters in length.
83
+ # @!attribute [rw] extra_statements
84
+ # @return [Array<String>]
85
+ # An optional list of DDL statements to run inside the newly created
86
+ # database. Statements can create tables, indexes, etc. These
87
+ # statements execute atomically with the creation of the database:
88
+ # if there is an error in any statement, the database is not created.
89
+ class CreateDatabaseRequest; end
90
+
91
+ # Metadata type for the operation returned by
92
+ # CreateDatabase.
93
+ # @!attribute [rw] database
94
+ # @return [String]
95
+ # The database being created.
96
+ class CreateDatabaseMetadata; end
97
+
98
+ # The request for GetDatabase.
99
+ # @!attribute [rw] name
100
+ # @return [String]
101
+ # Required. The name of the requested database. Values are of the form
102
+ # +projects/<project>/instances/<instance>/databases/<database>+.
103
+ class GetDatabaseRequest; end
104
+
105
+ # Enqueues the given DDL statements to be applied, in order but not
106
+ # necessarily all at once, to the database schema at some point (or
107
+ # points) in the future. The server checks that the statements
108
+ # are executable (syntactically valid, name tables that exist, etc.)
109
+ # before enqueueing them, but they may still fail upon
110
+ # later execution (e.g., if a statement from another batch of
111
+ # statements is applied first and it conflicts in some way, or if
112
+ # there is some data-related problem like a +NULL+ value in a column to
113
+ # which +NOT NULL+ would be added). If a statement fails, all
114
+ # subsequent statements in the batch are automatically cancelled.
115
+ #
116
+ # Each batch of statements is assigned a name which can be used with
117
+ # the Operations API to monitor
118
+ # progress. See the
119
+ # Operation_id field for more
120
+ # details.
121
+ # @!attribute [rw] database
122
+ # @return [String]
123
+ # Required. The database to update.
124
+ # @!attribute [rw] statements
125
+ # @return [Array<String>]
126
+ # DDL statements to be applied to the database.
127
+ # @!attribute [rw] operation_id
128
+ # @return [String]
129
+ # If empty, the new update request is assigned an
130
+ # automatically-generated operation ID. Otherwise, +operation_id+
131
+ # is used to construct the name of the resulting
132
+ # Operation.
133
+ #
134
+ # Specifying an explicit operation ID simplifies determining
135
+ # whether the statements were executed in the event that the
136
+ # UpdateDatabaseDdl call is replayed,
137
+ # or the return value is otherwise lost: the Database and
138
+ # +operation_id+ fields can be combined to form the
139
+ # Name of the resulting
140
+ # Longrunning::Operation: +<database>/operations/<operation_id>+.
141
+ #
142
+ # +operation_id+ should be unique within the database, and must be
143
+ # a valid identifier: +[a-z][a-z0-9_]*+. Note that
144
+ # automatically-generated operation IDs always begin with an
145
+ # underscore. If the named operation already exists,
146
+ # UpdateDatabaseDdl returns
147
+ # +ALREADY_EXISTS+.
148
+ class UpdateDatabaseDdlRequest; end
149
+
150
+ # Metadata type for the operation returned by
151
+ # UpdateDatabaseDdl.
152
+ # @!attribute [rw] database
153
+ # @return [String]
154
+ # The database being modified.
155
+ # @!attribute [rw] statements
156
+ # @return [Array<String>]
157
+ # For an update this list contains all the statements. For an
158
+ # individual statement, this list contains only that statement.
159
+ # @!attribute [rw] commit_timestamps
160
+ # @return [Array<Google::Protobuf::Timestamp>]
161
+ # Reports the commit timestamps of all statements that have
162
+ # succeeded so far, where +commit_timestamps[i]+ is the commit
163
+ # timestamp for the statement +statements[i]+.
164
+ class UpdateDatabaseDdlMetadata; end
165
+
166
+ # The request for DropDatabase.
167
+ # @!attribute [rw] database
168
+ # @return [String]
169
+ # Required. The database to be dropped.
170
+ class DropDatabaseRequest; end
171
+
172
+ # The request for GetDatabaseDdl.
173
+ # @!attribute [rw] database
174
+ # @return [String]
175
+ # Required. The database whose schema we wish to get.
176
+ class GetDatabaseDdlRequest; end
177
+
178
+ # The response for GetDatabaseDdl.
179
+ # @!attribute [rw] statements
180
+ # @return [Array<String>]
181
+ # A list of formatted DDL statements defining the schema of the database
182
+ # specified in the request.
183
+ class GetDatabaseDdlResponse; end
184
+ end
185
+ end
186
+ end
187
+ end
188
+ end