google-apis-workflows_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
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
+ # http://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
+ module Google
16
+ module Apis
17
+ module WorkflowsV1
18
+ # Version of the google-apis-workflows_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.2"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20210126"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,173 @@
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
+ # http://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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module WorkflowsV1
24
+
25
+ class Empty
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ListLocationsResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class ListOperationsResponse
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class ListWorkflowsResponse
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Location
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class Operation
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class OperationMetadata
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Status
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class Workflow
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class Empty
80
+ # @private
81
+ class Representation < Google::Apis::Core::JsonRepresentation
82
+ end
83
+ end
84
+
85
+ class ListLocationsResponse
86
+ # @private
87
+ class Representation < Google::Apis::Core::JsonRepresentation
88
+ collection :locations, as: 'locations', class: Google::Apis::WorkflowsV1::Location, decorator: Google::Apis::WorkflowsV1::Location::Representation
89
+
90
+ property :next_page_token, as: 'nextPageToken'
91
+ end
92
+ end
93
+
94
+ class ListOperationsResponse
95
+ # @private
96
+ class Representation < Google::Apis::Core::JsonRepresentation
97
+ property :next_page_token, as: 'nextPageToken'
98
+ collection :operations, as: 'operations', class: Google::Apis::WorkflowsV1::Operation, decorator: Google::Apis::WorkflowsV1::Operation::Representation
99
+
100
+ end
101
+ end
102
+
103
+ class ListWorkflowsResponse
104
+ # @private
105
+ class Representation < Google::Apis::Core::JsonRepresentation
106
+ property :next_page_token, as: 'nextPageToken'
107
+ collection :unreachable, as: 'unreachable'
108
+ collection :workflows, as: 'workflows', class: Google::Apis::WorkflowsV1::Workflow, decorator: Google::Apis::WorkflowsV1::Workflow::Representation
109
+
110
+ end
111
+ end
112
+
113
+ class Location
114
+ # @private
115
+ class Representation < Google::Apis::Core::JsonRepresentation
116
+ property :display_name, as: 'displayName'
117
+ hash :labels, as: 'labels'
118
+ property :location_id, as: 'locationId'
119
+ hash :metadata, as: 'metadata'
120
+ property :name, as: 'name'
121
+ end
122
+ end
123
+
124
+ class Operation
125
+ # @private
126
+ class Representation < Google::Apis::Core::JsonRepresentation
127
+ property :done, as: 'done'
128
+ property :error, as: 'error', class: Google::Apis::WorkflowsV1::Status, decorator: Google::Apis::WorkflowsV1::Status::Representation
129
+
130
+ hash :metadata, as: 'metadata'
131
+ property :name, as: 'name'
132
+ hash :response, as: 'response'
133
+ end
134
+ end
135
+
136
+ class OperationMetadata
137
+ # @private
138
+ class Representation < Google::Apis::Core::JsonRepresentation
139
+ property :api_version, as: 'apiVersion'
140
+ property :create_time, as: 'createTime'
141
+ property :end_time, as: 'endTime'
142
+ property :target, as: 'target'
143
+ property :verb, as: 'verb'
144
+ end
145
+ end
146
+
147
+ class Status
148
+ # @private
149
+ class Representation < Google::Apis::Core::JsonRepresentation
150
+ property :code, as: 'code'
151
+ collection :details, as: 'details'
152
+ property :message, as: 'message'
153
+ end
154
+ end
155
+
156
+ class Workflow
157
+ # @private
158
+ class Representation < Google::Apis::Core::JsonRepresentation
159
+ property :create_time, as: 'createTime'
160
+ property :description, as: 'description'
161
+ hash :labels, as: 'labels'
162
+ property :name, as: 'name'
163
+ property :revision_create_time, as: 'revisionCreateTime'
164
+ property :revision_id, as: 'revisionId'
165
+ property :service_account, as: 'serviceAccount'
166
+ property :source_contents, as: 'sourceContents'
167
+ property :state, as: 'state'
168
+ property :update_time, as: 'updateTime'
169
+ end
170
+ end
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,440 @@
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
+ # http://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
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module WorkflowsV1
23
+ # Workflows API
24
+ #
25
+ # Orchestrate Workflows consisting of Google Cloud APIs, SaaS APIs or private
26
+ # API endpoints.
27
+ #
28
+ # @example
29
+ # require 'google/apis/workflows_v1'
30
+ #
31
+ # Workflows = Google::Apis::WorkflowsV1 # Alias the module
32
+ # service = Workflows::WorkflowsService.new
33
+ #
34
+ # @see https://cloud.google.com/workflows
35
+ class WorkflowsService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://workflows.googleapis.com/', '',
48
+ client_name: 'google-apis-workflows_v1',
49
+ client_version: Google::Apis::WorkflowsV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::WorkflowsV1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::WorkflowsV1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::WorkflowsV1::Location::Representation
76
+ command.response_class = Google::Apis::WorkflowsV1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
92
+ # @param [String] fields
93
+ # Selector specifying which fields to include in a partial response.
94
+ # @param [String] quota_user
95
+ # Available to use for quota purposes for server-side applications. Can be any
96
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
97
+ # @param [Google::Apis::RequestOptions] options
98
+ # Request-specific options
99
+ #
100
+ # @yield [result, err] Result & error if block supplied
101
+ # @yieldparam result [Google::Apis::WorkflowsV1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::WorkflowsV1::ListLocationsResponse]
105
+ #
106
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
109
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::WorkflowsV1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::WorkflowsV1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Deletes a long-running operation. This method indicates that the client is no
123
+ # longer interested in the operation result. It does not cancel the operation.
124
+ # If the server doesn't support this method, it returns `google.rpc.Code.
125
+ # UNIMPLEMENTED`.
126
+ # @param [String] name
127
+ # The name of the operation resource to be deleted.
128
+ # @param [String] fields
129
+ # Selector specifying which fields to include in a partial response.
130
+ # @param [String] quota_user
131
+ # Available to use for quota purposes for server-side applications. Can be any
132
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
133
+ # @param [Google::Apis::RequestOptions] options
134
+ # Request-specific options
135
+ #
136
+ # @yield [result, err] Result & error if block supplied
137
+ # @yieldparam result [Google::Apis::WorkflowsV1::Empty] parsed result object
138
+ # @yieldparam err [StandardError] error object if request failed
139
+ #
140
+ # @return [Google::Apis::WorkflowsV1::Empty]
141
+ #
142
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
145
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
146
+ command = make_simple_command(:delete, 'v1/{+name}', options)
147
+ command.response_representation = Google::Apis::WorkflowsV1::Empty::Representation
148
+ command.response_class = Google::Apis::WorkflowsV1::Empty
149
+ command.params['name'] = name unless name.nil?
150
+ command.query['fields'] = fields unless fields.nil?
151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
152
+ execute_or_queue_command(command, &block)
153
+ end
154
+
155
+ # Gets the latest state of a long-running operation. Clients can use this method
156
+ # to poll the operation result at intervals as recommended by the API service.
157
+ # @param [String] name
158
+ # The name of the operation resource.
159
+ # @param [String] fields
160
+ # Selector specifying which fields to include in a partial response.
161
+ # @param [String] quota_user
162
+ # Available to use for quota purposes for server-side applications. Can be any
163
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
164
+ # @param [Google::Apis::RequestOptions] options
165
+ # Request-specific options
166
+ #
167
+ # @yield [result, err] Result & error if block supplied
168
+ # @yieldparam result [Google::Apis::WorkflowsV1::Operation] parsed result object
169
+ # @yieldparam err [StandardError] error object if request failed
170
+ #
171
+ # @return [Google::Apis::WorkflowsV1::Operation]
172
+ #
173
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
176
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
177
+ command = make_simple_command(:get, 'v1/{+name}', options)
178
+ command.response_representation = Google::Apis::WorkflowsV1::Operation::Representation
179
+ command.response_class = Google::Apis::WorkflowsV1::Operation
180
+ command.params['name'] = name unless name.nil?
181
+ command.query['fields'] = fields unless fields.nil?
182
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
183
+ execute_or_queue_command(command, &block)
184
+ end
185
+
186
+ # Lists operations that match the specified filter in the request. If the server
187
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
188
+ # binding allows API services to override the binding to use different resource
189
+ # name schemes, such as `users/*/operations`. To override the binding, API
190
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
191
+ # service configuration. For backwards compatibility, the default name includes
192
+ # the operations collection id, however overriding users must ensure the name
193
+ # binding is the parent resource, without the operations collection id.
194
+ # @param [String] name
195
+ # The name of the operation's parent resource.
196
+ # @param [String] filter
197
+ # The standard list filter.
198
+ # @param [Fixnum] page_size
199
+ # The standard list page size.
200
+ # @param [String] page_token
201
+ # The standard list page token.
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::WorkflowsV1::ListOperationsResponse] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::WorkflowsV1::ListOperationsResponse]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
221
+ command.response_representation = Google::Apis::WorkflowsV1::ListOperationsResponse::Representation
222
+ command.response_class = Google::Apis::WorkflowsV1::ListOperationsResponse
223
+ command.params['name'] = name unless name.nil?
224
+ command.query['filter'] = filter unless filter.nil?
225
+ command.query['pageSize'] = page_size unless page_size.nil?
226
+ command.query['pageToken'] = page_token unless page_token.nil?
227
+ command.query['fields'] = fields unless fields.nil?
228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
229
+ execute_or_queue_command(command, &block)
230
+ end
231
+
232
+ # Creates a new workflow. If a workflow with the specified name already exists
233
+ # in the specified project and location, the long running operation will return
234
+ # ALREADY_EXISTS error.
235
+ # @param [String] parent
236
+ # Required. Project and location in which the workflow should be created. Format:
237
+ # projects/`project`/locations/`location`
238
+ # @param [Google::Apis::WorkflowsV1::Workflow] workflow_object
239
+ # @param [String] workflow_id
240
+ # Required. The ID of the workflow to be created. It has to fulfill the
241
+ # following requirements: * Must contain only letters, numbers, underscores and
242
+ # hyphens. * Must start with a letter. * Must be between 1-64 characters. * Must
243
+ # end with a number or a letter. * Must be unique within the customer project
244
+ # and location.
245
+ # @param [String] fields
246
+ # Selector specifying which fields to include in a partial response.
247
+ # @param [String] quota_user
248
+ # Available to use for quota purposes for server-side applications. Can be any
249
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
250
+ # @param [Google::Apis::RequestOptions] options
251
+ # Request-specific options
252
+ #
253
+ # @yield [result, err] Result & error if block supplied
254
+ # @yieldparam result [Google::Apis::WorkflowsV1::Operation] parsed result object
255
+ # @yieldparam err [StandardError] error object if request failed
256
+ #
257
+ # @return [Google::Apis::WorkflowsV1::Operation]
258
+ #
259
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
260
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
261
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
262
+ def create_project_location_workflow(parent, workflow_object = nil, workflow_id: nil, fields: nil, quota_user: nil, options: nil, &block)
263
+ command = make_simple_command(:post, 'v1/{+parent}/workflows', options)
264
+ command.request_representation = Google::Apis::WorkflowsV1::Workflow::Representation
265
+ command.request_object = workflow_object
266
+ command.response_representation = Google::Apis::WorkflowsV1::Operation::Representation
267
+ command.response_class = Google::Apis::WorkflowsV1::Operation
268
+ command.params['parent'] = parent unless parent.nil?
269
+ command.query['workflowId'] = workflow_id unless workflow_id.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ execute_or_queue_command(command, &block)
273
+ end
274
+
275
+ # Deletes a workflow with the specified name. This method also cancels and
276
+ # deletes all running executions of the workflow.
277
+ # @param [String] name
278
+ # Required. Name of the workflow to be deleted. Format: projects/`project`/
279
+ # locations/`location`/workflows/`workflow`
280
+ # @param [String] fields
281
+ # Selector specifying which fields to include in a partial response.
282
+ # @param [String] quota_user
283
+ # Available to use for quota purposes for server-side applications. Can be any
284
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
285
+ # @param [Google::Apis::RequestOptions] options
286
+ # Request-specific options
287
+ #
288
+ # @yield [result, err] Result & error if block supplied
289
+ # @yieldparam result [Google::Apis::WorkflowsV1::Operation] parsed result object
290
+ # @yieldparam err [StandardError] error object if request failed
291
+ #
292
+ # @return [Google::Apis::WorkflowsV1::Operation]
293
+ #
294
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
295
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
296
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
297
+ def delete_project_location_workflow(name, fields: nil, quota_user: nil, options: nil, &block)
298
+ command = make_simple_command(:delete, 'v1/{+name}', options)
299
+ command.response_representation = Google::Apis::WorkflowsV1::Operation::Representation
300
+ command.response_class = Google::Apis::WorkflowsV1::Operation
301
+ command.params['name'] = name unless name.nil?
302
+ command.query['fields'] = fields unless fields.nil?
303
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
304
+ execute_or_queue_command(command, &block)
305
+ end
306
+
307
+ # Gets details of a single Workflow.
308
+ # @param [String] name
309
+ # Required. Name of the workflow which information should be retrieved. Format:
310
+ # projects/`project`/locations/`location`/workflows/`workflow`
311
+ # @param [String] fields
312
+ # Selector specifying which fields to include in a partial response.
313
+ # @param [String] quota_user
314
+ # Available to use for quota purposes for server-side applications. Can be any
315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
316
+ # @param [Google::Apis::RequestOptions] options
317
+ # Request-specific options
318
+ #
319
+ # @yield [result, err] Result & error if block supplied
320
+ # @yieldparam result [Google::Apis::WorkflowsV1::Workflow] parsed result object
321
+ # @yieldparam err [StandardError] error object if request failed
322
+ #
323
+ # @return [Google::Apis::WorkflowsV1::Workflow]
324
+ #
325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
328
+ def get_project_location_workflow(name, fields: nil, quota_user: nil, options: nil, &block)
329
+ command = make_simple_command(:get, 'v1/{+name}', options)
330
+ command.response_representation = Google::Apis::WorkflowsV1::Workflow::Representation
331
+ command.response_class = Google::Apis::WorkflowsV1::Workflow
332
+ command.params['name'] = name unless name.nil?
333
+ command.query['fields'] = fields unless fields.nil?
334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ execute_or_queue_command(command, &block)
336
+ end
337
+
338
+ # Lists Workflows in a given project and location. The default order is not
339
+ # specified.
340
+ # @param [String] parent
341
+ # Required. Project and location from which the workflows should be listed.
342
+ # Format: projects/`project`/locations/`location`
343
+ # @param [String] filter
344
+ # Filter to restrict results to specific workflows.
345
+ # @param [String] order_by
346
+ # Comma-separated list of fields that that specify the order of the results.
347
+ # Default sorting order for a field is ascending. To specify descending order
348
+ # for a field, append a " desc" suffix. If not specified, the results will be
349
+ # returned in an unspecified order.
350
+ # @param [Fixnum] page_size
351
+ # Maximum number of workflows to return per call. The service may return fewer
352
+ # than this value. If the value is not specified, a default value of 500 will be
353
+ # used. The maximum permitted value is 1000 and values greater than 1000 will be
354
+ # coerced down to 1000.
355
+ # @param [String] page_token
356
+ # A page token, received from a previous `ListWorkflows` call. Provide this to
357
+ # retrieve the subsequent page. When paginating, all other parameters provided
358
+ # to `ListWorkflows` must match the call that provided the page token.
359
+ # @param [String] fields
360
+ # Selector specifying which fields to include in a partial response.
361
+ # @param [String] quota_user
362
+ # Available to use for quota purposes for server-side applications. Can be any
363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
364
+ # @param [Google::Apis::RequestOptions] options
365
+ # Request-specific options
366
+ #
367
+ # @yield [result, err] Result & error if block supplied
368
+ # @yieldparam result [Google::Apis::WorkflowsV1::ListWorkflowsResponse] parsed result object
369
+ # @yieldparam err [StandardError] error object if request failed
370
+ #
371
+ # @return [Google::Apis::WorkflowsV1::ListWorkflowsResponse]
372
+ #
373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
376
+ def list_project_location_workflows(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
377
+ command = make_simple_command(:get, 'v1/{+parent}/workflows', options)
378
+ command.response_representation = Google::Apis::WorkflowsV1::ListWorkflowsResponse::Representation
379
+ command.response_class = Google::Apis::WorkflowsV1::ListWorkflowsResponse
380
+ command.params['parent'] = parent unless parent.nil?
381
+ command.query['filter'] = filter unless filter.nil?
382
+ command.query['orderBy'] = order_by unless order_by.nil?
383
+ command.query['pageSize'] = page_size unless page_size.nil?
384
+ command.query['pageToken'] = page_token unless page_token.nil?
385
+ command.query['fields'] = fields unless fields.nil?
386
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
387
+ execute_or_queue_command(command, &block)
388
+ end
389
+
390
+ # Updates an existing workflow. Running this method has no impact on already
391
+ # running executions of the workflow. A new revision of the workflow may be
392
+ # created as a result of a successful update operation. In that case, such
393
+ # revision will be used in new workflow executions.
394
+ # @param [String] name
395
+ # The resource name of the workflow. Format: projects/`project`/locations/`
396
+ # location`/workflows/`workflow`
397
+ # @param [Google::Apis::WorkflowsV1::Workflow] workflow_object
398
+ # @param [String] update_mask
399
+ # List of fields to be updated. If not present, the entire workflow will be
400
+ # updated.
401
+ # @param [String] fields
402
+ # Selector specifying which fields to include in a partial response.
403
+ # @param [String] quota_user
404
+ # Available to use for quota purposes for server-side applications. Can be any
405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
406
+ # @param [Google::Apis::RequestOptions] options
407
+ # Request-specific options
408
+ #
409
+ # @yield [result, err] Result & error if block supplied
410
+ # @yieldparam result [Google::Apis::WorkflowsV1::Operation] parsed result object
411
+ # @yieldparam err [StandardError] error object if request failed
412
+ #
413
+ # @return [Google::Apis::WorkflowsV1::Operation]
414
+ #
415
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
416
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
417
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
418
+ def patch_project_location_workflow(name, workflow_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
419
+ command = make_simple_command(:patch, 'v1/{+name}', options)
420
+ command.request_representation = Google::Apis::WorkflowsV1::Workflow::Representation
421
+ command.request_object = workflow_object
422
+ command.response_representation = Google::Apis::WorkflowsV1::Operation::Representation
423
+ command.response_class = Google::Apis::WorkflowsV1::Operation
424
+ command.params['name'] = name unless name.nil?
425
+ command.query['updateMask'] = update_mask unless update_mask.nil?
426
+ command.query['fields'] = fields unless fields.nil?
427
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
428
+ execute_or_queue_command(command, &block)
429
+ end
430
+
431
+ protected
432
+
433
+ def apply_command_defaults(command)
434
+ command.query['key'] = key unless key.nil?
435
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
436
+ end
437
+ end
438
+ end
439
+ end
440
+ end