google-cloud-dataflow-v1beta3 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/client.rb +351 -0
  5. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/service_stub.rb +109 -0
  6. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest.rb +51 -0
  7. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service.rb +7 -1
  8. data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +8 -12
  9. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/client.rb +784 -0
  10. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/service_stub.rb +454 -0
  11. data/lib/google/cloud/dataflow/v1beta3/jobs/rest.rb +52 -0
  12. data/lib/google/cloud/dataflow/v1beta3/jobs.rb +7 -1
  13. data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +4 -6
  14. data/lib/google/cloud/dataflow/v1beta3/messages/rest/client.rb +373 -0
  15. data/lib/google/cloud/dataflow/v1beta3/messages/rest/service_stub.rb +117 -0
  16. data/lib/google/cloud/dataflow/v1beta3/messages/rest.rb +52 -0
  17. data/lib/google/cloud/dataflow/v1beta3/messages.rb +7 -1
  18. data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +8 -12
  19. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/client.rb +539 -0
  20. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/service_stub.rb +240 -0
  21. data/lib/google/cloud/dataflow/v1beta3/metrics/rest.rb +52 -0
  22. data/lib/google/cloud/dataflow/v1beta3/metrics.rb +7 -1
  23. data/lib/google/cloud/dataflow/v1beta3/rest.rb +42 -0
  24. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/client.rb +494 -0
  25. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/service_stub.rb +261 -0
  26. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest.rb +51 -0
  27. data/lib/google/cloud/dataflow/v1beta3/snapshots.rb +7 -1
  28. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +522 -0
  29. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/service_stub.rb +253 -0
  30. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest.rb +51 -0
  31. data/lib/google/cloud/dataflow/v1beta3/templates_service.rb +7 -1
  32. data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
  33. data/lib/google/cloud/dataflow/v1beta3.rb +7 -2
  34. data/proto_docs/google/api/client.rb +318 -0
  35. data/proto_docs/google/api/launch_stage.rb +71 -0
  36. data/proto_docs/google/rpc/status.rb +4 -2
  37. metadata +29 -8
