google-cloud-workflows-v1beta 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/workflows/v1beta/rest.rb +37 -0
- data/lib/google/cloud/workflows/v1beta/version.rb +1 -1
- data/lib/google/cloud/workflows/v1beta/workflows/client.rb +18 -20
- data/lib/google/cloud/workflows/v1beta/workflows/operations.rb +14 -16
- data/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +683 -0
- data/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +793 -0
- data/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb +345 -0
- data/lib/google/cloud/workflows/v1beta/workflows/rest.rb +55 -0
- data/lib/google/cloud/workflows/v1beta/workflows.rb +7 -1
- data/lib/google/cloud/workflows/v1beta/workflows_pb.rb +26 -53
- data/lib/google/cloud/workflows/v1beta.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +16 -8
@@ -0,0 +1,345 @@
|
|
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/cloud/workflows/v1beta/workflows_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Workflows
|
24
|
+
module V1beta
|
25
|
+
module Workflows
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the Workflows 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 list_workflows REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest]
|
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::Workflows::V1beta::ListWorkflowsResponse]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def list_workflows 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_list_workflows_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::Workflows::V1beta::ListWorkflowsResponse.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 get_workflow REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest]
|
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::Workflows::V1beta::Workflow]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Cloud::Workflows::V1beta::Workflow]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def get_workflow 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_get_workflow_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::Workflows::V1beta::Workflow.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 create_workflow REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest]
|
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::Longrunning::Operation]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Longrunning::Operation]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def create_workflow 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_create_workflow_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::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Baseline implementation for the delete_workflow REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Longrunning::Operation]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def delete_workflow request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_workflow_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Baseline implementation for the update_workflow REST call
|
197
|
+
#
|
198
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest]
|
199
|
+
# A request object representing the call parameters. Required.
|
200
|
+
# @param options [::Gapic::CallOptions]
|
201
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
202
|
+
#
|
203
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
204
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
205
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
206
|
+
#
|
207
|
+
# @return [::Google::Longrunning::Operation]
|
208
|
+
# A result object deserialized from the server's reply
|
209
|
+
def update_workflow request_pb, options = nil
|
210
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
211
|
+
|
212
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_workflow_request request_pb
|
213
|
+
query_string_params = if query_string_params.any?
|
214
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
215
|
+
else
|
216
|
+
{}
|
217
|
+
end
|
218
|
+
|
219
|
+
response = @client_stub.make_http_request(
|
220
|
+
verb,
|
221
|
+
uri: uri,
|
222
|
+
body: body || "",
|
223
|
+
params: query_string_params,
|
224
|
+
options: options
|
225
|
+
)
|
226
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
227
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
228
|
+
|
229
|
+
yield result, operation if block_given?
|
230
|
+
result
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# @private
|
235
|
+
#
|
236
|
+
# GRPC transcoding helper method for the list_workflows REST call
|
237
|
+
#
|
238
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest]
|
239
|
+
# A request object representing the call parameters. Required.
|
240
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
241
|
+
# Uri, Body, Query string parameters
|
242
|
+
def self.transcode_list_workflows_request request_pb
|
243
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
244
|
+
.with_bindings(
|
245
|
+
uri_method: :get,
|
246
|
+
uri_template: "/v1beta/{parent}/workflows",
|
247
|
+
matches: [
|
248
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
249
|
+
]
|
250
|
+
)
|
251
|
+
transcoder.transcode request_pb
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# @private
|
256
|
+
#
|
257
|
+
# GRPC transcoding helper method for the get_workflow REST call
|
258
|
+
#
|
259
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest]
|
260
|
+
# A request object representing the call parameters. Required.
|
261
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
262
|
+
# Uri, Body, Query string parameters
|
263
|
+
def self.transcode_get_workflow_request request_pb
|
264
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
265
|
+
.with_bindings(
|
266
|
+
uri_method: :get,
|
267
|
+
uri_template: "/v1beta/{name}",
|
268
|
+
matches: [
|
269
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
|
270
|
+
]
|
271
|
+
)
|
272
|
+
transcoder.transcode request_pb
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# @private
|
277
|
+
#
|
278
|
+
# GRPC transcoding helper method for the create_workflow REST call
|
279
|
+
#
|
280
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest]
|
281
|
+
# A request object representing the call parameters. Required.
|
282
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
283
|
+
# Uri, Body, Query string parameters
|
284
|
+
def self.transcode_create_workflow_request request_pb
|
285
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
286
|
+
.with_bindings(
|
287
|
+
uri_method: :post,
|
288
|
+
uri_template: "/v1beta/{parent}/workflows",
|
289
|
+
body: "workflow",
|
290
|
+
matches: [
|
291
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
292
|
+
]
|
293
|
+
)
|
294
|
+
transcoder.transcode request_pb
|
295
|
+
end
|
296
|
+
|
297
|
+
##
|
298
|
+
# @private
|
299
|
+
#
|
300
|
+
# GRPC transcoding helper method for the delete_workflow REST call
|
301
|
+
#
|
302
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest]
|
303
|
+
# A request object representing the call parameters. Required.
|
304
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
305
|
+
# Uri, Body, Query string parameters
|
306
|
+
def self.transcode_delete_workflow_request request_pb
|
307
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
308
|
+
.with_bindings(
|
309
|
+
uri_method: :delete,
|
310
|
+
uri_template: "/v1beta/{name}",
|
311
|
+
matches: [
|
312
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
|
313
|
+
]
|
314
|
+
)
|
315
|
+
transcoder.transcode request_pb
|
316
|
+
end
|
317
|
+
|
318
|
+
##
|
319
|
+
# @private
|
320
|
+
#
|
321
|
+
# GRPC transcoding helper method for the update_workflow REST call
|
322
|
+
#
|
323
|
+
# @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest]
|
324
|
+
# A request object representing the call parameters. Required.
|
325
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
326
|
+
# Uri, Body, Query string parameters
|
327
|
+
def self.transcode_update_workflow_request request_pb
|
328
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
329
|
+
.with_bindings(
|
330
|
+
uri_method: :patch,
|
331
|
+
uri_template: "/v1beta/{workflow.name}",
|
332
|
+
body: "workflow",
|
333
|
+
matches: [
|
334
|
+
["workflow.name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false]
|
335
|
+
]
|
336
|
+
)
|
337
|
+
transcoder.transcode request_pb
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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/workflows/v1beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/workflows/v1beta/workflows/credentials"
|
26
|
+
require "google/cloud/workflows/v1beta/workflows/paths"
|
27
|
+
require "google/cloud/workflows/v1beta/workflows/rest/operations"
|
28
|
+
require "google/cloud/workflows/v1beta/workflows/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Workflows
|
33
|
+
module V1beta
|
34
|
+
##
|
35
|
+
# Workflows is used to deploy and execute workflow programs.
|
36
|
+
# Workflows makes sure the program executes reliably, despite hardware and
|
37
|
+
# networking interruptions.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/workflows/v1beta/workflows/rest"
|
42
|
+
# client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new
|
43
|
+
#
|
44
|
+
module Workflows
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
55
|
+
require "google/cloud/workflows/v1beta/workflows/rest/helpers" if ::File.file? helper_path
|
@@ -26,6 +26,7 @@ require "google/cloud/workflows/v1beta/workflows/credentials"
|
|
26
26
|
require "google/cloud/workflows/v1beta/workflows/paths"
|
27
27
|
require "google/cloud/workflows/v1beta/workflows/operations"
|
28
28
|
require "google/cloud/workflows/v1beta/workflows/client"
|
29
|
+
require "google/cloud/workflows/v1beta/workflows/rest"
|
29
30
|
|
30
31
|
module Google
|
31
32
|
module Cloud
|
@@ -36,11 +37,16 @@ module Google
|
|
36
37
|
# Workflows makes sure the program executes reliably, despite hardware and
|
37
38
|
# networking interruptions.
|
38
39
|
#
|
39
|
-
#
|
40
|
+
# @example Load this service and instantiate a gRPC client
|
40
41
|
#
|
41
42
|
# require "google/cloud/workflows/v1beta/workflows"
|
42
43
|
# client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new
|
43
44
|
#
|
45
|
+
# @example Load this service and instantiate a REST client
|
46
|
+
#
|
47
|
+
# require "google/cloud/workflows/v1beta/workflows/rest"
|
48
|
+
# client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new
|
49
|
+
#
|
44
50
|
module Workflows
|
45
51
|
end
|
46
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/workflows/v1beta/workflows.proto
|
3
4
|
|
@@ -11,61 +12,33 @@ require 'google/longrunning/operations_pb'
|
|
11
12
|
require 'google/protobuf/field_mask_pb'
|
12
13
|
require 'google/protobuf/timestamp_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
optional :page_token, :string, 3
|
38
|
-
optional :filter, :string, 4
|
39
|
-
optional :order_by, :string, 5
|
40
|
-
end
|
41
|
-
add_message "google.cloud.workflows.v1beta.ListWorkflowsResponse" do
|
42
|
-
repeated :workflows, :message, 1, "google.cloud.workflows.v1beta.Workflow"
|
43
|
-
optional :next_page_token, :string, 2
|
44
|
-
repeated :unreachable, :string, 3
|
45
|
-
end
|
46
|
-
add_message "google.cloud.workflows.v1beta.GetWorkflowRequest" do
|
47
|
-
optional :name, :string, 1
|
48
|
-
end
|
49
|
-
add_message "google.cloud.workflows.v1beta.CreateWorkflowRequest" do
|
50
|
-
optional :parent, :string, 1
|
51
|
-
optional :workflow, :message, 2, "google.cloud.workflows.v1beta.Workflow"
|
52
|
-
optional :workflow_id, :string, 3
|
53
|
-
end
|
54
|
-
add_message "google.cloud.workflows.v1beta.DeleteWorkflowRequest" do
|
55
|
-
optional :name, :string, 1
|
56
|
-
end
|
57
|
-
add_message "google.cloud.workflows.v1beta.UpdateWorkflowRequest" do
|
58
|
-
optional :workflow, :message, 1, "google.cloud.workflows.v1beta.Workflow"
|
59
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
60
|
-
end
|
61
|
-
add_message "google.cloud.workflows.v1beta.OperationMetadata" do
|
62
|
-
optional :create_time, :message, 1, "google.protobuf.Timestamp"
|
63
|
-
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
64
|
-
optional :target, :string, 3
|
65
|
-
optional :verb, :string, 4
|
66
|
-
optional :api_version, :string, 5
|
15
|
+
|
16
|
+
descriptor_data = "\n-google/cloud/workflows/v1beta/workflows.proto\x12\x1dgoogle.cloud.workflows.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x04\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.workflows.v1beta.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x08 \x03(\x0b\x32\x33.google.cloud.workflows.v1beta.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\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\n\n\x06\x41\x43TIVE\x10\x01:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12<projects/{project}/locations/{location}/workflows/{workflow}B\r\n\x0bsource_code\"\x9a\x01\n\x14ListWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"\x81\x01\n\x15ListWorkflowsResponse\x12:\n\tworkflows\x18\x01 \x03(\x0b\x32\'.google.cloud.workflows.v1beta.Workflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\xac\x01\n\x15\x43reateWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12>\n\x08workflow\x18\x02 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12\x18\n\x0bworkflow_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"P\n\x15\x44\x65leteWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\x88\x01\n\x15UpdateWorkflowRequest\x12>\n\x08workflow\x18\x01 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa5\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x05 \x01(\t2\xf9\x08\n\tWorkflows\x12\xbe\x01\n\rListWorkflows\x12\x33.google.cloud.workflows.v1beta.ListWorkflowsRequest\x1a\x34.google.cloud.workflows.v1beta.ListWorkflowsResponse\"B\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{parent=projects/*/locations/*}/workflows\xda\x41\x06parent\x12\xab\x01\n\x0bGetWorkflow\x12\x31.google.cloud.workflows.v1beta.GetWorkflowRequest\x1a\'.google.cloud.workflows.v1beta.Workflow\"@\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\x12\xe9\x01\n\x0e\x43reateWorkflow\x12\x34.google.cloud.workflows.v1beta.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\x82\xd3\xe4\x93\x02=\"1/v1beta/{parent=projects/*/locations/*}/workflows:\x08workflow\xda\x41\x1bparent,workflow,workflow_id\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x12\xd4\x01\n\x0e\x44\x65leteWorkflow\x12\x34.google.cloud.workflows.v1beta.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"m\x82\xd3\xe4\x93\x02\x33*1/v1beta/{name=projects/*/locations/*/workflows/*}\xda\x41\x04name\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\x12\xeb\x01\n\x0eUpdateWorkflow\x12\x34.google.cloud.workflows.v1beta.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\x82\xd3\xe4\x93\x02\x46\x32:/v1beta/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\xda\x41\x14workflow,update_mask\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBv\n!com.google.cloud.workflows.v1betaB\x0eWorkflowsProtoP\x01Z?cloud.google.com/go/workflows/apiv1beta/workflowspb;workflowspbb\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
32
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
67
38
|
end
|
68
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
69
42
|
end
|
70
43
|
|
71
44
|
module Google
|
@@ -23,13 +23,18 @@ module Google
|
|
23
23
|
module Cloud
|
24
24
|
module Workflows
|
25
25
|
##
|
26
|
-
#
|
26
|
+
# API client module.
|
27
27
|
#
|
28
|
-
# @example
|
28
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
29
29
|
#
|
30
30
|
# require "google/cloud/workflows/v1beta"
|
31
31
|
# client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new
|
32
32
|
#
|
33
|
+
# @example Load this package, including all its services, and instantiate a REST client
|
34
|
+
#
|
35
|
+
# require "google/cloud/workflows/v1beta"
|
36
|
+
# client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new
|
37
|
+
#
|
33
38
|
module V1beta
|
34
39
|
end
|
35
40
|
end
|