google-cloud-gke_backup-v1 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +70 -40
  4. data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +5 -3
  5. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +79 -40
  6. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +9 -7
  7. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +24 -24
  8. data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb +1 -0
  9. data/lib/google/cloud/gke_backup/v1/bindings_override.rb +255 -0
  10. data/lib/google/cloud/gke_backup/v1/rest.rb +1 -0
  11. data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
  12. data/lib/google/cloud/gkebackup/v1/backup_pb.rb +26 -49
  13. data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +27 -35
  14. data/lib/google/cloud/gkebackup/v1/common_pb.rb +24 -14
  15. data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +32 -152
  16. data/lib/google/cloud/gkebackup/v1/restore_pb.rb +30 -70
  17. data/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +27 -13
  18. data/lib/google/cloud/gkebackup/v1/volume_pb.rb +26 -55
  19. data/proto_docs/google/api/client.rb +67 -4
  20. data/proto_docs/google/cloud/gkebackup/v1/backup.rb +43 -31
  21. data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +54 -13
  22. data/proto_docs/google/cloud/gkebackup/v1/common.rb +1 -1
  23. data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +63 -61
  24. data/proto_docs/google/cloud/gkebackup/v1/restore.rb +194 -29
  25. data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +40 -13
  26. data/proto_docs/google/cloud/gkebackup/v1/volume.rb +23 -20
  27. data/proto_docs/google/protobuf/any.rb +7 -4
  28. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  29. data/proto_docs/google/type/expr.rb +75 -0
  30. metadata +46 -4
@@ -0,0 +1,255 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module GkeBackup
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/gke_backup/v1/rest"
28
+ # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "GkeBackup"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
68
+
69
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
70
+ uri_method: :get,
71
+ uri_template: "/v1/{resource}:getIamPolicy",
72
+ matches: [
73
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
74
+ ],
75
+ body: nil
76
+ ),
77
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
78
+ uri_method: :get,
79
+ uri_template: "/v1/{resource}:getIamPolicy",
80
+ matches: [
81
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false]
82
+ ],
83
+ body: nil
84
+ ),
85
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
86
+ uri_method: :get,
87
+ uri_template: "/v1/{resource}:getIamPolicy",
88
+ matches: [
89
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false]
90
+ ],
91
+ body: nil
92
+ ),
93
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
94
+ uri_method: :get,
95
+ uri_template: "/v1/{resource}:getIamPolicy",
96
+ matches: [
97
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false]
98
+ ],
99
+ body: nil
100
+ ),
101
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
102
+ uri_method: :get,
103
+ uri_template: "/v1/{resource}:getIamPolicy",
104
+ matches: [
105
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false]
106
+ ],
107
+ body: nil
108
+ ),
109
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
110
+ uri_method: :get,
111
+ uri_template: "/v1/{resource}:getIamPolicy",
112
+ matches: [
113
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false]
114
+ ],
115
+ body: nil
116
+ )
117
+ ]
118
+ default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
119
+
120
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
121
+ uri_method: :post,
122
+ uri_template: "/v1/{resource}:setIamPolicy",
123
+ matches: [
124
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
125
+ ],
126
+ body: "*"
127
+ ),
128
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
129
+ uri_method: :post,
130
+ uri_template: "/v1/{resource}:setIamPolicy",
131
+ matches: [
132
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false]
133
+ ],
134
+ body: "*"
135
+ ),
136
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
137
+ uri_method: :post,
138
+ uri_template: "/v1/{resource}:setIamPolicy",
139
+ matches: [
140
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false]
141
+ ],
142
+ body: "*"
143
+ ),
144
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
145
+ uri_method: :post,
146
+ uri_template: "/v1/{resource}:setIamPolicy",
147
+ matches: [
148
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false]
149
+ ],
150
+ body: "*"
151
+ ),
152
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
153
+ uri_method: :post,
154
+ uri_template: "/v1/{resource}:setIamPolicy",
155
+ matches: [
156
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false]
157
+ ],
158
+ body: "*"
159
+ ),
160
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
161
+ uri_method: :post,
162
+ uri_template: "/v1/{resource}:setIamPolicy",
163
+ matches: [
164
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false]
165
+ ],
166
+ body: "*"
167
+ )
168
+ ]
169
+ default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
170
+
171
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
172
+ uri_method: :post,
173
+ uri_template: "/v1/{resource}:testIamPermissions",
174
+ matches: [
175
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false]
176
+ ],
177
+ body: "*"
178
+ ),
179
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
180
+ uri_method: :post,
181
+ uri_template: "/v1/{resource}:testIamPermissions",
182
+ matches: [
183
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false]
184
+ ],
185
+ body: "*"
186
+ ),
187
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
188
+ uri_method: :post,
189
+ uri_template: "/v1/{resource}:testIamPermissions",
190
+ matches: [
191
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false]
192
+ ],
193
+ body: "*"
194
+ ),
195
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
196
+ uri_method: :post,
197
+ uri_template: "/v1/{resource}:testIamPermissions",
198
+ matches: [
199
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false]
200
+ ],
201
+ body: "*"
202
+ ),
203
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
204
+ uri_method: :post,
205
+ uri_template: "/v1/{resource}:testIamPermissions",
206
+ matches: [
207
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false]
208
+ ],
209
+ body: "*"
210
+ ),
211
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
212
+ uri_method: :post,
213
+ uri_template: "/v1/{resource}:testIamPermissions",
214
+ matches: [
215
+ ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false]
216
+ ],
217
+ body: "*"
218
+ )
219
+ ]
220
+ default_config
221
+ end
222
+ yield @configure if block_given?
223
+ @configure
224
+ end
225
+
226
+ ##
227
+ # @private
228
+ # Configuration class for the google.cloud.gkebackup.v1 package.
229
+ #
230
+ # This class contains common configuration for all services
231
+ # of the google.cloud.gkebackup.v1 package.
232
+ #
233
+ # This configuration is for internal use of the client library classes,
234
+ # and it is not intended that the end-users will read or change it.
235
+ #
236
+ class Configuration
237
+ extend ::Gapic::Config
238
+
239
+ # @private
240
+ # Overrides for http bindings for the RPC of the mixins for this package.
241
+ # Services in this package should use these when creating clients for the mixin services.
242
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
243
+ config_attr :bindings_override, {}, ::Hash, nil
244
+
245
+ # @private
246
+ def initialize parent_config = nil
247
+ @parent_config = parent_config unless parent_config.nil?
248
+
249
+ yield self if block_given?
250
+ end
251
+ end
252
+ end
253
+ end
254
+ end
255
+ end
@@ -17,6 +17,7 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/gke_backup/v1/backup_for_gke/rest"
20
+ require "google/cloud/gke_backup/v1/bindings_override"
20
21
  require "google/cloud/gke_backup/v1/version"