@@ -0,0 +1,261 @@
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 "google/dataflow/v1beta3/snapshots_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dataflow
24
+ module V1beta3
25
+ module Snapshots
26
+ module Rest
27
+ ##
28
+ # REST service stub for the Snapshots service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the get_snapshot REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::Snapshot]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Cloud::Dataflow::V1beta3::Snapshot]
56
+ # A result object deserialized from the server's reply
57
+ def get_snapshot request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_snapshot_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Cloud::Dataflow::V1beta3::Snapshot.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the delete_snapshot REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse]
94
+ # A result object deserialized from the server's reply
95
+ def delete_snapshot request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_snapshot_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotResponse.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the list_snapshots REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::ListSnapshotsRequest]
123
+ # A request object representing the call parameters. Required.
124
+ # @param options [::Gapic::CallOptions]
125
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
126
+ #
127
+ # @yield [result, operation] Access the result along with the TransportOperation object
128
+ # @yieldparam result [::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse]
132
+ # A result object deserialized from the server's reply
133
+ def list_snapshots request_pb, options = nil
134
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
135
+
136
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_snapshots_request request_pb
137
+ query_string_params = if query_string_params.any?
138
+ query_string_params.to_h { |p| p.split("=", 2) }
139
+ else
140
+ {}
141
+ end
142
+
143
+ response = @client_stub.make_http_request(
144
+ verb,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ options: options
149
+ )
150
+ operation = ::Gapic::Rest::TransportOperation.new response
151
+ result = ::Google::Cloud::Dataflow::V1beta3::ListSnapshotsResponse.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the get_snapshot REST call
161
+ #
162
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::GetSnapshotRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_get_snapshot_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :get,
170
+ uri_template: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}",
171
+ matches: [
172
+ ["project_id", %r{^[^/]+/?$}, false],
173
+ ["location", %r{^[^/]+/?$}, false],
174
+ ["snapshot_id", %r{^[^/]+/?$}, false]
175
+ ]
176
+ )
177
+ .with_bindings(
178
+ uri_method: :get,
179
+ uri_template: "/v1b3/projects/{project_id}/snapshots/{snapshot_id}",
180
+ matches: [
181
+ ["project_id", %r{^[^/]+/?$}, false],
182
+ ["snapshot_id", %r{^[^/]+/?$}, false]
183
+ ]
184
+ )
185
+ transcoder.transcode request_pb
186
+ end
187
+
188
+ ##
189
+ # @private
190
+ #
191
+ # GRPC transcoding helper method for the delete_snapshot REST call
192
+ #
193
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::DeleteSnapshotRequest]
194
+ # A request object representing the call parameters. Required.
195
+ # @return [Array(String, [String, nil], Hash{String => String})]
196
+ # Uri, Body, Query string parameters
197
+ def self.transcode_delete_snapshot_request request_pb
198
+ transcoder = Gapic::Rest::GrpcTranscoder.new
199
+ .with_bindings(
200
+ uri_method: :delete,
201
+ uri_template: "/v1b3/projects/{project_id}/locations/{location}/snapshots/{snapshot_id}",
202
+ matches: [
203
+ ["project_id", %r{^[^/]+/?$}, false],
204
+ ["location", %r{^[^/]+/?$}, false],
205
+ ["snapshot_id", %r{^[^/]+/?$}, false]
206
+ ]
207
+ )
208
+ .with_bindings(
209
+ uri_method: :delete,
210
+ uri_template: "/v1b3/projects/{project_id}/snapshots",
211
+ matches: [
212
+ ["project_id", %r{^[^/]+/?$}, false]
213
+ ]
214
+ )
215
+ transcoder.transcode request_pb
216
+ end
217
+
218
+ ##
219
+ # @private
220
+ #
221
+ # GRPC transcoding helper method for the list_snapshots REST call
222
+ #
223
+ # @param request_pb [::Google::Cloud::Dataflow::V1beta3::ListSnapshotsRequest]
224
+ # A request object representing the call parameters. Required.
225
+ # @return [Array(String, [String, nil], Hash{String => String})]
226
+ # Uri, Body, Query string parameters
227
+ def self.transcode_list_snapshots_request request_pb
228
+ transcoder = Gapic::Rest::GrpcTranscoder.new
229
+ .with_bindings(
230
+ uri_method: :get,
231
+ uri_template: "/v1b3/projects/{project_id}/locations/{location}/jobs/{job_id}/snapshots",
232
+ matches: [
233
+ ["project_id", %r{^[^/]+/?$}, false],
234
+ ["location", %r{^[^/]+/?$}, false],
235
+ ["job_id", %r{^[^/]+/?$}, false]
236
+ ]
237
+ )
238
+ .with_bindings(
239
+ uri_method: :get,
240
+ uri_template: "/v1b3/projects/{project_id}/locations/{location}/snapshots",
241
+ matches: [
242
+ ["project_id", %r{^[^/]+/?$}, false],
243
+ ["location", %r{^[^/]+/?$}, false]
244
+ ]
245
+ )
246
+ .with_bindings(
247
+ uri_method: :get,
248
+ uri_template: "/v1b3/projects/{project_id}/snapshots",
249
+ matches: [
250
+ ["project_id", %r{^[^/]+/?$}, false]
251
+ ]
252
+ )
253
+ transcoder.transcode request_pb
254
+ end
255
+ end
256
+ end
257
+ end
258
+ end
259
+ end
260
+ end
261
+ end
@@ -0,0 +1,51 @@
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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/dataflow/v1beta3/version"
24
+
25
+ require "google/cloud/dataflow/v1beta3/snapshots/credentials"
26
+ require "google/cloud/dataflow/v1beta3/snapshots/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Dataflow
31
+ module V1beta3
32
+ ##
33
+ # Provides methods to manage snapshots of Google Cloud Dataflow jobs.
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/cloud/dataflow/v1beta3/snapshots/rest"
38
+ # client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Rest::Client.new
39
+ #
40
+ module Snapshots
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/cloud/dataflow/v1beta3/snapshots/rest/helpers" if ::File.file? helper_path
@@ -24,6 +24,7 @@ require "google/cloud/dataflow/v1beta3/version"
24
24
 
25
25
  require "google/cloud/dataflow/v1beta3/snapshots/credentials"
26
26
  require "google/cloud/dataflow/v1beta3/snapshots/client"
27
+ require "google/cloud/dataflow/v1beta3/snapshots/rest"
27
28
 
28
29
  module Google
29
30
  module Cloud
@@ -32,11 +33,16 @@ module Google
32
33
  ##
33
34
  # Provides methods to manage snapshots of Google Cloud Dataflow jobs.
34
35
  #
35
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
36
37
  #
37
38
  # require "google/cloud/dataflow/v1beta3/snapshots"
38
39
  # client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Client.new
39
40
  #
41
+ # @example Load this service and instantiate a REST client
42
+ #
43
+ # require "google/cloud/dataflow/v1beta3/snapshots/rest"
44
+ # client = ::Google::Cloud::Dataflow::V1beta3::Snapshots::Rest::Client.new
45
+ #
40
46
  module Snapshots
41
47
  end
42
48
  end