google-cloud-bigtable 1.3.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/CHANGELOG.md +26 -0
  4. data/lib/google-cloud-bigtable.rb +29 -27
  5. data/lib/google/cloud/bigtable.rb +18 -26
  6. data/lib/google/cloud/bigtable/app_profile.rb +3 -3
  7. data/lib/google/cloud/bigtable/app_profile/list.rb +4 -2
  8. data/lib/google/cloud/bigtable/backup.rb +2 -2
  9. data/lib/google/cloud/bigtable/backup/list.rb +2 -2
  10. data/lib/google/cloud/bigtable/chunk_processor.rb +1 -1
  11. data/lib/google/cloud/bigtable/cluster.rb +2 -2
  12. data/lib/google/cloud/bigtable/cluster/list.rb +1 -1
  13. data/lib/google/cloud/bigtable/column_family.rb +2 -2
  14. data/lib/google/cloud/bigtable/column_family_map.rb +10 -10
  15. data/lib/google/cloud/bigtable/column_range.rb +2 -2
  16. data/lib/google/cloud/bigtable/credentials.rb +36 -2
  17. data/lib/google/cloud/bigtable/gc_rule.rb +7 -7
  18. data/lib/google/cloud/bigtable/instance.rb +6 -6
  19. data/lib/google/cloud/bigtable/instance/cluster_map.rb +1 -1
  20. data/lib/google/cloud/bigtable/instance/list.rb +1 -1
  21. data/lib/google/cloud/bigtable/longrunning_job.rb +2 -2
  22. data/lib/google/cloud/bigtable/mutation_entry.rb +10 -9
  23. data/lib/google/cloud/bigtable/mutation_operations.rb +2 -2
  24. data/lib/google/cloud/bigtable/project.rb +1 -1
  25. data/lib/google/cloud/bigtable/read_modify_write_rule.rb +2 -2
  26. data/lib/google/cloud/bigtable/read_operations.rb +2 -2
  27. data/lib/google/cloud/bigtable/routing_policy.rb +2 -2
  28. data/lib/google/cloud/bigtable/row_filter/chain_filter.rb +3 -3
  29. data/lib/google/cloud/bigtable/row_filter/condition_filter.rb +3 -3
  30. data/lib/google/cloud/bigtable/row_filter/interleave_filter.rb +3 -3
  31. data/lib/google/cloud/bigtable/row_filter/simple_filter.rb +3 -3
  32. data/lib/google/cloud/bigtable/row_range.rb +2 -2
  33. data/lib/google/cloud/bigtable/rows_mutator.rb +3 -3
  34. data/lib/google/cloud/bigtable/rows_reader.rb +10 -10
  35. data/lib/google/cloud/bigtable/sample_row_key.rb +2 -2
  36. data/lib/google/cloud/bigtable/service.rb +198 -281
  37. data/lib/google/cloud/bigtable/table.rb +5 -4
  38. data/lib/google/cloud/bigtable/table/cluster_state.rb +2 -2
  39. data/lib/google/cloud/bigtable/table/list.rb +1 -1
  40. data/lib/google/cloud/bigtable/value_range.rb +2 -2
  41. data/lib/google/cloud/bigtable/version.rb +1 -1
  42. metadata +11 -93
  43. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +0 -145
  44. data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +0 -90
  45. data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +0 -208
  46. data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +0 -154
  47. data/lib/google/bigtable/admin/v2/common_pb.rb +0 -30
  48. data/lib/google/bigtable/admin/v2/instance_pb.rb +0 -74
  49. data/lib/google/bigtable/admin/v2/table_pb.rb +0 -127
  50. data/lib/google/bigtable/v2/bigtable_pb.rb +0 -113
  51. data/lib/google/bigtable/v2/bigtable_services_pb.rb +0 -68
  52. data/lib/google/bigtable/v2/data_pb.rb +0 -156
  53. data/lib/google/cloud/bigtable/admin.rb +0 -202
  54. data/lib/google/cloud/bigtable/admin/credentials.rb +0 -27
  55. data/lib/google/cloud/bigtable/admin/v2.rb +0 -223
  56. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb +0 -1451
  57. data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client_config.json +0 -139
  58. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client.rb +0 -1734
  59. data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin_client_config.json +0 -163
  60. data/lib/google/cloud/bigtable/admin/v2/credentials.rb +0 -51
  61. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_instance_admin.rb +0 -297
  62. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/bigtable_table_admin.rb +0 -587
  63. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/instance.rb +0 -193
  64. data/lib/google/cloud/bigtable/admin/v2/doc/google/bigtable/admin/v2/table.rb +0 -303
  65. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/iam_policy.rb +0 -64
  66. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/options.rb +0 -33
  67. data/lib/google/cloud/bigtable/admin/v2/doc/google/iam/v1/policy.rb +0 -151
  68. data/lib/google/cloud/bigtable/admin/v2/doc/google/longrunning/operations.rb +0 -51
  69. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/any.rb +0 -131
  70. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/duration.rb +0 -91
  71. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/empty.rb +0 -29
  72. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/field_mask.rb +0 -222
  73. data/lib/google/cloud/bigtable/admin/v2/doc/google/protobuf/timestamp.rb +0 -113
  74. data/lib/google/cloud/bigtable/admin/v2/doc/google/rpc/status.rb +0 -39
  75. data/lib/google/cloud/bigtable/admin/v2/doc/google/type/expr.rb +0 -45
  76. data/lib/google/cloud/bigtable/v2.rb +0 -146
  77. data/lib/google/cloud/bigtable/v2/bigtable_client.rb +0 -591
  78. data/lib/google/cloud/bigtable/v2/bigtable_client_config.json +0 -83
  79. data/lib/google/cloud/bigtable/v2/credentials.rb +0 -46
  80. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/bigtable.rb +0 -290
  81. data/lib/google/cloud/bigtable/v2/doc/google/bigtable/v2/data.rb +0 -493
  82. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/any.rb +0 -131
  83. data/lib/google/cloud/bigtable/v2/doc/google/protobuf/wrappers.rb +0 -34
  84. data/lib/google/cloud/bigtable/v2/doc/google/rpc/status.rb +0 -39