21
22
 
22
23
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module GkeBackup
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/gkebackup/v1/backup.proto
3
4
 
@@ -8,57 +9,33 @@ require 'google/api/resource_pb'
8
9
  require 'google/cloud/gkebackup/v1/common_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/gkebackup/v1/backup.proto", :syntax => :proto3) do
13
- add_message "google.cloud.gkebackup.v1.Backup" do
14
- optional :name, :string, 1
15
- optional :uid, :string, 2
16
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
17
- optional :update_time, :message, 4, "google.protobuf.Timestamp"
18
- optional :manual, :bool, 5
19
- map :labels, :string, :string, 6
20
- optional :delete_lock_days, :int32, 7
21
- optional :delete_lock_expire_time, :message, 8, "google.protobuf.Timestamp"
22
- optional :retain_days, :int32, 9
23
- optional :retain_expire_time, :message, 10, "google.protobuf.Timestamp"
24
- optional :encryption_key, :message, 11, "google.cloud.gkebackup.v1.EncryptionKey"
25
- optional :contains_volume_data, :bool, 15
26
- optional :contains_secrets, :bool, 16
27
- optional :cluster_metadata, :message, 17, "google.cloud.gkebackup.v1.Backup.ClusterMetadata"
28
- optional :state, :enum, 18, "google.cloud.gkebackup.v1.Backup.State"
29
- optional :state_reason, :string, 19
30
- optional :complete_time, :message, 20, "google.protobuf.Timestamp"
31
- optional :resource_count, :int32, 21
32
- optional :volume_count, :int32, 22
33
- optional :size_bytes, :int64, 23
34
- optional :etag, :string, 24
35
- optional :description, :string, 25
36
- optional :pod_count, :int32, 26
37
- optional :config_backup_size_bytes, :int64, 27
38
- oneof :backup_scope do
39
- optional :all_namespaces, :bool, 12
40
- optional :selected_namespaces, :message, 13, "google.cloud.gkebackup.v1.Namespaces"
41
- optional :selected_applications, :message, 14, "google.cloud.gkebackup.v1.NamespacedNames"
42
- end
43
- end
44
- add_message "google.cloud.gkebackup.v1.Backup.ClusterMetadata" do
45
- optional :cluster, :string, 1
46
- optional :k8s_version, :string, 2
47
- map :backup_crd_versions, :string, :string, 3
48
- oneof :platform_version do
49
- optional :gke_version, :string, 4
50
- optional :anthos_version, :string, 5
51
- end
52
- end
53
- add_enum "google.cloud.gkebackup.v1.Backup.State" do
54
- value :STATE_UNSPECIFIED, 0
55
- value :CREATING, 1
56
- value :IN_PROGRESS, 2
57
- value :SUCCEEDED, 3
58
- value :FAILED, 4
59
- value :DELETING, 5
12
+
13
+ descriptor_data = "\n&google/cloud/gkebackup/v1/backup.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\r\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06manual\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12=\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.gkebackup.v1.Backup.LabelsEntry\x12\x18\n\x10\x64\x65lete_lock_days\x18\x07 \x01(\x05\x12@\n\x17\x64\x65lete_lock_expire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0bretain_days\x18\t \x01(\x05\x12;\n\x12retain_expire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x65ncryption_key\x18\x0b \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x03\x12\x1d\n\x0e\x61ll_namespaces\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12I\n\x13selected_namespaces\x18\r \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesB\x03\xe0\x41\x03H\x00\x12P\n\x15selected_applications\x18\x0e \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesB\x03\xe0\x41\x03H\x00\x12!\n\x14\x63ontains_volume_data\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontains_secrets\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12P\n\x10\x63luster_metadata\x18\x11 \x01(\x0b\x32\x31.google.cloud.gkebackup.v1.Backup.ClusterMetadataB\x03\xe0\x41\x03\x12;\n\x05state\x18\x12 \x01(\x0e\x32\'.google.cloud.gkebackup.v1.Backup.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x13 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_count\x18\x15 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cvolume_count\x18\x16 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x19 \x01(\t\x12\x16\n\tpod_count\x18\x1a \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18\x63onfig_backup_size_bytes\x18\x1b \x01(\x03\x42\x03\xe0\x41\x03\x1a\x9d\x02\n\x0f\x43lusterMetadata\x12\x0f\n\x07\x63luster\x18\x01 \x01(\t\x12\x13\n\x0bk8s_version\x18\x02 \x01(\t\x12\x65\n\x13\x62\x61\x63kup_crd_versions\x18\x03 \x03(\x0b\x32H.google.cloud.gkebackup.v1.Backup.ClusterMetadata.BackupCrdVersionsEntry\x12\x15\n\x0bgke_version\x18\x04 \x01(\tH\x00\x12\x18\n\x0e\x61nthos_version\x18\x05 \x01(\tH\x00\x1a\x38\n\x16\x42\x61\x63kupCrdVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x12\n\x10platform_version\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05:x\xea\x41u\n\x1fgkebackup.googleapis.com/Backup\x12Rprojects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}B\x0e\n\x0c\x62\x61\x63kup_scopeB\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x42\x61\x63kupProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.cloud.gkebackup.v1.EncryptionKey", "google/cloud/gkebackup/v1/common.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
60
35
  end
