Skip to main content

polyester/gen/connect/
triggers.v1.rs

1// @generated by connectrpc-codegen. DO NOT EDIT.
2
3///Shorthand for `OwnedView<CreateTriggerRequestView<'static>>`.
4pub type OwnedCreateTriggerRequestView = ::buffa::view::OwnedView<
5    crate::proto::triggers::v1::__buffa::view::CreateTriggerRequestView<'static>,
6>;
7///Shorthand for `OwnedView<CreateTriggerResponseView<'static>>`.
8pub type OwnedCreateTriggerResponseView = ::buffa::view::OwnedView<
9    crate::proto::triggers::v1::__buffa::view::CreateTriggerResponseView<'static>,
10>;
11///Shorthand for `OwnedView<GetTriggerRequestView<'static>>`.
12pub type OwnedGetTriggerRequestView = ::buffa::view::OwnedView<
13    crate::proto::triggers::v1::__buffa::view::GetTriggerRequestView<'static>,
14>;
15///Shorthand for `OwnedView<GetTriggerResponseView<'static>>`.
16pub type OwnedGetTriggerResponseView = ::buffa::view::OwnedView<
17    crate::proto::triggers::v1::__buffa::view::GetTriggerResponseView<'static>,
18>;
19///Shorthand for `OwnedView<ListTriggersRequestView<'static>>`.
20pub type OwnedListTriggersRequestView = ::buffa::view::OwnedView<
21    crate::proto::triggers::v1::__buffa::view::ListTriggersRequestView<'static>,
22>;
23///Shorthand for `OwnedView<ListTriggersResponseView<'static>>`.
24pub type OwnedListTriggersResponseView = ::buffa::view::OwnedView<
25    crate::proto::triggers::v1::__buffa::view::ListTriggersResponseView<'static>,
26>;
27///Shorthand for `OwnedView<ListTriggerEventsRequestView<'static>>`.
28pub type OwnedListTriggerEventsRequestView = ::buffa::view::OwnedView<
29    crate::proto::triggers::v1::__buffa::view::ListTriggerEventsRequestView<'static>,
30>;
31///Shorthand for `OwnedView<ListTriggerEventsResponseView<'static>>`.
32pub type OwnedListTriggerEventsResponseView = ::buffa::view::OwnedView<
33    crate::proto::triggers::v1::__buffa::view::ListTriggerEventsResponseView<'static>,
34>;
35///Shorthand for `OwnedView<CancelTriggerRequestView<'static>>`.
36pub type OwnedCancelTriggerRequestView = ::buffa::view::OwnedView<
37    crate::proto::triggers::v1::__buffa::view::CancelTriggerRequestView<'static>,
38>;
39///Shorthand for `OwnedView<CancelTriggerResponseView<'static>>`.
40pub type OwnedCancelTriggerResponseView = ::buffa::view::OwnedView<
41    crate::proto::triggers::v1::__buffa::view::CancelTriggerResponseView<'static>,
42>;
43///Shorthand for `OwnedView<ModifyTriggerRequestView<'static>>`.
44pub type OwnedModifyTriggerRequestView = ::buffa::view::OwnedView<
45    crate::proto::triggers::v1::__buffa::view::ModifyTriggerRequestView<'static>,
46>;
47///Shorthand for `OwnedView<ModifyTriggerResponseView<'static>>`.
48pub type OwnedModifyTriggerResponseView = ::buffa::view::OwnedView<
49    crate::proto::triggers::v1::__buffa::view::ModifyTriggerResponseView<'static>,
50>;
51///Shorthand for `OwnedView<PauseTriggerRequestView<'static>>`.
52pub type OwnedPauseTriggerRequestView = ::buffa::view::OwnedView<
53    crate::proto::triggers::v1::__buffa::view::PauseTriggerRequestView<'static>,
54>;
55///Shorthand for `OwnedView<PauseTriggerResponseView<'static>>`.
56pub type OwnedPauseTriggerResponseView = ::buffa::view::OwnedView<
57    crate::proto::triggers::v1::__buffa::view::PauseTriggerResponseView<'static>,
58>;
59///Shorthand for `OwnedView<ResumeTriggerRequestView<'static>>`.
60pub type OwnedResumeTriggerRequestView = ::buffa::view::OwnedView<
61    crate::proto::triggers::v1::__buffa::view::ResumeTriggerRequestView<'static>,
62>;
63///Shorthand for `OwnedView<ResumeTriggerResponseView<'static>>`.
64pub type OwnedResumeTriggerResponseView = ::buffa::view::OwnedView<
65    crate::proto::triggers::v1::__buffa::view::ResumeTriggerResponseView<'static>,
66>;
67impl ::connectrpc::Encodable<crate::proto::triggers::v1::CreateTriggerResponse>
68for crate::proto::triggers::v1::__buffa::view::CreateTriggerResponseView<'_> {
69    fn encode(
70        &self,
71        codec: ::connectrpc::CodecFormat,
72    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
73        ::connectrpc::__codegen::encode_view_body(self, codec)
74    }
75}
76impl ::connectrpc::Encodable<crate::proto::triggers::v1::CreateTriggerResponse>
77for ::buffa::view::OwnedView<
78    crate::proto::triggers::v1::__buffa::view::CreateTriggerResponseView<'static>,
79> {
80    fn encode(
81        &self,
82        codec: ::connectrpc::CodecFormat,
83    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
84        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
85    }
86}
87impl ::connectrpc::Encodable<crate::proto::triggers::v1::GetTriggerResponse>
88for crate::proto::triggers::v1::__buffa::view::GetTriggerResponseView<'_> {
89    fn encode(
90        &self,
91        codec: ::connectrpc::CodecFormat,
92    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
93        ::connectrpc::__codegen::encode_view_body(self, codec)
94    }
95}
96impl ::connectrpc::Encodable<crate::proto::triggers::v1::GetTriggerResponse>
97for ::buffa::view::OwnedView<
98    crate::proto::triggers::v1::__buffa::view::GetTriggerResponseView<'static>,
99> {
100    fn encode(
101        &self,
102        codec: ::connectrpc::CodecFormat,
103    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
104        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
105    }
106}
107impl ::connectrpc::Encodable<crate::proto::triggers::v1::ListTriggersResponse>
108for crate::proto::triggers::v1::__buffa::view::ListTriggersResponseView<'_> {
109    fn encode(
110        &self,
111        codec: ::connectrpc::CodecFormat,
112    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
113        ::connectrpc::__codegen::encode_view_body(self, codec)
114    }
115}
116impl ::connectrpc::Encodable<crate::proto::triggers::v1::ListTriggersResponse>
117for ::buffa::view::OwnedView<
118    crate::proto::triggers::v1::__buffa::view::ListTriggersResponseView<'static>,
119> {
120    fn encode(
121        &self,
122        codec: ::connectrpc::CodecFormat,
123    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
124        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
125    }
126}
127impl ::connectrpc::Encodable<crate::proto::triggers::v1::ListTriggerEventsResponse>
128for crate::proto::triggers::v1::__buffa::view::ListTriggerEventsResponseView<'_> {
129    fn encode(
130        &self,
131        codec: ::connectrpc::CodecFormat,
132    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
133        ::connectrpc::__codegen::encode_view_body(self, codec)
134    }
135}
136impl ::connectrpc::Encodable<crate::proto::triggers::v1::ListTriggerEventsResponse>
137for ::buffa::view::OwnedView<
138    crate::proto::triggers::v1::__buffa::view::ListTriggerEventsResponseView<'static>,
139> {
140    fn encode(
141        &self,
142        codec: ::connectrpc::CodecFormat,
143    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
144        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
145    }
146}
147impl ::connectrpc::Encodable<crate::proto::triggers::v1::CancelTriggerResponse>
148for crate::proto::triggers::v1::__buffa::view::CancelTriggerResponseView<'_> {
149    fn encode(
150        &self,
151        codec: ::connectrpc::CodecFormat,
152    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
153        ::connectrpc::__codegen::encode_view_body(self, codec)
154    }
155}
156impl ::connectrpc::Encodable<crate::proto::triggers::v1::CancelTriggerResponse>
157for ::buffa::view::OwnedView<
158    crate::proto::triggers::v1::__buffa::view::CancelTriggerResponseView<'static>,
159> {
160    fn encode(
161        &self,
162        codec: ::connectrpc::CodecFormat,
163    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
164        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
165    }
166}
167impl ::connectrpc::Encodable<crate::proto::triggers::v1::ModifyTriggerResponse>
168for crate::proto::triggers::v1::__buffa::view::ModifyTriggerResponseView<'_> {
169    fn encode(
170        &self,
171        codec: ::connectrpc::CodecFormat,
172    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
173        ::connectrpc::__codegen::encode_view_body(self, codec)
174    }
175}
176impl ::connectrpc::Encodable<crate::proto::triggers::v1::ModifyTriggerResponse>
177for ::buffa::view::OwnedView<
178    crate::proto::triggers::v1::__buffa::view::ModifyTriggerResponseView<'static>,
179> {
180    fn encode(
181        &self,
182        codec: ::connectrpc::CodecFormat,
183    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
184        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
185    }
186}
187impl ::connectrpc::Encodable<crate::proto::triggers::v1::PauseTriggerResponse>
188for crate::proto::triggers::v1::__buffa::view::PauseTriggerResponseView<'_> {
189    fn encode(
190        &self,
191        codec: ::connectrpc::CodecFormat,
192    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
193        ::connectrpc::__codegen::encode_view_body(self, codec)
194    }
195}
196impl ::connectrpc::Encodable<crate::proto::triggers::v1::PauseTriggerResponse>
197for ::buffa::view::OwnedView<
198    crate::proto::triggers::v1::__buffa::view::PauseTriggerResponseView<'static>,
199> {
200    fn encode(
201        &self,
202        codec: ::connectrpc::CodecFormat,
203    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
204        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
205    }
206}
207impl ::connectrpc::Encodable<crate::proto::triggers::v1::ResumeTriggerResponse>
208for crate::proto::triggers::v1::__buffa::view::ResumeTriggerResponseView<'_> {
209    fn encode(
210        &self,
211        codec: ::connectrpc::CodecFormat,
212    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
213        ::connectrpc::__codegen::encode_view_body(self, codec)
214    }
215}
216impl ::connectrpc::Encodable<crate::proto::triggers::v1::ResumeTriggerResponse>
217for ::buffa::view::OwnedView<
218    crate::proto::triggers::v1::__buffa::view::ResumeTriggerResponseView<'static>,
219> {
220    fn encode(
221        &self,
222        codec: ::connectrpc::CodecFormat,
223    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
224        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
225    }
226}
227/// Full service name for this service.
228pub const TRIGGERS_SERVICE_SERVICE_NAME: &str = "triggers.v1.TriggersService";
229/// Static [`Spec`](::connectrpc::Spec) for the server-side `CreateTrigger` RPC.
230///
231/// The dispatcher surfaces this on
232/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
233pub const TRIGGERS_SERVICE_CREATE_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
234        "/triggers.v1.TriggersService/CreateTrigger",
235        ::connectrpc::StreamType::Unary,
236    )
237    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
238/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetTrigger` RPC.
239///
240/// The dispatcher surfaces this on
241/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
242pub const TRIGGERS_SERVICE_GET_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
243        "/triggers.v1.TriggersService/GetTrigger",
244        ::connectrpc::StreamType::Unary,
245    )
246    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
247/// Static [`Spec`](::connectrpc::Spec) for the server-side `ListTriggers` RPC.
248///
249/// The dispatcher surfaces this on
250/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
251pub const TRIGGERS_SERVICE_LIST_TRIGGERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
252        "/triggers.v1.TriggersService/ListTriggers",
253        ::connectrpc::StreamType::Unary,
254    )
255    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
256/// Static [`Spec`](::connectrpc::Spec) for the server-side `ListTriggerEvents` RPC.
257///
258/// The dispatcher surfaces this on
259/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
260pub const TRIGGERS_SERVICE_LIST_TRIGGER_EVENTS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
261        "/triggers.v1.TriggersService/ListTriggerEvents",
262        ::connectrpc::StreamType::Unary,
263    )
264    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
265/// Static [`Spec`](::connectrpc::Spec) for the server-side `CancelTrigger` RPC.
266///
267/// The dispatcher surfaces this on
268/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
269pub const TRIGGERS_SERVICE_CANCEL_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
270        "/triggers.v1.TriggersService/CancelTrigger",
271        ::connectrpc::StreamType::Unary,
272    )
273    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
274/// Static [`Spec`](::connectrpc::Spec) for the server-side `ModifyTrigger` RPC.
275///
276/// The dispatcher surfaces this on
277/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
278pub const TRIGGERS_SERVICE_MODIFY_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
279        "/triggers.v1.TriggersService/ModifyTrigger",
280        ::connectrpc::StreamType::Unary,
281    )
282    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
283/// Static [`Spec`](::connectrpc::Spec) for the server-side `PauseTrigger` RPC.
284///
285/// The dispatcher surfaces this on
286/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
287pub const TRIGGERS_SERVICE_PAUSE_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
288        "/triggers.v1.TriggersService/PauseTrigger",
289        ::connectrpc::StreamType::Unary,
290    )
291    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
292/// Static [`Spec`](::connectrpc::Spec) for the server-side `ResumeTrigger` RPC.
293///
294/// The dispatcher surfaces this on
295/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
296pub const TRIGGERS_SERVICE_RESUME_TRIGGER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
297        "/triggers.v1.TriggersService/ResumeTrigger",
298        ::connectrpc::StreamType::Unary,
299    )
300    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
301/// Server trait for TriggersService.
302///
303/// # Implementing handlers
304///
305/// Implement methods with plain `async fn`; the returned future satisfies
306/// the `Send` bound automatically.
307///
308/// **Unary and server-streaming requests** arrive as
309/// [`ServiceRequest<'_, Req>`](::connectrpc::ServiceRequest): a zero-copy
310/// view of the request plus its body, valid for the duration of the call.
311/// Fields are read directly (`request.name` is a `&str` into the decoded
312/// buffer) and the borrow may be held across `.await` points. Anything
313/// that must outlive the call — `tokio::spawn`, channels, server state,
314/// or data captured by a returned response stream — takes owned data:
315/// call `request.to_owned_message()` (or copy the specific fields)
316/// first.
317///
318/// **Client-streaming and bidi requests** arrive as
319/// [`InboundStream<Req>`](::connectrpc::InboundStream) — a
320/// `ServiceStream` of [`StreamMessage`](::connectrpc::StreamMessage)s.
321/// Each item owns its decoded buffer and is `Send + 'static`, so items
322/// can be buffered or moved into spawned tasks; read fields zero-copy
323/// through the generated accessor methods (`item.name()`) or `.view()`,
324/// convert with `.to_owned_message()`, or yield an item back unchanged —
325/// `StreamMessage<M>` implements `Encodable<M>`.
326///
327/// Request types resolved through `extern_path` (e.g. well-known types
328/// from another crate) use the same wrappers; the crate that owns the
329/// type must be generated with buffa ≥ 0.8.0 and views enabled so the
330/// backing `HasMessageView` impl exists.
331///
332/// The `impl Encodable<Out>` return bound accepts the owned `Out`, the
333/// generated `OutView<'_>` / `OwnedOutView`,
334/// [`MaybeBorrowed`](::connectrpc::MaybeBorrowed), or
335/// [`PreEncoded`](::connectrpc::PreEncoded) for handlers that encode a
336/// non-`'static` view internally and pass the bytes across the handler
337/// boundary. View bodies are not emitted for output types mapped via
338/// `extern_path` (the impl would be an orphan); return owned for
339/// WKT/extern outputs.
340///
341/// Server-streaming and bidi-streaming methods return
342/// `ServiceStream<impl Encodable<Out> + Send + use<Self>>`. The
343/// `use<Self>` precise-capturing clause excludes `&self`'s lifetime and
344/// the request's lifetime (unary methods use `use<'a, Self>` and may
345/// borrow from `&self`), so stream items must be `'static` and cannot
346/// borrow from the request. To stream view-encoded data, encode each
347/// item inside the stream body and yield
348/// [`PreEncoded`](::connectrpc::PreEncoded) — see its `# Streaming
349/// example` doc.
350#[allow(clippy::type_complexity)]
351pub trait TriggersService: Send + Sync + 'static {
352    /// Create a standalone trigger (stop order, TWAP, ladder).
353    ///
354    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
355    ///
356    /// `request` is borrowed from the request body and is valid for the
357    /// duration of the call; message fields are read directly on it
358    /// (zero-copy). The response cannot borrow from `request` — use
359    /// `.to_owned_message()` (or copy the specific fields) for anything
360    /// returned, stored, or moved into `tokio::spawn`.
361    fn create_trigger<'a>(
362        &'a self,
363        ctx: ::connectrpc::RequestContext,
364        request: ::connectrpc::ServiceRequest<
365            '_,
366            crate::proto::triggers::v1::CreateTriggerRequest,
367        >,
368    ) -> impl ::std::future::Future<
369        Output = ::connectrpc::ServiceResult<
370            impl ::connectrpc::Encodable<
371                crate::proto::triggers::v1::CreateTriggerResponse,
372            > + Send + use<'a, Self>,
373        >,
374    > + Send;
375    /// Get a trigger by ID.
376    ///
377    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
378    ///
379    /// `request` is borrowed from the request body and is valid for the
380    /// duration of the call; message fields are read directly on it
381    /// (zero-copy). The response cannot borrow from `request` — use
382    /// `.to_owned_message()` (or copy the specific fields) for anything
383    /// returned, stored, or moved into `tokio::spawn`.
384    fn get_trigger<'a>(
385        &'a self,
386        ctx: ::connectrpc::RequestContext,
387        request: ::connectrpc::ServiceRequest<
388            '_,
389            crate::proto::triggers::v1::GetTriggerRequest,
390        >,
391    ) -> impl ::std::future::Future<
392        Output = ::connectrpc::ServiceResult<
393            impl ::connectrpc::Encodable<
394                crate::proto::triggers::v1::GetTriggerResponse,
395            > + Send + use<'a, Self>,
396        >,
397    > + Send;
398    /// List triggers for a sub-account with optional filters.
399    ///
400    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
401    ///
402    /// `request` is borrowed from the request body and is valid for the
403    /// duration of the call; message fields are read directly on it
404    /// (zero-copy). The response cannot borrow from `request` — use
405    /// `.to_owned_message()` (or copy the specific fields) for anything
406    /// returned, stored, or moved into `tokio::spawn`.
407    fn list_triggers<'a>(
408        &'a self,
409        ctx: ::connectrpc::RequestContext,
410        request: ::connectrpc::ServiceRequest<
411            '_,
412            crate::proto::triggers::v1::ListTriggersRequest,
413        >,
414    ) -> impl ::std::future::Future<
415        Output = ::connectrpc::ServiceResult<
416            impl ::connectrpc::Encodable<
417                crate::proto::triggers::v1::ListTriggersResponse,
418            > + Send + use<'a, Self>,
419        >,
420    > + Send;
421    /// List trigger events (append-only history).
422    ///
423    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
424    ///
425    /// `request` is borrowed from the request body and is valid for the
426    /// duration of the call; message fields are read directly on it
427    /// (zero-copy). The response cannot borrow from `request` — use
428    /// `.to_owned_message()` (or copy the specific fields) for anything
429    /// returned, stored, or moved into `tokio::spawn`.
430    fn list_trigger_events<'a>(
431        &'a self,
432        ctx: ::connectrpc::RequestContext,
433        request: ::connectrpc::ServiceRequest<
434            '_,
435            crate::proto::triggers::v1::ListTriggerEventsRequest,
436        >,
437    ) -> impl ::std::future::Future<
438        Output = ::connectrpc::ServiceResult<
439            impl ::connectrpc::Encodable<
440                crate::proto::triggers::v1::ListTriggerEventsResponse,
441            > + Send + use<'a, Self>,
442        >,
443    > + Send;
444    /// Cancel a trigger.
445    ///
446    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
447    ///
448    /// `request` is borrowed from the request body and is valid for the
449    /// duration of the call; message fields are read directly on it
450    /// (zero-copy). The response cannot borrow from `request` — use
451    /// `.to_owned_message()` (or copy the specific fields) for anything
452    /// returned, stored, or moved into `tokio::spawn`.
453    fn cancel_trigger<'a>(
454        &'a self,
455        ctx: ::connectrpc::RequestContext,
456        request: ::connectrpc::ServiceRequest<
457            '_,
458            crate::proto::triggers::v1::CancelTriggerRequest,
459        >,
460    ) -> impl ::std::future::Future<
461        Output = ::connectrpc::ServiceResult<
462            impl ::connectrpc::Encodable<
463                crate::proto::triggers::v1::CancelTriggerResponse,
464            > + Send + use<'a, Self>,
465        >,
466    > + Send;
467    /// Modify a trigger (limited patch).
468    ///
469    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
470    ///
471    /// `request` is borrowed from the request body and is valid for the
472    /// duration of the call; message fields are read directly on it
473    /// (zero-copy). The response cannot borrow from `request` — use
474    /// `.to_owned_message()` (or copy the specific fields) for anything
475    /// returned, stored, or moved into `tokio::spawn`.
476    fn modify_trigger<'a>(
477        &'a self,
478        ctx: ::connectrpc::RequestContext,
479        request: ::connectrpc::ServiceRequest<
480            '_,
481            crate::proto::triggers::v1::ModifyTriggerRequest,
482        >,
483    ) -> impl ::std::future::Future<
484        Output = ::connectrpc::ServiceResult<
485            impl ::connectrpc::Encodable<
486                crate::proto::triggers::v1::ModifyTriggerResponse,
487            > + Send + use<'a, Self>,
488        >,
489    > + Send;
490    /// Pause a trigger (sets status=PAUSED).
491    ///
492    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
493    ///
494    /// `request` is borrowed from the request body and is valid for the
495    /// duration of the call; message fields are read directly on it
496    /// (zero-copy). The response cannot borrow from `request` — use
497    /// `.to_owned_message()` (or copy the specific fields) for anything
498    /// returned, stored, or moved into `tokio::spawn`.
499    fn pause_trigger<'a>(
500        &'a self,
501        ctx: ::connectrpc::RequestContext,
502        request: ::connectrpc::ServiceRequest<
503            '_,
504            crate::proto::triggers::v1::PauseTriggerRequest,
505        >,
506    ) -> impl ::std::future::Future<
507        Output = ::connectrpc::ServiceResult<
508            impl ::connectrpc::Encodable<
509                crate::proto::triggers::v1::PauseTriggerResponse,
510            > + Send + use<'a, Self>,
511        >,
512    > + Send;
513    /// Resume a paused trigger (sets status back to ARMED/RUNNING as appropriate).
514    ///
515    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
516    ///
517    /// `request` is borrowed from the request body and is valid for the
518    /// duration of the call; message fields are read directly on it
519    /// (zero-copy). The response cannot borrow from `request` — use
520    /// `.to_owned_message()` (or copy the specific fields) for anything
521    /// returned, stored, or moved into `tokio::spawn`.
522    fn resume_trigger<'a>(
523        &'a self,
524        ctx: ::connectrpc::RequestContext,
525        request: ::connectrpc::ServiceRequest<
526            '_,
527            crate::proto::triggers::v1::ResumeTriggerRequest,
528        >,
529    ) -> impl ::std::future::Future<
530        Output = ::connectrpc::ServiceResult<
531            impl ::connectrpc::Encodable<
532                crate::proto::triggers::v1::ResumeTriggerResponse,
533            > + Send + use<'a, Self>,
534        >,
535    > + Send;
536}
537/// Extension trait for registering a service implementation with a Router.
538///
539/// This trait is automatically implemented for all types that implement the service trait.
540/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
541/// top-down registration; `register` remains available for compatibility
542/// and cases where the service-first call shape is more convenient.
543///
544/// # Example
545///
546/// ```rust,ignore
547/// use std::sync::Arc;
548///
549/// let service = Arc::new(MyServiceImpl);
550/// let router = service.register(Router::new());
551/// ```
552pub trait TriggersServiceExt: TriggersService {
553    /// Register this service implementation with a Router.
554    ///
555    /// Takes ownership of the `Arc<Self>` and returns a new Router with
556    /// this service's methods registered.
557    fn register(
558        self: ::std::sync::Arc<Self>,
559        router: ::connectrpc::Router,
560    ) -> ::connectrpc::Router;
561}
562impl<S: TriggersService> TriggersServiceExt for S {
563    fn register(
564        self: ::std::sync::Arc<Self>,
565        router: ::connectrpc::Router,
566    ) -> ::connectrpc::Router {
567        router
568            .route_view(
569                TRIGGERS_SERVICE_SERVICE_NAME,
570                "CreateTrigger",
571                {
572                    let svc = ::std::sync::Arc::clone(&self);
573                    ::connectrpc::view_handler_fn(move |
574                        ctx,
575                        req: ::buffa::view::OwnedView<
576                            crate::proto::triggers::v1::__buffa::view::CreateTriggerRequestView<
577                                'static,
578                            >,
579                        >,
580                        format|
581                    {
582                        let svc = ::std::sync::Arc::clone(&svc);
583                        async move {
584                            let sreq = ::connectrpc::ServiceRequest::<
585                                crate::proto::triggers::v1::CreateTriggerRequest,
586                            >::from_parts(req.reborrow(), req.bytes());
587                            svc.create_trigger(ctx, sreq)
588                                .await?
589                                .encode::<
590                                    crate::proto::triggers::v1::CreateTriggerResponse,
591                                >(format)
592                        }
593                    })
594                },
595            )
596            .with_spec(TRIGGERS_SERVICE_CREATE_TRIGGER_SPEC)
597            .route_view(
598                TRIGGERS_SERVICE_SERVICE_NAME,
599                "GetTrigger",
600                {
601                    let svc = ::std::sync::Arc::clone(&self);
602                    ::connectrpc::view_handler_fn(move |
603                        ctx,
604                        req: ::buffa::view::OwnedView<
605                            crate::proto::triggers::v1::__buffa::view::GetTriggerRequestView<
606                                'static,
607                            >,
608                        >,
609                        format|
610                    {
611                        let svc = ::std::sync::Arc::clone(&svc);
612                        async move {
613                            let sreq = ::connectrpc::ServiceRequest::<
614                                crate::proto::triggers::v1::GetTriggerRequest,
615                            >::from_parts(req.reborrow(), req.bytes());
616                            svc.get_trigger(ctx, sreq)
617                                .await?
618                                .encode::<
619                                    crate::proto::triggers::v1::GetTriggerResponse,
620                                >(format)
621                        }
622                    })
623                },
624            )
625            .with_spec(TRIGGERS_SERVICE_GET_TRIGGER_SPEC)
626            .route_view(
627                TRIGGERS_SERVICE_SERVICE_NAME,
628                "ListTriggers",
629                {
630                    let svc = ::std::sync::Arc::clone(&self);
631                    ::connectrpc::view_handler_fn(move |
632                        ctx,
633                        req: ::buffa::view::OwnedView<
634                            crate::proto::triggers::v1::__buffa::view::ListTriggersRequestView<
635                                'static,
636                            >,
637                        >,
638                        format|
639                    {
640                        let svc = ::std::sync::Arc::clone(&svc);
641                        async move {
642                            let sreq = ::connectrpc::ServiceRequest::<
643                                crate::proto::triggers::v1::ListTriggersRequest,
644                            >::from_parts(req.reborrow(), req.bytes());
645                            svc.list_triggers(ctx, sreq)
646                                .await?
647                                .encode::<
648                                    crate::proto::triggers::v1::ListTriggersResponse,
649                                >(format)
650                        }
651                    })
652                },
653            )
654            .with_spec(TRIGGERS_SERVICE_LIST_TRIGGERS_SPEC)
655            .route_view(
656                TRIGGERS_SERVICE_SERVICE_NAME,
657                "ListTriggerEvents",
658                {
659                    let svc = ::std::sync::Arc::clone(&self);
660                    ::connectrpc::view_handler_fn(move |
661                        ctx,
662                        req: ::buffa::view::OwnedView<
663                            crate::proto::triggers::v1::__buffa::view::ListTriggerEventsRequestView<
664                                'static,
665                            >,
666                        >,
667                        format|
668                    {
669                        let svc = ::std::sync::Arc::clone(&svc);
670                        async move {
671                            let sreq = ::connectrpc::ServiceRequest::<
672                                crate::proto::triggers::v1::ListTriggerEventsRequest,
673                            >::from_parts(req.reborrow(), req.bytes());
674                            svc.list_trigger_events(ctx, sreq)
675                                .await?
676                                .encode::<
677                                    crate::proto::triggers::v1::ListTriggerEventsResponse,
678                                >(format)
679                        }
680                    })
681                },
682            )
683            .with_spec(TRIGGERS_SERVICE_LIST_TRIGGER_EVENTS_SPEC)
684            .route_view(
685                TRIGGERS_SERVICE_SERVICE_NAME,
686                "CancelTrigger",
687                {
688                    let svc = ::std::sync::Arc::clone(&self);
689                    ::connectrpc::view_handler_fn(move |
690                        ctx,
691                        req: ::buffa::view::OwnedView<
692                            crate::proto::triggers::v1::__buffa::view::CancelTriggerRequestView<
693                                'static,
694                            >,
695                        >,
696                        format|
697                    {
698                        let svc = ::std::sync::Arc::clone(&svc);
699                        async move {
700                            let sreq = ::connectrpc::ServiceRequest::<
701                                crate::proto::triggers::v1::CancelTriggerRequest,
702                            >::from_parts(req.reborrow(), req.bytes());
703                            svc.cancel_trigger(ctx, sreq)
704                                .await?
705                                .encode::<
706                                    crate::proto::triggers::v1::CancelTriggerResponse,
707                                >(format)
708                        }
709                    })
710                },
711            )
712            .with_spec(TRIGGERS_SERVICE_CANCEL_TRIGGER_SPEC)
713            .route_view(
714                TRIGGERS_SERVICE_SERVICE_NAME,
715                "ModifyTrigger",
716                {
717                    let svc = ::std::sync::Arc::clone(&self);
718                    ::connectrpc::view_handler_fn(move |
719                        ctx,
720                        req: ::buffa::view::OwnedView<
721                            crate::proto::triggers::v1::__buffa::view::ModifyTriggerRequestView<
722                                'static,
723                            >,
724                        >,
725                        format|
726                    {
727                        let svc = ::std::sync::Arc::clone(&svc);
728                        async move {
729                            let sreq = ::connectrpc::ServiceRequest::<
730                                crate::proto::triggers::v1::ModifyTriggerRequest,
731                            >::from_parts(req.reborrow(), req.bytes());
732                            svc.modify_trigger(ctx, sreq)
733                                .await?
734                                .encode::<
735                                    crate::proto::triggers::v1::ModifyTriggerResponse,
736                                >(format)
737                        }
738                    })
739                },
740            )
741            .with_spec(TRIGGERS_SERVICE_MODIFY_TRIGGER_SPEC)
742            .route_view(
743                TRIGGERS_SERVICE_SERVICE_NAME,
744                "PauseTrigger",
745                {
746                    let svc = ::std::sync::Arc::clone(&self);
747                    ::connectrpc::view_handler_fn(move |
748                        ctx,
749                        req: ::buffa::view::OwnedView<
750                            crate::proto::triggers::v1::__buffa::view::PauseTriggerRequestView<
751                                'static,
752                            >,
753                        >,
754                        format|
755                    {
756                        let svc = ::std::sync::Arc::clone(&svc);
757                        async move {
758                            let sreq = ::connectrpc::ServiceRequest::<
759                                crate::proto::triggers::v1::PauseTriggerRequest,
760                            >::from_parts(req.reborrow(), req.bytes());
761                            svc.pause_trigger(ctx, sreq)
762                                .await?
763                                .encode::<
764                                    crate::proto::triggers::v1::PauseTriggerResponse,
765                                >(format)
766                        }
767                    })
768                },
769            )
770            .with_spec(TRIGGERS_SERVICE_PAUSE_TRIGGER_SPEC)
771            .route_view(
772                TRIGGERS_SERVICE_SERVICE_NAME,
773                "ResumeTrigger",
774                {
775                    let svc = ::std::sync::Arc::clone(&self);
776                    ::connectrpc::view_handler_fn(move |
777                        ctx,
778                        req: ::buffa::view::OwnedView<
779                            crate::proto::triggers::v1::__buffa::view::ResumeTriggerRequestView<
780                                'static,
781                            >,
782                        >,
783                        format|
784                    {
785                        let svc = ::std::sync::Arc::clone(&svc);
786                        async move {
787                            let sreq = ::connectrpc::ServiceRequest::<
788                                crate::proto::triggers::v1::ResumeTriggerRequest,
789                            >::from_parts(req.reborrow(), req.bytes());
790                            svc.resume_trigger(ctx, sreq)
791                                .await?
792                                .encode::<
793                                    crate::proto::triggers::v1::ResumeTriggerResponse,
794                                >(format)
795                        }
796                    })
797                },
798            )
799            .with_spec(TRIGGERS_SERVICE_RESUME_TRIGGER_SPEC)
800    }
801}
802/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
803#[doc(hidden)]
804pub struct TriggersServiceRegisterMarker;
805impl<S: TriggersService> ::connectrpc::ServiceRegister<TriggersServiceRegisterMarker>
806for ::std::sync::Arc<S> {
807    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
808        <S as TriggersServiceExt>::register(self, router)
809    }
810}
811/// Monomorphic dispatcher for `TriggersService`.
812///
813/// Unlike `.register(Router)` which type-erases each method into an `Arc<dyn ErasedHandler>` stored in a `HashMap`, this struct dispatches via a compile-time `match` on method name: no vtable, no hash lookup.
814///
815/// # Example
816///
817/// ```rust,ignore
818/// use connectrpc::ConnectRpcService;
819///
820/// let server = TriggersServiceServer::new(MyImpl);
821/// let service = ConnectRpcService::new(server);
822/// // hand `service` to axum/hyper as a fallback_service
823/// ```
824pub struct TriggersServiceServer<T> {
825    inner: ::std::sync::Arc<T>,
826}
827impl<T: TriggersService> TriggersServiceServer<T> {
828    /// Wrap a service implementation in a monomorphic dispatcher.
829    pub fn new(service: T) -> Self {
830        Self {
831            inner: ::std::sync::Arc::new(service),
832        }
833    }
834    /// Wrap an already-`Arc`'d service implementation.
835    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
836        Self { inner }
837    }
838}
839impl<T> Clone for TriggersServiceServer<T> {
840    fn clone(&self) -> Self {
841        Self {
842            inner: ::std::sync::Arc::clone(&self.inner),
843        }
844    }
845}
846impl<T: TriggersService> ::connectrpc::Dispatcher for TriggersServiceServer<T> {
847    #[inline]
848    fn lookup(
849        &self,
850        path: &str,
851    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
852        let method = path.strip_prefix("triggers.v1.TriggersService/")?;
853        match method {
854            "CreateTrigger" => {
855                Some(
856                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
857                        .with_spec(TRIGGERS_SERVICE_CREATE_TRIGGER_SPEC),
858                )
859            }
860            "GetTrigger" => {
861                Some(
862                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
863                        .with_spec(TRIGGERS_SERVICE_GET_TRIGGER_SPEC),
864                )
865            }
866            "ListTriggers" => {
867                Some(
868                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
869                        .with_spec(TRIGGERS_SERVICE_LIST_TRIGGERS_SPEC),
870                )
871            }
872            "ListTriggerEvents" => {
873                Some(
874                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
875                        .with_spec(TRIGGERS_SERVICE_LIST_TRIGGER_EVENTS_SPEC),
876                )
877            }
878            "CancelTrigger" => {
879                Some(
880                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
881                        .with_spec(TRIGGERS_SERVICE_CANCEL_TRIGGER_SPEC),
882                )
883            }
884            "ModifyTrigger" => {
885                Some(
886                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
887                        .with_spec(TRIGGERS_SERVICE_MODIFY_TRIGGER_SPEC),
888                )
889            }
890            "PauseTrigger" => {
891                Some(
892                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
893                        .with_spec(TRIGGERS_SERVICE_PAUSE_TRIGGER_SPEC),
894                )
895            }
896            "ResumeTrigger" => {
897                Some(
898                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
899                        .with_spec(TRIGGERS_SERVICE_RESUME_TRIGGER_SPEC),
900                )
901            }
902            _ => None,
903        }
904    }
905    fn call_unary(
906        &self,
907        path: &str,
908        ctx: ::connectrpc::RequestContext,
909        request: ::connectrpc::Payload,
910        format: ::connectrpc::CodecFormat,
911    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
912        let Some(method) = path.strip_prefix("triggers.v1.TriggersService/") else {
913            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
914        };
915        let _ = (&ctx, &request, &format);
916        match method {
917            "CreateTrigger" => {
918                let svc = ::std::sync::Arc::clone(&self.inner);
919                Box::pin(async move {
920                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
921                        crate::proto::triggers::v1::CreateTriggerRequest,
922                    >(request.encoded()?, format)?;
923                    let req: crate::proto::triggers::v1::__buffa::view::CreateTriggerRequestView<
924                        '_,
925                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
926                        &body,
927                    )?;
928                    let req = ::connectrpc::ServiceRequest::<
929                        crate::proto::triggers::v1::CreateTriggerRequest,
930                    >::from_parts(&req, &body);
931                    svc.create_trigger(ctx, req)
932                        .await?
933                        .encode::<
934                            crate::proto::triggers::v1::CreateTriggerResponse,
935                        >(format)
936                })
937            }
938            "GetTrigger" => {
939                let svc = ::std::sync::Arc::clone(&self.inner);
940                Box::pin(async move {
941                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
942                        crate::proto::triggers::v1::GetTriggerRequest,
943                    >(request.encoded()?, format)?;
944                    let req: crate::proto::triggers::v1::__buffa::view::GetTriggerRequestView<
945                        '_,
946                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
947                        &body,
948                    )?;
949                    let req = ::connectrpc::ServiceRequest::<
950                        crate::proto::triggers::v1::GetTriggerRequest,
951                    >::from_parts(&req, &body);
952                    svc.get_trigger(ctx, req)
953                        .await?
954                        .encode::<crate::proto::triggers::v1::GetTriggerResponse>(format)
955                })
956            }
957            "ListTriggers" => {
958                let svc = ::std::sync::Arc::clone(&self.inner);
959                Box::pin(async move {
960                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
961                        crate::proto::triggers::v1::ListTriggersRequest,
962                    >(request.encoded()?, format)?;
963                    let req: crate::proto::triggers::v1::__buffa::view::ListTriggersRequestView<
964                        '_,
965                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
966                        &body,
967                    )?;
968                    let req = ::connectrpc::ServiceRequest::<
969                        crate::proto::triggers::v1::ListTriggersRequest,
970                    >::from_parts(&req, &body);
971                    svc.list_triggers(ctx, req)
972                        .await?
973                        .encode::<
974                            crate::proto::triggers::v1::ListTriggersResponse,
975                        >(format)
976                })
977            }
978            "ListTriggerEvents" => {
979                let svc = ::std::sync::Arc::clone(&self.inner);
980                Box::pin(async move {
981                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
982                        crate::proto::triggers::v1::ListTriggerEventsRequest,
983                    >(request.encoded()?, format)?;
984                    let req: crate::proto::triggers::v1::__buffa::view::ListTriggerEventsRequestView<
985                        '_,
986                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
987                        &body,
988                    )?;
989                    let req = ::connectrpc::ServiceRequest::<
990                        crate::proto::triggers::v1::ListTriggerEventsRequest,
991                    >::from_parts(&req, &body);
992                    svc.list_trigger_events(ctx, req)
993                        .await?
994                        .encode::<
995                            crate::proto::triggers::v1::ListTriggerEventsResponse,
996                        >(format)
997                })
998            }
999            "CancelTrigger" => {
1000                let svc = ::std::sync::Arc::clone(&self.inner);
1001                Box::pin(async move {
1002                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1003                        crate::proto::triggers::v1::CancelTriggerRequest,
1004                    >(request.encoded()?, format)?;
1005                    let req: crate::proto::triggers::v1::__buffa::view::CancelTriggerRequestView<
1006                        '_,
1007                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1008                        &body,
1009                    )?;
1010                    let req = ::connectrpc::ServiceRequest::<
1011                        crate::proto::triggers::v1::CancelTriggerRequest,
1012                    >::from_parts(&req, &body);
1013                    svc.cancel_trigger(ctx, req)
1014                        .await?
1015                        .encode::<
1016                            crate::proto::triggers::v1::CancelTriggerResponse,
1017                        >(format)
1018                })
1019            }
1020            "ModifyTrigger" => {
1021                let svc = ::std::sync::Arc::clone(&self.inner);
1022                Box::pin(async move {
1023                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1024                        crate::proto::triggers::v1::ModifyTriggerRequest,
1025                    >(request.encoded()?, format)?;
1026                    let req: crate::proto::triggers::v1::__buffa::view::ModifyTriggerRequestView<
1027                        '_,
1028                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1029                        &body,
1030                    )?;
1031                    let req = ::connectrpc::ServiceRequest::<
1032                        crate::proto::triggers::v1::ModifyTriggerRequest,
1033                    >::from_parts(&req, &body);
1034                    svc.modify_trigger(ctx, req)
1035                        .await?
1036                        .encode::<
1037                            crate::proto::triggers::v1::ModifyTriggerResponse,
1038                        >(format)
1039                })
1040            }
1041            "PauseTrigger" => {
1042                let svc = ::std::sync::Arc::clone(&self.inner);
1043                Box::pin(async move {
1044                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1045                        crate::proto::triggers::v1::PauseTriggerRequest,
1046                    >(request.encoded()?, format)?;
1047                    let req: crate::proto::triggers::v1::__buffa::view::PauseTriggerRequestView<
1048                        '_,
1049                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1050                        &body,
1051                    )?;
1052                    let req = ::connectrpc::ServiceRequest::<
1053                        crate::proto::triggers::v1::PauseTriggerRequest,
1054                    >::from_parts(&req, &body);
1055                    svc.pause_trigger(ctx, req)
1056                        .await?
1057                        .encode::<
1058                            crate::proto::triggers::v1::PauseTriggerResponse,
1059                        >(format)
1060                })
1061            }
1062            "ResumeTrigger" => {
1063                let svc = ::std::sync::Arc::clone(&self.inner);
1064                Box::pin(async move {
1065                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1066                        crate::proto::triggers::v1::ResumeTriggerRequest,
1067                    >(request.encoded()?, format)?;
1068                    let req: crate::proto::triggers::v1::__buffa::view::ResumeTriggerRequestView<
1069                        '_,
1070                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1071                        &body,
1072                    )?;
1073                    let req = ::connectrpc::ServiceRequest::<
1074                        crate::proto::triggers::v1::ResumeTriggerRequest,
1075                    >::from_parts(&req, &body);
1076                    svc.resume_trigger(ctx, req)
1077                        .await?
1078                        .encode::<
1079                            crate::proto::triggers::v1::ResumeTriggerResponse,
1080                        >(format)
1081                })
1082            }
1083            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
1084        }
1085    }
1086    fn call_server_streaming(
1087        &self,
1088        path: &str,
1089        ctx: ::connectrpc::RequestContext,
1090        request: ::buffa::bytes::Bytes,
1091        format: ::connectrpc::CodecFormat,
1092    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
1093        let Some(method) = path.strip_prefix("triggers.v1.TriggersService/") else {
1094            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
1095        };
1096        let _ = (&ctx, &request, &format);
1097        match method {
1098            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
1099        }
1100    }
1101    fn call_client_streaming(
1102        &self,
1103        path: &str,
1104        ctx: ::connectrpc::RequestContext,
1105        requests: ::connectrpc::dispatcher::codegen::RequestStream,
1106        format: ::connectrpc::CodecFormat,
1107    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
1108        let Some(method) = path.strip_prefix("triggers.v1.TriggersService/") else {
1109            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
1110        };
1111        let _ = (&ctx, &requests, &format);
1112        match method {
1113            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
1114        }
1115    }
1116    fn call_bidi_streaming(
1117        &self,
1118        path: &str,
1119        ctx: ::connectrpc::RequestContext,
1120        requests: ::connectrpc::dispatcher::codegen::RequestStream,
1121        format: ::connectrpc::CodecFormat,
1122    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
1123        let Some(method) = path.strip_prefix("triggers.v1.TriggersService/") else {
1124            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
1125        };
1126        let _ = (&ctx, &requests, &format);
1127        match method {
1128            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
1129        }
1130    }
1131}
1132/// Client for this service.
1133///
1134/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
1135/// `Http2Connection` — it has honest `poll_ready` and composes with
1136/// `tower::balance` for multi-connection load balancing. For **Connect
1137/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
1138///
1139/// # Working with the response
1140///
1141/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
1142/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
1143/// message, so field access is zero-copy:
1144///
1145/// ```rust,ignore
1146/// let resp = client.create_trigger(request).await?;
1147/// let name: &str = resp.view().name;  // borrow into the response buffer
1148/// ```
1149///
1150/// If you need the owned struct (e.g. to store or pass by value), use
1151/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
1152///
1153/// ```rust,ignore
1154/// let owned = client.create_trigger(request).await?.into_owned();
1155/// ```
1156///
1157/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
1158/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
1159/// goes through `.reborrow()`. Streaming responses yield one
1160/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
1161/// `.message().await` — read fields zero-copy through the generated accessor
1162/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
1163#[derive(Clone)]
1164pub struct TriggersServiceClient<T> {
1165    transport: T,
1166    config: ::connectrpc::client::ClientConfig,
1167}
1168impl<T> TriggersServiceClient<T>
1169where
1170    T: ::connectrpc::client::ClientTransport,
1171    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
1172{
1173    /// Create a new client with the given transport and configuration.
1174    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
1175        Self { transport, config }
1176    }
1177    /// Get the client configuration.
1178    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
1179        &self.config
1180    }
1181    /// Get a mutable reference to the client configuration.
1182    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
1183        &mut self.config
1184    }
1185    /// Call the CreateTrigger RPC. Sends a request to /triggers.v1.TriggersService/CreateTrigger.
1186    pub async fn create_trigger(
1187        &self,
1188        request: crate::proto::triggers::v1::CreateTriggerRequest,
1189    ) -> Result<
1190        ::connectrpc::client::UnaryResponse<
1191            ::buffa::view::OwnedView<
1192                crate::proto::triggers::v1::__buffa::view::CreateTriggerResponseView<
1193                    'static,
1194                >,
1195            >,
1196        >,
1197        ::connectrpc::ConnectError,
1198    > {
1199        self.create_trigger_with_options(
1200                request,
1201                ::connectrpc::client::CallOptions::default(),
1202            )
1203            .await
1204    }
1205    /// Call the CreateTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1206    pub async fn create_trigger_with_options(
1207        &self,
1208        request: crate::proto::triggers::v1::CreateTriggerRequest,
1209        options: ::connectrpc::client::CallOptions,
1210    ) -> Result<
1211        ::connectrpc::client::UnaryResponse<
1212            ::buffa::view::OwnedView<
1213                crate::proto::triggers::v1::__buffa::view::CreateTriggerResponseView<
1214                    'static,
1215                >,
1216            >,
1217        >,
1218        ::connectrpc::ConnectError,
1219    > {
1220        ::connectrpc::client::call_unary(
1221                &self.transport,
1222                &self.config,
1223                TRIGGERS_SERVICE_SERVICE_NAME,
1224                "CreateTrigger",
1225                request,
1226                options,
1227            )
1228            .await
1229    }
1230    /// Call the GetTrigger RPC. Sends a request to /triggers.v1.TriggersService/GetTrigger.
1231    pub async fn get_trigger(
1232        &self,
1233        request: crate::proto::triggers::v1::GetTriggerRequest,
1234    ) -> Result<
1235        ::connectrpc::client::UnaryResponse<
1236            ::buffa::view::OwnedView<
1237                crate::proto::triggers::v1::__buffa::view::GetTriggerResponseView<
1238                    'static,
1239                >,
1240            >,
1241        >,
1242        ::connectrpc::ConnectError,
1243    > {
1244        self.get_trigger_with_options(
1245                request,
1246                ::connectrpc::client::CallOptions::default(),
1247            )
1248            .await
1249    }
1250    /// Call the GetTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1251    pub async fn get_trigger_with_options(
1252        &self,
1253        request: crate::proto::triggers::v1::GetTriggerRequest,
1254        options: ::connectrpc::client::CallOptions,
1255    ) -> Result<
1256        ::connectrpc::client::UnaryResponse<
1257            ::buffa::view::OwnedView<
1258                crate::proto::triggers::v1::__buffa::view::GetTriggerResponseView<
1259                    'static,
1260                >,
1261            >,
1262        >,
1263        ::connectrpc::ConnectError,
1264    > {
1265        ::connectrpc::client::call_unary(
1266                &self.transport,
1267                &self.config,
1268                TRIGGERS_SERVICE_SERVICE_NAME,
1269                "GetTrigger",
1270                request,
1271                options,
1272            )
1273            .await
1274    }
1275    /// Call the ListTriggers RPC. Sends a request to /triggers.v1.TriggersService/ListTriggers.
1276    pub async fn list_triggers(
1277        &self,
1278        request: crate::proto::triggers::v1::ListTriggersRequest,
1279    ) -> Result<
1280        ::connectrpc::client::UnaryResponse<
1281            ::buffa::view::OwnedView<
1282                crate::proto::triggers::v1::__buffa::view::ListTriggersResponseView<
1283                    'static,
1284                >,
1285            >,
1286        >,
1287        ::connectrpc::ConnectError,
1288    > {
1289        self.list_triggers_with_options(
1290                request,
1291                ::connectrpc::client::CallOptions::default(),
1292            )
1293            .await
1294    }
1295    /// Call the ListTriggers RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1296    pub async fn list_triggers_with_options(
1297        &self,
1298        request: crate::proto::triggers::v1::ListTriggersRequest,
1299        options: ::connectrpc::client::CallOptions,
1300    ) -> Result<
1301        ::connectrpc::client::UnaryResponse<
1302            ::buffa::view::OwnedView<
1303                crate::proto::triggers::v1::__buffa::view::ListTriggersResponseView<
1304                    'static,
1305                >,
1306            >,
1307        >,
1308        ::connectrpc::ConnectError,
1309    > {
1310        ::connectrpc::client::call_unary(
1311                &self.transport,
1312                &self.config,
1313                TRIGGERS_SERVICE_SERVICE_NAME,
1314                "ListTriggers",
1315                request,
1316                options,
1317            )
1318            .await
1319    }
1320    /// Call the ListTriggerEvents RPC. Sends a request to /triggers.v1.TriggersService/ListTriggerEvents.
1321    pub async fn list_trigger_events(
1322        &self,
1323        request: crate::proto::triggers::v1::ListTriggerEventsRequest,
1324    ) -> Result<
1325        ::connectrpc::client::UnaryResponse<
1326            ::buffa::view::OwnedView<
1327                crate::proto::triggers::v1::__buffa::view::ListTriggerEventsResponseView<
1328                    'static,
1329                >,
1330            >,
1331        >,
1332        ::connectrpc::ConnectError,
1333    > {
1334        self.list_trigger_events_with_options(
1335                request,
1336                ::connectrpc::client::CallOptions::default(),
1337            )
1338            .await
1339    }
1340    /// Call the ListTriggerEvents RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1341    pub async fn list_trigger_events_with_options(
1342        &self,
1343        request: crate::proto::triggers::v1::ListTriggerEventsRequest,
1344        options: ::connectrpc::client::CallOptions,
1345    ) -> Result<
1346        ::connectrpc::client::UnaryResponse<
1347            ::buffa::view::OwnedView<
1348                crate::proto::triggers::v1::__buffa::view::ListTriggerEventsResponseView<
1349                    'static,
1350                >,
1351            >,
1352        >,
1353        ::connectrpc::ConnectError,
1354    > {
1355        ::connectrpc::client::call_unary(
1356                &self.transport,
1357                &self.config,
1358                TRIGGERS_SERVICE_SERVICE_NAME,
1359                "ListTriggerEvents",
1360                request,
1361                options,
1362            )
1363            .await
1364    }
1365    /// Call the CancelTrigger RPC. Sends a request to /triggers.v1.TriggersService/CancelTrigger.
1366    pub async fn cancel_trigger(
1367        &self,
1368        request: crate::proto::triggers::v1::CancelTriggerRequest,
1369    ) -> Result<
1370        ::connectrpc::client::UnaryResponse<
1371            ::buffa::view::OwnedView<
1372                crate::proto::triggers::v1::__buffa::view::CancelTriggerResponseView<
1373                    'static,
1374                >,
1375            >,
1376        >,
1377        ::connectrpc::ConnectError,
1378    > {
1379        self.cancel_trigger_with_options(
1380                request,
1381                ::connectrpc::client::CallOptions::default(),
1382            )
1383            .await
1384    }
1385    /// Call the CancelTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1386    pub async fn cancel_trigger_with_options(
1387        &self,
1388        request: crate::proto::triggers::v1::CancelTriggerRequest,
1389        options: ::connectrpc::client::CallOptions,
1390    ) -> Result<
1391        ::connectrpc::client::UnaryResponse<
1392            ::buffa::view::OwnedView<
1393                crate::proto::triggers::v1::__buffa::view::CancelTriggerResponseView<
1394                    'static,
1395                >,
1396            >,
1397        >,
1398        ::connectrpc::ConnectError,
1399    > {
1400        ::connectrpc::client::call_unary(
1401                &self.transport,
1402                &self.config,
1403                TRIGGERS_SERVICE_SERVICE_NAME,
1404                "CancelTrigger",
1405                request,
1406                options,
1407            )
1408            .await
1409    }
1410    /// Call the ModifyTrigger RPC. Sends a request to /triggers.v1.TriggersService/ModifyTrigger.
1411    pub async fn modify_trigger(
1412        &self,
1413        request: crate::proto::triggers::v1::ModifyTriggerRequest,
1414    ) -> Result<
1415        ::connectrpc::client::UnaryResponse<
1416            ::buffa::view::OwnedView<
1417                crate::proto::triggers::v1::__buffa::view::ModifyTriggerResponseView<
1418                    'static,
1419                >,
1420            >,
1421        >,
1422        ::connectrpc::ConnectError,
1423    > {
1424        self.modify_trigger_with_options(
1425                request,
1426                ::connectrpc::client::CallOptions::default(),
1427            )
1428            .await
1429    }
1430    /// Call the ModifyTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1431    pub async fn modify_trigger_with_options(
1432        &self,
1433        request: crate::proto::triggers::v1::ModifyTriggerRequest,
1434        options: ::connectrpc::client::CallOptions,
1435    ) -> Result<
1436        ::connectrpc::client::UnaryResponse<
1437            ::buffa::view::OwnedView<
1438                crate::proto::triggers::v1::__buffa::view::ModifyTriggerResponseView<
1439                    'static,
1440                >,
1441            >,
1442        >,
1443        ::connectrpc::ConnectError,
1444    > {
1445        ::connectrpc::client::call_unary(
1446                &self.transport,
1447                &self.config,
1448                TRIGGERS_SERVICE_SERVICE_NAME,
1449                "ModifyTrigger",
1450                request,
1451                options,
1452            )
1453            .await
1454    }
1455    /// Call the PauseTrigger RPC. Sends a request to /triggers.v1.TriggersService/PauseTrigger.
1456    pub async fn pause_trigger(
1457        &self,
1458        request: crate::proto::triggers::v1::PauseTriggerRequest,
1459    ) -> Result<
1460        ::connectrpc::client::UnaryResponse<
1461            ::buffa::view::OwnedView<
1462                crate::proto::triggers::v1::__buffa::view::PauseTriggerResponseView<
1463                    'static,
1464                >,
1465            >,
1466        >,
1467        ::connectrpc::ConnectError,
1468    > {
1469        self.pause_trigger_with_options(
1470                request,
1471                ::connectrpc::client::CallOptions::default(),
1472            )
1473            .await
1474    }
1475    /// Call the PauseTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1476    pub async fn pause_trigger_with_options(
1477        &self,
1478        request: crate::proto::triggers::v1::PauseTriggerRequest,
1479        options: ::connectrpc::client::CallOptions,
1480    ) -> Result<
1481        ::connectrpc::client::UnaryResponse<
1482            ::buffa::view::OwnedView<
1483                crate::proto::triggers::v1::__buffa::view::PauseTriggerResponseView<
1484                    'static,
1485                >,
1486            >,
1487        >,
1488        ::connectrpc::ConnectError,
1489    > {
1490        ::connectrpc::client::call_unary(
1491                &self.transport,
1492                &self.config,
1493                TRIGGERS_SERVICE_SERVICE_NAME,
1494                "PauseTrigger",
1495                request,
1496                options,
1497            )
1498            .await
1499    }
1500    /// Call the ResumeTrigger RPC. Sends a request to /triggers.v1.TriggersService/ResumeTrigger.
1501    pub async fn resume_trigger(
1502        &self,
1503        request: crate::proto::triggers::v1::ResumeTriggerRequest,
1504    ) -> Result<
1505        ::connectrpc::client::UnaryResponse<
1506            ::buffa::view::OwnedView<
1507                crate::proto::triggers::v1::__buffa::view::ResumeTriggerResponseView<
1508                    'static,
1509                >,
1510            >,
1511        >,
1512        ::connectrpc::ConnectError,
1513    > {
1514        self.resume_trigger_with_options(
1515                request,
1516                ::connectrpc::client::CallOptions::default(),
1517            )
1518            .await
1519    }
1520    /// Call the ResumeTrigger RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1521    pub async fn resume_trigger_with_options(
1522        &self,
1523        request: crate::proto::triggers::v1::ResumeTriggerRequest,
1524        options: ::connectrpc::client::CallOptions,
1525    ) -> Result<
1526        ::connectrpc::client::UnaryResponse<
1527            ::buffa::view::OwnedView<
1528                crate::proto::triggers::v1::__buffa::view::ResumeTriggerResponseView<
1529                    'static,
1530                >,
1531            >,
1532        >,
1533        ::connectrpc::ConnectError,
1534    > {
1535        ::connectrpc::client::call_unary(
1536                &self.transport,
1537                &self.config,
1538                TRIGGERS_SERVICE_SERVICE_NAME,
1539                "ResumeTrigger",
1540                request,
1541                options,
1542            )
1543            .await
1544    }
1545}