google-cloud-spanner-admin-database-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-spanner-admin-database-v1.rb +21 -0
- data/lib/google/cloud/spanner/admin/database/v1.rb +39 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +59 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +1989 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/credentials.rb +56 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +574 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +92 -0
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +32 -0
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +101 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +31 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +144 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +170 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +364 -0
- data/proto_docs/google/spanner/admin/database/v1/common.rb +48 -0
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +437 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +235 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Timestamp represents a point in time independent of any time zone or local
|
23
|
+
# calendar, encoded as a count of seconds and fractions of seconds at
|
24
|
+
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
25
|
+
# January 1, 1970, in the proleptic Gregorian calendar which extends the
|
26
|
+
# Gregorian calendar backwards to year one.
|
27
|
+
#
|
28
|
+
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
29
|
+
# second table is needed for interpretation, using a [24-hour linear
|
30
|
+
# smear](https://developers.google.com/time/smear).
|
31
|
+
#
|
32
|
+
# The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
33
|
+
# restricting to that range, we ensure that we can convert to and from [RFC
|
34
|
+
# 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
35
|
+
#
|
36
|
+
# # Examples
|
37
|
+
#
|
38
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
39
|
+
#
|
40
|
+
# Timestamp timestamp;
|
41
|
+
# timestamp.set_seconds(time(NULL));
|
42
|
+
# timestamp.set_nanos(0);
|
43
|
+
#
|
44
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
45
|
+
#
|
46
|
+
# struct timeval tv;
|
47
|
+
# gettimeofday(&tv, NULL);
|
48
|
+
#
|
49
|
+
# Timestamp timestamp;
|
50
|
+
# timestamp.set_seconds(tv.tv_sec);
|
51
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
52
|
+
#
|
53
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
54
|
+
#
|
55
|
+
# FILETIME ft;
|
56
|
+
# GetSystemTimeAsFileTime(&ft);
|
57
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
58
|
+
#
|
59
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
60
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
61
|
+
# Timestamp timestamp;
|
62
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
63
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
64
|
+
#
|
65
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
66
|
+
#
|
67
|
+
# long millis = System.currentTimeMillis();
|
68
|
+
#
|
69
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
70
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
|
+
#
|
72
|
+
#
|
73
|
+
# Example 5: Compute Timestamp from current time in Python.
|
74
|
+
#
|
75
|
+
# timestamp = Timestamp()
|
76
|
+
# timestamp.GetCurrentTime()
|
77
|
+
#
|
78
|
+
# # JSON Mapping
|
79
|
+
#
|
80
|
+
# In JSON format, the Timestamp type is encoded as a string in the
|
81
|
+
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
82
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
83
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
84
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
85
|
+
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
86
|
+
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
87
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
88
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
89
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
90
|
+
#
|
91
|
+
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
92
|
+
# 01:30 UTC on January 15, 2017.
|
93
|
+
#
|
94
|
+
# In JavaScript, one can convert a Date object to this format using the
|
95
|
+
# standard
|
96
|
+
# [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
97
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
98
|
+
# to this format using
|
99
|
+
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
100
|
+
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
101
|
+
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
102
|
+
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
103
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
104
|
+
# @!attribute [rw] seconds
|
105
|
+
# @return [::Integer]
|
106
|
+
# Represents seconds of UTC time since Unix epoch
|
107
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
108
|
+
# 9999-12-31T23:59:59Z inclusive.
|
109
|
+
# @!attribute [rw] nanos
|
110
|
+
# @return [::Integer]
|
111
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
112
|
+
# second values with fractions must still have non-negative nanos values
|
113
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
114
|
+
# inclusive.
|
115
|
+
class Timestamp
|
116
|
+
include ::Google::Protobuf::MessageExts
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Rpc
|
22
|
+
# The `Status` type defines a logical error model that is suitable for
|
23
|
+
# different programming environments, including REST APIs and RPC APIs. It is
|
24
|
+
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
25
|
+
# three pieces of data: error code, error message, and error details.
|
26
|
+
#
|
27
|
+
# You can find out more about this error model and how to work with it in the
|
28
|
+
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
29
|
+
# @!attribute [rw] code
|
30
|
+
# @return [::Integer]
|
31
|
+
# The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
32
|
+
# @!attribute [rw] message
|
33
|
+
# @return [::String]
|
34
|
+
# A developer-facing error message, which should be in English. Any
|
35
|
+
# user-facing error message should be localized and sent in the
|
36
|
+
# {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
|
37
|
+
# @!attribute [rw] details
|
38
|
+
# @return [::Array<::Google::Protobuf::Any>]
|
39
|
+
# A list of messages that carry the error details. There is a common set of
|
40
|
+
# message types for APIs to use.
|
41
|
+
class Status
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,364 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Spanner
|
23
|
+
module Admin
|
24
|
+
module Database
|
25
|
+
module V1
|
26
|
+
# A backup of a Cloud Spanner database.
|
27
|
+
# @!attribute [rw] database
|
28
|
+
# @return [::String]
|
29
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
30
|
+
# Name of the database from which this backup was
|
31
|
+
# created. This needs to be in the same instance as the backup.
|
32
|
+
# Values are of the form
|
33
|
+
# `projects/<project>/instances/<instance>/databases/<database>`.
|
34
|
+
# @!attribute [rw] expire_time
|
35
|
+
# @return [::Google::Protobuf::Timestamp]
|
36
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
37
|
+
# operation. The expiration time of the backup, with microseconds
|
38
|
+
# granularity that must be at least 6 hours and at most 366 days
|
39
|
+
# from the time the CreateBackup request is processed. Once the `expire_time`
|
40
|
+
# has passed, the backup is eligible to be automatically deleted by Cloud
|
41
|
+
# Spanner to free the resources used by the backup.
|
42
|
+
# @!attribute [rw] name
|
43
|
+
# @return [::String]
|
44
|
+
# Output only for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
45
|
+
# Required for the {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup} operation.
|
46
|
+
#
|
47
|
+
# A globally unique identifier for the backup which cannot be
|
48
|
+
# changed. Values are of the form
|
49
|
+
# `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]`
|
50
|
+
# The final segment of the name must be between 2 and 60 characters
|
51
|
+
# in length.
|
52
|
+
#
|
53
|
+
# The backup is stored in the location(s) specified in the instance
|
54
|
+
# configuration of the instance containing the backup, identified
|
55
|
+
# by the prefix of the backup name of the form
|
56
|
+
# `projects/<project>/instances/<instance>`.
|
57
|
+
# @!attribute [r] create_time
|
58
|
+
# @return [::Google::Protobuf::Timestamp]
|
59
|
+
# Output only. The backup will contain an externally consistent
|
60
|
+
# copy of the database at the timestamp specified by
|
61
|
+
# `create_time`. `create_time` is approximately the time the
|
62
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} request is received.
|
63
|
+
# @!attribute [r] size_bytes
|
64
|
+
# @return [::Integer]
|
65
|
+
# Output only. Size of the backup in bytes.
|
66
|
+
# @!attribute [r] state
|
67
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup::State]
|
68
|
+
# Output only. The current state of the backup.
|
69
|
+
# @!attribute [r] referencing_databases
|
70
|
+
# @return [::Array<::String>]
|
71
|
+
# Output only. The names of the restored databases that reference the backup.
|
72
|
+
# The database names are of
|
73
|
+
# the form `projects/<project>/instances/<instance>/databases/<database>`.
|
74
|
+
# Referencing databases may exist in different instances. The existence of
|
75
|
+
# any referencing database prevents the backup from being deleted. When a
|
76
|
+
# restored database from the backup enters the `READY` state, the reference
|
77
|
+
# to the backup is removed.
|
78
|
+
class Backup
|
79
|
+
include ::Google::Protobuf::MessageExts
|
80
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
81
|
+
|
82
|
+
# Indicates the current state of the backup.
|
83
|
+
module State
|
84
|
+
# Not specified.
|
85
|
+
STATE_UNSPECIFIED = 0
|
86
|
+
|
87
|
+
# The pending backup is still being created. Operations on the
|
88
|
+
# backup may fail with `FAILED_PRECONDITION` in this state.
|
89
|
+
CREATING = 1
|
90
|
+
|
91
|
+
# The backup is complete and ready for use.
|
92
|
+
READY = 2
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
97
|
+
# @!attribute [rw] parent
|
98
|
+
# @return [::String]
|
99
|
+
# Required. The name of the instance in which the backup will be
|
100
|
+
# created. This must be the same instance that contains the database the
|
101
|
+
# backup will be created from. The backup will be stored in the
|
102
|
+
# location(s) specified in the instance configuration of this
|
103
|
+
# instance. Values are of the form
|
104
|
+
# `projects/<project>/instances/<instance>`.
|
105
|
+
# @!attribute [rw] backup_id
|
106
|
+
# @return [::String]
|
107
|
+
# Required. The id of the backup to be created. The `backup_id` appended to
|
108
|
+
# `parent` forms the full backup name of the form
|
109
|
+
# `projects/<project>/instances/<instance>/backups/<backup_id>`.
|
110
|
+
# @!attribute [rw] backup
|
111
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
112
|
+
# Required. The backup to create.
|
113
|
+
class CreateBackupRequest
|
114
|
+
include ::Google::Protobuf::MessageExts
|
115
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
116
|
+
end
|
117
|
+
|
118
|
+
# Metadata type for the operation returned by
|
119
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
120
|
+
# @!attribute [rw] name
|
121
|
+
# @return [::String]
|
122
|
+
# The name of the backup being created.
|
123
|
+
# @!attribute [rw] database
|
124
|
+
# @return [::String]
|
125
|
+
# The name of the database the backup is created from.
|
126
|
+
# @!attribute [rw] progress
|
127
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
|
128
|
+
# The progress of the
|
129
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup} operation.
|
130
|
+
# @!attribute [rw] cancel_time
|
131
|
+
# @return [::Google::Protobuf::Timestamp]
|
132
|
+
# The time at which cancellation of this operation was received.
|
133
|
+
# Operations.CancelOperation
|
134
|
+
# starts asynchronous cancellation on a long-running operation. The server
|
135
|
+
# makes a best effort to cancel the operation, but success is not guaranteed.
|
136
|
+
# Clients can use
|
137
|
+
# Operations.GetOperation or
|
138
|
+
# other methods to check whether the cancellation succeeded or whether the
|
139
|
+
# operation completed despite cancellation. On successful cancellation,
|
140
|
+
# the operation is not deleted; instead, it becomes an operation with
|
141
|
+
# an [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
|
142
|
+
# corresponding to `Code.CANCELLED`.
|
143
|
+
class CreateBackupMetadata
|
144
|
+
include ::Google::Protobuf::MessageExts
|
145
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
146
|
+
end
|
147
|
+
|
148
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
|
149
|
+
# @!attribute [rw] backup
|
150
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
151
|
+
# Required. The backup to update. `backup.name`, and the fields to be updated
|
152
|
+
# as specified by `update_mask` are required. Other fields are ignored.
|
153
|
+
# Update is only supported for the following fields:
|
154
|
+
# * `backup.expire_time`.
|
155
|
+
# @!attribute [rw] update_mask
|
156
|
+
# @return [::Google::Protobuf::FieldMask]
|
157
|
+
# Required. A mask specifying which fields (e.g. `expire_time`) in the
|
158
|
+
# Backup resource should be updated. This mask is relative to the Backup
|
159
|
+
# resource, not to the request message. The field mask must always be
|
160
|
+
# specified; this prevents any future fields from being erased accidentally
|
161
|
+
# by clients that do not know about them.
|
162
|
+
class UpdateBackupRequest
|
163
|
+
include ::Google::Protobuf::MessageExts
|
164
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
165
|
+
end
|
166
|
+
|
167
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
|
168
|
+
# @!attribute [rw] name
|
169
|
+
# @return [::String]
|
170
|
+
# Required. Name of the backup.
|
171
|
+
# Values are of the form
|
172
|
+
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
173
|
+
class GetBackupRequest
|
174
|
+
include ::Google::Protobuf::MessageExts
|
175
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
176
|
+
end
|
177
|
+
|
178
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
|
179
|
+
# @!attribute [rw] name
|
180
|
+
# @return [::String]
|
181
|
+
# Required. Name of the backup to delete.
|
182
|
+
# Values are of the form
|
183
|
+
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
184
|
+
class DeleteBackupRequest
|
185
|
+
include ::Google::Protobuf::MessageExts
|
186
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
187
|
+
end
|
188
|
+
|
189
|
+
# The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
190
|
+
# @!attribute [rw] parent
|
191
|
+
# @return [::String]
|
192
|
+
# Required. The instance to list backups from. Values are of the
|
193
|
+
# form `projects/<project>/instances/<instance>`.
|
194
|
+
# @!attribute [rw] filter
|
195
|
+
# @return [::String]
|
196
|
+
# An expression that filters the list of returned backups.
|
197
|
+
#
|
198
|
+
# A filter expression consists of a field name, a comparison operator, and a
|
199
|
+
# value for filtering.
|
200
|
+
# The value must be a string, a number, or a boolean. The comparison operator
|
201
|
+
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
202
|
+
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
203
|
+
#
|
204
|
+
# The following fields in the {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for filtering:
|
205
|
+
#
|
206
|
+
# * `name`
|
207
|
+
# * `database`
|
208
|
+
# * `state`
|
209
|
+
# * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
210
|
+
# * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
|
211
|
+
# * `size_bytes`
|
212
|
+
#
|
213
|
+
# You can combine multiple expressions by enclosing each expression in
|
214
|
+
# parentheses. By default, expressions are combined with AND logic, but
|
215
|
+
# you can specify AND, OR, and NOT logic explicitly.
|
216
|
+
#
|
217
|
+
# Here are a few examples:
|
218
|
+
#
|
219
|
+
# * `name:Howl` - The backup's name contains the string "howl".
|
220
|
+
# * `database:prod`
|
221
|
+
# - The database's name contains the string "prod".
|
222
|
+
# * `state:CREATING` - The backup is pending creation.
|
223
|
+
# * `state:READY` - The backup is fully created and ready for use.
|
224
|
+
# * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")`
|
225
|
+
# - The backup name contains the string "howl" and `create_time`
|
226
|
+
# of the backup is before 2018-03-28T14:50:00Z.
|
227
|
+
# * `expire_time < \"2018-03-28T14:50:00Z\"`
|
228
|
+
# - The backup `expire_time` is before 2018-03-28T14:50:00Z.
|
229
|
+
# * `size_bytes > 10000000000` - The backup's size is greater than 10GB
|
230
|
+
# @!attribute [rw] page_size
|
231
|
+
# @return [::Integer]
|
232
|
+
# Number of backups to be returned in the response. If 0 or
|
233
|
+
# less, defaults to the server's maximum allowed page size.
|
234
|
+
# @!attribute [rw] page_token
|
235
|
+
# @return [::String]
|
236
|
+
# If non-empty, `page_token` should contain a
|
237
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token} from a
|
238
|
+
# previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
|
239
|
+
# `filter`.
|
240
|
+
class ListBackupsRequest
|
241
|
+
include ::Google::Protobuf::MessageExts
|
242
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
243
|
+
end
|
244
|
+
|
245
|
+
# The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
246
|
+
# @!attribute [rw] backups
|
247
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
|
248
|
+
# The list of matching backups. Backups returned are ordered by `create_time`
|
249
|
+
# in descending order, starting from the most recent `create_time`.
|
250
|
+
# @!attribute [rw] next_page_token
|
251
|
+
# @return [::String]
|
252
|
+
# `next_page_token` can be sent in a subsequent
|
253
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups} call to fetch more
|
254
|
+
# of the matching backups.
|
255
|
+
class ListBackupsResponse
|
256
|
+
include ::Google::Protobuf::MessageExts
|
257
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
258
|
+
end
|
259
|
+
|
260
|
+
# The request for
|
261
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}.
|
262
|
+
# @!attribute [rw] parent
|
263
|
+
# @return [::String]
|
264
|
+
# Required. The instance of the backup operations. Values are of
|
265
|
+
# the form `projects/<project>/instances/<instance>`.
|
266
|
+
# @!attribute [rw] filter
|
267
|
+
# @return [::String]
|
268
|
+
# An expression that filters the list of returned backup operations.
|
269
|
+
#
|
270
|
+
# A filter expression consists of a field name, a
|
271
|
+
# comparison operator, and a value for filtering.
|
272
|
+
# The value must be a string, a number, or a boolean. The comparison operator
|
273
|
+
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
274
|
+
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
275
|
+
#
|
276
|
+
# The following fields in the {::Google::Longrunning::Operation operation}
|
277
|
+
# are eligible for filtering:
|
278
|
+
#
|
279
|
+
# * `name` - The name of the long-running operation
|
280
|
+
# * `done` - False if the operation is in progress, else true.
|
281
|
+
# * `metadata.@type` - the type of metadata. For example, the type string
|
282
|
+
# for {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata} is
|
283
|
+
# `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
284
|
+
# * `metadata.<field_name>` - any field in metadata.value.
|
285
|
+
# * `error` - Error associated with the long-running operation.
|
286
|
+
# * `response.@type` - the type of response.
|
287
|
+
# * `response.<field_name>` - any field in response.value.
|
288
|
+
#
|
289
|
+
# You can combine multiple expressions by enclosing each expression in
|
290
|
+
# parentheses. By default, expressions are combined with AND logic, but
|
291
|
+
# you can specify AND, OR, and NOT logic explicitly.
|
292
|
+
#
|
293
|
+
# Here are a few examples:
|
294
|
+
#
|
295
|
+
# * `done:true` - The operation is complete.
|
296
|
+
# * `metadata.database:prod` - The database the backup was taken from has
|
297
|
+
# a name containing the string "prod".
|
298
|
+
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` <br/>
|
299
|
+
# `(metadata.name:howl) AND` <br/>
|
300
|
+
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
|
301
|
+
# `(error:*)` - Returns operations where:
|
302
|
+
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
303
|
+
# * The backup name contains the string "howl".
|
304
|
+
# * The operation started before 2018-03-28T14:50:00Z.
|
305
|
+
# * The operation resulted in an error.
|
306
|
+
# @!attribute [rw] page_size
|
307
|
+
# @return [::Integer]
|
308
|
+
# Number of operations to be returned in the response. If 0 or
|
309
|
+
# less, defaults to the server's maximum allowed page size.
|
310
|
+
# @!attribute [rw] page_token
|
311
|
+
# @return [::String]
|
312
|
+
# If non-empty, `page_token` should contain a
|
313
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
|
314
|
+
# from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse} to the
|
315
|
+
# same `parent` and with the same `filter`.
|
316
|
+
class ListBackupOperationsRequest
|
317
|
+
include ::Google::Protobuf::MessageExts
|
318
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
319
|
+
end
|
320
|
+
|
321
|
+
# The response for
|
322
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}.
|
323
|
+
# @!attribute [rw] operations
|
324
|
+
# @return [::Array<::Google::Longrunning::Operation>]
|
325
|
+
# The list of matching backup [long-running
|
326
|
+
# operations][google.longrunning.Operation]. Each operation's name will be
|
327
|
+
# prefixed by the backup's name and the operation's
|
328
|
+
# {::Google::Longrunning::Operation#metadata metadata} will be of type
|
329
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}. Operations returned include those that are
|
330
|
+
# pending or have completed/failed/canceled within the last 7 days.
|
331
|
+
# Operations returned are ordered by
|
332
|
+
# `operation.metadata.value.progress.start_time` in descending order starting
|
333
|
+
# from the most recently started operation.
|
334
|
+
# @!attribute [rw] next_page_token
|
335
|
+
# @return [::String]
|
336
|
+
# `next_page_token` can be sent in a subsequent
|
337
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backup_operations ListBackupOperations}
|
338
|
+
# call to fetch more of the matching metadata.
|
339
|
+
class ListBackupOperationsResponse
|
340
|
+
include ::Google::Protobuf::MessageExts
|
341
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
342
|
+
end
|
343
|
+
|
344
|
+
# Information about a backup.
|
345
|
+
# @!attribute [rw] backup
|
346
|
+
# @return [::String]
|
347
|
+
# Name of the backup.
|
348
|
+
# @!attribute [rw] create_time
|
349
|
+
# @return [::Google::Protobuf::Timestamp]
|
350
|
+
# The backup contains an externally consistent copy of `source_database` at
|
351
|
+
# the timestamp specified by `create_time`.
|
352
|
+
# @!attribute [rw] source_database
|
353
|
+
# @return [::String]
|
354
|
+
# Name of the database the backup was created from.
|
355
|
+
class BackupInfo
|
356
|
+
include ::Google::Protobuf::MessageExts
|
357
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|
364
|
+
end
|