61
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
62
39
  end
63
40
 
64
41
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/gkebackup/v1/backup_plan.proto
3
4
 
@@ -8,43 +9,33 @@ require 'google/api/resource_pb'
8
9
  require 'google/cloud/gkebackup/v1/common_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/gkebackup/v1/backup_plan.proto", :syntax => :proto3) do
13
- add_message "google.cloud.gkebackup.v1.BackupPlan" do
14
- optional :name, :string, 1
15
- optional :uid, :string, 2
16
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
17
- optional :update_time, :message, 4, "google.protobuf.Timestamp"
18
- optional :description, :string, 5
19
- optional :cluster, :string, 6
20
- optional :retention_policy, :message, 7, "google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy"
21
- map :labels, :string, :string, 8
22
- optional :backup_schedule, :message, 9, "google.cloud.gkebackup.v1.BackupPlan.Schedule"
23
- optional :etag, :string, 10
24
- optional :deactivated, :bool, 11
25
- optional :backup_config, :message, 12, "google.cloud.gkebackup.v1.BackupPlan.BackupConfig"
26
- optional :protected_pod_count, :int32, 13
27
- end
28
- add_message "google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy" do
29
- optional :backup_delete_lock_days, :int32, 1
30
- optional :backup_retain_days, :int32, 2
31
- optional :locked, :bool, 3
32
- end
33
- add_message "google.cloud.gkebackup.v1.BackupPlan.Schedule" do
34
- optional :cron_schedule, :string, 1
35
- optional :paused, :bool, 2
36
- end
37
- add_message "google.cloud.gkebackup.v1.BackupPlan.BackupConfig" do
38
- optional :include_volume_data, :bool, 4
39
- optional :include_secrets, :bool, 5
40
- optional :encryption_key, :message, 6, "google.cloud.gkebackup.v1.EncryptionKey"
41
- oneof :backup_scope do
42
- optional :all_namespaces, :bool, 1
43
- optional :selected_namespaces, :message, 2, "google.cloud.gkebackup.v1.Namespaces"
44
- optional :selected_applications, :message, 3, "google.cloud.gkebackup.v1.NamespacedNames"
45
- end
12
+
13
+ descriptor_data = "\n+google/cloud/gkebackup/v1/backup_plan.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x0b\n\nBackupPlan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12<\n\x07\x63luster\x18\x06 \x01(\tB+\xe0\x41\x05\xe0\x41\x02\xfa\x41\"\n container.googleapis.com/Cluster\x12O\n\x10retention_policy\x18\x07 \x01(\x0b\x32\x35.google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy\x12\x41\n\x06labels\x18\x08 \x03(\x0b\x32\x31.google.cloud.gkebackup.v1.BackupPlan.LabelsEntry\x12G\n\x0f\x62\x61\x63kup_schedule\x18\t \x01(\x0b\x32..google.cloud.gkebackup.v1.BackupPlan.Schedule\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65\x61\x63tivated\x18\x0b \x01(\x08\x12I\n\rbackup_config\x18\x0c \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.BackupPlan.BackupConfig\x12 \n\x13protected_pod_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12?\n\x05state\x18\x0e \x01(\x0e\x32+.google.cloud.gkebackup.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0f \x01(\tB\x03\xe0\x41\x03\x1a^\n\x0fRetentionPolicy\x12\x1f\n\x17\x62\x61\x63kup_delete_lock_days\x18\x01 \x01(\x05\x12\x1a\n\x12\x62\x61\x63kup_retain_days\x18\x02 \x01(\x05\x12\x0e\n\x06locked\x18\x03 \x01(\x08\x1a\x31\n\x08Schedule\x12\x15\n\rcron_schedule\x18\x01 \x01(\t\x12\x0e\n\x06paused\x18\x02 \x01(\x08\x1a\xc3\x02\n\x0c\x42\x61\x63kupConfig\x12\x18\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08H\x00\x12\x44\n\x13selected_namespaces\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12K\n\x15selected_applications\x18\x03 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x12\x1b\n\x13include_volume_data\x18\x04 \x01(\x08\x12\x17\n\x0finclude_secrets\x18\x05 \x01(\x08\x12@\n\x0e\x65ncryption_key\x18\x06 \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x0e\n\x0c\x62\x61\x63kup_scope\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\x10\n\x0cPROVISIONING\x10\x02\x12\t\n\x05READY\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0f\n\x0b\x44\x45\x41\x43TIVATED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06:k\xea\x41h\n#gkebackup.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}B\xc6\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/common.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
46
35
  end
