google-cloud-eventarc-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,169 @@
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 Eventarc
23
+ module V1
24
+ # The request message for the GetTrigger method.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Required. The name of the trigger to get.
28
+ class GetTriggerRequest
29
+ include ::Google::Protobuf::MessageExts
30
+ extend ::Google::Protobuf::MessageExts::ClassMethods
31
+ end
32
+
33
+ # The request message for the ListTriggers method.
34
+ # @!attribute [rw] parent
35
+ # @return [::String]
36
+ # Required. The parent collection to list triggers on.
37
+ # @!attribute [rw] page_size
38
+ # @return [::Integer]
39
+ # The maximum number of triggers to return on each page.
40
+ # Note: The service may send fewer.
41
+ # @!attribute [rw] page_token
42
+ # @return [::String]
43
+ # The page token; provide the value from the `next_page_token` field in a
44
+ # previous `ListTriggers` call to retrieve the subsequent page.
45
+ #
46
+ # When paginating, all other parameters provided to `ListTriggers` must match
47
+ # the call that provided the page token.
48
+ # @!attribute [rw] order_by
49
+ # @return [::String]
50
+ # The sorting order of the resources returned. Value should be a comma
51
+ # separated list of fields. The default sorting oder is ascending. To specify
52
+ # descending order for a field, append a ` desc` suffix; for example:
53
+ # `name desc, trigger_id`.
54
+ class ListTriggersRequest
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # The response message for the ListTriggers method.
60
+ # @!attribute [rw] triggers
61
+ # @return [::Array<::Google::Cloud::Eventarc::V1::Trigger>]
62
+ # The requested triggers, up to the number specified in `page_size`.
63
+ # @!attribute [rw] next_page_token
64
+ # @return [::String]
65
+ # A page token that can be sent to ListTriggers to request the next page.
66
+ # If this is empty, then there are no more pages.
67
+ # @!attribute [rw] unreachable
68
+ # @return [::Array<::String>]
69
+ # Unreachable resources, if any.
70
+ class ListTriggersResponse
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
73
+ end
74
+
75
+ # The request message for the CreateTrigger method.
76
+ # @!attribute [rw] parent
77
+ # @return [::String]
78
+ # Required. The parent collection in which to add this trigger.
79
+ # @!attribute [rw] trigger
80
+ # @return [::Google::Cloud::Eventarc::V1::Trigger]
81
+ # Required. The trigger to create.
82
+ # @!attribute [rw] trigger_id
83
+ # @return [::String]
84
+ # Required. The user-provided ID to be assigned to the trigger.
85
+ # @!attribute [rw] validate_only
86
+ # @return [::Boolean]
87
+ # Required. If set, validate the request and preview the review, but do not actually
88
+ # post it.
89
+ class CreateTriggerRequest
90
+ include ::Google::Protobuf::MessageExts
91
+ extend ::Google::Protobuf::MessageExts::ClassMethods
92
+ end
93
+
94
+ # The request message for the UpdateTrigger method.
95
+ # @!attribute [rw] trigger
96
+ # @return [::Google::Cloud::Eventarc::V1::Trigger]
97
+ # The trigger to be updated.
98
+ # @!attribute [rw] update_mask
99
+ # @return [::Google::Protobuf::FieldMask]
100
+ # The fields to be updated; only fields explicitly provided will be updated.
101
+ # If no field mask is provided, all provided fields in the request will be
102
+ # updated. To update all fields, provide a field mask of "*".
103
+ # @!attribute [rw] allow_missing
104
+ # @return [::Boolean]
105
+ # If set to true, and the trigger is not found, a new trigger will be
106
+ # created. In this situation, `update_mask` is ignored.
107
+ # @!attribute [rw] validate_only
108
+ # @return [::Boolean]
109
+ # Required. If set, validate the request and preview the review, but do not actually
110
+ # post it.
111
+ class UpdateTriggerRequest
112
+ include ::Google::Protobuf::MessageExts
113
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
+ end
115
+
116
+ # The request message for the DeleteTrigger method.
117
+ # @!attribute [rw] name
118
+ # @return [::String]
119
+ # Required. The name of the trigger to be deleted.
120
+ # @!attribute [rw] etag
121
+ # @return [::String]
122
+ # If provided, the trigger will only be deleted if the etag matches the
123
+ # current etag on the resource.
124
+ # @!attribute [rw] allow_missing
125
+ # @return [::Boolean]
126
+ # If set to true, and the trigger is not found, the request will succeed
127
+ # but no action will be taken on the server.
128
+ # @!attribute [rw] validate_only
129
+ # @return [::Boolean]
130
+ # Required. If set, validate the request and preview the review, but do not actually
131
+ # post it.
132
+ class DeleteTriggerRequest
133
+ include ::Google::Protobuf::MessageExts
134
+ extend ::Google::Protobuf::MessageExts::ClassMethods
135
+ end
136
+
137
+ # Represents the metadata of the long-running operation.
138
+ # @!attribute [r] create_time
139
+ # @return [::Google::Protobuf::Timestamp]
140
+ # Output only. The time the operation was created.
141
+ # @!attribute [r] end_time
142
+ # @return [::Google::Protobuf::Timestamp]
143
+ # Output only. The time the operation finished running.
144
+ # @!attribute [r] target
145
+ # @return [::String]
146
+ # Output only. Server-defined resource path for the target of the operation.
147
+ # @!attribute [r] verb
148
+ # @return [::String]
149
+ # Output only. Name of the verb executed by the operation.
150
+ # @!attribute [r] status_message
151
+ # @return [::String]
152
+ # Output only. Human-readable status of the operation, if any.
153
+ # @!attribute [r] requested_cancellation
154
+ # @return [::Boolean]
155
+ # Output only. Identifies whether the user has requested cancellation
156
+ # of the operation. Operations that have successfully been cancelled
157
+ # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
158
+ # corresponding to `Code.CANCELLED`.
159
+ # @!attribute [r] api_version
160
+ # @return [::String]
161
+ # Output only. API version used to start the operation.
162
+ class OperationMetadata
163
+ include ::Google::Protobuf::MessageExts
164
+ extend ::Google::Protobuf::MessageExts::ClassMethods
165
+ end
166
+ end
167
+ end
168
+ end
169
+ end
@@ -0,0 +1,174 @@
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 Eventarc
23
+ module V1
24
+ # A representation of the trigger resource.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Required. The resource name of the trigger. Must be unique within the
28
+ # location on the project and must be in
29
+ # `projects/{project}/locations/{location}/triggers/{trigger}` format.
30
+ # @!attribute [r] uid
31
+ # @return [::String]
32
+ # Output only. Server assigned unique identifier for the trigger. The value
33
+ # is a UUID4 string and guaranteed to remain unchanged until the resource is
34
+ # deleted.
35
+ # @!attribute [r] create_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # Output only. The creation time.
38
+ # @!attribute [r] update_time
39
+ # @return [::Google::Protobuf::Timestamp]
40
+ # Output only. The last-modified time.
41
+ # @!attribute [rw] event_filters
42
+ # @return [::Array<::Google::Cloud::Eventarc::V1::EventFilter>]
43
+ # Required. null The list of filters that applies to event attributes. Only
44
+ # events that match all the provided filters will be sent to the destination.
45
+ # @!attribute [rw] service_account
46
+ # @return [::String]
47
+ # Optional. The IAM service account email associated with the trigger. The
48
+ # service account represents the identity of the trigger.
49
+ #
50
+ # The principal who calls this API must have `iam.serviceAccounts.actAs`
51
+ # permission in the service account. See
52
+ # https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
53
+ # for more information.
54
+ #
55
+ # For Cloud Run destinations, this service account is used to generate
56
+ # identity tokens when invoking the service. See
57
+ # https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
58
+ # for information on how to invoke authenticated Cloud Run services.
59
+ # In order to create Audit Log triggers, the service account should also
60
+ # have `roles/eventarc.eventReceiver` IAM role.
61
+ # @!attribute [rw] destination
62
+ # @return [::Google::Cloud::Eventarc::V1::Destination]
63
+ # Required. Destination specifies where the events should be sent to.
64
+ # @!attribute [rw] transport
65
+ # @return [::Google::Cloud::Eventarc::V1::Transport]
66
+ # Optional. In order to deliver messages, Eventarc may use other GCP
67
+ # products as transport intermediary. This field contains a reference to that
68
+ # transport intermediary. This information can be used for debugging
69
+ # purposes.
70
+ # @!attribute [rw] labels
71
+ # @return [::Google::Protobuf::Map{::String => ::String}]
72
+ # Optional. User labels attached to the triggers that can be used to group
73
+ # resources.
74
+ # @!attribute [r] etag
75
+ # @return [::String]
76
+ # Output only. This checksum is computed by the server based on the value of
77
+ # other fields, and may be sent only on create requests to ensure the client
78
+ # has an up-to-date value before proceeding.
79
+ class Trigger
80
+ include ::Google::Protobuf::MessageExts
81
+ extend ::Google::Protobuf::MessageExts::ClassMethods
82
+
83
+ # @!attribute [rw] key
84
+ # @return [::String]
85
+ # @!attribute [rw] value
86
+ # @return [::String]
87
+ class LabelsEntry
88
+ include ::Google::Protobuf::MessageExts
89
+ extend ::Google::Protobuf::MessageExts::ClassMethods
90
+ end
91
+ end
92
+
93
+ # Filters events based on exact matches on the CloudEvents attributes.
94
+ # @!attribute [rw] attribute
95
+ # @return [::String]
96
+ # Required. The name of a CloudEvents attribute. Currently, only a subset of
97
+ # attributes are supported for filtering.
98
+ #
99
+ # All triggers MUST provide a filter for the 'type' attribute.
100
+ # @!attribute [rw] value
101
+ # @return [::String]
102
+ # Required. The value for the attribute.
103
+ class EventFilter
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+
108
+ # Represents a target of an invocation over HTTP.
109
+ # @!attribute [rw] cloud_run
110
+ # @return [::Google::Cloud::Eventarc::V1::CloudRun]
111
+ # Cloud Run fully-managed service that receives the events. The service
112
+ # should be running in the same project of the trigger.
113
+ class Destination
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
116
+ end
117
+
118
+ # Represents the transport intermediaries created for the trigger in order to
119
+ # deliver events.
120
+ # @!attribute [rw] pubsub
121
+ # @return [::Google::Cloud::Eventarc::V1::Pubsub]
122
+ # The Pub/Sub topic and subscription used by Eventarc as delivery
123
+ # intermediary.
124
+ class Transport
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
129
+ # Represents a Cloud Run destination.
130
+ # @!attribute [rw] service
131
+ # @return [::String]
132
+ # Required. The name of the Cloud Run service being addressed. See
133
+ # https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services.
134
+ #
135
+ # Only services located in the same project of the trigger object
136
+ # can be addressed.
137
+ # @!attribute [rw] path
138
+ # @return [::String]
139
+ # Optional. The relative path on the Cloud Run service the events should be
140
+ # sent to.
141
+ #
142
+ # The value must conform to the definition of URI path segment (section 3.3
143
+ # of RFC2396). Examples: "/route", "route", "route/subroute".
144
+ # @!attribute [rw] region
145
+ # @return [::String]
146
+ # Required. The region the Cloud Run service is deployed in.
147
+ class CloudRun
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
152
+ # Represents a Pub/Sub transport.
153
+ # @!attribute [rw] topic
154
+ # @return [::String]
155
+ # Optional. The name of the Pub/Sub topic created and managed by Eventarc
156
+ # system as a transport for the event delivery. Format:
157
+ # `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`.
158
+ #
159
+ # You may set an existing topic for triggers of the type
160
+ # `google.cloud.pubsub.topic.v1.messagePublished` only. The topic you provide
161
+ # here will not be deleted by Eventarc at trigger deletion.
162
+ # @!attribute [r] subscription
163
+ # @return [::String]
164
+ # Output only. The name of the Pub/Sub subscription created and managed by
165
+ # Eventarc system as a transport for the event delivery. Format:
166
+ # `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`.
167
+ class Pubsub
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
170
+ end
171
+ end
172
+ end
173
+ end
174
+ 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