google-cloud-workflows-v1 0.1.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.
@@ -0,0 +1,242 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Cloud
22
+ module Workflows
23
+ module V1
24
+ # Workflow program to be executed by Workflows.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The resource name of the workflow.
28
+ # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
29
+ # @!attribute [rw] description
30
+ # @return [::String]
31
+ # Description of the workflow provided by the user.
32
+ # Must be at most 1000 unicode characters long.
33
+ # @!attribute [r] state
34
+ # @return [::Google::Cloud::Workflows::V1::Workflow::State]
35
+ # Output only. State of the workflow deployment.
36
+ # @!attribute [r] revision_id
37
+ # @return [::String]
38
+ # Output only. The revision of the workflow.
39
+ # A new revision of a workflow is created as a result of updating the
40
+ # following fields of a workflow:
41
+ # - `source_code`
42
+ # - `service_account`
43
+ # The format is "000001-a4d", where the first 6 characters define
44
+ # the zero-padded revision ordinal number. They are followed by a hyphen and
45
+ # 3 hexadecimal random characters.
46
+ # @!attribute [r] create_time
47
+ # @return [::Google::Protobuf::Timestamp]
48
+ # Output only. The timestamp of when the workflow was created.
49
+ # @!attribute [r] update_time
50
+ # @return [::Google::Protobuf::Timestamp]
51
+ # Output only. The last update timestamp of the workflow.
52
+ # @!attribute [r] revision_create_time
53
+ # @return [::Google::Protobuf::Timestamp]
54
+ # Output only. The timestamp that the latest revision of the workflow
55
+ # was created.
56
+ # @!attribute [rw] labels
57
+ # @return [::Google::Protobuf::Map{::String => ::String}]
58
+ # Labels associated with this workflow.
59
+ # Labels can contain at most 64 entries. Keys and values can be no longer
60
+ # than 63 characters and can only contain lowercase letters, numeric
61
+ # characters, underscores and dashes. Label keys must start with a letter.
62
+ # International characters are allowed.
63
+ # @!attribute [rw] service_account
64
+ # @return [::String]
65
+ # Name of the service account associated with the latest workflow version.
66
+ # This service account represents the identity of the workflow and determines
67
+ # what permissions the workflow has.
68
+ # Format: projects/\\{project}/serviceAccounts/\\{account}
69
+ #
70
+ # Using `-` as a wildcard for the `{project}` will infer the project from
71
+ # the account. The `{account}` value can be the `email` address or the
72
+ # `unique_id` of the service account.
73
+ #
74
+ # If not provided, workflow will use the project's default service account.
75
+ # Modifying this field for an existing workflow results in a new workflow
76
+ # revision.
77
+ # @!attribute [rw] source_contents
78
+ # @return [::String]
79
+ # Workflow code to be executed. The size limit is 32KB.
80
+ class Workflow
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+
84
+ # @!attribute [rw] key
85
+ # @return [::String]
86
+ # @!attribute [rw] value
87
+ # @return [::String]
88
+ class LabelsEntry
89
+ include ::Google::Protobuf::MessageExts
90
+ extend ::Google::Protobuf::MessageExts::ClassMethods
91
+ end
92
+
93
+ # Describes the current state of workflow deployment. More states may be
94
+ # added in the future.
95
+ module State
96
+ # Invalid state.
97
+ STATE_UNSPECIFIED = 0
98
+
99
+ # The workflow has been deployed successfully and is serving.
100
+ ACTIVE = 1
101
+ end
102
+ end
103
+
104
+ # Request for the
105
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows}
106
+ # method.
107
+ # @!attribute [rw] parent
108
+ # @return [::String]
109
+ # Required. Project and location from which the workflows should be listed.
110
+ # Format: projects/\\{project}/locations/\\{location}
111
+ # @!attribute [rw] page_size
112
+ # @return [::Integer]
113
+ # Maximum number of workflows to return per call. The service may return
114
+ # fewer than this value. If the value is not specified, a default value of
115
+ # 500 will be used. The maximum permitted value is 1000 and values greater
116
+ # than 1000 will be coerced down to 1000.
117
+ # @!attribute [rw] page_token
118
+ # @return [::String]
119
+ # A page token, received from a previous `ListWorkflows` call.
120
+ # Provide this to retrieve the subsequent page.
121
+ #
122
+ # When paginating, all other parameters provided to `ListWorkflows` must
123
+ # match the call that provided the page token.
124
+ # @!attribute [rw] filter
125
+ # @return [::String]
126
+ # Filter to restrict results to specific workflows.
127
+ # @!attribute [rw] order_by
128
+ # @return [::String]
129
+ # Comma-separated list of fields that that specify the order of the results.
130
+ # Default sorting order for a field is ascending. To specify descending order
131
+ # for a field, append a " desc" suffix.
132
+ # If not specified, the results will be returned in an unspecified order.
133
+ class ListWorkflowsRequest
134
+ include ::Google::Protobuf::MessageExts
135
+ extend ::Google::Protobuf::MessageExts::ClassMethods
136
+ end
137
+
138
+ # Response for the
139
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows}
140
+ # method.
141
+ # @!attribute [rw] workflows
142
+ # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>]
143
+ # The workflows which match the request.
144
+ # @!attribute [rw] next_page_token
145
+ # @return [::String]
146
+ # A token, which can be sent as `page_token` to retrieve the next page.
147
+ # If this field is omitted, there are no subsequent pages.
148
+ # @!attribute [rw] unreachable
149
+ # @return [::Array<::String>]
150
+ # Unreachable resources.
151
+ class ListWorkflowsResponse
152
+ include ::Google::Protobuf::MessageExts
153
+ extend ::Google::Protobuf::MessageExts::ClassMethods
154
+ end
155
+
156
+ # Request for the
157
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow GetWorkflow} method.
158
+ # @!attribute [rw] name
159
+ # @return [::String]
160
+ # Required. Name of the workflow which information should be retrieved.
161
+ # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
162
+ class GetWorkflowRequest
163
+ include ::Google::Protobuf::MessageExts
164
+ extend ::Google::Protobuf::MessageExts::ClassMethods
165
+ end
166
+
167
+ # Request for the
168
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#create_workflow CreateWorkflow}
169
+ # method.
170
+ # @!attribute [rw] parent
171
+ # @return [::String]
172
+ # Required. Project and location in which the workflow should be created.
173
+ # Format: projects/\\{project}/locations/\\{location}
174
+ # @!attribute [rw] workflow
175
+ # @return [::Google::Cloud::Workflows::V1::Workflow]
176
+ # Required. Workflow to be created.
177
+ # @!attribute [rw] workflow_id
178
+ # @return [::String]
179
+ # Required. The ID of the workflow to be created. It has to fulfill the
180
+ # following requirements:
181
+ #
182
+ # * Must contain only letters, numbers, underscores and hyphens.
183
+ # * Must start with a letter.
184
+ # * Must be between 1-64 characters.
185
+ # * Must end with a number or a letter.
186
+ # * Must be unique within the customer project and location.
187
+ class CreateWorkflowRequest
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # Request for the
193
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow DeleteWorkflow}
194
+ # method.
195
+ # @!attribute [rw] name
196
+ # @return [::String]
197
+ # Required. Name of the workflow to be deleted.
198
+ # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}
199
+ class DeleteWorkflowRequest
200
+ include ::Google::Protobuf::MessageExts
201
+ extend ::Google::Protobuf::MessageExts::ClassMethods
202
+ end
203
+
204
+ # Request for the
205
+ # {::Google::Cloud::Workflows::V1::Workflows::Client#update_workflow UpdateWorkflow}
206
+ # method.
207
+ # @!attribute [rw] workflow
208
+ # @return [::Google::Cloud::Workflows::V1::Workflow]
209
+ # Required. Workflow to be updated.
210
+ # @!attribute [rw] update_mask
211
+ # @return [::Google::Protobuf::FieldMask]
212
+ # List of fields to be updated. If not present, the entire workflow
213
+ # will be updated.
214
+ class UpdateWorkflowRequest
215
+ include ::Google::Protobuf::MessageExts
216
+ extend ::Google::Protobuf::MessageExts::ClassMethods
217
+ end
218
+
219
+ # Represents the metadata of the long-running operation.
220
+ # @!attribute [rw] create_time
221
+ # @return [::Google::Protobuf::Timestamp]
222
+ # The time the operation was created.
223
+ # @!attribute [rw] end_time
224
+ # @return [::Google::Protobuf::Timestamp]
225
+ # The time the operation finished running.
226
+ # @!attribute [rw] target
227
+ # @return [::String]
228
+ # Server-defined resource path for the target of the operation.
229
+ # @!attribute [rw] verb
230
+ # @return [::String]
231
+ # Name of the verb executed by the operation.
232
+ # @!attribute [rw] api_version
233
+ # @return [::String]
234
+ # API version used to start the operation.
235
+ class OperationMetadata
236
+ include ::Google::Protobuf::MessageExts
237
+ extend ::Google::Protobuf::MessageExts::ClassMethods
238
+ end
239
+ end
240
+ end
241
+ end
242
+ end
@@ -0,0 +1,164 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Longrunning
22
+ # This resource represents a long-running operation that is the result of a
23
+ # network API call.
24
+ # @!attribute [rw] name
25
+ # @return [::String]
26
+ # The server-assigned name, which is only unique within the same service that
27
+ # originally returns it. If you use the default HTTP mapping, the
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
+ # @!attribute [rw] metadata
30
+ # @return [::Google::Protobuf::Any]
31
+ # Service-specific metadata associated with the operation. It typically
32
+ # contains progress information and common metadata such as create time.
33
+ # Some services might not provide such metadata. Any method that returns a
34
+ # long-running operation should document the metadata type, if any.
35
+ # @!attribute [rw] done
36
+ # @return [::Boolean]
37
+ # If the value is `false`, it means the operation is still in progress.
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
+ # available.
40
+ # @!attribute [rw] error
41
+ # @return [::Google::Rpc::Status]
42
+ # The error result of the operation in case of failure or cancellation.
43
+ # @!attribute [rw] response
44
+ # @return [::Google::Protobuf::Any]
45
+ # The normal response of the operation in case of success. If the original
46
+ # method returns no data on success, such as `Delete`, the response is
47
+ # `google.protobuf.Empty`. If the original method is standard
48
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
49
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
50
+ # is the original method name. For example, if the original method name
51
+ # is `TakeSnapshot()`, the inferred response type is
52
+ # `TakeSnapshotResponse`.
53
+ class Operation
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # The request message for Operations.GetOperation.
59
+ # @!attribute [rw] name
60
+ # @return [::String]
61
+ # The name of the operation resource.
62
+ class GetOperationRequest
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
67
+ # The request message for Operations.ListOperations.
68
+ # @!attribute [rw] name
69
+ # @return [::String]
70
+ # The name of the operation's parent resource.
71
+ # @!attribute [rw] filter
72
+ # @return [::String]
73
+ # The standard list filter.
74
+ # @!attribute [rw] page_size
75
+ # @return [::Integer]
76
+ # The standard list page size.
77
+ # @!attribute [rw] page_token
78
+ # @return [::String]
79
+ # The standard list page token.
80
+ class ListOperationsRequest
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # The response message for Operations.ListOperations.
86
+ # @!attribute [rw] operations
87
+ # @return [::Array<::Google::Longrunning::Operation>]
88
+ # A list of operations that matches the specified filter in the request.
89
+ # @!attribute [rw] next_page_token
90
+ # @return [::String]
91
+ # The standard List next-page token.
92
+ class ListOperationsResponse
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
+ end
96
+
97
+ # The request message for Operations.CancelOperation.
98
+ # @!attribute [rw] name
99
+ # @return [::String]
100
+ # The name of the operation resource to be cancelled.
101
+ class CancelOperationRequest
102
+ include ::Google::Protobuf::MessageExts
103
+ extend ::Google::Protobuf::MessageExts::ClassMethods
104
+ end
105
+
106
+ # The request message for Operations.DeleteOperation.
107
+ # @!attribute [rw] name
108
+ # @return [::String]
109
+ # The name of the operation resource to be deleted.
110
+ class DeleteOperationRequest
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # A message representing the message types used by a long-running operation.
130
+ #
131
+ # Example:
132
+ #
133
+ # rpc LongRunningRecognize(LongRunningRecognizeRequest)
134
+ # returns (google.longrunning.Operation) {
135
+ # option (google.longrunning.operation_info) = {
136
+ # response_type: "LongRunningRecognizeResponse"
137
+ # metadata_type: "LongRunningRecognizeMetadata"
138
+ # };
139
+ # }
140
+ # @!attribute [rw] response_type
141
+ # @return [::String]
142
+ # Required. The message name of the primary return type for this
143
+ # long-running operation.
144
+ # This type will be used to deserialize the LRO's response.
145
+ #
146
+ # If the response is in a different package from the rpc, a fully-qualified
147
+ # message name must be used (e.g. `google.protobuf.Struct`).
148
+ #
149
+ # Note: Altering this value constitutes a breaking change.
150
+ # @!attribute [rw] metadata_type
151
+ # @return [::String]
152
+ # Required. The message name of the metadata type for this long-running
153
+ # operation.
154
+ #
155
+ # If the response is in a different package from the rpc, a fully-qualified
156
+ # message name must be used (e.g. `google.protobuf.Struct`).
157
+ #
158
+ # Note: Altering this value constitutes a breaking change.
159
+ class OperationInfo
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,141 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
20
+ module Google
21
+ module Protobuf
22
+ # `Any` contains an arbitrary serialized protocol buffer message along with a
23
+ # URL that describes the type of the serialized message.
24
+ #
25
+ # Protobuf library provides support to pack/unpack Any values in the form
26
+ # of utility functions or additional generated methods of the Any type.
27
+ #
28
+ # Example 1: Pack and unpack a message in C++.
29
+ #
30
+ # Foo foo = ...;
31
+ # Any any;
32
+ # any.PackFrom(foo);
33
+ # ...
34
+ # if (any.UnpackTo(&foo)) {
35
+ # ...
36
+ # }
37
+ #
38
+ # Example 2: Pack and unpack a message in Java.
39
+ #
40
+ # Foo foo = ...;
41
+ # Any any = Any.pack(foo);
42
+ # ...
43
+ # if (any.is(Foo.class)) {
44
+ # foo = any.unpack(Foo.class);
45
+ # }
46
+ #
47
+ # Example 3: Pack and unpack a message in Python.
48
+ #
49
+ # foo = Foo(...)
50
+ # any = Any()
51
+ # any.Pack(foo)
52
+ # ...
53
+ # if any.Is(Foo.DESCRIPTOR):
54
+ # any.Unpack(foo)
55
+ # ...
56
+ #
57
+ # Example 4: Pack and unpack a message in Go
58
+ #
59
+ # foo := &pb.Foo{...}
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
64
+ # ...
65
+ # foo := &pb.Foo{}
66
+ # if err := any.UnmarshalTo(foo); err != nil {
67
+ # ...
68
+ # }
69
+ #
70
+ # The pack methods provided by protobuf library will by default use
71
+ # 'type.googleapis.com/full.type.name' as the type URL and the unpack
72
+ # methods only use the fully qualified type name after the last '/'
73
+ # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
+ # name "y.z".
75
+ #
76
+ #
77
+ # JSON
78
+ # ====
79
+ # The JSON representation of an `Any` value uses the regular
80
+ # representation of the deserialized, embedded message, with an
81
+ # additional field `@type` which contains the type URL. Example:
82
+ #
83
+ # package google.profile;
84
+ # message Person {
85
+ # string first_name = 1;
86
+ # string last_name = 2;
87
+ # }
88
+ #
89
+ # {
90
+ # "@type": "type.googleapis.com/google.profile.Person",
91
+ # "firstName": <string>,
92
+ # "lastName": <string>
93
+ # }
94
+ #
95
+ # If the embedded message type is well-known and has a custom JSON
96
+ # representation, that representation will be embedded adding a field
97
+ # `value` which holds the custom JSON in addition to the `@type`
98
+ # field. Example (for message [google.protobuf.Duration][]):
99
+ #
100
+ # {
101
+ # "@type": "type.googleapis.com/google.protobuf.Duration",
102
+ # "value": "1.212s"
103
+ # }
104
+ # @!attribute [rw] type_url
105
+ # @return [::String]
106
+ # A URL/resource name that uniquely identifies the type of the serialized
107
+ # protocol buffer message. This string must contain at least
108
+ # one "/" character. The last segment of the URL's path must represent
109
+ # the fully qualified name of the type (as in
110
+ # `path/google.protobuf.Duration`). The name should be in a canonical form
111
+ # (e.g., leading "." is not accepted).
112
+ #
113
+ # In practice, teams usually precompile into the binary all types that they
114
+ # expect it to use in the context of Any. However, for URLs which use the
115
+ # scheme `http`, `https`, or no scheme, one can optionally set up a type
116
+ # server that maps type URLs to message definitions as follows:
117
+ #
118
+ # * If no scheme is provided, `https` is assumed.
119
+ # * An HTTP GET on the URL must yield a [google.protobuf.Type][]
120
+ # value in binary format, or produce an error.
121
+ # * Applications are allowed to cache lookup results based on the
122
+ # URL, or have them precompiled into a binary to avoid any
123
+ # lookup. Therefore, binary compatibility needs to be preserved
124
+ # on changes to types. (Use versioned type names to manage
125
+ # breaking changes.)
126
+ #
127
+ # Note: this functionality is not currently available in the official
128
+ # protobuf release, and it is not used for type URLs beginning with
129
+ # type.googleapis.com.
130
+ #
131
+ # Schemes other than `http`, `https` (or the empty scheme) might be
132
+ # used with implementation specific semantics.
133
+ # @!attribute [rw] value
134
+ # @return [::String]
135
+ # Must be a valid serialized protocol buffer of the above specified type.
136
+ class Any
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+ end
141
+ end