@@ -1,193 +0,0 @@
1
- # Copyright 2020 Google LLC
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
- # https://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
-
16
- module Google
17
- module Bigtable
18
- module Admin
19
- module V2
20
- # A collection of Bigtable {Google::Bigtable::Admin::V2::Table Tables} and
21
- # the resources that serve them.
22
- # All tables in an instance are served from all
23
- # {Google::Bigtable::Admin::V2::Cluster Clusters} in the instance.
24
- # @!attribute [rw] name
25
- # @return [String]
26
- # The unique name of the instance. Values are of the form
27
- # `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
28
- # @!attribute [rw] display_name
29
- # @return [String]
30
- # Required. The descriptive name for this instance as it appears in UIs.
31
- # Can be changed at any time, but should be kept globally unique
32
- # to avoid confusion.
33
- # @!attribute [rw] state
34
- # @return [Google::Bigtable::Admin::V2::Instance::State]
35
- # (`OutputOnly`)
36
- # The current state of the instance.
37
- # @!attribute [rw] type
38
- # @return [Google::Bigtable::Admin::V2::Instance::Type]
39
- # The type of the instance. Defaults to `PRODUCTION`.
40
- # @!attribute [rw] labels
41
- # @return [Hash{String => String}]
42
- # Labels are a flexible and lightweight mechanism for organizing cloud
43
- # resources into groups that reflect a customer's organizational needs and
44
- # deployment strategies. They can be used to filter resources and aggregate
45
- # metrics.
46
- #
47
- # * Label keys must be between 1 and 63 characters long and must conform to
48
- # the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
49
- # * Label values must be between 0 and 63 characters long and must conform to
50
- # the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
51
- # * No more than 64 labels can be associated with a given resource.
52
- # * Keys and values must both be under 128 bytes.
53
- class Instance
54
- # Possible states of an instance.
55
- module State
56
- # The state of the instance could not be determined.
57
- STATE_NOT_KNOWN = 0
58
-
59
- # The instance has been successfully created and can serve requests
60
- # to its tables.
61
- READY = 1
62
-
63
- # The instance is currently being created, and may be destroyed
64
- # if the creation process encounters an error.
65
- CREATING = 2
66
- end
67
-
68
- # The type of the instance.
69
- module Type
70
- # The type of the instance is unspecified. If set when creating an
71
- # instance, a `PRODUCTION` instance will be created. If set when updating
72
- # an instance, the type will be left unchanged.
73
- TYPE_UNSPECIFIED = 0
74
-
75
- # An instance meant for production use. `serve_nodes` must be set
76
- # on the cluster.
77
- PRODUCTION = 1
78
-
79
- # The instance is meant for development and testing purposes only; it has
80
- # no performance or uptime guarantees and is not covered by SLA.
81
- # After a development instance is created, it can be upgraded by
82
- # updating the instance to type `PRODUCTION`. An instance created
83
- # as a production instance cannot be changed to a development instance.
84
- # When creating a development instance, `serve_nodes` on the cluster must
85
- # not be set.
86
- DEVELOPMENT = 2
87
- end
88
- end
89
-
90
- # A resizable group of nodes in a particular cloud location, capable
91
- # of serving all {Google::Bigtable::Admin::V2::Table Tables} in the parent
92
- # {Google::Bigtable::Admin::V2::Instance Instance}.
93
- # @!attribute [rw] name
94
- # @return [String]
95
- # The unique name of the cluster. Values are of the form
96
- # `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
97
- # @!attribute [rw] location
98
- # @return [String]
99
- # (`CreationOnly`)
100
- # The location where this cluster's nodes and storage reside. For best
101
- # performance, clients should be located as close as possible to this
102
- # cluster. Currently only zones are supported, so values should be of the
103
- # form `projects/{project}/locations/{zone}`.
104
- # @!attribute [rw] state
105
- # @return [Google::Bigtable::Admin::V2::Cluster::State]
106
- # The current state of the cluster.
107
- # @!attribute [rw] serve_nodes
108
- # @return [Integer]
109
- # Required. The number of nodes allocated to this cluster. More nodes enable
110
- # higher throughput and more consistent performance.
111
- # @!attribute [rw] default_storage_type
112
- # @return [Google::Bigtable::Admin::V2::StorageType]
113
- # (`CreationOnly`)
114
- # The type of storage used by this cluster to serve its
115
- # parent instance's tables, unless explicitly overridden.
116
- class Cluster
117
- # Possible states of a cluster.
118
- module State
119
- # The state of the cluster could not be determined.
120
- STATE_NOT_KNOWN = 0
121
-
122
- # The cluster has been successfully created and is ready to serve requests.
123
- READY = 1
124
-
125
- # The cluster is currently being created, and may be destroyed
126
- # if the creation process encounters an error.
127
- # A cluster may not be able to serve requests while being created.
128
- CREATING = 2
129
-
130
- # The cluster is currently being resized, and may revert to its previous
131
- # node count if the process encounters an error.
132
- # A cluster is still capable of serving requests while being resized,
133
- # but may exhibit performance as if its number of allocated nodes is
134
- # between the starting and requested states.
135
- RESIZING = 3
136
-
137
- # The cluster has no backing nodes. The data (tables) still
138
- # exist, but no operations can be performed on the cluster.
139
- DISABLED = 4
140
- end
141
- end
142
-
143
- # A configuration object describing how Cloud Bigtable should treat traffic
144
- # from a particular end user application.
145
- # @!attribute [rw] name
146
- # @return [String]
147
- # (`OutputOnly`)
148
- # The unique name of the app profile. Values are of the form
149
- # `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
150
- # @!attribute [rw] etag
151
- # @return [String]
152
- # Strongly validated etag for optimistic concurrency control. Preserve the
153
- # value returned from `GetAppProfile` when calling `UpdateAppProfile` to
154
- # fail the request if there has been a modification in the mean time. The
155
- # `update_mask` of the request need not include `etag` for this protection
156
- # to apply.
157
- # See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
158
- # [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
159
- # details.
160
- # @!attribute [rw] description
161
- # @return [String]
162
- # Optional long form description of the use case for this AppProfile.
163
- # @!attribute [rw] multi_cluster_routing_use_any
164
- # @return [Google::Bigtable::Admin::V2::AppProfile::MultiClusterRoutingUseAny]
165
- # Use a multi-cluster routing policy.
166
- # @!attribute [rw] single_cluster_routing
167
- # @return [Google::Bigtable::Admin::V2::AppProfile::SingleClusterRouting]
168
- # Use a single-cluster routing policy.
169
- class AppProfile
170
- # Read/write requests are routed to the nearest cluster in the instance, and
171
- # will fail over to the nearest cluster that is available in the event of
172
- # transient errors or delays. Clusters in a region are considered
173
- # equidistant. Choosing this option sacrifices read-your-writes consistency
174
- # to improve availability.
175
- class MultiClusterRoutingUseAny; end
176
-
177
- # Unconditionally routes all read/write requests to a specific cluster.
178
- # This option preserves read-your-writes consistency but does not improve
179
- # availability.
180
- # @!attribute [rw] cluster_id
181
- # @return [String]
182
- # The cluster to which read/write requests should be routed.
183
- # @!attribute [rw] allow_transactional_writes
184
- # @return [true, false]
185
- # Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
186
- # allowed by this app profile. It is unsafe to send these requests to
187
- # the same table/row/column in multiple clusters.
188
- class SingleClusterRouting; end
189
- end
190
- end
191
- end
192
- end
193
- end
@@ -1,303 +0,0 @@
1
- # Copyright 2020 Google LLC
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
- # https://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
-
16
- module Google
17
- module Bigtable
18
- module Admin
19
- module V2
20
- # Information about a table restore.
21
- # @!attribute [rw] source_type
22
- # @return [Google::Bigtable::Admin::V2::RestoreSourceType]
23
- # The type of the restore source.
24
- # @!attribute [rw] backup_info
25
- # @return [Google::Bigtable::Admin::V2::BackupInfo]
26
- # Information about the backup used to restore the table. The backup
27
- # may no longer exist.
28
- class RestoreInfo; end
29
-
30
- # A collection of user data indexed by row, column, and timestamp.
31
- # Each table is served using the resources of its parent cluster.
32
- # @!attribute [rw] name
33
- # @return [String]
34
- # Output only. The unique name of the table. Values are of the form
35
- # `projects/<project>/instances/<instance>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
36
- # Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
37
- # @!attribute [rw] cluster_states
38
- # @return [Hash{String => Google::Bigtable::Admin::V2::Table::ClusterState}]
39
- # Output only. Map from cluster ID to per-cluster table state.
40
- # If it could not be determined whether or not the table has data in a
41
- # particular cluster (for example, if its zone is unavailable), then
42
- # there will be an entry for the cluster with UNKNOWN `replication_status`.
43
- # Views: `REPLICATION_VIEW`, `FULL`
44
- # @!attribute [rw] column_families
45
- # @return [Hash{String => Google::Bigtable::Admin::V2::ColumnFamily}]
46
- # (`CreationOnly`)
47
- # The column families configured for this table, mapped by column family ID.
48
- # Views: `SCHEMA_VIEW`, `FULL`
49
- # @!attribute [rw] granularity
50
- # @return [Google::Bigtable::Admin::V2::Table::TimestampGranularity]
51
- # (`CreationOnly`)
52
- # The granularity (i.e. `MILLIS`) at which timestamps are stored in
53
- # this table. Timestamps not matching the granularity will be rejected.
54
- # If unspecified at creation time, the value will be set to `MILLIS`.
55
- # Views: `SCHEMA_VIEW`, `FULL`.
56
- # @!attribute [rw] restore_info
57
- # @return [Google::Bigtable::Admin::V2::RestoreInfo]
58
- # Output only. If this table was restored from another data source (e.g. a
59
- # backup), this field will be populated with information about the restore.
60
- class Table
61
- # The state of a table's data in a particular cluster.
62
- # @!attribute [rw] replication_state
63
- # @return [Google::Bigtable::Admin::V2::Table::ClusterState::ReplicationState]
64
- # Output only. The state of replication for the table in this cluster.
65
- class ClusterState
66
- # Table replication states.
67
- module ReplicationState
68
- # The replication state of the table is unknown in this cluster.
69
- STATE_NOT_KNOWN = 0
70
-
71
- # The cluster was recently created, and the table must finish copying
72
- # over pre-existing data from other clusters before it can begin
73
- # receiving live replication updates and serving Data API requests.
74
- INITIALIZING = 1
75
-
76
- # The table is temporarily unable to serve Data API requests from this
77
- # cluster due to planned internal maintenance.
78
- PLANNED_MAINTENANCE = 2
79
-
80
- # The table is temporarily unable to serve Data API requests from this
81
- # cluster due to unplanned or emergency maintenance.
82
- UNPLANNED_MAINTENANCE = 3
83
-
84
- # The table can serve Data API requests from this cluster. Depending on
85
- # replication delay, reads may not immediately reflect the state of the
86
- # table in other clusters.
87
- READY = 4
88
-
89
- # The table is fully created and ready for use after a restore, and is
90
- # being optimized for performance. When optimizations are complete, the
91
- # table will transition to `READY` state.
92
- READY_OPTIMIZING = 5
93
- end
94
- end
95
-
96
- # Possible timestamp granularities to use when keeping multiple versions
97
- # of data in a table.
98
- module TimestampGranularity
99
- # The user did not specify a granularity. Should not be returned.
100
- # When specified during table creation, MILLIS will be used.
101
- TIMESTAMP_GRANULARITY_UNSPECIFIED = 0
102
-
103
- # The table keeps data versioned at a granularity of 1ms.
104
- MILLIS = 1
105
- end
106
-
107
- # Defines a view over a table's fields.
108
- module View
109
- # Uses the default view for each method as documented in its request.
110
- VIEW_UNSPECIFIED = 0
111
-
112
- # Only populates `name`.
113
- NAME_ONLY = 1
114
-
115
- # Only populates `name` and fields related to the table's schema.
116
- SCHEMA_VIEW = 2
117
-
118
- # Only populates `name` and fields related to the table's replication
119
- # state.
120
- REPLICATION_VIEW = 3
121
-
122
- # Populates all fields.
123
- FULL = 4
124
- end
125
- end
126
-
127
- # A set of columns within a table which share a common configuration.
128
- # @!attribute [rw] gc_rule
129
- # @return [Google::Bigtable::Admin::V2::GcRule]
130
- # Garbage collection rule specified as a protobuf.
131
- # Must serialize to at most 500 bytes.
132
- #
133
- # NOTE: Garbage collection executes opportunistically in the background, and
134
- # so it's possible for reads to return a cell even if it matches the active
135
- # GC expression for its family.
136
- class ColumnFamily; end
137
-
138
- # Rule for determining which cells to delete during garbage collection.
139
- # @!attribute [rw] max_num_versions
140
- # @return [Integer]
141
- # Delete all cells in a column except the most recent N.
142
- # @!attribute [rw] max_age
143
- # @return [Google::Protobuf::Duration]
144
- # Delete cells in a column older than the given age.
145
- # Values must be at least one millisecond, and will be truncated to
146
- # microsecond granularity.
147
- # @!attribute [rw] intersection
148
- # @return [Google::Bigtable::Admin::V2::GcRule::Intersection]
149
- # Delete cells that would be deleted by every nested rule.
150
- # @!attribute [rw] union
151
- # @return [Google::Bigtable::Admin::V2::GcRule::Union]
152
- # Delete cells that would be deleted by any nested rule.
153
- class GcRule
154
- # A GcRule which deletes cells matching all of the given rules.
155
- # @!attribute [rw] rules
156
- # @return [Array<Google::Bigtable::Admin::V2::GcRule>]
157
- # Only delete cells which would be deleted by every element of `rules`.
158
- class Intersection; end
159
-
160
- # A GcRule which deletes cells matching any of the given rules.
161
- # @!attribute [rw] rules
162
- # @return [Array<Google::Bigtable::Admin::V2::GcRule>]
163
- # Delete cells which would be deleted by any element of `rules`.
164
- class Union; end
165
- end
166
-
167
- # A snapshot of a table at a particular time. A snapshot can be used as a
168
- # checkpoint for data restoration or a data source for a new table.
169
- #
170
- # Note: This is a private alpha release of Cloud Bigtable snapshots. This
171
- # feature is not currently available to most Cloud Bigtable customers. This
172
- # feature might be changed in backward-incompatible ways and is not recommended
173
- # for production use. It is not subject to any SLA or deprecation policy.
174
- # @!attribute [rw] name
175
- # @return [String]
176
- # Output only. The unique name of the snapshot.
177
- # Values are of the form
178
- # `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
179
- # @!attribute [rw] source_table
180
- # @return [Google::Bigtable::Admin::V2::Table]
181
- # Output only. The source table at the time the snapshot was taken.
182
- # @!attribute [rw] data_size_bytes
183
- # @return [Integer]
184
- # Output only. The size of the data in the source table at the time the
185
- # snapshot was taken. In some cases, this value may be computed
186
- # asynchronously via a background process and a placeholder of 0 will be used
187
- # in the meantime.
188
- # @!attribute [rw] create_time
189
- # @return [Google::Protobuf::Timestamp]
190
- # Output only. The time when the snapshot is created.
191
- # @!attribute [rw] delete_time
192
- # @return [Google::Protobuf::Timestamp]
193
- # Output only. The time when the snapshot will be deleted. The maximum amount
194
- # of time a snapshot can stay active is 365 days. If 'ttl' is not specified,
195
- # the default maximum of 365 days will be used.
196
- # @!attribute [rw] state
197
- # @return [Google::Bigtable::Admin::V2::Snapshot::State]
198
- # Output only. The current state of the snapshot.
199
- # @!attribute [rw] description
200
- # @return [String]
201
- # Output only. Description of the snapshot.
202
- class Snapshot
203
- # Possible states of a snapshot.
204
- module State
205
- # The state of the snapshot could not be determined.
206
- STATE_NOT_KNOWN = 0
207
-
208
- # The snapshot has been successfully created and can serve all requests.
209
- READY = 1
210
-
211
- # The snapshot is currently being created, and may be destroyed if the
212
- # creation process encounters an error. A snapshot may not be restored to a
213
- # table while it is being created.
214
- CREATING = 2
215
- end
216
- end
217
-
218
- # A backup of a Cloud Bigtable table.
219
- # @!attribute [rw] name
220
- # @return [String]
221
- # Output only. A globally unique identifier for the backup which cannot be
222
- # changed. Values are of the form
223
- # `projects/{project}/instances/{instance}/clusters/{cluster}/
224
- # backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
225
- # The final segment of the name must be between 1 and 50 characters
226
- # in length.
227
- #
228
- # The backup is stored in the cluster identified by the prefix of the backup
229
- # name of the form
230
- # `projects/{project}/instances/{instance}/clusters/{cluster}`.
231
- # @!attribute [rw] source_table
232
- # @return [String]
233
- # Required. Immutable. Name of the table from which this backup was created.
234
- # This needs to be in the same instance as the backup. Values are of the form
235
- # `projects/{project}/instances/{instance}/tables/{source_table}`.
236
- # @!attribute [rw] expire_time
237
- # @return [Google::Protobuf::Timestamp]
238
- # Required. The expiration time of the backup, with microseconds
239
- # granularity that must be at least 6 hours and at most 30 days
240
- # from the time the request is received. Once the `expire_time`
241
- # has passed, Cloud Bigtable will delete the backup and free the
242
- # resources used by the backup.
243
- # @!attribute [rw] start_time
244
- # @return [Google::Protobuf::Timestamp]
245
- # Output only. `start_time` is the time that the backup was started
246
- # (i.e. approximately the time the
247
- # {Google::Bigtable::Admin::V2::BigtableTableAdmin::CreateBackup CreateBackup}
248
- # request is received). The row data in this backup will be no older than
249
- # this timestamp.
250
- # @!attribute [rw] end_time
251
- # @return [Google::Protobuf::Timestamp]
252
- # Output only. `end_time` is the time that the backup was finished. The row
253
- # data in the backup will be no newer than this timestamp.
254
- # @!attribute [rw] size_bytes
255
- # @return [Integer]
256
- # Output only. Size of the backup in bytes.
257
- # @!attribute [rw] state
258
- # @return [Google::Bigtable::Admin::V2::Backup::State]
259
- # Output only. The current state of the backup.
260
- class Backup
261
- # Indicates the current state of the backup.
262
- module State
263
- # Not specified.
264
- STATE_UNSPECIFIED = 0
265
-
266
- # The pending backup is still being created. Operations on the
267
- # backup may fail with `FAILED_PRECONDITION` in this state.
268
- CREATING = 1
269
-
270
- # The backup is complete and ready for use.
271
- READY = 2
272
- end
273
- end
274
-
275
- # Information about a backup.
276
- # @!attribute [rw] backup
277
- # @return [String]
278
- # Output only. Name of the backup.
279
- # @!attribute [rw] start_time
280
- # @return [Google::Protobuf::Timestamp]
281
- # Output only. The time that the backup was started. Row data in the backup
282
- # will be no older than this timestamp.
283
- # @!attribute [rw] end_time
284
- # @return [Google::Protobuf::Timestamp]
285
- # Output only. This time that the backup was finished. Row data in the
286
- # backup will be no newer than this timestamp.
287
- # @!attribute [rw] source_table
288
- # @return [String]
289
- # Output only. Name of the table the backup was created from.
290
- class BackupInfo; end
291
-
292
- # Indicates the type of the restore source.
293
- module RestoreSourceType
294
- # No restore associated.
295
- RESTORE_SOURCE_TYPE_UNSPECIFIED = 0
296
-
297
- # A backup was used as the source of the restore.
298
- BACKUP = 1
299
- end
300
- end
301
- end
302
- end
303
- end