47
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
48
39
  end
49
40
 
50
41
  module Google
@@ -55,6 +46,7 @@ module Google
55
46
  BackupPlan::RetentionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy").msgclass
56
47
  BackupPlan::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.Schedule").msgclass
57
48
  BackupPlan::BackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.BackupConfig").msgclass
49
+ BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.State").enummodule
58
50
  end
59
51
  end
60
52
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/gkebackup/v1/common.proto
3
4
 
@@ -5,22 +6,31 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/api/resource_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/gkebackup/v1/common.proto", :syntax => :proto3) do
10
- add_message "google.cloud.gkebackup.v1.Namespaces" do
11
- repeated :namespaces, :string, 1
12
- end
13
- add_message "google.cloud.gkebackup.v1.NamespacedName" do
14
- optional :namespace, :string, 1
15
- optional :name, :string, 2
16
- end
17
- add_message "google.cloud.gkebackup.v1.NamespacedNames" do
18
- repeated :namespaced_names, :message, 1, "google.cloud.gkebackup.v1.NamespacedName"
19
- end
20
- add_message "google.cloud.gkebackup.v1.EncryptionKey" do
21
- optional :gcp_kms_encryption_key, :string, 1
9
+
10
+ descriptor_data = "\n&google/cloud/gkebackup/v1/common.proto\x12\x19google.cloud.gkebackup.v1\x1a\x19google/api/resource.proto\" \n\nNamespaces\x12\x12\n\nnamespaces\x18\x01 \x03(\t\"1\n\x0eNamespacedName\x12\x11\n\tnamespace\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"V\n\x0fNamespacedNames\x12\x43\n\x10namespaced_names\x18\x01 \x03(\x0b\x32).google.cloud.gkebackup.v1.NamespacedName\"W\n\rEncryptionKey\x12\x46\n\x16gcp_kms_encryption_key\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyB\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
22
30
  end
23
31
  end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
24
34
  end
25
35
 
26
36
  module Google