1pub type OwnedCreateApiKeyRequestView = ::buffa::view::OwnedView<
5 crate::proto::auth::v1::__buffa::view::CreateApiKeyRequestView<'static>,
6>;
7pub type OwnedCreateApiKeyResponseView = ::buffa::view::OwnedView<
9 crate::proto::auth::v1::__buffa::view::CreateApiKeyResponseView<'static>,
10>;
11pub type OwnedListApiKeysRequestView = ::buffa::view::OwnedView<
13 crate::proto::auth::v1::__buffa::view::ListApiKeysRequestView<'static>,
14>;
15pub type OwnedListApiKeysResponseView = ::buffa::view::OwnedView<
17 crate::proto::auth::v1::__buffa::view::ListApiKeysResponseView<'static>,
18>;
19pub type OwnedGetApiKeyRequestView = ::buffa::view::OwnedView<
21 crate::proto::auth::v1::__buffa::view::GetApiKeyRequestView<'static>,
22>;
23pub type OwnedGetApiKeyResponseView = ::buffa::view::OwnedView<
25 crate::proto::auth::v1::__buffa::view::GetApiKeyResponseView<'static>,
26>;
27pub type OwnedDeleteApiKeyRequestView = ::buffa::view::OwnedView<
29 crate::proto::auth::v1::__buffa::view::DeleteApiKeyRequestView<'static>,
30>;
31pub type OwnedDeleteApiKeyResponseView = ::buffa::view::OwnedView<
33 crate::proto::auth::v1::__buffa::view::DeleteApiKeyResponseView<'static>,
34>;
35pub type OwnedUpdateApiKeyRequestView = ::buffa::view::OwnedView<
37 crate::proto::auth::v1::__buffa::view::UpdateApiKeyRequestView<'static>,
38>;
39pub type OwnedUpdateApiKeyResponseView = ::buffa::view::OwnedView<
41 crate::proto::auth::v1::__buffa::view::UpdateApiKeyResponseView<'static>,
42>;
43impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateApiKeyResponse>
44for crate::proto::auth::v1::__buffa::view::CreateApiKeyResponseView<'_> {
45 fn encode(
46 &self,
47 codec: ::connectrpc::CodecFormat,
48 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
49 ::connectrpc::__codegen::encode_view_body(self, codec)
50 }
51}
52impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateApiKeyResponse>
53for ::buffa::view::OwnedView<
54 crate::proto::auth::v1::__buffa::view::CreateApiKeyResponseView<'static>,
55> {
56 fn encode(
57 &self,
58 codec: ::connectrpc::CodecFormat,
59 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
60 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
61 }
62}
63impl ::connectrpc::Encodable<crate::proto::auth::v1::ListApiKeysResponse>
64for crate::proto::auth::v1::__buffa::view::ListApiKeysResponseView<'_> {
65 fn encode(
66 &self,
67 codec: ::connectrpc::CodecFormat,
68 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
69 ::connectrpc::__codegen::encode_view_body(self, codec)
70 }
71}
72impl ::connectrpc::Encodable<crate::proto::auth::v1::ListApiKeysResponse>
73for ::buffa::view::OwnedView<
74 crate::proto::auth::v1::__buffa::view::ListApiKeysResponseView<'static>,
75> {
76 fn encode(
77 &self,
78 codec: ::connectrpc::CodecFormat,
79 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
80 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
81 }
82}
83impl ::connectrpc::Encodable<crate::proto::auth::v1::GetApiKeyResponse>
84for crate::proto::auth::v1::__buffa::view::GetApiKeyResponseView<'_> {
85 fn encode(
86 &self,
87 codec: ::connectrpc::CodecFormat,
88 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
89 ::connectrpc::__codegen::encode_view_body(self, codec)
90 }
91}
92impl ::connectrpc::Encodable<crate::proto::auth::v1::GetApiKeyResponse>
93for ::buffa::view::OwnedView<
94 crate::proto::auth::v1::__buffa::view::GetApiKeyResponseView<'static>,
95> {
96 fn encode(
97 &self,
98 codec: ::connectrpc::CodecFormat,
99 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
100 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
101 }
102}
103impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteApiKeyResponse>
104for crate::proto::auth::v1::__buffa::view::DeleteApiKeyResponseView<'_> {
105 fn encode(
106 &self,
107 codec: ::connectrpc::CodecFormat,
108 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
109 ::connectrpc::__codegen::encode_view_body(self, codec)
110 }
111}
112impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteApiKeyResponse>
113for ::buffa::view::OwnedView<
114 crate::proto::auth::v1::__buffa::view::DeleteApiKeyResponseView<'static>,
115> {
116 fn encode(
117 &self,
118 codec: ::connectrpc::CodecFormat,
119 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
120 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
121 }
122}
123impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateApiKeyResponse>
124for crate::proto::auth::v1::__buffa::view::UpdateApiKeyResponseView<'_> {
125 fn encode(
126 &self,
127 codec: ::connectrpc::CodecFormat,
128 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
129 ::connectrpc::__codegen::encode_view_body(self, codec)
130 }
131}
132impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateApiKeyResponse>
133for ::buffa::view::OwnedView<
134 crate::proto::auth::v1::__buffa::view::UpdateApiKeyResponseView<'static>,
135> {
136 fn encode(
137 &self,
138 codec: ::connectrpc::CodecFormat,
139 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
140 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
141 }
142}
143pub const API_KEY_SERVICE_SERVICE_NAME: &str = "auth.v1.ApiKeyService";
145pub const API_KEY_SERVICE_CREATE_API_KEY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
150 "/auth.v1.ApiKeyService/CreateApiKey",
151 ::connectrpc::StreamType::Unary,
152 )
153 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
154pub const API_KEY_SERVICE_LIST_API_KEYS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
159 "/auth.v1.ApiKeyService/ListApiKeys",
160 ::connectrpc::StreamType::Unary,
161 )
162 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
163pub const API_KEY_SERVICE_GET_API_KEY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
168 "/auth.v1.ApiKeyService/GetApiKey",
169 ::connectrpc::StreamType::Unary,
170 )
171 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
172pub const API_KEY_SERVICE_DELETE_API_KEY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
177 "/auth.v1.ApiKeyService/DeleteApiKey",
178 ::connectrpc::StreamType::Unary,
179 )
180 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
181pub const API_KEY_SERVICE_UPDATE_API_KEY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
186 "/auth.v1.ApiKeyService/UpdateApiKey",
187 ::connectrpc::StreamType::Unary,
188 )
189 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
190#[allow(clippy::type_complexity)]
240pub trait ApiKeyService: Send + Sync + 'static {
241 fn create_api_key<'a>(
252 &'a self,
253 ctx: ::connectrpc::RequestContext,
254 request: ::connectrpc::ServiceRequest<
255 '_,
256 crate::proto::auth::v1::CreateApiKeyRequest,
257 >,
258 ) -> impl ::std::future::Future<
259 Output = ::connectrpc::ServiceResult<
260 impl ::connectrpc::Encodable<
261 crate::proto::auth::v1::CreateApiKeyResponse,
262 > + Send + use<'a, Self>,
263 >,
264 > + Send;
265 fn list_api_keys<'a>(
275 &'a self,
276 ctx: ::connectrpc::RequestContext,
277 request: ::connectrpc::ServiceRequest<
278 '_,
279 crate::proto::auth::v1::ListApiKeysRequest,
280 >,
281 ) -> impl ::std::future::Future<
282 Output = ::connectrpc::ServiceResult<
283 impl ::connectrpc::Encodable<
284 crate::proto::auth::v1::ListApiKeysResponse,
285 > + Send + use<'a, Self>,
286 >,
287 > + Send;
288 fn get_api_key<'a>(
298 &'a self,
299 ctx: ::connectrpc::RequestContext,
300 request: ::connectrpc::ServiceRequest<
301 '_,
302 crate::proto::auth::v1::GetApiKeyRequest,
303 >,
304 ) -> impl ::std::future::Future<
305 Output = ::connectrpc::ServiceResult<
306 impl ::connectrpc::Encodable<
307 crate::proto::auth::v1::GetApiKeyResponse,
308 > + Send + use<'a, Self>,
309 >,
310 > + Send;
311 fn delete_api_key<'a>(
321 &'a self,
322 ctx: ::connectrpc::RequestContext,
323 request: ::connectrpc::ServiceRequest<
324 '_,
325 crate::proto::auth::v1::DeleteApiKeyRequest,
326 >,
327 ) -> impl ::std::future::Future<
328 Output = ::connectrpc::ServiceResult<
329 impl ::connectrpc::Encodable<
330 crate::proto::auth::v1::DeleteApiKeyResponse,
331 > + Send + use<'a, Self>,
332 >,
333 > + Send;
334 fn update_api_key<'a>(
345 &'a self,
346 ctx: ::connectrpc::RequestContext,
347 request: ::connectrpc::ServiceRequest<
348 '_,
349 crate::proto::auth::v1::UpdateApiKeyRequest,
350 >,
351 ) -> impl ::std::future::Future<
352 Output = ::connectrpc::ServiceResult<
353 impl ::connectrpc::Encodable<
354 crate::proto::auth::v1::UpdateApiKeyResponse,
355 > + Send + use<'a, Self>,
356 >,
357 > + Send;
358}
359pub trait ApiKeyServiceExt: ApiKeyService {
375 fn register(
380 self: ::std::sync::Arc<Self>,
381 router: ::connectrpc::Router,
382 ) -> ::connectrpc::Router;
383}
384impl<S: ApiKeyService> ApiKeyServiceExt for S {
385 fn register(
386 self: ::std::sync::Arc<Self>,
387 router: ::connectrpc::Router,
388 ) -> ::connectrpc::Router {
389 router
390 .route_view(
391 API_KEY_SERVICE_SERVICE_NAME,
392 "CreateApiKey",
393 {
394 let svc = ::std::sync::Arc::clone(&self);
395 ::connectrpc::view_handler_fn(move |
396 ctx,
397 req: ::buffa::view::OwnedView<
398 crate::proto::auth::v1::__buffa::view::CreateApiKeyRequestView<
399 'static,
400 >,
401 >,
402 format|
403 {
404 let svc = ::std::sync::Arc::clone(&svc);
405 async move {
406 let sreq = ::connectrpc::ServiceRequest::<
407 crate::proto::auth::v1::CreateApiKeyRequest,
408 >::from_parts(req.reborrow(), req.bytes());
409 svc.create_api_key(ctx, sreq)
410 .await?
411 .encode::<
412 crate::proto::auth::v1::CreateApiKeyResponse,
413 >(format)
414 }
415 })
416 },
417 )
418 .with_spec(API_KEY_SERVICE_CREATE_API_KEY_SPEC)
419 .route_view(
420 API_KEY_SERVICE_SERVICE_NAME,
421 "ListApiKeys",
422 {
423 let svc = ::std::sync::Arc::clone(&self);
424 ::connectrpc::view_handler_fn(move |
425 ctx,
426 req: ::buffa::view::OwnedView<
427 crate::proto::auth::v1::__buffa::view::ListApiKeysRequestView<
428 'static,
429 >,
430 >,
431 format|
432 {
433 let svc = ::std::sync::Arc::clone(&svc);
434 async move {
435 let sreq = ::connectrpc::ServiceRequest::<
436 crate::proto::auth::v1::ListApiKeysRequest,
437 >::from_parts(req.reborrow(), req.bytes());
438 svc.list_api_keys(ctx, sreq)
439 .await?
440 .encode::<
441 crate::proto::auth::v1::ListApiKeysResponse,
442 >(format)
443 }
444 })
445 },
446 )
447 .with_spec(API_KEY_SERVICE_LIST_API_KEYS_SPEC)
448 .route_view(
449 API_KEY_SERVICE_SERVICE_NAME,
450 "GetApiKey",
451 {
452 let svc = ::std::sync::Arc::clone(&self);
453 ::connectrpc::view_handler_fn(move |
454 ctx,
455 req: ::buffa::view::OwnedView<
456 crate::proto::auth::v1::__buffa::view::GetApiKeyRequestView<
457 'static,
458 >,
459 >,
460 format|
461 {
462 let svc = ::std::sync::Arc::clone(&svc);
463 async move {
464 let sreq = ::connectrpc::ServiceRequest::<
465 crate::proto::auth::v1::GetApiKeyRequest,
466 >::from_parts(req.reborrow(), req.bytes());
467 svc.get_api_key(ctx, sreq)
468 .await?
469 .encode::<crate::proto::auth::v1::GetApiKeyResponse>(format)
470 }
471 })
472 },
473 )
474 .with_spec(API_KEY_SERVICE_GET_API_KEY_SPEC)
475 .route_view(
476 API_KEY_SERVICE_SERVICE_NAME,
477 "DeleteApiKey",
478 {
479 let svc = ::std::sync::Arc::clone(&self);
480 ::connectrpc::view_handler_fn(move |
481 ctx,
482 req: ::buffa::view::OwnedView<
483 crate::proto::auth::v1::__buffa::view::DeleteApiKeyRequestView<
484 'static,
485 >,
486 >,
487 format|
488 {
489 let svc = ::std::sync::Arc::clone(&svc);
490 async move {
491 let sreq = ::connectrpc::ServiceRequest::<
492 crate::proto::auth::v1::DeleteApiKeyRequest,
493 >::from_parts(req.reborrow(), req.bytes());
494 svc.delete_api_key(ctx, sreq)
495 .await?
496 .encode::<
497 crate::proto::auth::v1::DeleteApiKeyResponse,
498 >(format)
499 }
500 })
501 },
502 )
503 .with_spec(API_KEY_SERVICE_DELETE_API_KEY_SPEC)
504 .route_view(
505 API_KEY_SERVICE_SERVICE_NAME,
506 "UpdateApiKey",
507 {
508 let svc = ::std::sync::Arc::clone(&self);
509 ::connectrpc::view_handler_fn(move |
510 ctx,
511 req: ::buffa::view::OwnedView<
512 crate::proto::auth::v1::__buffa::view::UpdateApiKeyRequestView<
513 'static,
514 >,
515 >,
516 format|
517 {
518 let svc = ::std::sync::Arc::clone(&svc);
519 async move {
520 let sreq = ::connectrpc::ServiceRequest::<
521 crate::proto::auth::v1::UpdateApiKeyRequest,
522 >::from_parts(req.reborrow(), req.bytes());
523 svc.update_api_key(ctx, sreq)
524 .await?
525 .encode::<
526 crate::proto::auth::v1::UpdateApiKeyResponse,
527 >(format)
528 }
529 })
530 },
531 )
532 .with_spec(API_KEY_SERVICE_UPDATE_API_KEY_SPEC)
533 }
534}
535#[doc(hidden)]
537pub struct ApiKeyServiceRegisterMarker;
538impl<S: ApiKeyService> ::connectrpc::ServiceRegister<ApiKeyServiceRegisterMarker>
539for ::std::sync::Arc<S> {
540 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
541 <S as ApiKeyServiceExt>::register(self, router)
542 }
543}
544pub struct ApiKeyServiceServer<T> {
558 inner: ::std::sync::Arc<T>,
559}
560impl<T: ApiKeyService> ApiKeyServiceServer<T> {
561 pub fn new(service: T) -> Self {
563 Self {
564 inner: ::std::sync::Arc::new(service),
565 }
566 }
567 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
569 Self { inner }
570 }
571}
572impl<T> Clone for ApiKeyServiceServer<T> {
573 fn clone(&self) -> Self {
574 Self {
575 inner: ::std::sync::Arc::clone(&self.inner),
576 }
577 }
578}
579impl<T: ApiKeyService> ::connectrpc::Dispatcher for ApiKeyServiceServer<T> {
580 #[inline]
581 fn lookup(
582 &self,
583 path: &str,
584 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
585 let method = path.strip_prefix("auth.v1.ApiKeyService/")?;
586 match method {
587 "CreateApiKey" => {
588 Some(
589 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
590 .with_spec(API_KEY_SERVICE_CREATE_API_KEY_SPEC),
591 )
592 }
593 "ListApiKeys" => {
594 Some(
595 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
596 .with_spec(API_KEY_SERVICE_LIST_API_KEYS_SPEC),
597 )
598 }
599 "GetApiKey" => {
600 Some(
601 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
602 .with_spec(API_KEY_SERVICE_GET_API_KEY_SPEC),
603 )
604 }
605 "DeleteApiKey" => {
606 Some(
607 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
608 .with_spec(API_KEY_SERVICE_DELETE_API_KEY_SPEC),
609 )
610 }
611 "UpdateApiKey" => {
612 Some(
613 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
614 .with_spec(API_KEY_SERVICE_UPDATE_API_KEY_SPEC),
615 )
616 }
617 _ => None,
618 }
619 }
620 fn call_unary(
621 &self,
622 path: &str,
623 ctx: ::connectrpc::RequestContext,
624 request: ::connectrpc::Payload,
625 format: ::connectrpc::CodecFormat,
626 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
627 let Some(method) = path.strip_prefix("auth.v1.ApiKeyService/") else {
628 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
629 };
630 let _ = (&ctx, &request, &format);
631 match method {
632 "CreateApiKey" => {
633 let svc = ::std::sync::Arc::clone(&self.inner);
634 Box::pin(async move {
635 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
636 crate::proto::auth::v1::CreateApiKeyRequest,
637 >(request.encoded()?, format)?;
638 let req: crate::proto::auth::v1::__buffa::view::CreateApiKeyRequestView<
639 '_,
640 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
641 &body,
642 )?;
643 let req = ::connectrpc::ServiceRequest::<
644 crate::proto::auth::v1::CreateApiKeyRequest,
645 >::from_parts(&req, &body);
646 svc.create_api_key(ctx, req)
647 .await?
648 .encode::<crate::proto::auth::v1::CreateApiKeyResponse>(format)
649 })
650 }
651 "ListApiKeys" => {
652 let svc = ::std::sync::Arc::clone(&self.inner);
653 Box::pin(async move {
654 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
655 crate::proto::auth::v1::ListApiKeysRequest,
656 >(request.encoded()?, format)?;
657 let req: crate::proto::auth::v1::__buffa::view::ListApiKeysRequestView<
658 '_,
659 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
660 &body,
661 )?;
662 let req = ::connectrpc::ServiceRequest::<
663 crate::proto::auth::v1::ListApiKeysRequest,
664 >::from_parts(&req, &body);
665 svc.list_api_keys(ctx, req)
666 .await?
667 .encode::<crate::proto::auth::v1::ListApiKeysResponse>(format)
668 })
669 }
670 "GetApiKey" => {
671 let svc = ::std::sync::Arc::clone(&self.inner);
672 Box::pin(async move {
673 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
674 crate::proto::auth::v1::GetApiKeyRequest,
675 >(request.encoded()?, format)?;
676 let req: crate::proto::auth::v1::__buffa::view::GetApiKeyRequestView<
677 '_,
678 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
679 &body,
680 )?;
681 let req = ::connectrpc::ServiceRequest::<
682 crate::proto::auth::v1::GetApiKeyRequest,
683 >::from_parts(&req, &body);
684 svc.get_api_key(ctx, req)
685 .await?
686 .encode::<crate::proto::auth::v1::GetApiKeyResponse>(format)
687 })
688 }
689 "DeleteApiKey" => {
690 let svc = ::std::sync::Arc::clone(&self.inner);
691 Box::pin(async move {
692 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
693 crate::proto::auth::v1::DeleteApiKeyRequest,
694 >(request.encoded()?, format)?;
695 let req: crate::proto::auth::v1::__buffa::view::DeleteApiKeyRequestView<
696 '_,
697 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
698 &body,
699 )?;
700 let req = ::connectrpc::ServiceRequest::<
701 crate::proto::auth::v1::DeleteApiKeyRequest,
702 >::from_parts(&req, &body);
703 svc.delete_api_key(ctx, req)
704 .await?
705 .encode::<crate::proto::auth::v1::DeleteApiKeyResponse>(format)
706 })
707 }
708 "UpdateApiKey" => {
709 let svc = ::std::sync::Arc::clone(&self.inner);
710 Box::pin(async move {
711 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
712 crate::proto::auth::v1::UpdateApiKeyRequest,
713 >(request.encoded()?, format)?;
714 let req: crate::proto::auth::v1::__buffa::view::UpdateApiKeyRequestView<
715 '_,
716 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
717 &body,
718 )?;
719 let req = ::connectrpc::ServiceRequest::<
720 crate::proto::auth::v1::UpdateApiKeyRequest,
721 >::from_parts(&req, &body);
722 svc.update_api_key(ctx, req)
723 .await?
724 .encode::<crate::proto::auth::v1::UpdateApiKeyResponse>(format)
725 })
726 }
727 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
728 }
729 }
730 fn call_server_streaming(
731 &self,
732 path: &str,
733 ctx: ::connectrpc::RequestContext,
734 request: ::buffa::bytes::Bytes,
735 format: ::connectrpc::CodecFormat,
736 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
737 let Some(method) = path.strip_prefix("auth.v1.ApiKeyService/") else {
738 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
739 };
740 let _ = (&ctx, &request, &format);
741 match method {
742 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
743 }
744 }
745 fn call_client_streaming(
746 &self,
747 path: &str,
748 ctx: ::connectrpc::RequestContext,
749 requests: ::connectrpc::dispatcher::codegen::RequestStream,
750 format: ::connectrpc::CodecFormat,
751 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
752 let Some(method) = path.strip_prefix("auth.v1.ApiKeyService/") else {
753 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
754 };
755 let _ = (&ctx, &requests, &format);
756 match method {
757 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
758 }
759 }
760 fn call_bidi_streaming(
761 &self,
762 path: &str,
763 ctx: ::connectrpc::RequestContext,
764 requests: ::connectrpc::dispatcher::codegen::RequestStream,
765 format: ::connectrpc::CodecFormat,
766 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
767 let Some(method) = path.strip_prefix("auth.v1.ApiKeyService/") else {
768 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
769 };
770 let _ = (&ctx, &requests, &format);
771 match method {
772 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
773 }
774 }
775}
776#[derive(Clone)]
808pub struct ApiKeyServiceClient<T> {
809 transport: T,
810 config: ::connectrpc::client::ClientConfig,
811}
812impl<T> ApiKeyServiceClient<T>
813where
814 T: ::connectrpc::client::ClientTransport,
815 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
816{
817 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
819 Self { transport, config }
820 }
821 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
823 &self.config
824 }
825 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
827 &mut self.config
828 }
829 pub async fn create_api_key(
831 &self,
832 request: crate::proto::auth::v1::CreateApiKeyRequest,
833 ) -> Result<
834 ::connectrpc::client::UnaryResponse<
835 ::buffa::view::OwnedView<
836 crate::proto::auth::v1::__buffa::view::CreateApiKeyResponseView<'static>,
837 >,
838 >,
839 ::connectrpc::ConnectError,
840 > {
841 self.create_api_key_with_options(
842 request,
843 ::connectrpc::client::CallOptions::default(),
844 )
845 .await
846 }
847 pub async fn create_api_key_with_options(
849 &self,
850 request: crate::proto::auth::v1::CreateApiKeyRequest,
851 options: ::connectrpc::client::CallOptions,
852 ) -> Result<
853 ::connectrpc::client::UnaryResponse<
854 ::buffa::view::OwnedView<
855 crate::proto::auth::v1::__buffa::view::CreateApiKeyResponseView<'static>,
856 >,
857 >,
858 ::connectrpc::ConnectError,
859 > {
860 ::connectrpc::client::call_unary(
861 &self.transport,
862 &self.config,
863 API_KEY_SERVICE_SERVICE_NAME,
864 "CreateApiKey",
865 request,
866 options,
867 )
868 .await
869 }
870 pub async fn list_api_keys(
872 &self,
873 request: crate::proto::auth::v1::ListApiKeysRequest,
874 ) -> Result<
875 ::connectrpc::client::UnaryResponse<
876 ::buffa::view::OwnedView<
877 crate::proto::auth::v1::__buffa::view::ListApiKeysResponseView<'static>,
878 >,
879 >,
880 ::connectrpc::ConnectError,
881 > {
882 self.list_api_keys_with_options(
883 request,
884 ::connectrpc::client::CallOptions::default(),
885 )
886 .await
887 }
888 pub async fn list_api_keys_with_options(
890 &self,
891 request: crate::proto::auth::v1::ListApiKeysRequest,
892 options: ::connectrpc::client::CallOptions,
893 ) -> Result<
894 ::connectrpc::client::UnaryResponse<
895 ::buffa::view::OwnedView<
896 crate::proto::auth::v1::__buffa::view::ListApiKeysResponseView<'static>,
897 >,
898 >,
899 ::connectrpc::ConnectError,
900 > {
901 ::connectrpc::client::call_unary(
902 &self.transport,
903 &self.config,
904 API_KEY_SERVICE_SERVICE_NAME,
905 "ListApiKeys",
906 request,
907 options,
908 )
909 .await
910 }
911 pub async fn get_api_key(
913 &self,
914 request: crate::proto::auth::v1::GetApiKeyRequest,
915 ) -> Result<
916 ::connectrpc::client::UnaryResponse<
917 ::buffa::view::OwnedView<
918 crate::proto::auth::v1::__buffa::view::GetApiKeyResponseView<'static>,
919 >,
920 >,
921 ::connectrpc::ConnectError,
922 > {
923 self.get_api_key_with_options(
924 request,
925 ::connectrpc::client::CallOptions::default(),
926 )
927 .await
928 }
929 pub async fn get_api_key_with_options(
931 &self,
932 request: crate::proto::auth::v1::GetApiKeyRequest,
933 options: ::connectrpc::client::CallOptions,
934 ) -> Result<
935 ::connectrpc::client::UnaryResponse<
936 ::buffa::view::OwnedView<
937 crate::proto::auth::v1::__buffa::view::GetApiKeyResponseView<'static>,
938 >,
939 >,
940 ::connectrpc::ConnectError,
941 > {
942 ::connectrpc::client::call_unary(
943 &self.transport,
944 &self.config,
945 API_KEY_SERVICE_SERVICE_NAME,
946 "GetApiKey",
947 request,
948 options,
949 )
950 .await
951 }
952 pub async fn delete_api_key(
954 &self,
955 request: crate::proto::auth::v1::DeleteApiKeyRequest,
956 ) -> Result<
957 ::connectrpc::client::UnaryResponse<
958 ::buffa::view::OwnedView<
959 crate::proto::auth::v1::__buffa::view::DeleteApiKeyResponseView<'static>,
960 >,
961 >,
962 ::connectrpc::ConnectError,
963 > {
964 self.delete_api_key_with_options(
965 request,
966 ::connectrpc::client::CallOptions::default(),
967 )
968 .await
969 }
970 pub async fn delete_api_key_with_options(
972 &self,
973 request: crate::proto::auth::v1::DeleteApiKeyRequest,
974 options: ::connectrpc::client::CallOptions,
975 ) -> Result<
976 ::connectrpc::client::UnaryResponse<
977 ::buffa::view::OwnedView<
978 crate::proto::auth::v1::__buffa::view::DeleteApiKeyResponseView<'static>,
979 >,
980 >,
981 ::connectrpc::ConnectError,
982 > {
983 ::connectrpc::client::call_unary(
984 &self.transport,
985 &self.config,
986 API_KEY_SERVICE_SERVICE_NAME,
987 "DeleteApiKey",
988 request,
989 options,
990 )
991 .await
992 }
993 pub async fn update_api_key(
995 &self,
996 request: crate::proto::auth::v1::UpdateApiKeyRequest,
997 ) -> Result<
998 ::connectrpc::client::UnaryResponse<
999 ::buffa::view::OwnedView<
1000 crate::proto::auth::v1::__buffa::view::UpdateApiKeyResponseView<'static>,
1001 >,
1002 >,
1003 ::connectrpc::ConnectError,
1004 > {
1005 self.update_api_key_with_options(
1006 request,
1007 ::connectrpc::client::CallOptions::default(),
1008 )
1009 .await
1010 }
1011 pub async fn update_api_key_with_options(
1013 &self,
1014 request: crate::proto::auth::v1::UpdateApiKeyRequest,
1015 options: ::connectrpc::client::CallOptions,
1016 ) -> Result<
1017 ::connectrpc::client::UnaryResponse<
1018 ::buffa::view::OwnedView<
1019 crate::proto::auth::v1::__buffa::view::UpdateApiKeyResponseView<'static>,
1020 >,
1021 >,
1022 ::connectrpc::ConnectError,
1023 > {
1024 ::connectrpc::client::call_unary(
1025 &self.transport,
1026 &self.config,
1027 API_KEY_SERVICE_SERVICE_NAME,
1028 "UpdateApiKey",
1029 request,
1030 options,
1031 )
1032 .await
1033 }
1034}
1035
1036pub type OwnedListSubaccountPoliciesRequestView = ::buffa::view::OwnedView<
1038 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesRequestView<'static>,
1039>;
1040pub type OwnedListSubaccountPoliciesResponseView = ::buffa::view::OwnedView<
1042 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesResponseView<'static>,
1043>;
1044pub type OwnedGetSubaccountPolicyRequestView = ::buffa::view::OwnedView<
1046 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyRequestView<'static>,
1047>;
1048pub type OwnedGetSubaccountPolicyResponseView = ::buffa::view::OwnedView<
1050 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyResponseView<'static>,
1051>;
1052pub type OwnedCreateSubaccountPolicyRequestView = ::buffa::view::OwnedView<
1054 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyRequestView<'static>,
1055>;
1056pub type OwnedCreateSubaccountPolicyResponseView = ::buffa::view::OwnedView<
1058 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyResponseView<'static>,
1059>;
1060pub type OwnedUpdateSubaccountPolicyRequestView = ::buffa::view::OwnedView<
1062 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyRequestView<'static>,
1063>;
1064pub type OwnedUpdateSubaccountPolicyResponseView = ::buffa::view::OwnedView<
1066 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyResponseView<'static>,
1067>;
1068pub type OwnedDeleteSubaccountPolicyRequestView = ::buffa::view::OwnedView<
1070 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyRequestView<'static>,
1071>;
1072pub type OwnedDeleteSubaccountPolicyResponseView = ::buffa::view::OwnedView<
1074 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyResponseView<'static>,
1075>;
1076pub type OwnedSetSubaccountPolicyRequestView = ::buffa::view::OwnedView<
1078 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyRequestView<'static>,
1079>;
1080pub type OwnedSetSubaccountPolicyResponseView = ::buffa::view::OwnedView<
1082 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyResponseView<'static>,
1083>;
1084pub type OwnedListApiPoliciesRequestView = ::buffa::view::OwnedView<
1086 crate::proto::auth::v1::__buffa::view::ListApiPoliciesRequestView<'static>,
1087>;
1088pub type OwnedListApiPoliciesResponseView = ::buffa::view::OwnedView<
1090 crate::proto::auth::v1::__buffa::view::ListApiPoliciesResponseView<'static>,
1091>;
1092pub type OwnedGetApiPolicyRequestView = ::buffa::view::OwnedView<
1094 crate::proto::auth::v1::__buffa::view::GetApiPolicyRequestView<'static>,
1095>;
1096pub type OwnedGetApiPolicyResponseView = ::buffa::view::OwnedView<
1098 crate::proto::auth::v1::__buffa::view::GetApiPolicyResponseView<'static>,
1099>;
1100pub type OwnedCreateApiPolicyRequestView = ::buffa::view::OwnedView<
1102 crate::proto::auth::v1::__buffa::view::CreateApiPolicyRequestView<'static>,
1103>;
1104pub type OwnedCreateApiPolicyResponseView = ::buffa::view::OwnedView<
1106 crate::proto::auth::v1::__buffa::view::CreateApiPolicyResponseView<'static>,
1107>;
1108pub type OwnedUpdateApiPolicyRequestView = ::buffa::view::OwnedView<
1110 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyRequestView<'static>,
1111>;
1112pub type OwnedUpdateApiPolicyResponseView = ::buffa::view::OwnedView<
1114 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyResponseView<'static>,
1115>;
1116pub type OwnedDeleteApiPolicyRequestView = ::buffa::view::OwnedView<
1118 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyRequestView<'static>,
1119>;
1120pub type OwnedDeleteApiPolicyResponseView = ::buffa::view::OwnedView<
1122 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyResponseView<'static>,
1123>;
1124pub type OwnedSetApiKeyPolicyRequestView = ::buffa::view::OwnedView<
1126 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyRequestView<'static>,
1127>;
1128pub type OwnedSetApiKeyPolicyResponseView = ::buffa::view::OwnedView<
1130 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyResponseView<'static>,
1131>;
1132impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountPoliciesResponse>
1133for crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesResponseView<'_> {
1134 fn encode(
1135 &self,
1136 codec: ::connectrpc::CodecFormat,
1137 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1138 ::connectrpc::__codegen::encode_view_body(self, codec)
1139 }
1140}
1141impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountPoliciesResponse>
1142for ::buffa::view::OwnedView<
1143 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesResponseView<'static>,
1144> {
1145 fn encode(
1146 &self,
1147 codec: ::connectrpc::CodecFormat,
1148 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1149 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1150 }
1151}
1152impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSubaccountPolicyResponse>
1153for crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyResponseView<'_> {
1154 fn encode(
1155 &self,
1156 codec: ::connectrpc::CodecFormat,
1157 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1158 ::connectrpc::__codegen::encode_view_body(self, codec)
1159 }
1160}
1161impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSubaccountPolicyResponse>
1162for ::buffa::view::OwnedView<
1163 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyResponseView<'static>,
1164> {
1165 fn encode(
1166 &self,
1167 codec: ::connectrpc::CodecFormat,
1168 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1169 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1170 }
1171}
1172impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateSubaccountPolicyResponse>
1173for crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyResponseView<'_> {
1174 fn encode(
1175 &self,
1176 codec: ::connectrpc::CodecFormat,
1177 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1178 ::connectrpc::__codegen::encode_view_body(self, codec)
1179 }
1180}
1181impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateSubaccountPolicyResponse>
1182for ::buffa::view::OwnedView<
1183 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyResponseView<'static>,
1184> {
1185 fn encode(
1186 &self,
1187 codec: ::connectrpc::CodecFormat,
1188 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1189 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1190 }
1191}
1192impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountPolicyResponse>
1193for crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyResponseView<'_> {
1194 fn encode(
1195 &self,
1196 codec: ::connectrpc::CodecFormat,
1197 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1198 ::connectrpc::__codegen::encode_view_body(self, codec)
1199 }
1200}
1201impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountPolicyResponse>
1202for ::buffa::view::OwnedView<
1203 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyResponseView<'static>,
1204> {
1205 fn encode(
1206 &self,
1207 codec: ::connectrpc::CodecFormat,
1208 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1209 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1210 }
1211}
1212impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteSubaccountPolicyResponse>
1213for crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyResponseView<'_> {
1214 fn encode(
1215 &self,
1216 codec: ::connectrpc::CodecFormat,
1217 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1218 ::connectrpc::__codegen::encode_view_body(self, codec)
1219 }
1220}
1221impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteSubaccountPolicyResponse>
1222for ::buffa::view::OwnedView<
1223 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyResponseView<'static>,
1224> {
1225 fn encode(
1226 &self,
1227 codec: ::connectrpc::CodecFormat,
1228 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1229 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1230 }
1231}
1232impl ::connectrpc::Encodable<crate::proto::auth::v1::SetSubaccountPolicyResponse>
1233for crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyResponseView<'_> {
1234 fn encode(
1235 &self,
1236 codec: ::connectrpc::CodecFormat,
1237 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1238 ::connectrpc::__codegen::encode_view_body(self, codec)
1239 }
1240}
1241impl ::connectrpc::Encodable<crate::proto::auth::v1::SetSubaccountPolicyResponse>
1242for ::buffa::view::OwnedView<
1243 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyResponseView<'static>,
1244> {
1245 fn encode(
1246 &self,
1247 codec: ::connectrpc::CodecFormat,
1248 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1249 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1250 }
1251}
1252impl ::connectrpc::Encodable<crate::proto::auth::v1::ListApiPoliciesResponse>
1253for crate::proto::auth::v1::__buffa::view::ListApiPoliciesResponseView<'_> {
1254 fn encode(
1255 &self,
1256 codec: ::connectrpc::CodecFormat,
1257 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1258 ::connectrpc::__codegen::encode_view_body(self, codec)
1259 }
1260}
1261impl ::connectrpc::Encodable<crate::proto::auth::v1::ListApiPoliciesResponse>
1262for ::buffa::view::OwnedView<
1263 crate::proto::auth::v1::__buffa::view::ListApiPoliciesResponseView<'static>,
1264> {
1265 fn encode(
1266 &self,
1267 codec: ::connectrpc::CodecFormat,
1268 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1269 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1270 }
1271}
1272impl ::connectrpc::Encodable<crate::proto::auth::v1::GetApiPolicyResponse>
1273for crate::proto::auth::v1::__buffa::view::GetApiPolicyResponseView<'_> {
1274 fn encode(
1275 &self,
1276 codec: ::connectrpc::CodecFormat,
1277 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1278 ::connectrpc::__codegen::encode_view_body(self, codec)
1279 }
1280}
1281impl ::connectrpc::Encodable<crate::proto::auth::v1::GetApiPolicyResponse>
1282for ::buffa::view::OwnedView<
1283 crate::proto::auth::v1::__buffa::view::GetApiPolicyResponseView<'static>,
1284> {
1285 fn encode(
1286 &self,
1287 codec: ::connectrpc::CodecFormat,
1288 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1289 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1290 }
1291}
1292impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateApiPolicyResponse>
1293for crate::proto::auth::v1::__buffa::view::CreateApiPolicyResponseView<'_> {
1294 fn encode(
1295 &self,
1296 codec: ::connectrpc::CodecFormat,
1297 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1298 ::connectrpc::__codegen::encode_view_body(self, codec)
1299 }
1300}
1301impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateApiPolicyResponse>
1302for ::buffa::view::OwnedView<
1303 crate::proto::auth::v1::__buffa::view::CreateApiPolicyResponseView<'static>,
1304> {
1305 fn encode(
1306 &self,
1307 codec: ::connectrpc::CodecFormat,
1308 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1309 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1310 }
1311}
1312impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateApiPolicyResponse>
1313for crate::proto::auth::v1::__buffa::view::UpdateApiPolicyResponseView<'_> {
1314 fn encode(
1315 &self,
1316 codec: ::connectrpc::CodecFormat,
1317 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1318 ::connectrpc::__codegen::encode_view_body(self, codec)
1319 }
1320}
1321impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateApiPolicyResponse>
1322for ::buffa::view::OwnedView<
1323 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyResponseView<'static>,
1324> {
1325 fn encode(
1326 &self,
1327 codec: ::connectrpc::CodecFormat,
1328 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1329 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1330 }
1331}
1332impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteApiPolicyResponse>
1333for crate::proto::auth::v1::__buffa::view::DeleteApiPolicyResponseView<'_> {
1334 fn encode(
1335 &self,
1336 codec: ::connectrpc::CodecFormat,
1337 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1338 ::connectrpc::__codegen::encode_view_body(self, codec)
1339 }
1340}
1341impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteApiPolicyResponse>
1342for ::buffa::view::OwnedView<
1343 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyResponseView<'static>,
1344> {
1345 fn encode(
1346 &self,
1347 codec: ::connectrpc::CodecFormat,
1348 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1349 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1350 }
1351}
1352impl ::connectrpc::Encodable<crate::proto::auth::v1::SetApiKeyPolicyResponse>
1353for crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyResponseView<'_> {
1354 fn encode(
1355 &self,
1356 codec: ::connectrpc::CodecFormat,
1357 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1358 ::connectrpc::__codegen::encode_view_body(self, codec)
1359 }
1360}
1361impl ::connectrpc::Encodable<crate::proto::auth::v1::SetApiKeyPolicyResponse>
1362for ::buffa::view::OwnedView<
1363 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyResponseView<'static>,
1364> {
1365 fn encode(
1366 &self,
1367 codec: ::connectrpc::CodecFormat,
1368 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1369 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1370 }
1371}
1372pub const POLICY_SERVICE_SERVICE_NAME: &str = "auth.v1.PolicyService";
1374pub const POLICY_SERVICE_LIST_SUBACCOUNT_POLICIES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1379 "/auth.v1.PolicyService/ListSubaccountPolicies",
1380 ::connectrpc::StreamType::Unary,
1381 )
1382 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1383pub const POLICY_SERVICE_GET_SUBACCOUNT_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1388 "/auth.v1.PolicyService/GetSubaccountPolicy",
1389 ::connectrpc::StreamType::Unary,
1390 )
1391 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1392pub const POLICY_SERVICE_CREATE_SUBACCOUNT_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1397 "/auth.v1.PolicyService/CreateSubaccountPolicy",
1398 ::connectrpc::StreamType::Unary,
1399 )
1400 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1401pub const POLICY_SERVICE_UPDATE_SUBACCOUNT_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1406 "/auth.v1.PolicyService/UpdateSubaccountPolicy",
1407 ::connectrpc::StreamType::Unary,
1408 )
1409 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1410pub const POLICY_SERVICE_DELETE_SUBACCOUNT_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1415 "/auth.v1.PolicyService/DeleteSubaccountPolicy",
1416 ::connectrpc::StreamType::Unary,
1417 )
1418 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1419pub const POLICY_SERVICE_SET_SUBACCOUNT_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1424 "/auth.v1.PolicyService/SetSubaccountPolicy",
1425 ::connectrpc::StreamType::Unary,
1426 )
1427 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1428pub const POLICY_SERVICE_LIST_API_POLICIES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1433 "/auth.v1.PolicyService/ListApiPolicies",
1434 ::connectrpc::StreamType::Unary,
1435 )
1436 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1437pub const POLICY_SERVICE_GET_API_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1442 "/auth.v1.PolicyService/GetApiPolicy",
1443 ::connectrpc::StreamType::Unary,
1444 )
1445 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1446pub const POLICY_SERVICE_CREATE_API_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1451 "/auth.v1.PolicyService/CreateApiPolicy",
1452 ::connectrpc::StreamType::Unary,
1453 )
1454 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1455pub const POLICY_SERVICE_UPDATE_API_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1460 "/auth.v1.PolicyService/UpdateApiPolicy",
1461 ::connectrpc::StreamType::Unary,
1462 )
1463 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1464pub const POLICY_SERVICE_DELETE_API_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1469 "/auth.v1.PolicyService/DeleteApiPolicy",
1470 ::connectrpc::StreamType::Unary,
1471 )
1472 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1473pub const POLICY_SERVICE_SET_API_KEY_POLICY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1478 "/auth.v1.PolicyService/SetApiKeyPolicy",
1479 ::connectrpc::StreamType::Unary,
1480 )
1481 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1482#[allow(clippy::type_complexity)]
1532pub trait PolicyService: Send + Sync + 'static {
1533 fn list_subaccount_policies<'a>(
1543 &'a self,
1544 ctx: ::connectrpc::RequestContext,
1545 request: ::connectrpc::ServiceRequest<
1546 '_,
1547 crate::proto::auth::v1::ListSubaccountPoliciesRequest,
1548 >,
1549 ) -> impl ::std::future::Future<
1550 Output = ::connectrpc::ServiceResult<
1551 impl ::connectrpc::Encodable<
1552 crate::proto::auth::v1::ListSubaccountPoliciesResponse,
1553 > + Send + use<'a, Self>,
1554 >,
1555 > + Send;
1556 fn get_subaccount_policy<'a>(
1566 &'a self,
1567 ctx: ::connectrpc::RequestContext,
1568 request: ::connectrpc::ServiceRequest<
1569 '_,
1570 crate::proto::auth::v1::GetSubaccountPolicyRequest,
1571 >,
1572 ) -> impl ::std::future::Future<
1573 Output = ::connectrpc::ServiceResult<
1574 impl ::connectrpc::Encodable<
1575 crate::proto::auth::v1::GetSubaccountPolicyResponse,
1576 > + Send + use<'a, Self>,
1577 >,
1578 > + Send;
1579 fn create_subaccount_policy<'a>(
1589 &'a self,
1590 ctx: ::connectrpc::RequestContext,
1591 request: ::connectrpc::ServiceRequest<
1592 '_,
1593 crate::proto::auth::v1::CreateSubaccountPolicyRequest,
1594 >,
1595 ) -> impl ::std::future::Future<
1596 Output = ::connectrpc::ServiceResult<
1597 impl ::connectrpc::Encodable<
1598 crate::proto::auth::v1::CreateSubaccountPolicyResponse,
1599 > + Send + use<'a, Self>,
1600 >,
1601 > + Send;
1602 fn update_subaccount_policy<'a>(
1612 &'a self,
1613 ctx: ::connectrpc::RequestContext,
1614 request: ::connectrpc::ServiceRequest<
1615 '_,
1616 crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
1617 >,
1618 ) -> impl ::std::future::Future<
1619 Output = ::connectrpc::ServiceResult<
1620 impl ::connectrpc::Encodable<
1621 crate::proto::auth::v1::UpdateSubaccountPolicyResponse,
1622 > + Send + use<'a, Self>,
1623 >,
1624 > + Send;
1625 fn delete_subaccount_policy<'a>(
1635 &'a self,
1636 ctx: ::connectrpc::RequestContext,
1637 request: ::connectrpc::ServiceRequest<
1638 '_,
1639 crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
1640 >,
1641 ) -> impl ::std::future::Future<
1642 Output = ::connectrpc::ServiceResult<
1643 impl ::connectrpc::Encodable<
1644 crate::proto::auth::v1::DeleteSubaccountPolicyResponse,
1645 > + Send + use<'a, Self>,
1646 >,
1647 > + Send;
1648 fn set_subaccount_policy<'a>(
1658 &'a self,
1659 ctx: ::connectrpc::RequestContext,
1660 request: ::connectrpc::ServiceRequest<
1661 '_,
1662 crate::proto::auth::v1::SetSubaccountPolicyRequest,
1663 >,
1664 ) -> impl ::std::future::Future<
1665 Output = ::connectrpc::ServiceResult<
1666 impl ::connectrpc::Encodable<
1667 crate::proto::auth::v1::SetSubaccountPolicyResponse,
1668 > + Send + use<'a, Self>,
1669 >,
1670 > + Send;
1671 fn list_api_policies<'a>(
1681 &'a self,
1682 ctx: ::connectrpc::RequestContext,
1683 request: ::connectrpc::ServiceRequest<
1684 '_,
1685 crate::proto::auth::v1::ListApiPoliciesRequest,
1686 >,
1687 ) -> impl ::std::future::Future<
1688 Output = ::connectrpc::ServiceResult<
1689 impl ::connectrpc::Encodable<
1690 crate::proto::auth::v1::ListApiPoliciesResponse,
1691 > + Send + use<'a, Self>,
1692 >,
1693 > + Send;
1694 fn get_api_policy<'a>(
1704 &'a self,
1705 ctx: ::connectrpc::RequestContext,
1706 request: ::connectrpc::ServiceRequest<
1707 '_,
1708 crate::proto::auth::v1::GetApiPolicyRequest,
1709 >,
1710 ) -> impl ::std::future::Future<
1711 Output = ::connectrpc::ServiceResult<
1712 impl ::connectrpc::Encodable<
1713 crate::proto::auth::v1::GetApiPolicyResponse,
1714 > + Send + use<'a, Self>,
1715 >,
1716 > + Send;
1717 fn create_api_policy<'a>(
1727 &'a self,
1728 ctx: ::connectrpc::RequestContext,
1729 request: ::connectrpc::ServiceRequest<
1730 '_,
1731 crate::proto::auth::v1::CreateApiPolicyRequest,
1732 >,
1733 ) -> impl ::std::future::Future<
1734 Output = ::connectrpc::ServiceResult<
1735 impl ::connectrpc::Encodable<
1736 crate::proto::auth::v1::CreateApiPolicyResponse,
1737 > + Send + use<'a, Self>,
1738 >,
1739 > + Send;
1740 fn update_api_policy<'a>(
1750 &'a self,
1751 ctx: ::connectrpc::RequestContext,
1752 request: ::connectrpc::ServiceRequest<
1753 '_,
1754 crate::proto::auth::v1::UpdateApiPolicyRequest,
1755 >,
1756 ) -> impl ::std::future::Future<
1757 Output = ::connectrpc::ServiceResult<
1758 impl ::connectrpc::Encodable<
1759 crate::proto::auth::v1::UpdateApiPolicyResponse,
1760 > + Send + use<'a, Self>,
1761 >,
1762 > + Send;
1763 fn delete_api_policy<'a>(
1773 &'a self,
1774 ctx: ::connectrpc::RequestContext,
1775 request: ::connectrpc::ServiceRequest<
1776 '_,
1777 crate::proto::auth::v1::DeleteApiPolicyRequest,
1778 >,
1779 ) -> impl ::std::future::Future<
1780 Output = ::connectrpc::ServiceResult<
1781 impl ::connectrpc::Encodable<
1782 crate::proto::auth::v1::DeleteApiPolicyResponse,
1783 > + Send + use<'a, Self>,
1784 >,
1785 > + Send;
1786 fn set_api_key_policy<'a>(
1796 &'a self,
1797 ctx: ::connectrpc::RequestContext,
1798 request: ::connectrpc::ServiceRequest<
1799 '_,
1800 crate::proto::auth::v1::SetApiKeyPolicyRequest,
1801 >,
1802 ) -> impl ::std::future::Future<
1803 Output = ::connectrpc::ServiceResult<
1804 impl ::connectrpc::Encodable<
1805 crate::proto::auth::v1::SetApiKeyPolicyResponse,
1806 > + Send + use<'a, Self>,
1807 >,
1808 > + Send;
1809}
1810pub trait PolicyServiceExt: PolicyService {
1826 fn register(
1831 self: ::std::sync::Arc<Self>,
1832 router: ::connectrpc::Router,
1833 ) -> ::connectrpc::Router;
1834}
1835impl<S: PolicyService> PolicyServiceExt for S {
1836 fn register(
1837 self: ::std::sync::Arc<Self>,
1838 router: ::connectrpc::Router,
1839 ) -> ::connectrpc::Router {
1840 router
1841 .route_view(
1842 POLICY_SERVICE_SERVICE_NAME,
1843 "ListSubaccountPolicies",
1844 {
1845 let svc = ::std::sync::Arc::clone(&self);
1846 ::connectrpc::view_handler_fn(move |
1847 ctx,
1848 req: ::buffa::view::OwnedView<
1849 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesRequestView<
1850 'static,
1851 >,
1852 >,
1853 format|
1854 {
1855 let svc = ::std::sync::Arc::clone(&svc);
1856 async move {
1857 let sreq = ::connectrpc::ServiceRequest::<
1858 crate::proto::auth::v1::ListSubaccountPoliciesRequest,
1859 >::from_parts(req.reborrow(), req.bytes());
1860 svc.list_subaccount_policies(ctx, sreq)
1861 .await?
1862 .encode::<
1863 crate::proto::auth::v1::ListSubaccountPoliciesResponse,
1864 >(format)
1865 }
1866 })
1867 },
1868 )
1869 .with_spec(POLICY_SERVICE_LIST_SUBACCOUNT_POLICIES_SPEC)
1870 .route_view(
1871 POLICY_SERVICE_SERVICE_NAME,
1872 "GetSubaccountPolicy",
1873 {
1874 let svc = ::std::sync::Arc::clone(&self);
1875 ::connectrpc::view_handler_fn(move |
1876 ctx,
1877 req: ::buffa::view::OwnedView<
1878 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyRequestView<
1879 'static,
1880 >,
1881 >,
1882 format|
1883 {
1884 let svc = ::std::sync::Arc::clone(&svc);
1885 async move {
1886 let sreq = ::connectrpc::ServiceRequest::<
1887 crate::proto::auth::v1::GetSubaccountPolicyRequest,
1888 >::from_parts(req.reborrow(), req.bytes());
1889 svc.get_subaccount_policy(ctx, sreq)
1890 .await?
1891 .encode::<
1892 crate::proto::auth::v1::GetSubaccountPolicyResponse,
1893 >(format)
1894 }
1895 })
1896 },
1897 )
1898 .with_spec(POLICY_SERVICE_GET_SUBACCOUNT_POLICY_SPEC)
1899 .route_view(
1900 POLICY_SERVICE_SERVICE_NAME,
1901 "CreateSubaccountPolicy",
1902 {
1903 let svc = ::std::sync::Arc::clone(&self);
1904 ::connectrpc::view_handler_fn(move |
1905 ctx,
1906 req: ::buffa::view::OwnedView<
1907 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyRequestView<
1908 'static,
1909 >,
1910 >,
1911 format|
1912 {
1913 let svc = ::std::sync::Arc::clone(&svc);
1914 async move {
1915 let sreq = ::connectrpc::ServiceRequest::<
1916 crate::proto::auth::v1::CreateSubaccountPolicyRequest,
1917 >::from_parts(req.reborrow(), req.bytes());
1918 svc.create_subaccount_policy(ctx, sreq)
1919 .await?
1920 .encode::<
1921 crate::proto::auth::v1::CreateSubaccountPolicyResponse,
1922 >(format)
1923 }
1924 })
1925 },
1926 )
1927 .with_spec(POLICY_SERVICE_CREATE_SUBACCOUNT_POLICY_SPEC)
1928 .route_view(
1929 POLICY_SERVICE_SERVICE_NAME,
1930 "UpdateSubaccountPolicy",
1931 {
1932 let svc = ::std::sync::Arc::clone(&self);
1933 ::connectrpc::view_handler_fn(move |
1934 ctx,
1935 req: ::buffa::view::OwnedView<
1936 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyRequestView<
1937 'static,
1938 >,
1939 >,
1940 format|
1941 {
1942 let svc = ::std::sync::Arc::clone(&svc);
1943 async move {
1944 let sreq = ::connectrpc::ServiceRequest::<
1945 crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
1946 >::from_parts(req.reborrow(), req.bytes());
1947 svc.update_subaccount_policy(ctx, sreq)
1948 .await?
1949 .encode::<
1950 crate::proto::auth::v1::UpdateSubaccountPolicyResponse,
1951 >(format)
1952 }
1953 })
1954 },
1955 )
1956 .with_spec(POLICY_SERVICE_UPDATE_SUBACCOUNT_POLICY_SPEC)
1957 .route_view(
1958 POLICY_SERVICE_SERVICE_NAME,
1959 "DeleteSubaccountPolicy",
1960 {
1961 let svc = ::std::sync::Arc::clone(&self);
1962 ::connectrpc::view_handler_fn(move |
1963 ctx,
1964 req: ::buffa::view::OwnedView<
1965 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyRequestView<
1966 'static,
1967 >,
1968 >,
1969 format|
1970 {
1971 let svc = ::std::sync::Arc::clone(&svc);
1972 async move {
1973 let sreq = ::connectrpc::ServiceRequest::<
1974 crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
1975 >::from_parts(req.reborrow(), req.bytes());
1976 svc.delete_subaccount_policy(ctx, sreq)
1977 .await?
1978 .encode::<
1979 crate::proto::auth::v1::DeleteSubaccountPolicyResponse,
1980 >(format)
1981 }
1982 })
1983 },
1984 )
1985 .with_spec(POLICY_SERVICE_DELETE_SUBACCOUNT_POLICY_SPEC)
1986 .route_view(
1987 POLICY_SERVICE_SERVICE_NAME,
1988 "SetSubaccountPolicy",
1989 {
1990 let svc = ::std::sync::Arc::clone(&self);
1991 ::connectrpc::view_handler_fn(move |
1992 ctx,
1993 req: ::buffa::view::OwnedView<
1994 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyRequestView<
1995 'static,
1996 >,
1997 >,
1998 format|
1999 {
2000 let svc = ::std::sync::Arc::clone(&svc);
2001 async move {
2002 let sreq = ::connectrpc::ServiceRequest::<
2003 crate::proto::auth::v1::SetSubaccountPolicyRequest,
2004 >::from_parts(req.reborrow(), req.bytes());
2005 svc.set_subaccount_policy(ctx, sreq)
2006 .await?
2007 .encode::<
2008 crate::proto::auth::v1::SetSubaccountPolicyResponse,
2009 >(format)
2010 }
2011 })
2012 },
2013 )
2014 .with_spec(POLICY_SERVICE_SET_SUBACCOUNT_POLICY_SPEC)
2015 .route_view(
2016 POLICY_SERVICE_SERVICE_NAME,
2017 "ListApiPolicies",
2018 {
2019 let svc = ::std::sync::Arc::clone(&self);
2020 ::connectrpc::view_handler_fn(move |
2021 ctx,
2022 req: ::buffa::view::OwnedView<
2023 crate::proto::auth::v1::__buffa::view::ListApiPoliciesRequestView<
2024 'static,
2025 >,
2026 >,
2027 format|
2028 {
2029 let svc = ::std::sync::Arc::clone(&svc);
2030 async move {
2031 let sreq = ::connectrpc::ServiceRequest::<
2032 crate::proto::auth::v1::ListApiPoliciesRequest,
2033 >::from_parts(req.reborrow(), req.bytes());
2034 svc.list_api_policies(ctx, sreq)
2035 .await?
2036 .encode::<
2037 crate::proto::auth::v1::ListApiPoliciesResponse,
2038 >(format)
2039 }
2040 })
2041 },
2042 )
2043 .with_spec(POLICY_SERVICE_LIST_API_POLICIES_SPEC)
2044 .route_view(
2045 POLICY_SERVICE_SERVICE_NAME,
2046 "GetApiPolicy",
2047 {
2048 let svc = ::std::sync::Arc::clone(&self);
2049 ::connectrpc::view_handler_fn(move |
2050 ctx,
2051 req: ::buffa::view::OwnedView<
2052 crate::proto::auth::v1::__buffa::view::GetApiPolicyRequestView<
2053 'static,
2054 >,
2055 >,
2056 format|
2057 {
2058 let svc = ::std::sync::Arc::clone(&svc);
2059 async move {
2060 let sreq = ::connectrpc::ServiceRequest::<
2061 crate::proto::auth::v1::GetApiPolicyRequest,
2062 >::from_parts(req.reborrow(), req.bytes());
2063 svc.get_api_policy(ctx, sreq)
2064 .await?
2065 .encode::<
2066 crate::proto::auth::v1::GetApiPolicyResponse,
2067 >(format)
2068 }
2069 })
2070 },
2071 )
2072 .with_spec(POLICY_SERVICE_GET_API_POLICY_SPEC)
2073 .route_view(
2074 POLICY_SERVICE_SERVICE_NAME,
2075 "CreateApiPolicy",
2076 {
2077 let svc = ::std::sync::Arc::clone(&self);
2078 ::connectrpc::view_handler_fn(move |
2079 ctx,
2080 req: ::buffa::view::OwnedView<
2081 crate::proto::auth::v1::__buffa::view::CreateApiPolicyRequestView<
2082 'static,
2083 >,
2084 >,
2085 format|
2086 {
2087 let svc = ::std::sync::Arc::clone(&svc);
2088 async move {
2089 let sreq = ::connectrpc::ServiceRequest::<
2090 crate::proto::auth::v1::CreateApiPolicyRequest,
2091 >::from_parts(req.reborrow(), req.bytes());
2092 svc.create_api_policy(ctx, sreq)
2093 .await?
2094 .encode::<
2095 crate::proto::auth::v1::CreateApiPolicyResponse,
2096 >(format)
2097 }
2098 })
2099 },
2100 )
2101 .with_spec(POLICY_SERVICE_CREATE_API_POLICY_SPEC)
2102 .route_view(
2103 POLICY_SERVICE_SERVICE_NAME,
2104 "UpdateApiPolicy",
2105 {
2106 let svc = ::std::sync::Arc::clone(&self);
2107 ::connectrpc::view_handler_fn(move |
2108 ctx,
2109 req: ::buffa::view::OwnedView<
2110 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyRequestView<
2111 'static,
2112 >,
2113 >,
2114 format|
2115 {
2116 let svc = ::std::sync::Arc::clone(&svc);
2117 async move {
2118 let sreq = ::connectrpc::ServiceRequest::<
2119 crate::proto::auth::v1::UpdateApiPolicyRequest,
2120 >::from_parts(req.reborrow(), req.bytes());
2121 svc.update_api_policy(ctx, sreq)
2122 .await?
2123 .encode::<
2124 crate::proto::auth::v1::UpdateApiPolicyResponse,
2125 >(format)
2126 }
2127 })
2128 },
2129 )
2130 .with_spec(POLICY_SERVICE_UPDATE_API_POLICY_SPEC)
2131 .route_view(
2132 POLICY_SERVICE_SERVICE_NAME,
2133 "DeleteApiPolicy",
2134 {
2135 let svc = ::std::sync::Arc::clone(&self);
2136 ::connectrpc::view_handler_fn(move |
2137 ctx,
2138 req: ::buffa::view::OwnedView<
2139 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyRequestView<
2140 'static,
2141 >,
2142 >,
2143 format|
2144 {
2145 let svc = ::std::sync::Arc::clone(&svc);
2146 async move {
2147 let sreq = ::connectrpc::ServiceRequest::<
2148 crate::proto::auth::v1::DeleteApiPolicyRequest,
2149 >::from_parts(req.reborrow(), req.bytes());
2150 svc.delete_api_policy(ctx, sreq)
2151 .await?
2152 .encode::<
2153 crate::proto::auth::v1::DeleteApiPolicyResponse,
2154 >(format)
2155 }
2156 })
2157 },
2158 )
2159 .with_spec(POLICY_SERVICE_DELETE_API_POLICY_SPEC)
2160 .route_view(
2161 POLICY_SERVICE_SERVICE_NAME,
2162 "SetApiKeyPolicy",
2163 {
2164 let svc = ::std::sync::Arc::clone(&self);
2165 ::connectrpc::view_handler_fn(move |
2166 ctx,
2167 req: ::buffa::view::OwnedView<
2168 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyRequestView<
2169 'static,
2170 >,
2171 >,
2172 format|
2173 {
2174 let svc = ::std::sync::Arc::clone(&svc);
2175 async move {
2176 let sreq = ::connectrpc::ServiceRequest::<
2177 crate::proto::auth::v1::SetApiKeyPolicyRequest,
2178 >::from_parts(req.reborrow(), req.bytes());
2179 svc.set_api_key_policy(ctx, sreq)
2180 .await?
2181 .encode::<
2182 crate::proto::auth::v1::SetApiKeyPolicyResponse,
2183 >(format)
2184 }
2185 })
2186 },
2187 )
2188 .with_spec(POLICY_SERVICE_SET_API_KEY_POLICY_SPEC)
2189 }
2190}
2191#[doc(hidden)]
2193pub struct PolicyServiceRegisterMarker;
2194impl<S: PolicyService> ::connectrpc::ServiceRegister<PolicyServiceRegisterMarker>
2195for ::std::sync::Arc<S> {
2196 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
2197 <S as PolicyServiceExt>::register(self, router)
2198 }
2199}
2200pub struct PolicyServiceServer<T> {
2214 inner: ::std::sync::Arc<T>,
2215}
2216impl<T: PolicyService> PolicyServiceServer<T> {
2217 pub fn new(service: T) -> Self {
2219 Self {
2220 inner: ::std::sync::Arc::new(service),
2221 }
2222 }
2223 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
2225 Self { inner }
2226 }
2227}
2228impl<T> Clone for PolicyServiceServer<T> {
2229 fn clone(&self) -> Self {
2230 Self {
2231 inner: ::std::sync::Arc::clone(&self.inner),
2232 }
2233 }
2234}
2235impl<T: PolicyService> ::connectrpc::Dispatcher for PolicyServiceServer<T> {
2236 #[inline]
2237 fn lookup(
2238 &self,
2239 path: &str,
2240 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
2241 let method = path.strip_prefix("auth.v1.PolicyService/")?;
2242 match method {
2243 "ListSubaccountPolicies" => {
2244 Some(
2245 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2246 .with_spec(POLICY_SERVICE_LIST_SUBACCOUNT_POLICIES_SPEC),
2247 )
2248 }
2249 "GetSubaccountPolicy" => {
2250 Some(
2251 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2252 .with_spec(POLICY_SERVICE_GET_SUBACCOUNT_POLICY_SPEC),
2253 )
2254 }
2255 "CreateSubaccountPolicy" => {
2256 Some(
2257 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2258 .with_spec(POLICY_SERVICE_CREATE_SUBACCOUNT_POLICY_SPEC),
2259 )
2260 }
2261 "UpdateSubaccountPolicy" => {
2262 Some(
2263 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2264 .with_spec(POLICY_SERVICE_UPDATE_SUBACCOUNT_POLICY_SPEC),
2265 )
2266 }
2267 "DeleteSubaccountPolicy" => {
2268 Some(
2269 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2270 .with_spec(POLICY_SERVICE_DELETE_SUBACCOUNT_POLICY_SPEC),
2271 )
2272 }
2273 "SetSubaccountPolicy" => {
2274 Some(
2275 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2276 .with_spec(POLICY_SERVICE_SET_SUBACCOUNT_POLICY_SPEC),
2277 )
2278 }
2279 "ListApiPolicies" => {
2280 Some(
2281 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2282 .with_spec(POLICY_SERVICE_LIST_API_POLICIES_SPEC),
2283 )
2284 }
2285 "GetApiPolicy" => {
2286 Some(
2287 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2288 .with_spec(POLICY_SERVICE_GET_API_POLICY_SPEC),
2289 )
2290 }
2291 "CreateApiPolicy" => {
2292 Some(
2293 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2294 .with_spec(POLICY_SERVICE_CREATE_API_POLICY_SPEC),
2295 )
2296 }
2297 "UpdateApiPolicy" => {
2298 Some(
2299 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2300 .with_spec(POLICY_SERVICE_UPDATE_API_POLICY_SPEC),
2301 )
2302 }
2303 "DeleteApiPolicy" => {
2304 Some(
2305 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2306 .with_spec(POLICY_SERVICE_DELETE_API_POLICY_SPEC),
2307 )
2308 }
2309 "SetApiKeyPolicy" => {
2310 Some(
2311 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2312 .with_spec(POLICY_SERVICE_SET_API_KEY_POLICY_SPEC),
2313 )
2314 }
2315 _ => None,
2316 }
2317 }
2318 fn call_unary(
2319 &self,
2320 path: &str,
2321 ctx: ::connectrpc::RequestContext,
2322 request: ::connectrpc::Payload,
2323 format: ::connectrpc::CodecFormat,
2324 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2325 let Some(method) = path.strip_prefix("auth.v1.PolicyService/") else {
2326 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2327 };
2328 let _ = (&ctx, &request, &format);
2329 match method {
2330 "ListSubaccountPolicies" => {
2331 let svc = ::std::sync::Arc::clone(&self.inner);
2332 Box::pin(async move {
2333 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2334 crate::proto::auth::v1::ListSubaccountPoliciesRequest,
2335 >(request.encoded()?, format)?;
2336 let req: crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesRequestView<
2337 '_,
2338 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2339 &body,
2340 )?;
2341 let req = ::connectrpc::ServiceRequest::<
2342 crate::proto::auth::v1::ListSubaccountPoliciesRequest,
2343 >::from_parts(&req, &body);
2344 svc.list_subaccount_policies(ctx, req)
2345 .await?
2346 .encode::<
2347 crate::proto::auth::v1::ListSubaccountPoliciesResponse,
2348 >(format)
2349 })
2350 }
2351 "GetSubaccountPolicy" => {
2352 let svc = ::std::sync::Arc::clone(&self.inner);
2353 Box::pin(async move {
2354 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2355 crate::proto::auth::v1::GetSubaccountPolicyRequest,
2356 >(request.encoded()?, format)?;
2357 let req: crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyRequestView<
2358 '_,
2359 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2360 &body,
2361 )?;
2362 let req = ::connectrpc::ServiceRequest::<
2363 crate::proto::auth::v1::GetSubaccountPolicyRequest,
2364 >::from_parts(&req, &body);
2365 svc.get_subaccount_policy(ctx, req)
2366 .await?
2367 .encode::<
2368 crate::proto::auth::v1::GetSubaccountPolicyResponse,
2369 >(format)
2370 })
2371 }
2372 "CreateSubaccountPolicy" => {
2373 let svc = ::std::sync::Arc::clone(&self.inner);
2374 Box::pin(async move {
2375 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2376 crate::proto::auth::v1::CreateSubaccountPolicyRequest,
2377 >(request.encoded()?, format)?;
2378 let req: crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyRequestView<
2379 '_,
2380 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2381 &body,
2382 )?;
2383 let req = ::connectrpc::ServiceRequest::<
2384 crate::proto::auth::v1::CreateSubaccountPolicyRequest,
2385 >::from_parts(&req, &body);
2386 svc.create_subaccount_policy(ctx, req)
2387 .await?
2388 .encode::<
2389 crate::proto::auth::v1::CreateSubaccountPolicyResponse,
2390 >(format)
2391 })
2392 }
2393 "UpdateSubaccountPolicy" => {
2394 let svc = ::std::sync::Arc::clone(&self.inner);
2395 Box::pin(async move {
2396 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2397 crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
2398 >(request.encoded()?, format)?;
2399 let req: crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyRequestView<
2400 '_,
2401 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2402 &body,
2403 )?;
2404 let req = ::connectrpc::ServiceRequest::<
2405 crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
2406 >::from_parts(&req, &body);
2407 svc.update_subaccount_policy(ctx, req)
2408 .await?
2409 .encode::<
2410 crate::proto::auth::v1::UpdateSubaccountPolicyResponse,
2411 >(format)
2412 })
2413 }
2414 "DeleteSubaccountPolicy" => {
2415 let svc = ::std::sync::Arc::clone(&self.inner);
2416 Box::pin(async move {
2417 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2418 crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
2419 >(request.encoded()?, format)?;
2420 let req: crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyRequestView<
2421 '_,
2422 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2423 &body,
2424 )?;
2425 let req = ::connectrpc::ServiceRequest::<
2426 crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
2427 >::from_parts(&req, &body);
2428 svc.delete_subaccount_policy(ctx, req)
2429 .await?
2430 .encode::<
2431 crate::proto::auth::v1::DeleteSubaccountPolicyResponse,
2432 >(format)
2433 })
2434 }
2435 "SetSubaccountPolicy" => {
2436 let svc = ::std::sync::Arc::clone(&self.inner);
2437 Box::pin(async move {
2438 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2439 crate::proto::auth::v1::SetSubaccountPolicyRequest,
2440 >(request.encoded()?, format)?;
2441 let req: crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyRequestView<
2442 '_,
2443 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2444 &body,
2445 )?;
2446 let req = ::connectrpc::ServiceRequest::<
2447 crate::proto::auth::v1::SetSubaccountPolicyRequest,
2448 >::from_parts(&req, &body);
2449 svc.set_subaccount_policy(ctx, req)
2450 .await?
2451 .encode::<
2452 crate::proto::auth::v1::SetSubaccountPolicyResponse,
2453 >(format)
2454 })
2455 }
2456 "ListApiPolicies" => {
2457 let svc = ::std::sync::Arc::clone(&self.inner);
2458 Box::pin(async move {
2459 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2460 crate::proto::auth::v1::ListApiPoliciesRequest,
2461 >(request.encoded()?, format)?;
2462 let req: crate::proto::auth::v1::__buffa::view::ListApiPoliciesRequestView<
2463 '_,
2464 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2465 &body,
2466 )?;
2467 let req = ::connectrpc::ServiceRequest::<
2468 crate::proto::auth::v1::ListApiPoliciesRequest,
2469 >::from_parts(&req, &body);
2470 svc.list_api_policies(ctx, req)
2471 .await?
2472 .encode::<
2473 crate::proto::auth::v1::ListApiPoliciesResponse,
2474 >(format)
2475 })
2476 }
2477 "GetApiPolicy" => {
2478 let svc = ::std::sync::Arc::clone(&self.inner);
2479 Box::pin(async move {
2480 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2481 crate::proto::auth::v1::GetApiPolicyRequest,
2482 >(request.encoded()?, format)?;
2483 let req: crate::proto::auth::v1::__buffa::view::GetApiPolicyRequestView<
2484 '_,
2485 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2486 &body,
2487 )?;
2488 let req = ::connectrpc::ServiceRequest::<
2489 crate::proto::auth::v1::GetApiPolicyRequest,
2490 >::from_parts(&req, &body);
2491 svc.get_api_policy(ctx, req)
2492 .await?
2493 .encode::<crate::proto::auth::v1::GetApiPolicyResponse>(format)
2494 })
2495 }
2496 "CreateApiPolicy" => {
2497 let svc = ::std::sync::Arc::clone(&self.inner);
2498 Box::pin(async move {
2499 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2500 crate::proto::auth::v1::CreateApiPolicyRequest,
2501 >(request.encoded()?, format)?;
2502 let req: crate::proto::auth::v1::__buffa::view::CreateApiPolicyRequestView<
2503 '_,
2504 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2505 &body,
2506 )?;
2507 let req = ::connectrpc::ServiceRequest::<
2508 crate::proto::auth::v1::CreateApiPolicyRequest,
2509 >::from_parts(&req, &body);
2510 svc.create_api_policy(ctx, req)
2511 .await?
2512 .encode::<
2513 crate::proto::auth::v1::CreateApiPolicyResponse,
2514 >(format)
2515 })
2516 }
2517 "UpdateApiPolicy" => {
2518 let svc = ::std::sync::Arc::clone(&self.inner);
2519 Box::pin(async move {
2520 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2521 crate::proto::auth::v1::UpdateApiPolicyRequest,
2522 >(request.encoded()?, format)?;
2523 let req: crate::proto::auth::v1::__buffa::view::UpdateApiPolicyRequestView<
2524 '_,
2525 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2526 &body,
2527 )?;
2528 let req = ::connectrpc::ServiceRequest::<
2529 crate::proto::auth::v1::UpdateApiPolicyRequest,
2530 >::from_parts(&req, &body);
2531 svc.update_api_policy(ctx, req)
2532 .await?
2533 .encode::<
2534 crate::proto::auth::v1::UpdateApiPolicyResponse,
2535 >(format)
2536 })
2537 }
2538 "DeleteApiPolicy" => {
2539 let svc = ::std::sync::Arc::clone(&self.inner);
2540 Box::pin(async move {
2541 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2542 crate::proto::auth::v1::DeleteApiPolicyRequest,
2543 >(request.encoded()?, format)?;
2544 let req: crate::proto::auth::v1::__buffa::view::DeleteApiPolicyRequestView<
2545 '_,
2546 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2547 &body,
2548 )?;
2549 let req = ::connectrpc::ServiceRequest::<
2550 crate::proto::auth::v1::DeleteApiPolicyRequest,
2551 >::from_parts(&req, &body);
2552 svc.delete_api_policy(ctx, req)
2553 .await?
2554 .encode::<
2555 crate::proto::auth::v1::DeleteApiPolicyResponse,
2556 >(format)
2557 })
2558 }
2559 "SetApiKeyPolicy" => {
2560 let svc = ::std::sync::Arc::clone(&self.inner);
2561 Box::pin(async move {
2562 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2563 crate::proto::auth::v1::SetApiKeyPolicyRequest,
2564 >(request.encoded()?, format)?;
2565 let req: crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyRequestView<
2566 '_,
2567 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2568 &body,
2569 )?;
2570 let req = ::connectrpc::ServiceRequest::<
2571 crate::proto::auth::v1::SetApiKeyPolicyRequest,
2572 >::from_parts(&req, &body);
2573 svc.set_api_key_policy(ctx, req)
2574 .await?
2575 .encode::<
2576 crate::proto::auth::v1::SetApiKeyPolicyResponse,
2577 >(format)
2578 })
2579 }
2580 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2581 }
2582 }
2583 fn call_server_streaming(
2584 &self,
2585 path: &str,
2586 ctx: ::connectrpc::RequestContext,
2587 request: ::buffa::bytes::Bytes,
2588 format: ::connectrpc::CodecFormat,
2589 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2590 let Some(method) = path.strip_prefix("auth.v1.PolicyService/") else {
2591 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2592 };
2593 let _ = (&ctx, &request, &format);
2594 match method {
2595 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2596 }
2597 }
2598 fn call_client_streaming(
2599 &self,
2600 path: &str,
2601 ctx: ::connectrpc::RequestContext,
2602 requests: ::connectrpc::dispatcher::codegen::RequestStream,
2603 format: ::connectrpc::CodecFormat,
2604 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2605 let Some(method) = path.strip_prefix("auth.v1.PolicyService/") else {
2606 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2607 };
2608 let _ = (&ctx, &requests, &format);
2609 match method {
2610 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2611 }
2612 }
2613 fn call_bidi_streaming(
2614 &self,
2615 path: &str,
2616 ctx: ::connectrpc::RequestContext,
2617 requests: ::connectrpc::dispatcher::codegen::RequestStream,
2618 format: ::connectrpc::CodecFormat,
2619 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2620 let Some(method) = path.strip_prefix("auth.v1.PolicyService/") else {
2621 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2622 };
2623 let _ = (&ctx, &requests, &format);
2624 match method {
2625 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2626 }
2627 }
2628}
2629#[derive(Clone)]
2661pub struct PolicyServiceClient<T> {
2662 transport: T,
2663 config: ::connectrpc::client::ClientConfig,
2664}
2665impl<T> PolicyServiceClient<T>
2666where
2667 T: ::connectrpc::client::ClientTransport,
2668 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
2669{
2670 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
2672 Self { transport, config }
2673 }
2674 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
2676 &self.config
2677 }
2678 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
2680 &mut self.config
2681 }
2682 pub async fn list_subaccount_policies(
2684 &self,
2685 request: crate::proto::auth::v1::ListSubaccountPoliciesRequest,
2686 ) -> Result<
2687 ::connectrpc::client::UnaryResponse<
2688 ::buffa::view::OwnedView<
2689 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesResponseView<
2690 'static,
2691 >,
2692 >,
2693 >,
2694 ::connectrpc::ConnectError,
2695 > {
2696 self.list_subaccount_policies_with_options(
2697 request,
2698 ::connectrpc::client::CallOptions::default(),
2699 )
2700 .await
2701 }
2702 pub async fn list_subaccount_policies_with_options(
2704 &self,
2705 request: crate::proto::auth::v1::ListSubaccountPoliciesRequest,
2706 options: ::connectrpc::client::CallOptions,
2707 ) -> Result<
2708 ::connectrpc::client::UnaryResponse<
2709 ::buffa::view::OwnedView<
2710 crate::proto::auth::v1::__buffa::view::ListSubaccountPoliciesResponseView<
2711 'static,
2712 >,
2713 >,
2714 >,
2715 ::connectrpc::ConnectError,
2716 > {
2717 ::connectrpc::client::call_unary(
2718 &self.transport,
2719 &self.config,
2720 POLICY_SERVICE_SERVICE_NAME,
2721 "ListSubaccountPolicies",
2722 request,
2723 options,
2724 )
2725 .await
2726 }
2727 pub async fn get_subaccount_policy(
2729 &self,
2730 request: crate::proto::auth::v1::GetSubaccountPolicyRequest,
2731 ) -> Result<
2732 ::connectrpc::client::UnaryResponse<
2733 ::buffa::view::OwnedView<
2734 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyResponseView<
2735 'static,
2736 >,
2737 >,
2738 >,
2739 ::connectrpc::ConnectError,
2740 > {
2741 self.get_subaccount_policy_with_options(
2742 request,
2743 ::connectrpc::client::CallOptions::default(),
2744 )
2745 .await
2746 }
2747 pub async fn get_subaccount_policy_with_options(
2749 &self,
2750 request: crate::proto::auth::v1::GetSubaccountPolicyRequest,
2751 options: ::connectrpc::client::CallOptions,
2752 ) -> Result<
2753 ::connectrpc::client::UnaryResponse<
2754 ::buffa::view::OwnedView<
2755 crate::proto::auth::v1::__buffa::view::GetSubaccountPolicyResponseView<
2756 'static,
2757 >,
2758 >,
2759 >,
2760 ::connectrpc::ConnectError,
2761 > {
2762 ::connectrpc::client::call_unary(
2763 &self.transport,
2764 &self.config,
2765 POLICY_SERVICE_SERVICE_NAME,
2766 "GetSubaccountPolicy",
2767 request,
2768 options,
2769 )
2770 .await
2771 }
2772 pub async fn create_subaccount_policy(
2774 &self,
2775 request: crate::proto::auth::v1::CreateSubaccountPolicyRequest,
2776 ) -> Result<
2777 ::connectrpc::client::UnaryResponse<
2778 ::buffa::view::OwnedView<
2779 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyResponseView<
2780 'static,
2781 >,
2782 >,
2783 >,
2784 ::connectrpc::ConnectError,
2785 > {
2786 self.create_subaccount_policy_with_options(
2787 request,
2788 ::connectrpc::client::CallOptions::default(),
2789 )
2790 .await
2791 }
2792 pub async fn create_subaccount_policy_with_options(
2794 &self,
2795 request: crate::proto::auth::v1::CreateSubaccountPolicyRequest,
2796 options: ::connectrpc::client::CallOptions,
2797 ) -> Result<
2798 ::connectrpc::client::UnaryResponse<
2799 ::buffa::view::OwnedView<
2800 crate::proto::auth::v1::__buffa::view::CreateSubaccountPolicyResponseView<
2801 'static,
2802 >,
2803 >,
2804 >,
2805 ::connectrpc::ConnectError,
2806 > {
2807 ::connectrpc::client::call_unary(
2808 &self.transport,
2809 &self.config,
2810 POLICY_SERVICE_SERVICE_NAME,
2811 "CreateSubaccountPolicy",
2812 request,
2813 options,
2814 )
2815 .await
2816 }
2817 pub async fn update_subaccount_policy(
2819 &self,
2820 request: crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
2821 ) -> Result<
2822 ::connectrpc::client::UnaryResponse<
2823 ::buffa::view::OwnedView<
2824 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyResponseView<
2825 'static,
2826 >,
2827 >,
2828 >,
2829 ::connectrpc::ConnectError,
2830 > {
2831 self.update_subaccount_policy_with_options(
2832 request,
2833 ::connectrpc::client::CallOptions::default(),
2834 )
2835 .await
2836 }
2837 pub async fn update_subaccount_policy_with_options(
2839 &self,
2840 request: crate::proto::auth::v1::UpdateSubaccountPolicyRequest,
2841 options: ::connectrpc::client::CallOptions,
2842 ) -> Result<
2843 ::connectrpc::client::UnaryResponse<
2844 ::buffa::view::OwnedView<
2845 crate::proto::auth::v1::__buffa::view::UpdateSubaccountPolicyResponseView<
2846 'static,
2847 >,
2848 >,
2849 >,
2850 ::connectrpc::ConnectError,
2851 > {
2852 ::connectrpc::client::call_unary(
2853 &self.transport,
2854 &self.config,
2855 POLICY_SERVICE_SERVICE_NAME,
2856 "UpdateSubaccountPolicy",
2857 request,
2858 options,
2859 )
2860 .await
2861 }
2862 pub async fn delete_subaccount_policy(
2864 &self,
2865 request: crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
2866 ) -> Result<
2867 ::connectrpc::client::UnaryResponse<
2868 ::buffa::view::OwnedView<
2869 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyResponseView<
2870 'static,
2871 >,
2872 >,
2873 >,
2874 ::connectrpc::ConnectError,
2875 > {
2876 self.delete_subaccount_policy_with_options(
2877 request,
2878 ::connectrpc::client::CallOptions::default(),
2879 )
2880 .await
2881 }
2882 pub async fn delete_subaccount_policy_with_options(
2884 &self,
2885 request: crate::proto::auth::v1::DeleteSubaccountPolicyRequest,
2886 options: ::connectrpc::client::CallOptions,
2887 ) -> Result<
2888 ::connectrpc::client::UnaryResponse<
2889 ::buffa::view::OwnedView<
2890 crate::proto::auth::v1::__buffa::view::DeleteSubaccountPolicyResponseView<
2891 'static,
2892 >,
2893 >,
2894 >,
2895 ::connectrpc::ConnectError,
2896 > {
2897 ::connectrpc::client::call_unary(
2898 &self.transport,
2899 &self.config,
2900 POLICY_SERVICE_SERVICE_NAME,
2901 "DeleteSubaccountPolicy",
2902 request,
2903 options,
2904 )
2905 .await
2906 }
2907 pub async fn set_subaccount_policy(
2909 &self,
2910 request: crate::proto::auth::v1::SetSubaccountPolicyRequest,
2911 ) -> Result<
2912 ::connectrpc::client::UnaryResponse<
2913 ::buffa::view::OwnedView<
2914 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyResponseView<
2915 'static,
2916 >,
2917 >,
2918 >,
2919 ::connectrpc::ConnectError,
2920 > {
2921 self.set_subaccount_policy_with_options(
2922 request,
2923 ::connectrpc::client::CallOptions::default(),
2924 )
2925 .await
2926 }
2927 pub async fn set_subaccount_policy_with_options(
2929 &self,
2930 request: crate::proto::auth::v1::SetSubaccountPolicyRequest,
2931 options: ::connectrpc::client::CallOptions,
2932 ) -> Result<
2933 ::connectrpc::client::UnaryResponse<
2934 ::buffa::view::OwnedView<
2935 crate::proto::auth::v1::__buffa::view::SetSubaccountPolicyResponseView<
2936 'static,
2937 >,
2938 >,
2939 >,
2940 ::connectrpc::ConnectError,
2941 > {
2942 ::connectrpc::client::call_unary(
2943 &self.transport,
2944 &self.config,
2945 POLICY_SERVICE_SERVICE_NAME,
2946 "SetSubaccountPolicy",
2947 request,
2948 options,
2949 )
2950 .await
2951 }
2952 pub async fn list_api_policies(
2954 &self,
2955 request: crate::proto::auth::v1::ListApiPoliciesRequest,
2956 ) -> Result<
2957 ::connectrpc::client::UnaryResponse<
2958 ::buffa::view::OwnedView<
2959 crate::proto::auth::v1::__buffa::view::ListApiPoliciesResponseView<
2960 'static,
2961 >,
2962 >,
2963 >,
2964 ::connectrpc::ConnectError,
2965 > {
2966 self.list_api_policies_with_options(
2967 request,
2968 ::connectrpc::client::CallOptions::default(),
2969 )
2970 .await
2971 }
2972 pub async fn list_api_policies_with_options(
2974 &self,
2975 request: crate::proto::auth::v1::ListApiPoliciesRequest,
2976 options: ::connectrpc::client::CallOptions,
2977 ) -> Result<
2978 ::connectrpc::client::UnaryResponse<
2979 ::buffa::view::OwnedView<
2980 crate::proto::auth::v1::__buffa::view::ListApiPoliciesResponseView<
2981 'static,
2982 >,
2983 >,
2984 >,
2985 ::connectrpc::ConnectError,
2986 > {
2987 ::connectrpc::client::call_unary(
2988 &self.transport,
2989 &self.config,
2990 POLICY_SERVICE_SERVICE_NAME,
2991 "ListApiPolicies",
2992 request,
2993 options,
2994 )
2995 .await
2996 }
2997 pub async fn get_api_policy(
2999 &self,
3000 request: crate::proto::auth::v1::GetApiPolicyRequest,
3001 ) -> Result<
3002 ::connectrpc::client::UnaryResponse<
3003 ::buffa::view::OwnedView<
3004 crate::proto::auth::v1::__buffa::view::GetApiPolicyResponseView<'static>,
3005 >,
3006 >,
3007 ::connectrpc::ConnectError,
3008 > {
3009 self.get_api_policy_with_options(
3010 request,
3011 ::connectrpc::client::CallOptions::default(),
3012 )
3013 .await
3014 }
3015 pub async fn get_api_policy_with_options(
3017 &self,
3018 request: crate::proto::auth::v1::GetApiPolicyRequest,
3019 options: ::connectrpc::client::CallOptions,
3020 ) -> Result<
3021 ::connectrpc::client::UnaryResponse<
3022 ::buffa::view::OwnedView<
3023 crate::proto::auth::v1::__buffa::view::GetApiPolicyResponseView<'static>,
3024 >,
3025 >,
3026 ::connectrpc::ConnectError,
3027 > {
3028 ::connectrpc::client::call_unary(
3029 &self.transport,
3030 &self.config,
3031 POLICY_SERVICE_SERVICE_NAME,
3032 "GetApiPolicy",
3033 request,
3034 options,
3035 )
3036 .await
3037 }
3038 pub async fn create_api_policy(
3040 &self,
3041 request: crate::proto::auth::v1::CreateApiPolicyRequest,
3042 ) -> Result<
3043 ::connectrpc::client::UnaryResponse<
3044 ::buffa::view::OwnedView<
3045 crate::proto::auth::v1::__buffa::view::CreateApiPolicyResponseView<
3046 'static,
3047 >,
3048 >,
3049 >,
3050 ::connectrpc::ConnectError,
3051 > {
3052 self.create_api_policy_with_options(
3053 request,
3054 ::connectrpc::client::CallOptions::default(),
3055 )
3056 .await
3057 }
3058 pub async fn create_api_policy_with_options(
3060 &self,
3061 request: crate::proto::auth::v1::CreateApiPolicyRequest,
3062 options: ::connectrpc::client::CallOptions,
3063 ) -> Result<
3064 ::connectrpc::client::UnaryResponse<
3065 ::buffa::view::OwnedView<
3066 crate::proto::auth::v1::__buffa::view::CreateApiPolicyResponseView<
3067 'static,
3068 >,
3069 >,
3070 >,
3071 ::connectrpc::ConnectError,
3072 > {
3073 ::connectrpc::client::call_unary(
3074 &self.transport,
3075 &self.config,
3076 POLICY_SERVICE_SERVICE_NAME,
3077 "CreateApiPolicy",
3078 request,
3079 options,
3080 )
3081 .await
3082 }
3083 pub async fn update_api_policy(
3085 &self,
3086 request: crate::proto::auth::v1::UpdateApiPolicyRequest,
3087 ) -> Result<
3088 ::connectrpc::client::UnaryResponse<
3089 ::buffa::view::OwnedView<
3090 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyResponseView<
3091 'static,
3092 >,
3093 >,
3094 >,
3095 ::connectrpc::ConnectError,
3096 > {
3097 self.update_api_policy_with_options(
3098 request,
3099 ::connectrpc::client::CallOptions::default(),
3100 )
3101 .await
3102 }
3103 pub async fn update_api_policy_with_options(
3105 &self,
3106 request: crate::proto::auth::v1::UpdateApiPolicyRequest,
3107 options: ::connectrpc::client::CallOptions,
3108 ) -> Result<
3109 ::connectrpc::client::UnaryResponse<
3110 ::buffa::view::OwnedView<
3111 crate::proto::auth::v1::__buffa::view::UpdateApiPolicyResponseView<
3112 'static,
3113 >,
3114 >,
3115 >,
3116 ::connectrpc::ConnectError,
3117 > {
3118 ::connectrpc::client::call_unary(
3119 &self.transport,
3120 &self.config,
3121 POLICY_SERVICE_SERVICE_NAME,
3122 "UpdateApiPolicy",
3123 request,
3124 options,
3125 )
3126 .await
3127 }
3128 pub async fn delete_api_policy(
3130 &self,
3131 request: crate::proto::auth::v1::DeleteApiPolicyRequest,
3132 ) -> Result<
3133 ::connectrpc::client::UnaryResponse<
3134 ::buffa::view::OwnedView<
3135 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyResponseView<
3136 'static,
3137 >,
3138 >,
3139 >,
3140 ::connectrpc::ConnectError,
3141 > {
3142 self.delete_api_policy_with_options(
3143 request,
3144 ::connectrpc::client::CallOptions::default(),
3145 )
3146 .await
3147 }
3148 pub async fn delete_api_policy_with_options(
3150 &self,
3151 request: crate::proto::auth::v1::DeleteApiPolicyRequest,
3152 options: ::connectrpc::client::CallOptions,
3153 ) -> Result<
3154 ::connectrpc::client::UnaryResponse<
3155 ::buffa::view::OwnedView<
3156 crate::proto::auth::v1::__buffa::view::DeleteApiPolicyResponseView<
3157 'static,
3158 >,
3159 >,
3160 >,
3161 ::connectrpc::ConnectError,
3162 > {
3163 ::connectrpc::client::call_unary(
3164 &self.transport,
3165 &self.config,
3166 POLICY_SERVICE_SERVICE_NAME,
3167 "DeleteApiPolicy",
3168 request,
3169 options,
3170 )
3171 .await
3172 }
3173 pub async fn set_api_key_policy(
3175 &self,
3176 request: crate::proto::auth::v1::SetApiKeyPolicyRequest,
3177 ) -> Result<
3178 ::connectrpc::client::UnaryResponse<
3179 ::buffa::view::OwnedView<
3180 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyResponseView<
3181 'static,
3182 >,
3183 >,
3184 >,
3185 ::connectrpc::ConnectError,
3186 > {
3187 self.set_api_key_policy_with_options(
3188 request,
3189 ::connectrpc::client::CallOptions::default(),
3190 )
3191 .await
3192 }
3193 pub async fn set_api_key_policy_with_options(
3195 &self,
3196 request: crate::proto::auth::v1::SetApiKeyPolicyRequest,
3197 options: ::connectrpc::client::CallOptions,
3198 ) -> Result<
3199 ::connectrpc::client::UnaryResponse<
3200 ::buffa::view::OwnedView<
3201 crate::proto::auth::v1::__buffa::view::SetApiKeyPolicyResponseView<
3202 'static,
3203 >,
3204 >,
3205 >,
3206 ::connectrpc::ConnectError,
3207 > {
3208 ::connectrpc::client::call_unary(
3209 &self.transport,
3210 &self.config,
3211 POLICY_SERVICE_SERVICE_NAME,
3212 "SetApiKeyPolicy",
3213 request,
3214 options,
3215 )
3216 .await
3217 }
3218}
3219
3220pub type OwnedGetSubaccountRequestView = ::buffa::view::OwnedView<
3222 crate::proto::auth::v1::__buffa::view::GetSubaccountRequestView<'static>,
3223>;
3224pub type OwnedGetSubaccountResponseView = ::buffa::view::OwnedView<
3226 crate::proto::auth::v1::__buffa::view::GetSubaccountResponseView<'static>,
3227>;
3228pub type OwnedListSubaccountEventsRequestView = ::buffa::view::OwnedView<
3230 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsRequestView<'static>,
3231>;
3232pub type OwnedListSubaccountEventsResponseView = ::buffa::view::OwnedView<
3234 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsResponseView<'static>,
3235>;
3236pub type OwnedListSubaccountsRequestView = ::buffa::view::OwnedView<
3238 crate::proto::auth::v1::__buffa::view::ListSubaccountsRequestView<'static>,
3239>;
3240pub type OwnedListSubaccountsResponseView = ::buffa::view::OwnedView<
3242 crate::proto::auth::v1::__buffa::view::ListSubaccountsResponseView<'static>,
3243>;
3244pub type OwnedCreateSubaccountRequestView = ::buffa::view::OwnedView<
3246 crate::proto::auth::v1::__buffa::view::CreateSubaccountRequestView<'static>,
3247>;
3248pub type OwnedCreateSubaccountResponseView = ::buffa::view::OwnedView<
3250 crate::proto::auth::v1::__buffa::view::CreateSubaccountResponseView<'static>,
3251>;
3252pub type OwnedUpdateSubaccountRequestView = ::buffa::view::OwnedView<
3254 crate::proto::auth::v1::__buffa::view::UpdateSubaccountRequestView<'static>,
3255>;
3256pub type OwnedUpdateSubaccountResponseView = ::buffa::view::OwnedView<
3258 crate::proto::auth::v1::__buffa::view::UpdateSubaccountResponseView<'static>,
3259>;
3260pub type OwnedSetSubaccountMemberMfaRequirementRequestView = ::buffa::view::OwnedView<
3262 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementRequestView<
3263 'static,
3264 >,
3265>;
3266pub type OwnedSetSubaccountMemberMfaRequirementResponseView = ::buffa::view::OwnedView<
3268 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementResponseView<
3269 'static,
3270 >,
3271>;
3272pub type OwnedListSubaccountMembersRequestView = ::buffa::view::OwnedView<
3274 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersRequestView<'static>,
3275>;
3276pub type OwnedListSubaccountMembersResponseView = ::buffa::view::OwnedView<
3278 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersResponseView<'static>,
3279>;
3280pub type OwnedRemoveSubaccountMemberRequestView = ::buffa::view::OwnedView<
3282 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberRequestView<'static>,
3283>;
3284pub type OwnedRemoveSubaccountMemberResponseView = ::buffa::view::OwnedView<
3286 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberResponseView<'static>,
3287>;
3288pub type OwnedUpdateSubaccountMemberRoleRequestView = ::buffa::view::OwnedView<
3290 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleRequestView<'static>,
3291>;
3292pub type OwnedUpdateSubaccountMemberRoleResponseView = ::buffa::view::OwnedView<
3294 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleResponseView<
3295 'static,
3296 >,
3297>;
3298pub type OwnedInviteSubaccountMemberRequestView = ::buffa::view::OwnedView<
3300 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberRequestView<'static>,
3301>;
3302pub type OwnedInviteSubaccountMemberResponseView = ::buffa::view::OwnedView<
3304 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberResponseView<'static>,
3305>;
3306pub type OwnedListSubaccountInvitesRequestView = ::buffa::view::OwnedView<
3308 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesRequestView<'static>,
3309>;
3310pub type OwnedListSubaccountInvitesResponseView = ::buffa::view::OwnedView<
3312 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesResponseView<'static>,
3313>;
3314pub type OwnedRespondSubaccountInviteRequestView = ::buffa::view::OwnedView<
3316 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteRequestView<'static>,
3317>;
3318pub type OwnedRespondSubaccountInviteResponseView = ::buffa::view::OwnedView<
3320 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteResponseView<'static>,
3321>;
3322impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSubaccountResponse>
3323for crate::proto::auth::v1::__buffa::view::GetSubaccountResponseView<'_> {
3324 fn encode(
3325 &self,
3326 codec: ::connectrpc::CodecFormat,
3327 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3328 ::connectrpc::__codegen::encode_view_body(self, codec)
3329 }
3330}
3331impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSubaccountResponse>
3332for ::buffa::view::OwnedView<
3333 crate::proto::auth::v1::__buffa::view::GetSubaccountResponseView<'static>,
3334> {
3335 fn encode(
3336 &self,
3337 codec: ::connectrpc::CodecFormat,
3338 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3339 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3340 }
3341}
3342impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountEventsResponse>
3343for crate::proto::auth::v1::__buffa::view::ListSubaccountEventsResponseView<'_> {
3344 fn encode(
3345 &self,
3346 codec: ::connectrpc::CodecFormat,
3347 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3348 ::connectrpc::__codegen::encode_view_body(self, codec)
3349 }
3350}
3351impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountEventsResponse>
3352for ::buffa::view::OwnedView<
3353 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsResponseView<'static>,
3354> {
3355 fn encode(
3356 &self,
3357 codec: ::connectrpc::CodecFormat,
3358 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3359 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3360 }
3361}
3362impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountsResponse>
3363for crate::proto::auth::v1::__buffa::view::ListSubaccountsResponseView<'_> {
3364 fn encode(
3365 &self,
3366 codec: ::connectrpc::CodecFormat,
3367 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3368 ::connectrpc::__codegen::encode_view_body(self, codec)
3369 }
3370}
3371impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountsResponse>
3372for ::buffa::view::OwnedView<
3373 crate::proto::auth::v1::__buffa::view::ListSubaccountsResponseView<'static>,
3374> {
3375 fn encode(
3376 &self,
3377 codec: ::connectrpc::CodecFormat,
3378 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3379 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3380 }
3381}
3382impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateSubaccountResponse>
3383for crate::proto::auth::v1::__buffa::view::CreateSubaccountResponseView<'_> {
3384 fn encode(
3385 &self,
3386 codec: ::connectrpc::CodecFormat,
3387 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3388 ::connectrpc::__codegen::encode_view_body(self, codec)
3389 }
3390}
3391impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateSubaccountResponse>
3392for ::buffa::view::OwnedView<
3393 crate::proto::auth::v1::__buffa::view::CreateSubaccountResponseView<'static>,
3394> {
3395 fn encode(
3396 &self,
3397 codec: ::connectrpc::CodecFormat,
3398 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3399 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3400 }
3401}
3402impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountResponse>
3403for crate::proto::auth::v1::__buffa::view::UpdateSubaccountResponseView<'_> {
3404 fn encode(
3405 &self,
3406 codec: ::connectrpc::CodecFormat,
3407 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3408 ::connectrpc::__codegen::encode_view_body(self, codec)
3409 }
3410}
3411impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountResponse>
3412for ::buffa::view::OwnedView<
3413 crate::proto::auth::v1::__buffa::view::UpdateSubaccountResponseView<'static>,
3414> {
3415 fn encode(
3416 &self,
3417 codec: ::connectrpc::CodecFormat,
3418 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3419 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3420 }
3421}
3422impl ::connectrpc::Encodable<
3423 crate::proto::auth::v1::SetSubaccountMemberMFARequirementResponse,
3424>
3425for crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementResponseView<
3426 '_,
3427> {
3428 fn encode(
3429 &self,
3430 codec: ::connectrpc::CodecFormat,
3431 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3432 ::connectrpc::__codegen::encode_view_body(self, codec)
3433 }
3434}
3435impl ::connectrpc::Encodable<
3436 crate::proto::auth::v1::SetSubaccountMemberMFARequirementResponse,
3437>
3438for ::buffa::view::OwnedView<
3439 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementResponseView<
3440 'static,
3441 >,
3442> {
3443 fn encode(
3444 &self,
3445 codec: ::connectrpc::CodecFormat,
3446 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3447 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3448 }
3449}
3450impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountMembersResponse>
3451for crate::proto::auth::v1::__buffa::view::ListSubaccountMembersResponseView<'_> {
3452 fn encode(
3453 &self,
3454 codec: ::connectrpc::CodecFormat,
3455 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3456 ::connectrpc::__codegen::encode_view_body(self, codec)
3457 }
3458}
3459impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountMembersResponse>
3460for ::buffa::view::OwnedView<
3461 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersResponseView<'static>,
3462> {
3463 fn encode(
3464 &self,
3465 codec: ::connectrpc::CodecFormat,
3466 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3467 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3468 }
3469}
3470impl ::connectrpc::Encodable<crate::proto::auth::v1::RemoveSubaccountMemberResponse>
3471for crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberResponseView<'_> {
3472 fn encode(
3473 &self,
3474 codec: ::connectrpc::CodecFormat,
3475 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3476 ::connectrpc::__codegen::encode_view_body(self, codec)
3477 }
3478}
3479impl ::connectrpc::Encodable<crate::proto::auth::v1::RemoveSubaccountMemberResponse>
3480for ::buffa::view::OwnedView<
3481 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberResponseView<'static>,
3482> {
3483 fn encode(
3484 &self,
3485 codec: ::connectrpc::CodecFormat,
3486 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3487 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3488 }
3489}
3490impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountMemberRoleResponse>
3491for crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleResponseView<'_> {
3492 fn encode(
3493 &self,
3494 codec: ::connectrpc::CodecFormat,
3495 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3496 ::connectrpc::__codegen::encode_view_body(self, codec)
3497 }
3498}
3499impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateSubaccountMemberRoleResponse>
3500for ::buffa::view::OwnedView<
3501 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleResponseView<
3502 'static,
3503 >,
3504> {
3505 fn encode(
3506 &self,
3507 codec: ::connectrpc::CodecFormat,
3508 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3509 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3510 }
3511}
3512impl ::connectrpc::Encodable<crate::proto::auth::v1::InviteSubaccountMemberResponse>
3513for crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberResponseView<'_> {
3514 fn encode(
3515 &self,
3516 codec: ::connectrpc::CodecFormat,
3517 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3518 ::connectrpc::__codegen::encode_view_body(self, codec)
3519 }
3520}
3521impl ::connectrpc::Encodable<crate::proto::auth::v1::InviteSubaccountMemberResponse>
3522for ::buffa::view::OwnedView<
3523 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberResponseView<'static>,
3524> {
3525 fn encode(
3526 &self,
3527 codec: ::connectrpc::CodecFormat,
3528 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3529 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3530 }
3531}
3532impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountInvitesResponse>
3533for crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesResponseView<'_> {
3534 fn encode(
3535 &self,
3536 codec: ::connectrpc::CodecFormat,
3537 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3538 ::connectrpc::__codegen::encode_view_body(self, codec)
3539 }
3540}
3541impl ::connectrpc::Encodable<crate::proto::auth::v1::ListSubaccountInvitesResponse>
3542for ::buffa::view::OwnedView<
3543 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesResponseView<'static>,
3544> {
3545 fn encode(
3546 &self,
3547 codec: ::connectrpc::CodecFormat,
3548 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3549 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3550 }
3551}
3552impl ::connectrpc::Encodable<crate::proto::auth::v1::RespondSubaccountInviteResponse>
3553for crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteResponseView<'_> {
3554 fn encode(
3555 &self,
3556 codec: ::connectrpc::CodecFormat,
3557 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3558 ::connectrpc::__codegen::encode_view_body(self, codec)
3559 }
3560}
3561impl ::connectrpc::Encodable<crate::proto::auth::v1::RespondSubaccountInviteResponse>
3562for ::buffa::view::OwnedView<
3563 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteResponseView<'static>,
3564> {
3565 fn encode(
3566 &self,
3567 codec: ::connectrpc::CodecFormat,
3568 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
3569 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
3570 }
3571}
3572pub const SUBACCOUNT_VIEW_SERVICE_SERVICE_NAME: &str = "auth.v1.SubaccountViewService";
3574pub const SUBACCOUNT_VIEW_SERVICE_GET_SUBACCOUNT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
3579 "/auth.v1.SubaccountViewService/GetSubaccount",
3580 ::connectrpc::StreamType::Unary,
3581 )
3582 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
3583pub const SUBACCOUNT_VIEW_SERVICE_LIST_SUBACCOUNT_ACTIVITY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
3588 "/auth.v1.SubaccountViewService/ListSubaccountActivity",
3589 ::connectrpc::StreamType::Unary,
3590 )
3591 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
3592#[allow(clippy::type_complexity)]
3642pub trait SubaccountViewService: Send + Sync + 'static {
3643 fn get_subaccount<'a>(
3653 &'a self,
3654 ctx: ::connectrpc::RequestContext,
3655 request: ::connectrpc::ServiceRequest<
3656 '_,
3657 crate::proto::auth::v1::GetSubaccountRequest,
3658 >,
3659 ) -> impl ::std::future::Future<
3660 Output = ::connectrpc::ServiceResult<
3661 impl ::connectrpc::Encodable<
3662 crate::proto::auth::v1::GetSubaccountResponse,
3663 > + Send + use<'a, Self>,
3664 >,
3665 > + Send;
3666 fn list_subaccount_activity<'a>(
3676 &'a self,
3677 ctx: ::connectrpc::RequestContext,
3678 request: ::connectrpc::ServiceRequest<
3679 '_,
3680 crate::proto::auth::v1::ListSubaccountEventsRequest,
3681 >,
3682 ) -> impl ::std::future::Future<
3683 Output = ::connectrpc::ServiceResult<
3684 impl ::connectrpc::Encodable<
3685 crate::proto::auth::v1::ListSubaccountEventsResponse,
3686 > + Send + use<'a, Self>,
3687 >,
3688 > + Send;
3689}
3690pub trait SubaccountViewServiceExt: SubaccountViewService {
3706 fn register(
3711 self: ::std::sync::Arc<Self>,
3712 router: ::connectrpc::Router,
3713 ) -> ::connectrpc::Router;
3714}
3715impl<S: SubaccountViewService> SubaccountViewServiceExt for S {
3716 fn register(
3717 self: ::std::sync::Arc<Self>,
3718 router: ::connectrpc::Router,
3719 ) -> ::connectrpc::Router {
3720 router
3721 .route_view(
3722 SUBACCOUNT_VIEW_SERVICE_SERVICE_NAME,
3723 "GetSubaccount",
3724 {
3725 let svc = ::std::sync::Arc::clone(&self);
3726 ::connectrpc::view_handler_fn(move |
3727 ctx,
3728 req: ::buffa::view::OwnedView<
3729 crate::proto::auth::v1::__buffa::view::GetSubaccountRequestView<
3730 'static,
3731 >,
3732 >,
3733 format|
3734 {
3735 let svc = ::std::sync::Arc::clone(&svc);
3736 async move {
3737 let sreq = ::connectrpc::ServiceRequest::<
3738 crate::proto::auth::v1::GetSubaccountRequest,
3739 >::from_parts(req.reborrow(), req.bytes());
3740 svc.get_subaccount(ctx, sreq)
3741 .await?
3742 .encode::<
3743 crate::proto::auth::v1::GetSubaccountResponse,
3744 >(format)
3745 }
3746 })
3747 },
3748 )
3749 .with_spec(SUBACCOUNT_VIEW_SERVICE_GET_SUBACCOUNT_SPEC)
3750 .route_view(
3751 SUBACCOUNT_VIEW_SERVICE_SERVICE_NAME,
3752 "ListSubaccountActivity",
3753 {
3754 let svc = ::std::sync::Arc::clone(&self);
3755 ::connectrpc::view_handler_fn(move |
3756 ctx,
3757 req: ::buffa::view::OwnedView<
3758 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsRequestView<
3759 'static,
3760 >,
3761 >,
3762 format|
3763 {
3764 let svc = ::std::sync::Arc::clone(&svc);
3765 async move {
3766 let sreq = ::connectrpc::ServiceRequest::<
3767 crate::proto::auth::v1::ListSubaccountEventsRequest,
3768 >::from_parts(req.reborrow(), req.bytes());
3769 svc.list_subaccount_activity(ctx, sreq)
3770 .await?
3771 .encode::<
3772 crate::proto::auth::v1::ListSubaccountEventsResponse,
3773 >(format)
3774 }
3775 })
3776 },
3777 )
3778 .with_spec(SUBACCOUNT_VIEW_SERVICE_LIST_SUBACCOUNT_ACTIVITY_SPEC)
3779 }
3780}
3781#[doc(hidden)]
3783pub struct SubaccountViewServiceRegisterMarker;
3784impl<
3785 S: SubaccountViewService,
3786> ::connectrpc::ServiceRegister<SubaccountViewServiceRegisterMarker>
3787for ::std::sync::Arc<S> {
3788 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
3789 <S as SubaccountViewServiceExt>::register(self, router)
3790 }
3791}
3792pub struct SubaccountViewServiceServer<T> {
3806 inner: ::std::sync::Arc<T>,
3807}
3808impl<T: SubaccountViewService> SubaccountViewServiceServer<T> {
3809 pub fn new(service: T) -> Self {
3811 Self {
3812 inner: ::std::sync::Arc::new(service),
3813 }
3814 }
3815 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
3817 Self { inner }
3818 }
3819}
3820impl<T> Clone for SubaccountViewServiceServer<T> {
3821 fn clone(&self) -> Self {
3822 Self {
3823 inner: ::std::sync::Arc::clone(&self.inner),
3824 }
3825 }
3826}
3827impl<T: SubaccountViewService> ::connectrpc::Dispatcher
3828for SubaccountViewServiceServer<T> {
3829 #[inline]
3830 fn lookup(
3831 &self,
3832 path: &str,
3833 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
3834 let method = path.strip_prefix("auth.v1.SubaccountViewService/")?;
3835 match method {
3836 "GetSubaccount" => {
3837 Some(
3838 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
3839 .with_spec(SUBACCOUNT_VIEW_SERVICE_GET_SUBACCOUNT_SPEC),
3840 )
3841 }
3842 "ListSubaccountActivity" => {
3843 Some(
3844 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
3845 .with_spec(SUBACCOUNT_VIEW_SERVICE_LIST_SUBACCOUNT_ACTIVITY_SPEC),
3846 )
3847 }
3848 _ => None,
3849 }
3850 }
3851 fn call_unary(
3852 &self,
3853 path: &str,
3854 ctx: ::connectrpc::RequestContext,
3855 request: ::connectrpc::Payload,
3856 format: ::connectrpc::CodecFormat,
3857 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
3858 let Some(method) = path.strip_prefix("auth.v1.SubaccountViewService/") else {
3859 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
3860 };
3861 let _ = (&ctx, &request, &format);
3862 match method {
3863 "GetSubaccount" => {
3864 let svc = ::std::sync::Arc::clone(&self.inner);
3865 Box::pin(async move {
3866 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
3867 crate::proto::auth::v1::GetSubaccountRequest,
3868 >(request.encoded()?, format)?;
3869 let req: crate::proto::auth::v1::__buffa::view::GetSubaccountRequestView<
3870 '_,
3871 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
3872 &body,
3873 )?;
3874 let req = ::connectrpc::ServiceRequest::<
3875 crate::proto::auth::v1::GetSubaccountRequest,
3876 >::from_parts(&req, &body);
3877 svc.get_subaccount(ctx, req)
3878 .await?
3879 .encode::<crate::proto::auth::v1::GetSubaccountResponse>(format)
3880 })
3881 }
3882 "ListSubaccountActivity" => {
3883 let svc = ::std::sync::Arc::clone(&self.inner);
3884 Box::pin(async move {
3885 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
3886 crate::proto::auth::v1::ListSubaccountEventsRequest,
3887 >(request.encoded()?, format)?;
3888 let req: crate::proto::auth::v1::__buffa::view::ListSubaccountEventsRequestView<
3889 '_,
3890 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
3891 &body,
3892 )?;
3893 let req = ::connectrpc::ServiceRequest::<
3894 crate::proto::auth::v1::ListSubaccountEventsRequest,
3895 >::from_parts(&req, &body);
3896 svc.list_subaccount_activity(ctx, req)
3897 .await?
3898 .encode::<
3899 crate::proto::auth::v1::ListSubaccountEventsResponse,
3900 >(format)
3901 })
3902 }
3903 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
3904 }
3905 }
3906 fn call_server_streaming(
3907 &self,
3908 path: &str,
3909 ctx: ::connectrpc::RequestContext,
3910 request: ::buffa::bytes::Bytes,
3911 format: ::connectrpc::CodecFormat,
3912 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
3913 let Some(method) = path.strip_prefix("auth.v1.SubaccountViewService/") else {
3914 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
3915 };
3916 let _ = (&ctx, &request, &format);
3917 match method {
3918 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
3919 }
3920 }
3921 fn call_client_streaming(
3922 &self,
3923 path: &str,
3924 ctx: ::connectrpc::RequestContext,
3925 requests: ::connectrpc::dispatcher::codegen::RequestStream,
3926 format: ::connectrpc::CodecFormat,
3927 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
3928 let Some(method) = path.strip_prefix("auth.v1.SubaccountViewService/") else {
3929 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
3930 };
3931 let _ = (&ctx, &requests, &format);
3932 match method {
3933 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
3934 }
3935 }
3936 fn call_bidi_streaming(
3937 &self,
3938 path: &str,
3939 ctx: ::connectrpc::RequestContext,
3940 requests: ::connectrpc::dispatcher::codegen::RequestStream,
3941 format: ::connectrpc::CodecFormat,
3942 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
3943 let Some(method) = path.strip_prefix("auth.v1.SubaccountViewService/") else {
3944 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
3945 };
3946 let _ = (&ctx, &requests, &format);
3947 match method {
3948 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
3949 }
3950 }
3951}
3952#[derive(Clone)]
3984pub struct SubaccountViewServiceClient<T> {
3985 transport: T,
3986 config: ::connectrpc::client::ClientConfig,
3987}
3988impl<T> SubaccountViewServiceClient<T>
3989where
3990 T: ::connectrpc::client::ClientTransport,
3991 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
3992{
3993 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
3995 Self { transport, config }
3996 }
3997 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
3999 &self.config
4000 }
4001 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
4003 &mut self.config
4004 }
4005 pub async fn get_subaccount(
4007 &self,
4008 request: crate::proto::auth::v1::GetSubaccountRequest,
4009 ) -> Result<
4010 ::connectrpc::client::UnaryResponse<
4011 ::buffa::view::OwnedView<
4012 crate::proto::auth::v1::__buffa::view::GetSubaccountResponseView<'static>,
4013 >,
4014 >,
4015 ::connectrpc::ConnectError,
4016 > {
4017 self.get_subaccount_with_options(
4018 request,
4019 ::connectrpc::client::CallOptions::default(),
4020 )
4021 .await
4022 }
4023 pub async fn get_subaccount_with_options(
4025 &self,
4026 request: crate::proto::auth::v1::GetSubaccountRequest,
4027 options: ::connectrpc::client::CallOptions,
4028 ) -> Result<
4029 ::connectrpc::client::UnaryResponse<
4030 ::buffa::view::OwnedView<
4031 crate::proto::auth::v1::__buffa::view::GetSubaccountResponseView<'static>,
4032 >,
4033 >,
4034 ::connectrpc::ConnectError,
4035 > {
4036 ::connectrpc::client::call_unary(
4037 &self.transport,
4038 &self.config,
4039 SUBACCOUNT_VIEW_SERVICE_SERVICE_NAME,
4040 "GetSubaccount",
4041 request,
4042 options,
4043 )
4044 .await
4045 }
4046 pub async fn list_subaccount_activity(
4048 &self,
4049 request: crate::proto::auth::v1::ListSubaccountEventsRequest,
4050 ) -> Result<
4051 ::connectrpc::client::UnaryResponse<
4052 ::buffa::view::OwnedView<
4053 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsResponseView<
4054 'static,
4055 >,
4056 >,
4057 >,
4058 ::connectrpc::ConnectError,
4059 > {
4060 self.list_subaccount_activity_with_options(
4061 request,
4062 ::connectrpc::client::CallOptions::default(),
4063 )
4064 .await
4065 }
4066 pub async fn list_subaccount_activity_with_options(
4068 &self,
4069 request: crate::proto::auth::v1::ListSubaccountEventsRequest,
4070 options: ::connectrpc::client::CallOptions,
4071 ) -> Result<
4072 ::connectrpc::client::UnaryResponse<
4073 ::buffa::view::OwnedView<
4074 crate::proto::auth::v1::__buffa::view::ListSubaccountEventsResponseView<
4075 'static,
4076 >,
4077 >,
4078 >,
4079 ::connectrpc::ConnectError,
4080 > {
4081 ::connectrpc::client::call_unary(
4082 &self.transport,
4083 &self.config,
4084 SUBACCOUNT_VIEW_SERVICE_SERVICE_NAME,
4085 "ListSubaccountActivity",
4086 request,
4087 options,
4088 )
4089 .await
4090 }
4091}
4092pub const SUBACCOUNT_SERVICE_SERVICE_NAME: &str = "auth.v1.SubaccountService";
4094pub const SUBACCOUNT_SERVICE_LIST_SUBACCOUNTS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4099 "/auth.v1.SubaccountService/ListSubaccounts",
4100 ::connectrpc::StreamType::Unary,
4101 )
4102 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4103pub const SUBACCOUNT_SERVICE_CREATE_SUBACCOUNT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4108 "/auth.v1.SubaccountService/CreateSubaccount",
4109 ::connectrpc::StreamType::Unary,
4110 )
4111 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4112pub const SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4117 "/auth.v1.SubaccountService/UpdateSubaccount",
4118 ::connectrpc::StreamType::Unary,
4119 )
4120 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4121pub const SUBACCOUNT_SERVICE_SET_SUBACCOUNT_MEMBER_MFA_REQUIREMENT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4126 "/auth.v1.SubaccountService/SetSubaccountMemberMFARequirement",
4127 ::connectrpc::StreamType::Unary,
4128 )
4129 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4130pub const SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_MEMBERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4135 "/auth.v1.SubaccountService/ListSubaccountMembers",
4136 ::connectrpc::StreamType::Unary,
4137 )
4138 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4139pub const SUBACCOUNT_SERVICE_REMOVE_SUBACCOUNT_MEMBER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4144 "/auth.v1.SubaccountService/RemoveSubaccountMember",
4145 ::connectrpc::StreamType::Unary,
4146 )
4147 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4148pub const SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_MEMBER_ROLE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4153 "/auth.v1.SubaccountService/UpdateSubaccountMemberRole",
4154 ::connectrpc::StreamType::Unary,
4155 )
4156 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4157pub const SUBACCOUNT_SERVICE_INVITE_SUBACCOUNT_MEMBER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4162 "/auth.v1.SubaccountService/InviteSubaccountMember",
4163 ::connectrpc::StreamType::Unary,
4164 )
4165 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4166pub const SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_INVITES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4171 "/auth.v1.SubaccountService/ListSubaccountInvites",
4172 ::connectrpc::StreamType::Unary,
4173 )
4174 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4175pub const SUBACCOUNT_SERVICE_RESPOND_SUBACCOUNT_INVITE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
4180 "/auth.v1.SubaccountService/RespondSubaccountInvite",
4181 ::connectrpc::StreamType::Unary,
4182 )
4183 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
4184#[allow(clippy::type_complexity)]
4234pub trait SubaccountService: Send + Sync + 'static {
4235 fn list_subaccounts<'a>(
4245 &'a self,
4246 ctx: ::connectrpc::RequestContext,
4247 request: ::connectrpc::ServiceRequest<
4248 '_,
4249 crate::proto::auth::v1::ListSubaccountsRequest,
4250 >,
4251 ) -> impl ::std::future::Future<
4252 Output = ::connectrpc::ServiceResult<
4253 impl ::connectrpc::Encodable<
4254 crate::proto::auth::v1::ListSubaccountsResponse,
4255 > + Send + use<'a, Self>,
4256 >,
4257 > + Send;
4258 fn create_subaccount<'a>(
4268 &'a self,
4269 ctx: ::connectrpc::RequestContext,
4270 request: ::connectrpc::ServiceRequest<
4271 '_,
4272 crate::proto::auth::v1::CreateSubaccountRequest,
4273 >,
4274 ) -> impl ::std::future::Future<
4275 Output = ::connectrpc::ServiceResult<
4276 impl ::connectrpc::Encodable<
4277 crate::proto::auth::v1::CreateSubaccountResponse,
4278 > + Send + use<'a, Self>,
4279 >,
4280 > + Send;
4281 fn update_subaccount<'a>(
4291 &'a self,
4292 ctx: ::connectrpc::RequestContext,
4293 request: ::connectrpc::ServiceRequest<
4294 '_,
4295 crate::proto::auth::v1::UpdateSubaccountRequest,
4296 >,
4297 ) -> impl ::std::future::Future<
4298 Output = ::connectrpc::ServiceResult<
4299 impl ::connectrpc::Encodable<
4300 crate::proto::auth::v1::UpdateSubaccountResponse,
4301 > + Send + use<'a, Self>,
4302 >,
4303 > + Send;
4304 fn set_subaccount_member_mfa_requirement<'a>(
4314 &'a self,
4315 ctx: ::connectrpc::RequestContext,
4316 request: ::connectrpc::ServiceRequest<
4317 '_,
4318 crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
4319 >,
4320 ) -> impl ::std::future::Future<
4321 Output = ::connectrpc::ServiceResult<
4322 impl ::connectrpc::Encodable<
4323 crate::proto::auth::v1::SetSubaccountMemberMFARequirementResponse,
4324 > + Send + use<'a, Self>,
4325 >,
4326 > + Send;
4327 fn list_subaccount_members<'a>(
4337 &'a self,
4338 ctx: ::connectrpc::RequestContext,
4339 request: ::connectrpc::ServiceRequest<
4340 '_,
4341 crate::proto::auth::v1::ListSubaccountMembersRequest,
4342 >,
4343 ) -> impl ::std::future::Future<
4344 Output = ::connectrpc::ServiceResult<
4345 impl ::connectrpc::Encodable<
4346 crate::proto::auth::v1::ListSubaccountMembersResponse,
4347 > + Send + use<'a, Self>,
4348 >,
4349 > + Send;
4350 fn remove_subaccount_member<'a>(
4360 &'a self,
4361 ctx: ::connectrpc::RequestContext,
4362 request: ::connectrpc::ServiceRequest<
4363 '_,
4364 crate::proto::auth::v1::RemoveSubaccountMemberRequest,
4365 >,
4366 ) -> impl ::std::future::Future<
4367 Output = ::connectrpc::ServiceResult<
4368 impl ::connectrpc::Encodable<
4369 crate::proto::auth::v1::RemoveSubaccountMemberResponse,
4370 > + Send + use<'a, Self>,
4371 >,
4372 > + Send;
4373 fn update_subaccount_member_role<'a>(
4383 &'a self,
4384 ctx: ::connectrpc::RequestContext,
4385 request: ::connectrpc::ServiceRequest<
4386 '_,
4387 crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
4388 >,
4389 ) -> impl ::std::future::Future<
4390 Output = ::connectrpc::ServiceResult<
4391 impl ::connectrpc::Encodable<
4392 crate::proto::auth::v1::UpdateSubaccountMemberRoleResponse,
4393 > + Send + use<'a, Self>,
4394 >,
4395 > + Send;
4396 fn invite_subaccount_member<'a>(
4406 &'a self,
4407 ctx: ::connectrpc::RequestContext,
4408 request: ::connectrpc::ServiceRequest<
4409 '_,
4410 crate::proto::auth::v1::InviteSubaccountMemberRequest,
4411 >,
4412 ) -> impl ::std::future::Future<
4413 Output = ::connectrpc::ServiceResult<
4414 impl ::connectrpc::Encodable<
4415 crate::proto::auth::v1::InviteSubaccountMemberResponse,
4416 > + Send + use<'a, Self>,
4417 >,
4418 > + Send;
4419 fn list_subaccount_invites<'a>(
4429 &'a self,
4430 ctx: ::connectrpc::RequestContext,
4431 request: ::connectrpc::ServiceRequest<
4432 '_,
4433 crate::proto::auth::v1::ListSubaccountInvitesRequest,
4434 >,
4435 ) -> impl ::std::future::Future<
4436 Output = ::connectrpc::ServiceResult<
4437 impl ::connectrpc::Encodable<
4438 crate::proto::auth::v1::ListSubaccountInvitesResponse,
4439 > + Send + use<'a, Self>,
4440 >,
4441 > + Send;
4442 fn respond_subaccount_invite<'a>(
4452 &'a self,
4453 ctx: ::connectrpc::RequestContext,
4454 request: ::connectrpc::ServiceRequest<
4455 '_,
4456 crate::proto::auth::v1::RespondSubaccountInviteRequest,
4457 >,
4458 ) -> impl ::std::future::Future<
4459 Output = ::connectrpc::ServiceResult<
4460 impl ::connectrpc::Encodable<
4461 crate::proto::auth::v1::RespondSubaccountInviteResponse,
4462 > + Send + use<'a, Self>,
4463 >,
4464 > + Send;
4465}
4466pub trait SubaccountServiceExt: SubaccountService {
4482 fn register(
4487 self: ::std::sync::Arc<Self>,
4488 router: ::connectrpc::Router,
4489 ) -> ::connectrpc::Router;
4490}
4491impl<S: SubaccountService> SubaccountServiceExt for S {
4492 fn register(
4493 self: ::std::sync::Arc<Self>,
4494 router: ::connectrpc::Router,
4495 ) -> ::connectrpc::Router {
4496 router
4497 .route_view(
4498 SUBACCOUNT_SERVICE_SERVICE_NAME,
4499 "ListSubaccounts",
4500 {
4501 let svc = ::std::sync::Arc::clone(&self);
4502 ::connectrpc::view_handler_fn(move |
4503 ctx,
4504 req: ::buffa::view::OwnedView<
4505 crate::proto::auth::v1::__buffa::view::ListSubaccountsRequestView<
4506 'static,
4507 >,
4508 >,
4509 format|
4510 {
4511 let svc = ::std::sync::Arc::clone(&svc);
4512 async move {
4513 let sreq = ::connectrpc::ServiceRequest::<
4514 crate::proto::auth::v1::ListSubaccountsRequest,
4515 >::from_parts(req.reborrow(), req.bytes());
4516 svc.list_subaccounts(ctx, sreq)
4517 .await?
4518 .encode::<
4519 crate::proto::auth::v1::ListSubaccountsResponse,
4520 >(format)
4521 }
4522 })
4523 },
4524 )
4525 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNTS_SPEC)
4526 .route_view(
4527 SUBACCOUNT_SERVICE_SERVICE_NAME,
4528 "CreateSubaccount",
4529 {
4530 let svc = ::std::sync::Arc::clone(&self);
4531 ::connectrpc::view_handler_fn(move |
4532 ctx,
4533 req: ::buffa::view::OwnedView<
4534 crate::proto::auth::v1::__buffa::view::CreateSubaccountRequestView<
4535 'static,
4536 >,
4537 >,
4538 format|
4539 {
4540 let svc = ::std::sync::Arc::clone(&svc);
4541 async move {
4542 let sreq = ::connectrpc::ServiceRequest::<
4543 crate::proto::auth::v1::CreateSubaccountRequest,
4544 >::from_parts(req.reborrow(), req.bytes());
4545 svc.create_subaccount(ctx, sreq)
4546 .await?
4547 .encode::<
4548 crate::proto::auth::v1::CreateSubaccountResponse,
4549 >(format)
4550 }
4551 })
4552 },
4553 )
4554 .with_spec(SUBACCOUNT_SERVICE_CREATE_SUBACCOUNT_SPEC)
4555 .route_view(
4556 SUBACCOUNT_SERVICE_SERVICE_NAME,
4557 "UpdateSubaccount",
4558 {
4559 let svc = ::std::sync::Arc::clone(&self);
4560 ::connectrpc::view_handler_fn(move |
4561 ctx,
4562 req: ::buffa::view::OwnedView<
4563 crate::proto::auth::v1::__buffa::view::UpdateSubaccountRequestView<
4564 'static,
4565 >,
4566 >,
4567 format|
4568 {
4569 let svc = ::std::sync::Arc::clone(&svc);
4570 async move {
4571 let sreq = ::connectrpc::ServiceRequest::<
4572 crate::proto::auth::v1::UpdateSubaccountRequest,
4573 >::from_parts(req.reborrow(), req.bytes());
4574 svc.update_subaccount(ctx, sreq)
4575 .await?
4576 .encode::<
4577 crate::proto::auth::v1::UpdateSubaccountResponse,
4578 >(format)
4579 }
4580 })
4581 },
4582 )
4583 .with_spec(SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_SPEC)
4584 .route_view(
4585 SUBACCOUNT_SERVICE_SERVICE_NAME,
4586 "SetSubaccountMemberMFARequirement",
4587 {
4588 let svc = ::std::sync::Arc::clone(&self);
4589 ::connectrpc::view_handler_fn(move |
4590 ctx,
4591 req: ::buffa::view::OwnedView<
4592 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementRequestView<
4593 'static,
4594 >,
4595 >,
4596 format|
4597 {
4598 let svc = ::std::sync::Arc::clone(&svc);
4599 async move {
4600 let sreq = ::connectrpc::ServiceRequest::<
4601 crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
4602 >::from_parts(req.reborrow(), req.bytes());
4603 svc.set_subaccount_member_mfa_requirement(ctx, sreq)
4604 .await?
4605 .encode::<
4606 crate::proto::auth::v1::SetSubaccountMemberMFARequirementResponse,
4607 >(format)
4608 }
4609 })
4610 },
4611 )
4612 .with_spec(SUBACCOUNT_SERVICE_SET_SUBACCOUNT_MEMBER_MFA_REQUIREMENT_SPEC)
4613 .route_view(
4614 SUBACCOUNT_SERVICE_SERVICE_NAME,
4615 "ListSubaccountMembers",
4616 {
4617 let svc = ::std::sync::Arc::clone(&self);
4618 ::connectrpc::view_handler_fn(move |
4619 ctx,
4620 req: ::buffa::view::OwnedView<
4621 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersRequestView<
4622 'static,
4623 >,
4624 >,
4625 format|
4626 {
4627 let svc = ::std::sync::Arc::clone(&svc);
4628 async move {
4629 let sreq = ::connectrpc::ServiceRequest::<
4630 crate::proto::auth::v1::ListSubaccountMembersRequest,
4631 >::from_parts(req.reborrow(), req.bytes());
4632 svc.list_subaccount_members(ctx, sreq)
4633 .await?
4634 .encode::<
4635 crate::proto::auth::v1::ListSubaccountMembersResponse,
4636 >(format)
4637 }
4638 })
4639 },
4640 )
4641 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_MEMBERS_SPEC)
4642 .route_view(
4643 SUBACCOUNT_SERVICE_SERVICE_NAME,
4644 "RemoveSubaccountMember",
4645 {
4646 let svc = ::std::sync::Arc::clone(&self);
4647 ::connectrpc::view_handler_fn(move |
4648 ctx,
4649 req: ::buffa::view::OwnedView<
4650 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberRequestView<
4651 'static,
4652 >,
4653 >,
4654 format|
4655 {
4656 let svc = ::std::sync::Arc::clone(&svc);
4657 async move {
4658 let sreq = ::connectrpc::ServiceRequest::<
4659 crate::proto::auth::v1::RemoveSubaccountMemberRequest,
4660 >::from_parts(req.reborrow(), req.bytes());
4661 svc.remove_subaccount_member(ctx, sreq)
4662 .await?
4663 .encode::<
4664 crate::proto::auth::v1::RemoveSubaccountMemberResponse,
4665 >(format)
4666 }
4667 })
4668 },
4669 )
4670 .with_spec(SUBACCOUNT_SERVICE_REMOVE_SUBACCOUNT_MEMBER_SPEC)
4671 .route_view(
4672 SUBACCOUNT_SERVICE_SERVICE_NAME,
4673 "UpdateSubaccountMemberRole",
4674 {
4675 let svc = ::std::sync::Arc::clone(&self);
4676 ::connectrpc::view_handler_fn(move |
4677 ctx,
4678 req: ::buffa::view::OwnedView<
4679 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleRequestView<
4680 'static,
4681 >,
4682 >,
4683 format|
4684 {
4685 let svc = ::std::sync::Arc::clone(&svc);
4686 async move {
4687 let sreq = ::connectrpc::ServiceRequest::<
4688 crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
4689 >::from_parts(req.reborrow(), req.bytes());
4690 svc.update_subaccount_member_role(ctx, sreq)
4691 .await?
4692 .encode::<
4693 crate::proto::auth::v1::UpdateSubaccountMemberRoleResponse,
4694 >(format)
4695 }
4696 })
4697 },
4698 )
4699 .with_spec(SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_MEMBER_ROLE_SPEC)
4700 .route_view(
4701 SUBACCOUNT_SERVICE_SERVICE_NAME,
4702 "InviteSubaccountMember",
4703 {
4704 let svc = ::std::sync::Arc::clone(&self);
4705 ::connectrpc::view_handler_fn(move |
4706 ctx,
4707 req: ::buffa::view::OwnedView<
4708 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberRequestView<
4709 'static,
4710 >,
4711 >,
4712 format|
4713 {
4714 let svc = ::std::sync::Arc::clone(&svc);
4715 async move {
4716 let sreq = ::connectrpc::ServiceRequest::<
4717 crate::proto::auth::v1::InviteSubaccountMemberRequest,
4718 >::from_parts(req.reborrow(), req.bytes());
4719 svc.invite_subaccount_member(ctx, sreq)
4720 .await?
4721 .encode::<
4722 crate::proto::auth::v1::InviteSubaccountMemberResponse,
4723 >(format)
4724 }
4725 })
4726 },
4727 )
4728 .with_spec(SUBACCOUNT_SERVICE_INVITE_SUBACCOUNT_MEMBER_SPEC)
4729 .route_view(
4730 SUBACCOUNT_SERVICE_SERVICE_NAME,
4731 "ListSubaccountInvites",
4732 {
4733 let svc = ::std::sync::Arc::clone(&self);
4734 ::connectrpc::view_handler_fn(move |
4735 ctx,
4736 req: ::buffa::view::OwnedView<
4737 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesRequestView<
4738 'static,
4739 >,
4740 >,
4741 format|
4742 {
4743 let svc = ::std::sync::Arc::clone(&svc);
4744 async move {
4745 let sreq = ::connectrpc::ServiceRequest::<
4746 crate::proto::auth::v1::ListSubaccountInvitesRequest,
4747 >::from_parts(req.reborrow(), req.bytes());
4748 svc.list_subaccount_invites(ctx, sreq)
4749 .await?
4750 .encode::<
4751 crate::proto::auth::v1::ListSubaccountInvitesResponse,
4752 >(format)
4753 }
4754 })
4755 },
4756 )
4757 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_INVITES_SPEC)
4758 .route_view(
4759 SUBACCOUNT_SERVICE_SERVICE_NAME,
4760 "RespondSubaccountInvite",
4761 {
4762 let svc = ::std::sync::Arc::clone(&self);
4763 ::connectrpc::view_handler_fn(move |
4764 ctx,
4765 req: ::buffa::view::OwnedView<
4766 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteRequestView<
4767 'static,
4768 >,
4769 >,
4770 format|
4771 {
4772 let svc = ::std::sync::Arc::clone(&svc);
4773 async move {
4774 let sreq = ::connectrpc::ServiceRequest::<
4775 crate::proto::auth::v1::RespondSubaccountInviteRequest,
4776 >::from_parts(req.reborrow(), req.bytes());
4777 svc.respond_subaccount_invite(ctx, sreq)
4778 .await?
4779 .encode::<
4780 crate::proto::auth::v1::RespondSubaccountInviteResponse,
4781 >(format)
4782 }
4783 })
4784 },
4785 )
4786 .with_spec(SUBACCOUNT_SERVICE_RESPOND_SUBACCOUNT_INVITE_SPEC)
4787 }
4788}
4789#[doc(hidden)]
4791pub struct SubaccountServiceRegisterMarker;
4792impl<S: SubaccountService> ::connectrpc::ServiceRegister<SubaccountServiceRegisterMarker>
4793for ::std::sync::Arc<S> {
4794 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
4795 <S as SubaccountServiceExt>::register(self, router)
4796 }
4797}
4798pub struct SubaccountServiceServer<T> {
4812 inner: ::std::sync::Arc<T>,
4813}
4814impl<T: SubaccountService> SubaccountServiceServer<T> {
4815 pub fn new(service: T) -> Self {
4817 Self {
4818 inner: ::std::sync::Arc::new(service),
4819 }
4820 }
4821 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
4823 Self { inner }
4824 }
4825}
4826impl<T> Clone for SubaccountServiceServer<T> {
4827 fn clone(&self) -> Self {
4828 Self {
4829 inner: ::std::sync::Arc::clone(&self.inner),
4830 }
4831 }
4832}
4833impl<T: SubaccountService> ::connectrpc::Dispatcher for SubaccountServiceServer<T> {
4834 #[inline]
4835 fn lookup(
4836 &self,
4837 path: &str,
4838 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
4839 let method = path.strip_prefix("auth.v1.SubaccountService/")?;
4840 match method {
4841 "ListSubaccounts" => {
4842 Some(
4843 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4844 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNTS_SPEC),
4845 )
4846 }
4847 "CreateSubaccount" => {
4848 Some(
4849 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4850 .with_spec(SUBACCOUNT_SERVICE_CREATE_SUBACCOUNT_SPEC),
4851 )
4852 }
4853 "UpdateSubaccount" => {
4854 Some(
4855 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4856 .with_spec(SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_SPEC),
4857 )
4858 }
4859 "SetSubaccountMemberMFARequirement" => {
4860 Some(
4861 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4862 .with_spec(
4863 SUBACCOUNT_SERVICE_SET_SUBACCOUNT_MEMBER_MFA_REQUIREMENT_SPEC,
4864 ),
4865 )
4866 }
4867 "ListSubaccountMembers" => {
4868 Some(
4869 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4870 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_MEMBERS_SPEC),
4871 )
4872 }
4873 "RemoveSubaccountMember" => {
4874 Some(
4875 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4876 .with_spec(SUBACCOUNT_SERVICE_REMOVE_SUBACCOUNT_MEMBER_SPEC),
4877 )
4878 }
4879 "UpdateSubaccountMemberRole" => {
4880 Some(
4881 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4882 .with_spec(SUBACCOUNT_SERVICE_UPDATE_SUBACCOUNT_MEMBER_ROLE_SPEC),
4883 )
4884 }
4885 "InviteSubaccountMember" => {
4886 Some(
4887 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4888 .with_spec(SUBACCOUNT_SERVICE_INVITE_SUBACCOUNT_MEMBER_SPEC),
4889 )
4890 }
4891 "ListSubaccountInvites" => {
4892 Some(
4893 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4894 .with_spec(SUBACCOUNT_SERVICE_LIST_SUBACCOUNT_INVITES_SPEC),
4895 )
4896 }
4897 "RespondSubaccountInvite" => {
4898 Some(
4899 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
4900 .with_spec(SUBACCOUNT_SERVICE_RESPOND_SUBACCOUNT_INVITE_SPEC),
4901 )
4902 }
4903 _ => None,
4904 }
4905 }
4906 fn call_unary(
4907 &self,
4908 path: &str,
4909 ctx: ::connectrpc::RequestContext,
4910 request: ::connectrpc::Payload,
4911 format: ::connectrpc::CodecFormat,
4912 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
4913 let Some(method) = path.strip_prefix("auth.v1.SubaccountService/") else {
4914 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
4915 };
4916 let _ = (&ctx, &request, &format);
4917 match method {
4918 "ListSubaccounts" => {
4919 let svc = ::std::sync::Arc::clone(&self.inner);
4920 Box::pin(async move {
4921 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
4922 crate::proto::auth::v1::ListSubaccountsRequest,
4923 >(request.encoded()?, format)?;
4924 let req: crate::proto::auth::v1::__buffa::view::ListSubaccountsRequestView<
4925 '_,
4926 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
4927 &body,
4928 )?;
4929 let req = ::connectrpc::ServiceRequest::<
4930 crate::proto::auth::v1::ListSubaccountsRequest,
4931 >::from_parts(&req, &body);
4932 svc.list_subaccounts(ctx, req)
4933 .await?
4934 .encode::<
4935 crate::proto::auth::v1::ListSubaccountsResponse,
4936 >(format)
4937 })
4938 }
4939 "CreateSubaccount" => {
4940 let svc = ::std::sync::Arc::clone(&self.inner);
4941 Box::pin(async move {
4942 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
4943 crate::proto::auth::v1::CreateSubaccountRequest,
4944 >(request.encoded()?, format)?;
4945 let req: crate::proto::auth::v1::__buffa::view::CreateSubaccountRequestView<
4946 '_,
4947 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
4948 &body,
4949 )?;
4950 let req = ::connectrpc::ServiceRequest::<
4951 crate::proto::auth::v1::CreateSubaccountRequest,
4952 >::from_parts(&req, &body);
4953 svc.create_subaccount(ctx, req)
4954 .await?
4955 .encode::<
4956 crate::proto::auth::v1::CreateSubaccountResponse,
4957 >(format)
4958 })
4959 }
4960 "UpdateSubaccount" => {
4961 let svc = ::std::sync::Arc::clone(&self.inner);
4962 Box::pin(async move {
4963 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
4964 crate::proto::auth::v1::UpdateSubaccountRequest,
4965 >(request.encoded()?, format)?;
4966 let req: crate::proto::auth::v1::__buffa::view::UpdateSubaccountRequestView<
4967 '_,
4968 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
4969 &body,
4970 )?;
4971 let req = ::connectrpc::ServiceRequest::<
4972 crate::proto::auth::v1::UpdateSubaccountRequest,
4973 >::from_parts(&req, &body);
4974 svc.update_subaccount(ctx, req)
4975 .await?
4976 .encode::<
4977 crate::proto::auth::v1::UpdateSubaccountResponse,
4978 >(format)
4979 })
4980 }
4981 "SetSubaccountMemberMFARequirement" => {
4982 let svc = ::std::sync::Arc::clone(&self.inner);
4983 Box::pin(async move {
4984 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
4985 crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
4986 >(request.encoded()?, format)?;
4987 let req: crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementRequestView<
4988 '_,
4989 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
4990 &body,
4991 )?;
4992 let req = ::connectrpc::ServiceRequest::<
4993 crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
4994 >::from_parts(&req, &body);
4995 svc.set_subaccount_member_mfa_requirement(ctx, req)
4996 .await?
4997 .encode::<
4998 crate::proto::auth::v1::SetSubaccountMemberMFARequirementResponse,
4999 >(format)
5000 })
5001 }
5002 "ListSubaccountMembers" => {
5003 let svc = ::std::sync::Arc::clone(&self.inner);
5004 Box::pin(async move {
5005 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5006 crate::proto::auth::v1::ListSubaccountMembersRequest,
5007 >(request.encoded()?, format)?;
5008 let req: crate::proto::auth::v1::__buffa::view::ListSubaccountMembersRequestView<
5009 '_,
5010 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5011 &body,
5012 )?;
5013 let req = ::connectrpc::ServiceRequest::<
5014 crate::proto::auth::v1::ListSubaccountMembersRequest,
5015 >::from_parts(&req, &body);
5016 svc.list_subaccount_members(ctx, req)
5017 .await?
5018 .encode::<
5019 crate::proto::auth::v1::ListSubaccountMembersResponse,
5020 >(format)
5021 })
5022 }
5023 "RemoveSubaccountMember" => {
5024 let svc = ::std::sync::Arc::clone(&self.inner);
5025 Box::pin(async move {
5026 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5027 crate::proto::auth::v1::RemoveSubaccountMemberRequest,
5028 >(request.encoded()?, format)?;
5029 let req: crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberRequestView<
5030 '_,
5031 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5032 &body,
5033 )?;
5034 let req = ::connectrpc::ServiceRequest::<
5035 crate::proto::auth::v1::RemoveSubaccountMemberRequest,
5036 >::from_parts(&req, &body);
5037 svc.remove_subaccount_member(ctx, req)
5038 .await?
5039 .encode::<
5040 crate::proto::auth::v1::RemoveSubaccountMemberResponse,
5041 >(format)
5042 })
5043 }
5044 "UpdateSubaccountMemberRole" => {
5045 let svc = ::std::sync::Arc::clone(&self.inner);
5046 Box::pin(async move {
5047 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5048 crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
5049 >(request.encoded()?, format)?;
5050 let req: crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleRequestView<
5051 '_,
5052 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5053 &body,
5054 )?;
5055 let req = ::connectrpc::ServiceRequest::<
5056 crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
5057 >::from_parts(&req, &body);
5058 svc.update_subaccount_member_role(ctx, req)
5059 .await?
5060 .encode::<
5061 crate::proto::auth::v1::UpdateSubaccountMemberRoleResponse,
5062 >(format)
5063 })
5064 }
5065 "InviteSubaccountMember" => {
5066 let svc = ::std::sync::Arc::clone(&self.inner);
5067 Box::pin(async move {
5068 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5069 crate::proto::auth::v1::InviteSubaccountMemberRequest,
5070 >(request.encoded()?, format)?;
5071 let req: crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberRequestView<
5072 '_,
5073 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5074 &body,
5075 )?;
5076 let req = ::connectrpc::ServiceRequest::<
5077 crate::proto::auth::v1::InviteSubaccountMemberRequest,
5078 >::from_parts(&req, &body);
5079 svc.invite_subaccount_member(ctx, req)
5080 .await?
5081 .encode::<
5082 crate::proto::auth::v1::InviteSubaccountMemberResponse,
5083 >(format)
5084 })
5085 }
5086 "ListSubaccountInvites" => {
5087 let svc = ::std::sync::Arc::clone(&self.inner);
5088 Box::pin(async move {
5089 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5090 crate::proto::auth::v1::ListSubaccountInvitesRequest,
5091 >(request.encoded()?, format)?;
5092 let req: crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesRequestView<
5093 '_,
5094 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5095 &body,
5096 )?;
5097 let req = ::connectrpc::ServiceRequest::<
5098 crate::proto::auth::v1::ListSubaccountInvitesRequest,
5099 >::from_parts(&req, &body);
5100 svc.list_subaccount_invites(ctx, req)
5101 .await?
5102 .encode::<
5103 crate::proto::auth::v1::ListSubaccountInvitesResponse,
5104 >(format)
5105 })
5106 }
5107 "RespondSubaccountInvite" => {
5108 let svc = ::std::sync::Arc::clone(&self.inner);
5109 Box::pin(async move {
5110 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
5111 crate::proto::auth::v1::RespondSubaccountInviteRequest,
5112 >(request.encoded()?, format)?;
5113 let req: crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteRequestView<
5114 '_,
5115 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
5116 &body,
5117 )?;
5118 let req = ::connectrpc::ServiceRequest::<
5119 crate::proto::auth::v1::RespondSubaccountInviteRequest,
5120 >::from_parts(&req, &body);
5121 svc.respond_subaccount_invite(ctx, req)
5122 .await?
5123 .encode::<
5124 crate::proto::auth::v1::RespondSubaccountInviteResponse,
5125 >(format)
5126 })
5127 }
5128 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
5129 }
5130 }
5131 fn call_server_streaming(
5132 &self,
5133 path: &str,
5134 ctx: ::connectrpc::RequestContext,
5135 request: ::buffa::bytes::Bytes,
5136 format: ::connectrpc::CodecFormat,
5137 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
5138 let Some(method) = path.strip_prefix("auth.v1.SubaccountService/") else {
5139 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
5140 };
5141 let _ = (&ctx, &request, &format);
5142 match method {
5143 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
5144 }
5145 }
5146 fn call_client_streaming(
5147 &self,
5148 path: &str,
5149 ctx: ::connectrpc::RequestContext,
5150 requests: ::connectrpc::dispatcher::codegen::RequestStream,
5151 format: ::connectrpc::CodecFormat,
5152 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
5153 let Some(method) = path.strip_prefix("auth.v1.SubaccountService/") else {
5154 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
5155 };
5156 let _ = (&ctx, &requests, &format);
5157 match method {
5158 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
5159 }
5160 }
5161 fn call_bidi_streaming(
5162 &self,
5163 path: &str,
5164 ctx: ::connectrpc::RequestContext,
5165 requests: ::connectrpc::dispatcher::codegen::RequestStream,
5166 format: ::connectrpc::CodecFormat,
5167 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
5168 let Some(method) = path.strip_prefix("auth.v1.SubaccountService/") else {
5169 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
5170 };
5171 let _ = (&ctx, &requests, &format);
5172 match method {
5173 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
5174 }
5175 }
5176}
5177#[derive(Clone)]
5209pub struct SubaccountServiceClient<T> {
5210 transport: T,
5211 config: ::connectrpc::client::ClientConfig,
5212}
5213impl<T> SubaccountServiceClient<T>
5214where
5215 T: ::connectrpc::client::ClientTransport,
5216 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
5217{
5218 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
5220 Self { transport, config }
5221 }
5222 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
5224 &self.config
5225 }
5226 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
5228 &mut self.config
5229 }
5230 pub async fn list_subaccounts(
5232 &self,
5233 request: crate::proto::auth::v1::ListSubaccountsRequest,
5234 ) -> Result<
5235 ::connectrpc::client::UnaryResponse<
5236 ::buffa::view::OwnedView<
5237 crate::proto::auth::v1::__buffa::view::ListSubaccountsResponseView<
5238 'static,
5239 >,
5240 >,
5241 >,
5242 ::connectrpc::ConnectError,
5243 > {
5244 self.list_subaccounts_with_options(
5245 request,
5246 ::connectrpc::client::CallOptions::default(),
5247 )
5248 .await
5249 }
5250 pub async fn list_subaccounts_with_options(
5252 &self,
5253 request: crate::proto::auth::v1::ListSubaccountsRequest,
5254 options: ::connectrpc::client::CallOptions,
5255 ) -> Result<
5256 ::connectrpc::client::UnaryResponse<
5257 ::buffa::view::OwnedView<
5258 crate::proto::auth::v1::__buffa::view::ListSubaccountsResponseView<
5259 'static,
5260 >,
5261 >,
5262 >,
5263 ::connectrpc::ConnectError,
5264 > {
5265 ::connectrpc::client::call_unary(
5266 &self.transport,
5267 &self.config,
5268 SUBACCOUNT_SERVICE_SERVICE_NAME,
5269 "ListSubaccounts",
5270 request,
5271 options,
5272 )
5273 .await
5274 }
5275 pub async fn create_subaccount(
5277 &self,
5278 request: crate::proto::auth::v1::CreateSubaccountRequest,
5279 ) -> Result<
5280 ::connectrpc::client::UnaryResponse<
5281 ::buffa::view::OwnedView<
5282 crate::proto::auth::v1::__buffa::view::CreateSubaccountResponseView<
5283 'static,
5284 >,
5285 >,
5286 >,
5287 ::connectrpc::ConnectError,
5288 > {
5289 self.create_subaccount_with_options(
5290 request,
5291 ::connectrpc::client::CallOptions::default(),
5292 )
5293 .await
5294 }
5295 pub async fn create_subaccount_with_options(
5297 &self,
5298 request: crate::proto::auth::v1::CreateSubaccountRequest,
5299 options: ::connectrpc::client::CallOptions,
5300 ) -> Result<
5301 ::connectrpc::client::UnaryResponse<
5302 ::buffa::view::OwnedView<
5303 crate::proto::auth::v1::__buffa::view::CreateSubaccountResponseView<
5304 'static,
5305 >,
5306 >,
5307 >,
5308 ::connectrpc::ConnectError,
5309 > {
5310 ::connectrpc::client::call_unary(
5311 &self.transport,
5312 &self.config,
5313 SUBACCOUNT_SERVICE_SERVICE_NAME,
5314 "CreateSubaccount",
5315 request,
5316 options,
5317 )
5318 .await
5319 }
5320 pub async fn update_subaccount(
5322 &self,
5323 request: crate::proto::auth::v1::UpdateSubaccountRequest,
5324 ) -> Result<
5325 ::connectrpc::client::UnaryResponse<
5326 ::buffa::view::OwnedView<
5327 crate::proto::auth::v1::__buffa::view::UpdateSubaccountResponseView<
5328 'static,
5329 >,
5330 >,
5331 >,
5332 ::connectrpc::ConnectError,
5333 > {
5334 self.update_subaccount_with_options(
5335 request,
5336 ::connectrpc::client::CallOptions::default(),
5337 )
5338 .await
5339 }
5340 pub async fn update_subaccount_with_options(
5342 &self,
5343 request: crate::proto::auth::v1::UpdateSubaccountRequest,
5344 options: ::connectrpc::client::CallOptions,
5345 ) -> Result<
5346 ::connectrpc::client::UnaryResponse<
5347 ::buffa::view::OwnedView<
5348 crate::proto::auth::v1::__buffa::view::UpdateSubaccountResponseView<
5349 'static,
5350 >,
5351 >,
5352 >,
5353 ::connectrpc::ConnectError,
5354 > {
5355 ::connectrpc::client::call_unary(
5356 &self.transport,
5357 &self.config,
5358 SUBACCOUNT_SERVICE_SERVICE_NAME,
5359 "UpdateSubaccount",
5360 request,
5361 options,
5362 )
5363 .await
5364 }
5365 pub async fn set_subaccount_member_mfa_requirement(
5367 &self,
5368 request: crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
5369 ) -> Result<
5370 ::connectrpc::client::UnaryResponse<
5371 ::buffa::view::OwnedView<
5372 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementResponseView<
5373 'static,
5374 >,
5375 >,
5376 >,
5377 ::connectrpc::ConnectError,
5378 > {
5379 self.set_subaccount_member_mfa_requirement_with_options(
5380 request,
5381 ::connectrpc::client::CallOptions::default(),
5382 )
5383 .await
5384 }
5385 pub async fn set_subaccount_member_mfa_requirement_with_options(
5387 &self,
5388 request: crate::proto::auth::v1::SetSubaccountMemberMFARequirementRequest,
5389 options: ::connectrpc::client::CallOptions,
5390 ) -> Result<
5391 ::connectrpc::client::UnaryResponse<
5392 ::buffa::view::OwnedView<
5393 crate::proto::auth::v1::__buffa::view::SetSubaccountMemberMFARequirementResponseView<
5394 'static,
5395 >,
5396 >,
5397 >,
5398 ::connectrpc::ConnectError,
5399 > {
5400 ::connectrpc::client::call_unary(
5401 &self.transport,
5402 &self.config,
5403 SUBACCOUNT_SERVICE_SERVICE_NAME,
5404 "SetSubaccountMemberMFARequirement",
5405 request,
5406 options,
5407 )
5408 .await
5409 }
5410 pub async fn list_subaccount_members(
5412 &self,
5413 request: crate::proto::auth::v1::ListSubaccountMembersRequest,
5414 ) -> Result<
5415 ::connectrpc::client::UnaryResponse<
5416 ::buffa::view::OwnedView<
5417 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersResponseView<
5418 'static,
5419 >,
5420 >,
5421 >,
5422 ::connectrpc::ConnectError,
5423 > {
5424 self.list_subaccount_members_with_options(
5425 request,
5426 ::connectrpc::client::CallOptions::default(),
5427 )
5428 .await
5429 }
5430 pub async fn list_subaccount_members_with_options(
5432 &self,
5433 request: crate::proto::auth::v1::ListSubaccountMembersRequest,
5434 options: ::connectrpc::client::CallOptions,
5435 ) -> Result<
5436 ::connectrpc::client::UnaryResponse<
5437 ::buffa::view::OwnedView<
5438 crate::proto::auth::v1::__buffa::view::ListSubaccountMembersResponseView<
5439 'static,
5440 >,
5441 >,
5442 >,
5443 ::connectrpc::ConnectError,
5444 > {
5445 ::connectrpc::client::call_unary(
5446 &self.transport,
5447 &self.config,
5448 SUBACCOUNT_SERVICE_SERVICE_NAME,
5449 "ListSubaccountMembers",
5450 request,
5451 options,
5452 )
5453 .await
5454 }
5455 pub async fn remove_subaccount_member(
5457 &self,
5458 request: crate::proto::auth::v1::RemoveSubaccountMemberRequest,
5459 ) -> Result<
5460 ::connectrpc::client::UnaryResponse<
5461 ::buffa::view::OwnedView<
5462 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberResponseView<
5463 'static,
5464 >,
5465 >,
5466 >,
5467 ::connectrpc::ConnectError,
5468 > {
5469 self.remove_subaccount_member_with_options(
5470 request,
5471 ::connectrpc::client::CallOptions::default(),
5472 )
5473 .await
5474 }
5475 pub async fn remove_subaccount_member_with_options(
5477 &self,
5478 request: crate::proto::auth::v1::RemoveSubaccountMemberRequest,
5479 options: ::connectrpc::client::CallOptions,
5480 ) -> Result<
5481 ::connectrpc::client::UnaryResponse<
5482 ::buffa::view::OwnedView<
5483 crate::proto::auth::v1::__buffa::view::RemoveSubaccountMemberResponseView<
5484 'static,
5485 >,
5486 >,
5487 >,
5488 ::connectrpc::ConnectError,
5489 > {
5490 ::connectrpc::client::call_unary(
5491 &self.transport,
5492 &self.config,
5493 SUBACCOUNT_SERVICE_SERVICE_NAME,
5494 "RemoveSubaccountMember",
5495 request,
5496 options,
5497 )
5498 .await
5499 }
5500 pub async fn update_subaccount_member_role(
5502 &self,
5503 request: crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
5504 ) -> Result<
5505 ::connectrpc::client::UnaryResponse<
5506 ::buffa::view::OwnedView<
5507 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleResponseView<
5508 'static,
5509 >,
5510 >,
5511 >,
5512 ::connectrpc::ConnectError,
5513 > {
5514 self.update_subaccount_member_role_with_options(
5515 request,
5516 ::connectrpc::client::CallOptions::default(),
5517 )
5518 .await
5519 }
5520 pub async fn update_subaccount_member_role_with_options(
5522 &self,
5523 request: crate::proto::auth::v1::UpdateSubaccountMemberRoleRequest,
5524 options: ::connectrpc::client::CallOptions,
5525 ) -> Result<
5526 ::connectrpc::client::UnaryResponse<
5527 ::buffa::view::OwnedView<
5528 crate::proto::auth::v1::__buffa::view::UpdateSubaccountMemberRoleResponseView<
5529 'static,
5530 >,
5531 >,
5532 >,
5533 ::connectrpc::ConnectError,
5534 > {
5535 ::connectrpc::client::call_unary(
5536 &self.transport,
5537 &self.config,
5538 SUBACCOUNT_SERVICE_SERVICE_NAME,
5539 "UpdateSubaccountMemberRole",
5540 request,
5541 options,
5542 )
5543 .await
5544 }
5545 pub async fn invite_subaccount_member(
5547 &self,
5548 request: crate::proto::auth::v1::InviteSubaccountMemberRequest,
5549 ) -> Result<
5550 ::connectrpc::client::UnaryResponse<
5551 ::buffa::view::OwnedView<
5552 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberResponseView<
5553 'static,
5554 >,
5555 >,
5556 >,
5557 ::connectrpc::ConnectError,
5558 > {
5559 self.invite_subaccount_member_with_options(
5560 request,
5561 ::connectrpc::client::CallOptions::default(),
5562 )
5563 .await
5564 }
5565 pub async fn invite_subaccount_member_with_options(
5567 &self,
5568 request: crate::proto::auth::v1::InviteSubaccountMemberRequest,
5569 options: ::connectrpc::client::CallOptions,
5570 ) -> Result<
5571 ::connectrpc::client::UnaryResponse<
5572 ::buffa::view::OwnedView<
5573 crate::proto::auth::v1::__buffa::view::InviteSubaccountMemberResponseView<
5574 'static,
5575 >,
5576 >,
5577 >,
5578 ::connectrpc::ConnectError,
5579 > {
5580 ::connectrpc::client::call_unary(
5581 &self.transport,
5582 &self.config,
5583 SUBACCOUNT_SERVICE_SERVICE_NAME,
5584 "InviteSubaccountMember",
5585 request,
5586 options,
5587 )
5588 .await
5589 }
5590 pub async fn list_subaccount_invites(
5592 &self,
5593 request: crate::proto::auth::v1::ListSubaccountInvitesRequest,
5594 ) -> Result<
5595 ::connectrpc::client::UnaryResponse<
5596 ::buffa::view::OwnedView<
5597 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesResponseView<
5598 'static,
5599 >,
5600 >,
5601 >,
5602 ::connectrpc::ConnectError,
5603 > {
5604 self.list_subaccount_invites_with_options(
5605 request,
5606 ::connectrpc::client::CallOptions::default(),
5607 )
5608 .await
5609 }
5610 pub async fn list_subaccount_invites_with_options(
5612 &self,
5613 request: crate::proto::auth::v1::ListSubaccountInvitesRequest,
5614 options: ::connectrpc::client::CallOptions,
5615 ) -> Result<
5616 ::connectrpc::client::UnaryResponse<
5617 ::buffa::view::OwnedView<
5618 crate::proto::auth::v1::__buffa::view::ListSubaccountInvitesResponseView<
5619 'static,
5620 >,
5621 >,
5622 >,
5623 ::connectrpc::ConnectError,
5624 > {
5625 ::connectrpc::client::call_unary(
5626 &self.transport,
5627 &self.config,
5628 SUBACCOUNT_SERVICE_SERVICE_NAME,
5629 "ListSubaccountInvites",
5630 request,
5631 options,
5632 )
5633 .await
5634 }
5635 pub async fn respond_subaccount_invite(
5637 &self,
5638 request: crate::proto::auth::v1::RespondSubaccountInviteRequest,
5639 ) -> Result<
5640 ::connectrpc::client::UnaryResponse<
5641 ::buffa::view::OwnedView<
5642 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteResponseView<
5643 'static,
5644 >,
5645 >,
5646 >,
5647 ::connectrpc::ConnectError,
5648 > {
5649 self.respond_subaccount_invite_with_options(
5650 request,
5651 ::connectrpc::client::CallOptions::default(),
5652 )
5653 .await
5654 }
5655 pub async fn respond_subaccount_invite_with_options(
5657 &self,
5658 request: crate::proto::auth::v1::RespondSubaccountInviteRequest,
5659 options: ::connectrpc::client::CallOptions,
5660 ) -> Result<
5661 ::connectrpc::client::UnaryResponse<
5662 ::buffa::view::OwnedView<
5663 crate::proto::auth::v1::__buffa::view::RespondSubaccountInviteResponseView<
5664 'static,
5665 >,
5666 >,
5667 >,
5668 ::connectrpc::ConnectError,
5669 > {
5670 ::connectrpc::client::call_unary(
5671 &self.transport,
5672 &self.config,
5673 SUBACCOUNT_SERVICE_SERVICE_NAME,
5674 "RespondSubaccountInvite",
5675 request,
5676 options,
5677 )
5678 .await
5679 }
5680}
5681
5682pub type OwnedListAddressBooksRequestView = ::buffa::view::OwnedView<
5684 crate::proto::auth::v1::__buffa::view::ListAddressBooksRequestView<'static>,
5685>;
5686pub type OwnedListAddressBooksResponseView = ::buffa::view::OwnedView<
5688 crate::proto::auth::v1::__buffa::view::ListAddressBooksResponseView<'static>,
5689>;
5690pub type OwnedListAddressBookEntriesRequestView = ::buffa::view::OwnedView<
5692 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesRequestView<'static>,
5693>;
5694pub type OwnedListAddressBookEntriesResponseView = ::buffa::view::OwnedView<
5696 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesResponseView<'static>,
5697>;
5698pub type OwnedCreateAddressBookEntryRequestView = ::buffa::view::OwnedView<
5700 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryRequestView<'static>,
5701>;
5702pub type OwnedCreateAddressBookEntryResponseView = ::buffa::view::OwnedView<
5704 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryResponseView<'static>,
5705>;
5706pub type OwnedUpdateAddressBookEntryRequestView = ::buffa::view::OwnedView<
5708 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryRequestView<'static>,
5709>;
5710pub type OwnedUpdateAddressBookEntryResponseView = ::buffa::view::OwnedView<
5712 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryResponseView<'static>,
5713>;
5714pub type OwnedDeleteAddressBookEntryRequestView = ::buffa::view::OwnedView<
5716 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryRequestView<'static>,
5717>;
5718pub type OwnedDeleteAddressBookEntryResponseView = ::buffa::view::OwnedView<
5720 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryResponseView<'static>,
5721>;
5722pub type OwnedCopyAddressBookEntryRequestView = ::buffa::view::OwnedView<
5724 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryRequestView<'static>,
5725>;
5726pub type OwnedCopyAddressBookEntryResponseView = ::buffa::view::OwnedView<
5728 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryResponseView<'static>,
5729>;
5730pub type OwnedCreateAddressBookTagRequestView = ::buffa::view::OwnedView<
5732 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagRequestView<'static>,
5733>;
5734pub type OwnedCreateAddressBookTagResponseView = ::buffa::view::OwnedView<
5736 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagResponseView<'static>,
5737>;
5738pub type OwnedUpdateAddressBookTagRequestView = ::buffa::view::OwnedView<
5740 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagRequestView<'static>,
5741>;
5742pub type OwnedUpdateAddressBookTagResponseView = ::buffa::view::OwnedView<
5744 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagResponseView<'static>,
5745>;
5746pub type OwnedDeleteAddressBookTagRequestView = ::buffa::view::OwnedView<
5748 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagRequestView<'static>,
5749>;
5750pub type OwnedDeleteAddressBookTagResponseView = ::buffa::view::OwnedView<
5752 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagResponseView<'static>,
5753>;
5754pub type OwnedListTransferCounterpartiesRequestView = ::buffa::view::OwnedView<
5756 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesRequestView<'static>,
5757>;
5758pub type OwnedListTransferCounterpartiesResponseView = ::buffa::view::OwnedView<
5760 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesResponseView<
5761 'static,
5762 >,
5763>;
5764pub type OwnedListTransferDestinationsRequestView = ::buffa::view::OwnedView<
5766 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsRequestView<'static>,
5767>;
5768pub type OwnedListTransferDestinationsResponseView = ::buffa::view::OwnedView<
5770 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsResponseView<'static>,
5771>;
5772pub type OwnedListInternalTransferWhitelistEntriesRequestView = ::buffa::view::OwnedView<
5774 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesRequestView<
5775 'static,
5776 >,
5777>;
5778pub type OwnedListInternalTransferWhitelistEntriesResponseView = ::buffa::view::OwnedView<
5780 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesResponseView<
5781 'static,
5782 >,
5783>;
5784pub type OwnedGetWithdrawWhitelistViewRequestView = ::buffa::view::OwnedView<
5786 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewRequestView<'static>,
5787>;
5788pub type OwnedGetWithdrawWhitelistViewResponseView = ::buffa::view::OwnedView<
5790 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewResponseView<'static>,
5791>;
5792pub type OwnedGetAddressBookViewRequestView = ::buffa::view::OwnedView<
5794 crate::proto::auth::v1::__buffa::view::GetAddressBookViewRequestView<'static>,
5795>;
5796pub type OwnedGetAddressBookViewResponseView = ::buffa::view::OwnedView<
5798 crate::proto::auth::v1::__buffa::view::GetAddressBookViewResponseView<'static>,
5799>;
5800impl ::connectrpc::Encodable<crate::proto::auth::v1::ListAddressBooksResponse>
5801for crate::proto::auth::v1::__buffa::view::ListAddressBooksResponseView<'_> {
5802 fn encode(
5803 &self,
5804 codec: ::connectrpc::CodecFormat,
5805 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5806 ::connectrpc::__codegen::encode_view_body(self, codec)
5807 }
5808}
5809impl ::connectrpc::Encodable<crate::proto::auth::v1::ListAddressBooksResponse>
5810for ::buffa::view::OwnedView<
5811 crate::proto::auth::v1::__buffa::view::ListAddressBooksResponseView<'static>,
5812> {
5813 fn encode(
5814 &self,
5815 codec: ::connectrpc::CodecFormat,
5816 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5817 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5818 }
5819}
5820impl ::connectrpc::Encodable<crate::proto::auth::v1::ListAddressBookEntriesResponse>
5821for crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesResponseView<'_> {
5822 fn encode(
5823 &self,
5824 codec: ::connectrpc::CodecFormat,
5825 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5826 ::connectrpc::__codegen::encode_view_body(self, codec)
5827 }
5828}
5829impl ::connectrpc::Encodable<crate::proto::auth::v1::ListAddressBookEntriesResponse>
5830for ::buffa::view::OwnedView<
5831 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesResponseView<'static>,
5832> {
5833 fn encode(
5834 &self,
5835 codec: ::connectrpc::CodecFormat,
5836 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5837 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5838 }
5839}
5840impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateAddressBookEntryResponse>
5841for crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryResponseView<'_> {
5842 fn encode(
5843 &self,
5844 codec: ::connectrpc::CodecFormat,
5845 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5846 ::connectrpc::__codegen::encode_view_body(self, codec)
5847 }
5848}
5849impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateAddressBookEntryResponse>
5850for ::buffa::view::OwnedView<
5851 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryResponseView<'static>,
5852> {
5853 fn encode(
5854 &self,
5855 codec: ::connectrpc::CodecFormat,
5856 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5857 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5858 }
5859}
5860impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateAddressBookEntryResponse>
5861for crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryResponseView<'_> {
5862 fn encode(
5863 &self,
5864 codec: ::connectrpc::CodecFormat,
5865 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5866 ::connectrpc::__codegen::encode_view_body(self, codec)
5867 }
5868}
5869impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateAddressBookEntryResponse>
5870for ::buffa::view::OwnedView<
5871 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryResponseView<'static>,
5872> {
5873 fn encode(
5874 &self,
5875 codec: ::connectrpc::CodecFormat,
5876 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5877 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5878 }
5879}
5880impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteAddressBookEntryResponse>
5881for crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryResponseView<'_> {
5882 fn encode(
5883 &self,
5884 codec: ::connectrpc::CodecFormat,
5885 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5886 ::connectrpc::__codegen::encode_view_body(self, codec)
5887 }
5888}
5889impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteAddressBookEntryResponse>
5890for ::buffa::view::OwnedView<
5891 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryResponseView<'static>,
5892> {
5893 fn encode(
5894 &self,
5895 codec: ::connectrpc::CodecFormat,
5896 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5897 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5898 }
5899}
5900impl ::connectrpc::Encodable<crate::proto::auth::v1::CopyAddressBookEntryResponse>
5901for crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryResponseView<'_> {
5902 fn encode(
5903 &self,
5904 codec: ::connectrpc::CodecFormat,
5905 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5906 ::connectrpc::__codegen::encode_view_body(self, codec)
5907 }
5908}
5909impl ::connectrpc::Encodable<crate::proto::auth::v1::CopyAddressBookEntryResponse>
5910for ::buffa::view::OwnedView<
5911 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryResponseView<'static>,
5912> {
5913 fn encode(
5914 &self,
5915 codec: ::connectrpc::CodecFormat,
5916 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5917 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5918 }
5919}
5920impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateAddressBookTagResponse>
5921for crate::proto::auth::v1::__buffa::view::CreateAddressBookTagResponseView<'_> {
5922 fn encode(
5923 &self,
5924 codec: ::connectrpc::CodecFormat,
5925 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5926 ::connectrpc::__codegen::encode_view_body(self, codec)
5927 }
5928}
5929impl ::connectrpc::Encodable<crate::proto::auth::v1::CreateAddressBookTagResponse>
5930for ::buffa::view::OwnedView<
5931 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagResponseView<'static>,
5932> {
5933 fn encode(
5934 &self,
5935 codec: ::connectrpc::CodecFormat,
5936 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5937 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5938 }
5939}
5940impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateAddressBookTagResponse>
5941for crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagResponseView<'_> {
5942 fn encode(
5943 &self,
5944 codec: ::connectrpc::CodecFormat,
5945 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5946 ::connectrpc::__codegen::encode_view_body(self, codec)
5947 }
5948}
5949impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateAddressBookTagResponse>
5950for ::buffa::view::OwnedView<
5951 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagResponseView<'static>,
5952> {
5953 fn encode(
5954 &self,
5955 codec: ::connectrpc::CodecFormat,
5956 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5957 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5958 }
5959}
5960impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteAddressBookTagResponse>
5961for crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagResponseView<'_> {
5962 fn encode(
5963 &self,
5964 codec: ::connectrpc::CodecFormat,
5965 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5966 ::connectrpc::__codegen::encode_view_body(self, codec)
5967 }
5968}
5969impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteAddressBookTagResponse>
5970for ::buffa::view::OwnedView<
5971 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagResponseView<'static>,
5972> {
5973 fn encode(
5974 &self,
5975 codec: ::connectrpc::CodecFormat,
5976 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5977 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
5978 }
5979}
5980impl ::connectrpc::Encodable<crate::proto::auth::v1::ListTransferCounterpartiesResponse>
5981for crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesResponseView<'_> {
5982 fn encode(
5983 &self,
5984 codec: ::connectrpc::CodecFormat,
5985 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5986 ::connectrpc::__codegen::encode_view_body(self, codec)
5987 }
5988}
5989impl ::connectrpc::Encodable<crate::proto::auth::v1::ListTransferCounterpartiesResponse>
5990for ::buffa::view::OwnedView<
5991 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesResponseView<
5992 'static,
5993 >,
5994> {
5995 fn encode(
5996 &self,
5997 codec: ::connectrpc::CodecFormat,
5998 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
5999 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
6000 }
6001}
6002impl ::connectrpc::Encodable<crate::proto::auth::v1::ListTransferDestinationsResponse>
6003for crate::proto::auth::v1::__buffa::view::ListTransferDestinationsResponseView<'_> {
6004 fn encode(
6005 &self,
6006 codec: ::connectrpc::CodecFormat,
6007 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6008 ::connectrpc::__codegen::encode_view_body(self, codec)
6009 }
6010}
6011impl ::connectrpc::Encodable<crate::proto::auth::v1::ListTransferDestinationsResponse>
6012for ::buffa::view::OwnedView<
6013 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsResponseView<'static>,
6014> {
6015 fn encode(
6016 &self,
6017 codec: ::connectrpc::CodecFormat,
6018 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6019 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
6020 }
6021}
6022impl ::connectrpc::Encodable<
6023 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesResponse,
6024>
6025for crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesResponseView<
6026 '_,
6027> {
6028 fn encode(
6029 &self,
6030 codec: ::connectrpc::CodecFormat,
6031 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6032 ::connectrpc::__codegen::encode_view_body(self, codec)
6033 }
6034}
6035impl ::connectrpc::Encodable<
6036 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesResponse,
6037>
6038for ::buffa::view::OwnedView<
6039 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesResponseView<
6040 'static,
6041 >,
6042> {
6043 fn encode(
6044 &self,
6045 codec: ::connectrpc::CodecFormat,
6046 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6047 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
6048 }
6049}
6050impl ::connectrpc::Encodable<crate::proto::auth::v1::GetWithdrawWhitelistViewResponse>
6051for crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewResponseView<'_> {
6052 fn encode(
6053 &self,
6054 codec: ::connectrpc::CodecFormat,
6055 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6056 ::connectrpc::__codegen::encode_view_body(self, codec)
6057 }
6058}
6059impl ::connectrpc::Encodable<crate::proto::auth::v1::GetWithdrawWhitelistViewResponse>
6060for ::buffa::view::OwnedView<
6061 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewResponseView<'static>,
6062> {
6063 fn encode(
6064 &self,
6065 codec: ::connectrpc::CodecFormat,
6066 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6067 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
6068 }
6069}
6070impl ::connectrpc::Encodable<crate::proto::auth::v1::GetAddressBookViewResponse>
6071for crate::proto::auth::v1::__buffa::view::GetAddressBookViewResponseView<'_> {
6072 fn encode(
6073 &self,
6074 codec: ::connectrpc::CodecFormat,
6075 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6076 ::connectrpc::__codegen::encode_view_body(self, codec)
6077 }
6078}
6079impl ::connectrpc::Encodable<crate::proto::auth::v1::GetAddressBookViewResponse>
6080for ::buffa::view::OwnedView<
6081 crate::proto::auth::v1::__buffa::view::GetAddressBookViewResponseView<'static>,
6082> {
6083 fn encode(
6084 &self,
6085 codec: ::connectrpc::CodecFormat,
6086 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
6087 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
6088 }
6089}
6090pub const ADDRESS_BOOK_SERVICE_SERVICE_NAME: &str = "auth.v1.AddressBookService";
6092pub const ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOKS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6097 "/auth.v1.AddressBookService/ListAddressBooks",
6098 ::connectrpc::StreamType::Unary,
6099 )
6100 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6101pub const ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOK_ENTRIES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6106 "/auth.v1.AddressBookService/ListAddressBookEntries",
6107 ::connectrpc::StreamType::Unary,
6108 )
6109 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6110pub const ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_ENTRY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6115 "/auth.v1.AddressBookService/CreateAddressBookEntry",
6116 ::connectrpc::StreamType::Unary,
6117 )
6118 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6119pub const ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_ENTRY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6124 "/auth.v1.AddressBookService/UpdateAddressBookEntry",
6125 ::connectrpc::StreamType::Unary,
6126 )
6127 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6128pub const ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_ENTRY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6133 "/auth.v1.AddressBookService/DeleteAddressBookEntry",
6134 ::connectrpc::StreamType::Unary,
6135 )
6136 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6137pub const ADDRESS_BOOK_SERVICE_COPY_ADDRESS_BOOK_ENTRY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6142 "/auth.v1.AddressBookService/CopyAddressBookEntry",
6143 ::connectrpc::StreamType::Unary,
6144 )
6145 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6146pub const ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_TAG_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6151 "/auth.v1.AddressBookService/CreateAddressBookTag",
6152 ::connectrpc::StreamType::Unary,
6153 )
6154 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6155pub const ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_TAG_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6160 "/auth.v1.AddressBookService/UpdateAddressBookTag",
6161 ::connectrpc::StreamType::Unary,
6162 )
6163 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6164pub const ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_TAG_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6169 "/auth.v1.AddressBookService/DeleteAddressBookTag",
6170 ::connectrpc::StreamType::Unary,
6171 )
6172 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6173pub const ADDRESS_BOOK_SERVICE_LIST_TRANSFER_COUNTERPARTIES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6178 "/auth.v1.AddressBookService/ListTransferCounterparties",
6179 ::connectrpc::StreamType::Unary,
6180 )
6181 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6182pub const ADDRESS_BOOK_SERVICE_LIST_TRANSFER_DESTINATIONS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6187 "/auth.v1.AddressBookService/ListTransferDestinations",
6188 ::connectrpc::StreamType::Unary,
6189 )
6190 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6191pub const ADDRESS_BOOK_SERVICE_LIST_INTERNAL_TRANSFER_WHITELIST_ENTRIES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6196 "/auth.v1.AddressBookService/ListInternalTransferWhitelistEntries",
6197 ::connectrpc::StreamType::Unary,
6198 )
6199 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6200pub const ADDRESS_BOOK_SERVICE_GET_WITHDRAW_WHITELIST_VIEW_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6205 "/auth.v1.AddressBookService/GetWithdrawWhitelistView",
6206 ::connectrpc::StreamType::Unary,
6207 )
6208 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6209pub const ADDRESS_BOOK_SERVICE_GET_ADDRESS_BOOK_VIEW_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
6214 "/auth.v1.AddressBookService/GetAddressBookView",
6215 ::connectrpc::StreamType::Unary,
6216 )
6217 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
6218#[allow(clippy::type_complexity)]
6268pub trait AddressBookService: Send + Sync + 'static {
6269 fn list_address_books<'a>(
6279 &'a self,
6280 ctx: ::connectrpc::RequestContext,
6281 request: ::connectrpc::ServiceRequest<
6282 '_,
6283 crate::proto::auth::v1::ListAddressBooksRequest,
6284 >,
6285 ) -> impl ::std::future::Future<
6286 Output = ::connectrpc::ServiceResult<
6287 impl ::connectrpc::Encodable<
6288 crate::proto::auth::v1::ListAddressBooksResponse,
6289 > + Send + use<'a, Self>,
6290 >,
6291 > + Send;
6292 fn list_address_book_entries<'a>(
6302 &'a self,
6303 ctx: ::connectrpc::RequestContext,
6304 request: ::connectrpc::ServiceRequest<
6305 '_,
6306 crate::proto::auth::v1::ListAddressBookEntriesRequest,
6307 >,
6308 ) -> impl ::std::future::Future<
6309 Output = ::connectrpc::ServiceResult<
6310 impl ::connectrpc::Encodable<
6311 crate::proto::auth::v1::ListAddressBookEntriesResponse,
6312 > + Send + use<'a, Self>,
6313 >,
6314 > + Send;
6315 fn create_address_book_entry<'a>(
6325 &'a self,
6326 ctx: ::connectrpc::RequestContext,
6327 request: ::connectrpc::ServiceRequest<
6328 '_,
6329 crate::proto::auth::v1::CreateAddressBookEntryRequest,
6330 >,
6331 ) -> impl ::std::future::Future<
6332 Output = ::connectrpc::ServiceResult<
6333 impl ::connectrpc::Encodable<
6334 crate::proto::auth::v1::CreateAddressBookEntryResponse,
6335 > + Send + use<'a, Self>,
6336 >,
6337 > + Send;
6338 fn update_address_book_entry<'a>(
6348 &'a self,
6349 ctx: ::connectrpc::RequestContext,
6350 request: ::connectrpc::ServiceRequest<
6351 '_,
6352 crate::proto::auth::v1::UpdateAddressBookEntryRequest,
6353 >,
6354 ) -> impl ::std::future::Future<
6355 Output = ::connectrpc::ServiceResult<
6356 impl ::connectrpc::Encodable<
6357 crate::proto::auth::v1::UpdateAddressBookEntryResponse,
6358 > + Send + use<'a, Self>,
6359 >,
6360 > + Send;
6361 fn delete_address_book_entry<'a>(
6371 &'a self,
6372 ctx: ::connectrpc::RequestContext,
6373 request: ::connectrpc::ServiceRequest<
6374 '_,
6375 crate::proto::auth::v1::DeleteAddressBookEntryRequest,
6376 >,
6377 ) -> impl ::std::future::Future<
6378 Output = ::connectrpc::ServiceResult<
6379 impl ::connectrpc::Encodable<
6380 crate::proto::auth::v1::DeleteAddressBookEntryResponse,
6381 > + Send + use<'a, Self>,
6382 >,
6383 > + Send;
6384 fn copy_address_book_entry<'a>(
6394 &'a self,
6395 ctx: ::connectrpc::RequestContext,
6396 request: ::connectrpc::ServiceRequest<
6397 '_,
6398 crate::proto::auth::v1::CopyAddressBookEntryRequest,
6399 >,
6400 ) -> impl ::std::future::Future<
6401 Output = ::connectrpc::ServiceResult<
6402 impl ::connectrpc::Encodable<
6403 crate::proto::auth::v1::CopyAddressBookEntryResponse,
6404 > + Send + use<'a, Self>,
6405 >,
6406 > + Send;
6407 fn create_address_book_tag<'a>(
6417 &'a self,
6418 ctx: ::connectrpc::RequestContext,
6419 request: ::connectrpc::ServiceRequest<
6420 '_,
6421 crate::proto::auth::v1::CreateAddressBookTagRequest,
6422 >,
6423 ) -> impl ::std::future::Future<
6424 Output = ::connectrpc::ServiceResult<
6425 impl ::connectrpc::Encodable<
6426 crate::proto::auth::v1::CreateAddressBookTagResponse,
6427 > + Send + use<'a, Self>,
6428 >,
6429 > + Send;
6430 fn update_address_book_tag<'a>(
6440 &'a self,
6441 ctx: ::connectrpc::RequestContext,
6442 request: ::connectrpc::ServiceRequest<
6443 '_,
6444 crate::proto::auth::v1::UpdateAddressBookTagRequest,
6445 >,
6446 ) -> impl ::std::future::Future<
6447 Output = ::connectrpc::ServiceResult<
6448 impl ::connectrpc::Encodable<
6449 crate::proto::auth::v1::UpdateAddressBookTagResponse,
6450 > + Send + use<'a, Self>,
6451 >,
6452 > + Send;
6453 fn delete_address_book_tag<'a>(
6463 &'a self,
6464 ctx: ::connectrpc::RequestContext,
6465 request: ::connectrpc::ServiceRequest<
6466 '_,
6467 crate::proto::auth::v1::DeleteAddressBookTagRequest,
6468 >,
6469 ) -> impl ::std::future::Future<
6470 Output = ::connectrpc::ServiceResult<
6471 impl ::connectrpc::Encodable<
6472 crate::proto::auth::v1::DeleteAddressBookTagResponse,
6473 > + Send + use<'a, Self>,
6474 >,
6475 > + Send;
6476 fn list_transfer_counterparties<'a>(
6486 &'a self,
6487 ctx: ::connectrpc::RequestContext,
6488 request: ::connectrpc::ServiceRequest<
6489 '_,
6490 crate::proto::auth::v1::ListTransferCounterpartiesRequest,
6491 >,
6492 ) -> impl ::std::future::Future<
6493 Output = ::connectrpc::ServiceResult<
6494 impl ::connectrpc::Encodable<
6495 crate::proto::auth::v1::ListTransferCounterpartiesResponse,
6496 > + Send + use<'a, Self>,
6497 >,
6498 > + Send;
6499 fn list_transfer_destinations<'a>(
6509 &'a self,
6510 ctx: ::connectrpc::RequestContext,
6511 request: ::connectrpc::ServiceRequest<
6512 '_,
6513 crate::proto::auth::v1::ListTransferDestinationsRequest,
6514 >,
6515 ) -> impl ::std::future::Future<
6516 Output = ::connectrpc::ServiceResult<
6517 impl ::connectrpc::Encodable<
6518 crate::proto::auth::v1::ListTransferDestinationsResponse,
6519 > + Send + use<'a, Self>,
6520 >,
6521 > + Send;
6522 fn list_internal_transfer_whitelist_entries<'a>(
6532 &'a self,
6533 ctx: ::connectrpc::RequestContext,
6534 request: ::connectrpc::ServiceRequest<
6535 '_,
6536 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
6537 >,
6538 ) -> impl ::std::future::Future<
6539 Output = ::connectrpc::ServiceResult<
6540 impl ::connectrpc::Encodable<
6541 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesResponse,
6542 > + Send + use<'a, Self>,
6543 >,
6544 > + Send;
6545 fn get_withdraw_whitelist_view<'a>(
6555 &'a self,
6556 ctx: ::connectrpc::RequestContext,
6557 request: ::connectrpc::ServiceRequest<
6558 '_,
6559 crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
6560 >,
6561 ) -> impl ::std::future::Future<
6562 Output = ::connectrpc::ServiceResult<
6563 impl ::connectrpc::Encodable<
6564 crate::proto::auth::v1::GetWithdrawWhitelistViewResponse,
6565 > + Send + use<'a, Self>,
6566 >,
6567 > + Send;
6568 fn get_address_book_view<'a>(
6578 &'a self,
6579 ctx: ::connectrpc::RequestContext,
6580 request: ::connectrpc::ServiceRequest<
6581 '_,
6582 crate::proto::auth::v1::GetAddressBookViewRequest,
6583 >,
6584 ) -> impl ::std::future::Future<
6585 Output = ::connectrpc::ServiceResult<
6586 impl ::connectrpc::Encodable<
6587 crate::proto::auth::v1::GetAddressBookViewResponse,
6588 > + Send + use<'a, Self>,
6589 >,
6590 > + Send;
6591}
6592pub trait AddressBookServiceExt: AddressBookService {
6608 fn register(
6613 self: ::std::sync::Arc<Self>,
6614 router: ::connectrpc::Router,
6615 ) -> ::connectrpc::Router;
6616}
6617impl<S: AddressBookService> AddressBookServiceExt for S {
6618 fn register(
6619 self: ::std::sync::Arc<Self>,
6620 router: ::connectrpc::Router,
6621 ) -> ::connectrpc::Router {
6622 router
6623 .route_view(
6624 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6625 "ListAddressBooks",
6626 {
6627 let svc = ::std::sync::Arc::clone(&self);
6628 ::connectrpc::view_handler_fn(move |
6629 ctx,
6630 req: ::buffa::view::OwnedView<
6631 crate::proto::auth::v1::__buffa::view::ListAddressBooksRequestView<
6632 'static,
6633 >,
6634 >,
6635 format|
6636 {
6637 let svc = ::std::sync::Arc::clone(&svc);
6638 async move {
6639 let sreq = ::connectrpc::ServiceRequest::<
6640 crate::proto::auth::v1::ListAddressBooksRequest,
6641 >::from_parts(req.reborrow(), req.bytes());
6642 svc.list_address_books(ctx, sreq)
6643 .await?
6644 .encode::<
6645 crate::proto::auth::v1::ListAddressBooksResponse,
6646 >(format)
6647 }
6648 })
6649 },
6650 )
6651 .with_spec(ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOKS_SPEC)
6652 .route_view(
6653 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6654 "ListAddressBookEntries",
6655 {
6656 let svc = ::std::sync::Arc::clone(&self);
6657 ::connectrpc::view_handler_fn(move |
6658 ctx,
6659 req: ::buffa::view::OwnedView<
6660 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesRequestView<
6661 'static,
6662 >,
6663 >,
6664 format|
6665 {
6666 let svc = ::std::sync::Arc::clone(&svc);
6667 async move {
6668 let sreq = ::connectrpc::ServiceRequest::<
6669 crate::proto::auth::v1::ListAddressBookEntriesRequest,
6670 >::from_parts(req.reborrow(), req.bytes());
6671 svc.list_address_book_entries(ctx, sreq)
6672 .await?
6673 .encode::<
6674 crate::proto::auth::v1::ListAddressBookEntriesResponse,
6675 >(format)
6676 }
6677 })
6678 },
6679 )
6680 .with_spec(ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOK_ENTRIES_SPEC)
6681 .route_view(
6682 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6683 "CreateAddressBookEntry",
6684 {
6685 let svc = ::std::sync::Arc::clone(&self);
6686 ::connectrpc::view_handler_fn(move |
6687 ctx,
6688 req: ::buffa::view::OwnedView<
6689 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryRequestView<
6690 'static,
6691 >,
6692 >,
6693 format|
6694 {
6695 let svc = ::std::sync::Arc::clone(&svc);
6696 async move {
6697 let sreq = ::connectrpc::ServiceRequest::<
6698 crate::proto::auth::v1::CreateAddressBookEntryRequest,
6699 >::from_parts(req.reborrow(), req.bytes());
6700 svc.create_address_book_entry(ctx, sreq)
6701 .await?
6702 .encode::<
6703 crate::proto::auth::v1::CreateAddressBookEntryResponse,
6704 >(format)
6705 }
6706 })
6707 },
6708 )
6709 .with_spec(ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_ENTRY_SPEC)
6710 .route_view(
6711 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6712 "UpdateAddressBookEntry",
6713 {
6714 let svc = ::std::sync::Arc::clone(&self);
6715 ::connectrpc::view_handler_fn(move |
6716 ctx,
6717 req: ::buffa::view::OwnedView<
6718 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryRequestView<
6719 'static,
6720 >,
6721 >,
6722 format|
6723 {
6724 let svc = ::std::sync::Arc::clone(&svc);
6725 async move {
6726 let sreq = ::connectrpc::ServiceRequest::<
6727 crate::proto::auth::v1::UpdateAddressBookEntryRequest,
6728 >::from_parts(req.reborrow(), req.bytes());
6729 svc.update_address_book_entry(ctx, sreq)
6730 .await?
6731 .encode::<
6732 crate::proto::auth::v1::UpdateAddressBookEntryResponse,
6733 >(format)
6734 }
6735 })
6736 },
6737 )
6738 .with_spec(ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_ENTRY_SPEC)
6739 .route_view(
6740 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6741 "DeleteAddressBookEntry",
6742 {
6743 let svc = ::std::sync::Arc::clone(&self);
6744 ::connectrpc::view_handler_fn(move |
6745 ctx,
6746 req: ::buffa::view::OwnedView<
6747 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryRequestView<
6748 'static,
6749 >,
6750 >,
6751 format|
6752 {
6753 let svc = ::std::sync::Arc::clone(&svc);
6754 async move {
6755 let sreq = ::connectrpc::ServiceRequest::<
6756 crate::proto::auth::v1::DeleteAddressBookEntryRequest,
6757 >::from_parts(req.reborrow(), req.bytes());
6758 svc.delete_address_book_entry(ctx, sreq)
6759 .await?
6760 .encode::<
6761 crate::proto::auth::v1::DeleteAddressBookEntryResponse,
6762 >(format)
6763 }
6764 })
6765 },
6766 )
6767 .with_spec(ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_ENTRY_SPEC)
6768 .route_view(
6769 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6770 "CopyAddressBookEntry",
6771 {
6772 let svc = ::std::sync::Arc::clone(&self);
6773 ::connectrpc::view_handler_fn(move |
6774 ctx,
6775 req: ::buffa::view::OwnedView<
6776 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryRequestView<
6777 'static,
6778 >,
6779 >,
6780 format|
6781 {
6782 let svc = ::std::sync::Arc::clone(&svc);
6783 async move {
6784 let sreq = ::connectrpc::ServiceRequest::<
6785 crate::proto::auth::v1::CopyAddressBookEntryRequest,
6786 >::from_parts(req.reborrow(), req.bytes());
6787 svc.copy_address_book_entry(ctx, sreq)
6788 .await?
6789 .encode::<
6790 crate::proto::auth::v1::CopyAddressBookEntryResponse,
6791 >(format)
6792 }
6793 })
6794 },
6795 )
6796 .with_spec(ADDRESS_BOOK_SERVICE_COPY_ADDRESS_BOOK_ENTRY_SPEC)
6797 .route_view(
6798 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6799 "CreateAddressBookTag",
6800 {
6801 let svc = ::std::sync::Arc::clone(&self);
6802 ::connectrpc::view_handler_fn(move |
6803 ctx,
6804 req: ::buffa::view::OwnedView<
6805 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagRequestView<
6806 'static,
6807 >,
6808 >,
6809 format|
6810 {
6811 let svc = ::std::sync::Arc::clone(&svc);
6812 async move {
6813 let sreq = ::connectrpc::ServiceRequest::<
6814 crate::proto::auth::v1::CreateAddressBookTagRequest,
6815 >::from_parts(req.reborrow(), req.bytes());
6816 svc.create_address_book_tag(ctx, sreq)
6817 .await?
6818 .encode::<
6819 crate::proto::auth::v1::CreateAddressBookTagResponse,
6820 >(format)
6821 }
6822 })
6823 },
6824 )
6825 .with_spec(ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_TAG_SPEC)
6826 .route_view(
6827 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6828 "UpdateAddressBookTag",
6829 {
6830 let svc = ::std::sync::Arc::clone(&self);
6831 ::connectrpc::view_handler_fn(move |
6832 ctx,
6833 req: ::buffa::view::OwnedView<
6834 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagRequestView<
6835 'static,
6836 >,
6837 >,
6838 format|
6839 {
6840 let svc = ::std::sync::Arc::clone(&svc);
6841 async move {
6842 let sreq = ::connectrpc::ServiceRequest::<
6843 crate::proto::auth::v1::UpdateAddressBookTagRequest,
6844 >::from_parts(req.reborrow(), req.bytes());
6845 svc.update_address_book_tag(ctx, sreq)
6846 .await?
6847 .encode::<
6848 crate::proto::auth::v1::UpdateAddressBookTagResponse,
6849 >(format)
6850 }
6851 })
6852 },
6853 )
6854 .with_spec(ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_TAG_SPEC)
6855 .route_view(
6856 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6857 "DeleteAddressBookTag",
6858 {
6859 let svc = ::std::sync::Arc::clone(&self);
6860 ::connectrpc::view_handler_fn(move |
6861 ctx,
6862 req: ::buffa::view::OwnedView<
6863 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagRequestView<
6864 'static,
6865 >,
6866 >,
6867 format|
6868 {
6869 let svc = ::std::sync::Arc::clone(&svc);
6870 async move {
6871 let sreq = ::connectrpc::ServiceRequest::<
6872 crate::proto::auth::v1::DeleteAddressBookTagRequest,
6873 >::from_parts(req.reborrow(), req.bytes());
6874 svc.delete_address_book_tag(ctx, sreq)
6875 .await?
6876 .encode::<
6877 crate::proto::auth::v1::DeleteAddressBookTagResponse,
6878 >(format)
6879 }
6880 })
6881 },
6882 )
6883 .with_spec(ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_TAG_SPEC)
6884 .route_view(
6885 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6886 "ListTransferCounterparties",
6887 {
6888 let svc = ::std::sync::Arc::clone(&self);
6889 ::connectrpc::view_handler_fn(move |
6890 ctx,
6891 req: ::buffa::view::OwnedView<
6892 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesRequestView<
6893 'static,
6894 >,
6895 >,
6896 format|
6897 {
6898 let svc = ::std::sync::Arc::clone(&svc);
6899 async move {
6900 let sreq = ::connectrpc::ServiceRequest::<
6901 crate::proto::auth::v1::ListTransferCounterpartiesRequest,
6902 >::from_parts(req.reborrow(), req.bytes());
6903 svc.list_transfer_counterparties(ctx, sreq)
6904 .await?
6905 .encode::<
6906 crate::proto::auth::v1::ListTransferCounterpartiesResponse,
6907 >(format)
6908 }
6909 })
6910 },
6911 )
6912 .with_spec(ADDRESS_BOOK_SERVICE_LIST_TRANSFER_COUNTERPARTIES_SPEC)
6913 .route_view(
6914 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6915 "ListTransferDestinations",
6916 {
6917 let svc = ::std::sync::Arc::clone(&self);
6918 ::connectrpc::view_handler_fn(move |
6919 ctx,
6920 req: ::buffa::view::OwnedView<
6921 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsRequestView<
6922 'static,
6923 >,
6924 >,
6925 format|
6926 {
6927 let svc = ::std::sync::Arc::clone(&svc);
6928 async move {
6929 let sreq = ::connectrpc::ServiceRequest::<
6930 crate::proto::auth::v1::ListTransferDestinationsRequest,
6931 >::from_parts(req.reborrow(), req.bytes());
6932 svc.list_transfer_destinations(ctx, sreq)
6933 .await?
6934 .encode::<
6935 crate::proto::auth::v1::ListTransferDestinationsResponse,
6936 >(format)
6937 }
6938 })
6939 },
6940 )
6941 .with_spec(ADDRESS_BOOK_SERVICE_LIST_TRANSFER_DESTINATIONS_SPEC)
6942 .route_view(
6943 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6944 "ListInternalTransferWhitelistEntries",
6945 {
6946 let svc = ::std::sync::Arc::clone(&self);
6947 ::connectrpc::view_handler_fn(move |
6948 ctx,
6949 req: ::buffa::view::OwnedView<
6950 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesRequestView<
6951 'static,
6952 >,
6953 >,
6954 format|
6955 {
6956 let svc = ::std::sync::Arc::clone(&svc);
6957 async move {
6958 let sreq = ::connectrpc::ServiceRequest::<
6959 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
6960 >::from_parts(req.reborrow(), req.bytes());
6961 svc.list_internal_transfer_whitelist_entries(ctx, sreq)
6962 .await?
6963 .encode::<
6964 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesResponse,
6965 >(format)
6966 }
6967 })
6968 },
6969 )
6970 .with_spec(
6971 ADDRESS_BOOK_SERVICE_LIST_INTERNAL_TRANSFER_WHITELIST_ENTRIES_SPEC,
6972 )
6973 .route_view(
6974 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
6975 "GetWithdrawWhitelistView",
6976 {
6977 let svc = ::std::sync::Arc::clone(&self);
6978 ::connectrpc::view_handler_fn(move |
6979 ctx,
6980 req: ::buffa::view::OwnedView<
6981 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewRequestView<
6982 'static,
6983 >,
6984 >,
6985 format|
6986 {
6987 let svc = ::std::sync::Arc::clone(&svc);
6988 async move {
6989 let sreq = ::connectrpc::ServiceRequest::<
6990 crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
6991 >::from_parts(req.reborrow(), req.bytes());
6992 svc.get_withdraw_whitelist_view(ctx, sreq)
6993 .await?
6994 .encode::<
6995 crate::proto::auth::v1::GetWithdrawWhitelistViewResponse,
6996 >(format)
6997 }
6998 })
6999 },
7000 )
7001 .with_spec(ADDRESS_BOOK_SERVICE_GET_WITHDRAW_WHITELIST_VIEW_SPEC)
7002 .route_view(
7003 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7004 "GetAddressBookView",
7005 {
7006 let svc = ::std::sync::Arc::clone(&self);
7007 ::connectrpc::view_handler_fn(move |
7008 ctx,
7009 req: ::buffa::view::OwnedView<
7010 crate::proto::auth::v1::__buffa::view::GetAddressBookViewRequestView<
7011 'static,
7012 >,
7013 >,
7014 format|
7015 {
7016 let svc = ::std::sync::Arc::clone(&svc);
7017 async move {
7018 let sreq = ::connectrpc::ServiceRequest::<
7019 crate::proto::auth::v1::GetAddressBookViewRequest,
7020 >::from_parts(req.reborrow(), req.bytes());
7021 svc.get_address_book_view(ctx, sreq)
7022 .await?
7023 .encode::<
7024 crate::proto::auth::v1::GetAddressBookViewResponse,
7025 >(format)
7026 }
7027 })
7028 },
7029 )
7030 .with_spec(ADDRESS_BOOK_SERVICE_GET_ADDRESS_BOOK_VIEW_SPEC)
7031 }
7032}
7033#[doc(hidden)]
7035pub struct AddressBookServiceRegisterMarker;
7036impl<
7037 S: AddressBookService,
7038> ::connectrpc::ServiceRegister<AddressBookServiceRegisterMarker>
7039for ::std::sync::Arc<S> {
7040 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
7041 <S as AddressBookServiceExt>::register(self, router)
7042 }
7043}
7044pub struct AddressBookServiceServer<T> {
7058 inner: ::std::sync::Arc<T>,
7059}
7060impl<T: AddressBookService> AddressBookServiceServer<T> {
7061 pub fn new(service: T) -> Self {
7063 Self {
7064 inner: ::std::sync::Arc::new(service),
7065 }
7066 }
7067 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
7069 Self { inner }
7070 }
7071}
7072impl<T> Clone for AddressBookServiceServer<T> {
7073 fn clone(&self) -> Self {
7074 Self {
7075 inner: ::std::sync::Arc::clone(&self.inner),
7076 }
7077 }
7078}
7079impl<T: AddressBookService> ::connectrpc::Dispatcher for AddressBookServiceServer<T> {
7080 #[inline]
7081 fn lookup(
7082 &self,
7083 path: &str,
7084 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
7085 let method = path.strip_prefix("auth.v1.AddressBookService/")?;
7086 match method {
7087 "ListAddressBooks" => {
7088 Some(
7089 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7090 .with_spec(ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOKS_SPEC),
7091 )
7092 }
7093 "ListAddressBookEntries" => {
7094 Some(
7095 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7096 .with_spec(ADDRESS_BOOK_SERVICE_LIST_ADDRESS_BOOK_ENTRIES_SPEC),
7097 )
7098 }
7099 "CreateAddressBookEntry" => {
7100 Some(
7101 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7102 .with_spec(ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_ENTRY_SPEC),
7103 )
7104 }
7105 "UpdateAddressBookEntry" => {
7106 Some(
7107 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7108 .with_spec(ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_ENTRY_SPEC),
7109 )
7110 }
7111 "DeleteAddressBookEntry" => {
7112 Some(
7113 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7114 .with_spec(ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_ENTRY_SPEC),
7115 )
7116 }
7117 "CopyAddressBookEntry" => {
7118 Some(
7119 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7120 .with_spec(ADDRESS_BOOK_SERVICE_COPY_ADDRESS_BOOK_ENTRY_SPEC),
7121 )
7122 }
7123 "CreateAddressBookTag" => {
7124 Some(
7125 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7126 .with_spec(ADDRESS_BOOK_SERVICE_CREATE_ADDRESS_BOOK_TAG_SPEC),
7127 )
7128 }
7129 "UpdateAddressBookTag" => {
7130 Some(
7131 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7132 .with_spec(ADDRESS_BOOK_SERVICE_UPDATE_ADDRESS_BOOK_TAG_SPEC),
7133 )
7134 }
7135 "DeleteAddressBookTag" => {
7136 Some(
7137 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7138 .with_spec(ADDRESS_BOOK_SERVICE_DELETE_ADDRESS_BOOK_TAG_SPEC),
7139 )
7140 }
7141 "ListTransferCounterparties" => {
7142 Some(
7143 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7144 .with_spec(
7145 ADDRESS_BOOK_SERVICE_LIST_TRANSFER_COUNTERPARTIES_SPEC,
7146 ),
7147 )
7148 }
7149 "ListTransferDestinations" => {
7150 Some(
7151 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7152 .with_spec(ADDRESS_BOOK_SERVICE_LIST_TRANSFER_DESTINATIONS_SPEC),
7153 )
7154 }
7155 "ListInternalTransferWhitelistEntries" => {
7156 Some(
7157 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7158 .with_spec(
7159 ADDRESS_BOOK_SERVICE_LIST_INTERNAL_TRANSFER_WHITELIST_ENTRIES_SPEC,
7160 ),
7161 )
7162 }
7163 "GetWithdrawWhitelistView" => {
7164 Some(
7165 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7166 .with_spec(ADDRESS_BOOK_SERVICE_GET_WITHDRAW_WHITELIST_VIEW_SPEC),
7167 )
7168 }
7169 "GetAddressBookView" => {
7170 Some(
7171 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
7172 .with_spec(ADDRESS_BOOK_SERVICE_GET_ADDRESS_BOOK_VIEW_SPEC),
7173 )
7174 }
7175 _ => None,
7176 }
7177 }
7178 fn call_unary(
7179 &self,
7180 path: &str,
7181 ctx: ::connectrpc::RequestContext,
7182 request: ::connectrpc::Payload,
7183 format: ::connectrpc::CodecFormat,
7184 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
7185 let Some(method) = path.strip_prefix("auth.v1.AddressBookService/") else {
7186 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
7187 };
7188 let _ = (&ctx, &request, &format);
7189 match method {
7190 "ListAddressBooks" => {
7191 let svc = ::std::sync::Arc::clone(&self.inner);
7192 Box::pin(async move {
7193 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7194 crate::proto::auth::v1::ListAddressBooksRequest,
7195 >(request.encoded()?, format)?;
7196 let req: crate::proto::auth::v1::__buffa::view::ListAddressBooksRequestView<
7197 '_,
7198 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7199 &body,
7200 )?;
7201 let req = ::connectrpc::ServiceRequest::<
7202 crate::proto::auth::v1::ListAddressBooksRequest,
7203 >::from_parts(&req, &body);
7204 svc.list_address_books(ctx, req)
7205 .await?
7206 .encode::<
7207 crate::proto::auth::v1::ListAddressBooksResponse,
7208 >(format)
7209 })
7210 }
7211 "ListAddressBookEntries" => {
7212 let svc = ::std::sync::Arc::clone(&self.inner);
7213 Box::pin(async move {
7214 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7215 crate::proto::auth::v1::ListAddressBookEntriesRequest,
7216 >(request.encoded()?, format)?;
7217 let req: crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesRequestView<
7218 '_,
7219 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7220 &body,
7221 )?;
7222 let req = ::connectrpc::ServiceRequest::<
7223 crate::proto::auth::v1::ListAddressBookEntriesRequest,
7224 >::from_parts(&req, &body);
7225 svc.list_address_book_entries(ctx, req)
7226 .await?
7227 .encode::<
7228 crate::proto::auth::v1::ListAddressBookEntriesResponse,
7229 >(format)
7230 })
7231 }
7232 "CreateAddressBookEntry" => {
7233 let svc = ::std::sync::Arc::clone(&self.inner);
7234 Box::pin(async move {
7235 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7236 crate::proto::auth::v1::CreateAddressBookEntryRequest,
7237 >(request.encoded()?, format)?;
7238 let req: crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryRequestView<
7239 '_,
7240 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7241 &body,
7242 )?;
7243 let req = ::connectrpc::ServiceRequest::<
7244 crate::proto::auth::v1::CreateAddressBookEntryRequest,
7245 >::from_parts(&req, &body);
7246 svc.create_address_book_entry(ctx, req)
7247 .await?
7248 .encode::<
7249 crate::proto::auth::v1::CreateAddressBookEntryResponse,
7250 >(format)
7251 })
7252 }
7253 "UpdateAddressBookEntry" => {
7254 let svc = ::std::sync::Arc::clone(&self.inner);
7255 Box::pin(async move {
7256 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7257 crate::proto::auth::v1::UpdateAddressBookEntryRequest,
7258 >(request.encoded()?, format)?;
7259 let req: crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryRequestView<
7260 '_,
7261 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7262 &body,
7263 )?;
7264 let req = ::connectrpc::ServiceRequest::<
7265 crate::proto::auth::v1::UpdateAddressBookEntryRequest,
7266 >::from_parts(&req, &body);
7267 svc.update_address_book_entry(ctx, req)
7268 .await?
7269 .encode::<
7270 crate::proto::auth::v1::UpdateAddressBookEntryResponse,
7271 >(format)
7272 })
7273 }
7274 "DeleteAddressBookEntry" => {
7275 let svc = ::std::sync::Arc::clone(&self.inner);
7276 Box::pin(async move {
7277 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7278 crate::proto::auth::v1::DeleteAddressBookEntryRequest,
7279 >(request.encoded()?, format)?;
7280 let req: crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryRequestView<
7281 '_,
7282 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7283 &body,
7284 )?;
7285 let req = ::connectrpc::ServiceRequest::<
7286 crate::proto::auth::v1::DeleteAddressBookEntryRequest,
7287 >::from_parts(&req, &body);
7288 svc.delete_address_book_entry(ctx, req)
7289 .await?
7290 .encode::<
7291 crate::proto::auth::v1::DeleteAddressBookEntryResponse,
7292 >(format)
7293 })
7294 }
7295 "CopyAddressBookEntry" => {
7296 let svc = ::std::sync::Arc::clone(&self.inner);
7297 Box::pin(async move {
7298 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7299 crate::proto::auth::v1::CopyAddressBookEntryRequest,
7300 >(request.encoded()?, format)?;
7301 let req: crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryRequestView<
7302 '_,
7303 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7304 &body,
7305 )?;
7306 let req = ::connectrpc::ServiceRequest::<
7307 crate::proto::auth::v1::CopyAddressBookEntryRequest,
7308 >::from_parts(&req, &body);
7309 svc.copy_address_book_entry(ctx, req)
7310 .await?
7311 .encode::<
7312 crate::proto::auth::v1::CopyAddressBookEntryResponse,
7313 >(format)
7314 })
7315 }
7316 "CreateAddressBookTag" => {
7317 let svc = ::std::sync::Arc::clone(&self.inner);
7318 Box::pin(async move {
7319 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7320 crate::proto::auth::v1::CreateAddressBookTagRequest,
7321 >(request.encoded()?, format)?;
7322 let req: crate::proto::auth::v1::__buffa::view::CreateAddressBookTagRequestView<
7323 '_,
7324 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7325 &body,
7326 )?;
7327 let req = ::connectrpc::ServiceRequest::<
7328 crate::proto::auth::v1::CreateAddressBookTagRequest,
7329 >::from_parts(&req, &body);
7330 svc.create_address_book_tag(ctx, req)
7331 .await?
7332 .encode::<
7333 crate::proto::auth::v1::CreateAddressBookTagResponse,
7334 >(format)
7335 })
7336 }
7337 "UpdateAddressBookTag" => {
7338 let svc = ::std::sync::Arc::clone(&self.inner);
7339 Box::pin(async move {
7340 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7341 crate::proto::auth::v1::UpdateAddressBookTagRequest,
7342 >(request.encoded()?, format)?;
7343 let req: crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagRequestView<
7344 '_,
7345 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7346 &body,
7347 )?;
7348 let req = ::connectrpc::ServiceRequest::<
7349 crate::proto::auth::v1::UpdateAddressBookTagRequest,
7350 >::from_parts(&req, &body);
7351 svc.update_address_book_tag(ctx, req)
7352 .await?
7353 .encode::<
7354 crate::proto::auth::v1::UpdateAddressBookTagResponse,
7355 >(format)
7356 })
7357 }
7358 "DeleteAddressBookTag" => {
7359 let svc = ::std::sync::Arc::clone(&self.inner);
7360 Box::pin(async move {
7361 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7362 crate::proto::auth::v1::DeleteAddressBookTagRequest,
7363 >(request.encoded()?, format)?;
7364 let req: crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagRequestView<
7365 '_,
7366 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7367 &body,
7368 )?;
7369 let req = ::connectrpc::ServiceRequest::<
7370 crate::proto::auth::v1::DeleteAddressBookTagRequest,
7371 >::from_parts(&req, &body);
7372 svc.delete_address_book_tag(ctx, req)
7373 .await?
7374 .encode::<
7375 crate::proto::auth::v1::DeleteAddressBookTagResponse,
7376 >(format)
7377 })
7378 }
7379 "ListTransferCounterparties" => {
7380 let svc = ::std::sync::Arc::clone(&self.inner);
7381 Box::pin(async move {
7382 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7383 crate::proto::auth::v1::ListTransferCounterpartiesRequest,
7384 >(request.encoded()?, format)?;
7385 let req: crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesRequestView<
7386 '_,
7387 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7388 &body,
7389 )?;
7390 let req = ::connectrpc::ServiceRequest::<
7391 crate::proto::auth::v1::ListTransferCounterpartiesRequest,
7392 >::from_parts(&req, &body);
7393 svc.list_transfer_counterparties(ctx, req)
7394 .await?
7395 .encode::<
7396 crate::proto::auth::v1::ListTransferCounterpartiesResponse,
7397 >(format)
7398 })
7399 }
7400 "ListTransferDestinations" => {
7401 let svc = ::std::sync::Arc::clone(&self.inner);
7402 Box::pin(async move {
7403 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7404 crate::proto::auth::v1::ListTransferDestinationsRequest,
7405 >(request.encoded()?, format)?;
7406 let req: crate::proto::auth::v1::__buffa::view::ListTransferDestinationsRequestView<
7407 '_,
7408 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7409 &body,
7410 )?;
7411 let req = ::connectrpc::ServiceRequest::<
7412 crate::proto::auth::v1::ListTransferDestinationsRequest,
7413 >::from_parts(&req, &body);
7414 svc.list_transfer_destinations(ctx, req)
7415 .await?
7416 .encode::<
7417 crate::proto::auth::v1::ListTransferDestinationsResponse,
7418 >(format)
7419 })
7420 }
7421 "ListInternalTransferWhitelistEntries" => {
7422 let svc = ::std::sync::Arc::clone(&self.inner);
7423 Box::pin(async move {
7424 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7425 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
7426 >(request.encoded()?, format)?;
7427 let req: crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesRequestView<
7428 '_,
7429 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7430 &body,
7431 )?;
7432 let req = ::connectrpc::ServiceRequest::<
7433 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
7434 >::from_parts(&req, &body);
7435 svc.list_internal_transfer_whitelist_entries(ctx, req)
7436 .await?
7437 .encode::<
7438 crate::proto::auth::v1::ListInternalTransferWhitelistEntriesResponse,
7439 >(format)
7440 })
7441 }
7442 "GetWithdrawWhitelistView" => {
7443 let svc = ::std::sync::Arc::clone(&self.inner);
7444 Box::pin(async move {
7445 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7446 crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
7447 >(request.encoded()?, format)?;
7448 let req: crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewRequestView<
7449 '_,
7450 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7451 &body,
7452 )?;
7453 let req = ::connectrpc::ServiceRequest::<
7454 crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
7455 >::from_parts(&req, &body);
7456 svc.get_withdraw_whitelist_view(ctx, req)
7457 .await?
7458 .encode::<
7459 crate::proto::auth::v1::GetWithdrawWhitelistViewResponse,
7460 >(format)
7461 })
7462 }
7463 "GetAddressBookView" => {
7464 let svc = ::std::sync::Arc::clone(&self.inner);
7465 Box::pin(async move {
7466 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
7467 crate::proto::auth::v1::GetAddressBookViewRequest,
7468 >(request.encoded()?, format)?;
7469 let req: crate::proto::auth::v1::__buffa::view::GetAddressBookViewRequestView<
7470 '_,
7471 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
7472 &body,
7473 )?;
7474 let req = ::connectrpc::ServiceRequest::<
7475 crate::proto::auth::v1::GetAddressBookViewRequest,
7476 >::from_parts(&req, &body);
7477 svc.get_address_book_view(ctx, req)
7478 .await?
7479 .encode::<
7480 crate::proto::auth::v1::GetAddressBookViewResponse,
7481 >(format)
7482 })
7483 }
7484 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
7485 }
7486 }
7487 fn call_server_streaming(
7488 &self,
7489 path: &str,
7490 ctx: ::connectrpc::RequestContext,
7491 request: ::buffa::bytes::Bytes,
7492 format: ::connectrpc::CodecFormat,
7493 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
7494 let Some(method) = path.strip_prefix("auth.v1.AddressBookService/") else {
7495 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
7496 };
7497 let _ = (&ctx, &request, &format);
7498 match method {
7499 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
7500 }
7501 }
7502 fn call_client_streaming(
7503 &self,
7504 path: &str,
7505 ctx: ::connectrpc::RequestContext,
7506 requests: ::connectrpc::dispatcher::codegen::RequestStream,
7507 format: ::connectrpc::CodecFormat,
7508 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
7509 let Some(method) = path.strip_prefix("auth.v1.AddressBookService/") else {
7510 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
7511 };
7512 let _ = (&ctx, &requests, &format);
7513 match method {
7514 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
7515 }
7516 }
7517 fn call_bidi_streaming(
7518 &self,
7519 path: &str,
7520 ctx: ::connectrpc::RequestContext,
7521 requests: ::connectrpc::dispatcher::codegen::RequestStream,
7522 format: ::connectrpc::CodecFormat,
7523 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
7524 let Some(method) = path.strip_prefix("auth.v1.AddressBookService/") else {
7525 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
7526 };
7527 let _ = (&ctx, &requests, &format);
7528 match method {
7529 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
7530 }
7531 }
7532}
7533#[derive(Clone)]
7565pub struct AddressBookServiceClient<T> {
7566 transport: T,
7567 config: ::connectrpc::client::ClientConfig,
7568}
7569impl<T> AddressBookServiceClient<T>
7570where
7571 T: ::connectrpc::client::ClientTransport,
7572 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
7573{
7574 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
7576 Self { transport, config }
7577 }
7578 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
7580 &self.config
7581 }
7582 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
7584 &mut self.config
7585 }
7586 pub async fn list_address_books(
7588 &self,
7589 request: crate::proto::auth::v1::ListAddressBooksRequest,
7590 ) -> Result<
7591 ::connectrpc::client::UnaryResponse<
7592 ::buffa::view::OwnedView<
7593 crate::proto::auth::v1::__buffa::view::ListAddressBooksResponseView<
7594 'static,
7595 >,
7596 >,
7597 >,
7598 ::connectrpc::ConnectError,
7599 > {
7600 self.list_address_books_with_options(
7601 request,
7602 ::connectrpc::client::CallOptions::default(),
7603 )
7604 .await
7605 }
7606 pub async fn list_address_books_with_options(
7608 &self,
7609 request: crate::proto::auth::v1::ListAddressBooksRequest,
7610 options: ::connectrpc::client::CallOptions,
7611 ) -> Result<
7612 ::connectrpc::client::UnaryResponse<
7613 ::buffa::view::OwnedView<
7614 crate::proto::auth::v1::__buffa::view::ListAddressBooksResponseView<
7615 'static,
7616 >,
7617 >,
7618 >,
7619 ::connectrpc::ConnectError,
7620 > {
7621 ::connectrpc::client::call_unary(
7622 &self.transport,
7623 &self.config,
7624 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7625 "ListAddressBooks",
7626 request,
7627 options,
7628 )
7629 .await
7630 }
7631 pub async fn list_address_book_entries(
7633 &self,
7634 request: crate::proto::auth::v1::ListAddressBookEntriesRequest,
7635 ) -> Result<
7636 ::connectrpc::client::UnaryResponse<
7637 ::buffa::view::OwnedView<
7638 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesResponseView<
7639 'static,
7640 >,
7641 >,
7642 >,
7643 ::connectrpc::ConnectError,
7644 > {
7645 self.list_address_book_entries_with_options(
7646 request,
7647 ::connectrpc::client::CallOptions::default(),
7648 )
7649 .await
7650 }
7651 pub async fn list_address_book_entries_with_options(
7653 &self,
7654 request: crate::proto::auth::v1::ListAddressBookEntriesRequest,
7655 options: ::connectrpc::client::CallOptions,
7656 ) -> Result<
7657 ::connectrpc::client::UnaryResponse<
7658 ::buffa::view::OwnedView<
7659 crate::proto::auth::v1::__buffa::view::ListAddressBookEntriesResponseView<
7660 'static,
7661 >,
7662 >,
7663 >,
7664 ::connectrpc::ConnectError,
7665 > {
7666 ::connectrpc::client::call_unary(
7667 &self.transport,
7668 &self.config,
7669 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7670 "ListAddressBookEntries",
7671 request,
7672 options,
7673 )
7674 .await
7675 }
7676 pub async fn create_address_book_entry(
7678 &self,
7679 request: crate::proto::auth::v1::CreateAddressBookEntryRequest,
7680 ) -> Result<
7681 ::connectrpc::client::UnaryResponse<
7682 ::buffa::view::OwnedView<
7683 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryResponseView<
7684 'static,
7685 >,
7686 >,
7687 >,
7688 ::connectrpc::ConnectError,
7689 > {
7690 self.create_address_book_entry_with_options(
7691 request,
7692 ::connectrpc::client::CallOptions::default(),
7693 )
7694 .await
7695 }
7696 pub async fn create_address_book_entry_with_options(
7698 &self,
7699 request: crate::proto::auth::v1::CreateAddressBookEntryRequest,
7700 options: ::connectrpc::client::CallOptions,
7701 ) -> Result<
7702 ::connectrpc::client::UnaryResponse<
7703 ::buffa::view::OwnedView<
7704 crate::proto::auth::v1::__buffa::view::CreateAddressBookEntryResponseView<
7705 'static,
7706 >,
7707 >,
7708 >,
7709 ::connectrpc::ConnectError,
7710 > {
7711 ::connectrpc::client::call_unary(
7712 &self.transport,
7713 &self.config,
7714 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7715 "CreateAddressBookEntry",
7716 request,
7717 options,
7718 )
7719 .await
7720 }
7721 pub async fn update_address_book_entry(
7723 &self,
7724 request: crate::proto::auth::v1::UpdateAddressBookEntryRequest,
7725 ) -> Result<
7726 ::connectrpc::client::UnaryResponse<
7727 ::buffa::view::OwnedView<
7728 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryResponseView<
7729 'static,
7730 >,
7731 >,
7732 >,
7733 ::connectrpc::ConnectError,
7734 > {
7735 self.update_address_book_entry_with_options(
7736 request,
7737 ::connectrpc::client::CallOptions::default(),
7738 )
7739 .await
7740 }
7741 pub async fn update_address_book_entry_with_options(
7743 &self,
7744 request: crate::proto::auth::v1::UpdateAddressBookEntryRequest,
7745 options: ::connectrpc::client::CallOptions,
7746 ) -> Result<
7747 ::connectrpc::client::UnaryResponse<
7748 ::buffa::view::OwnedView<
7749 crate::proto::auth::v1::__buffa::view::UpdateAddressBookEntryResponseView<
7750 'static,
7751 >,
7752 >,
7753 >,
7754 ::connectrpc::ConnectError,
7755 > {
7756 ::connectrpc::client::call_unary(
7757 &self.transport,
7758 &self.config,
7759 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7760 "UpdateAddressBookEntry",
7761 request,
7762 options,
7763 )
7764 .await
7765 }
7766 pub async fn delete_address_book_entry(
7768 &self,
7769 request: crate::proto::auth::v1::DeleteAddressBookEntryRequest,
7770 ) -> Result<
7771 ::connectrpc::client::UnaryResponse<
7772 ::buffa::view::OwnedView<
7773 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryResponseView<
7774 'static,
7775 >,
7776 >,
7777 >,
7778 ::connectrpc::ConnectError,
7779 > {
7780 self.delete_address_book_entry_with_options(
7781 request,
7782 ::connectrpc::client::CallOptions::default(),
7783 )
7784 .await
7785 }
7786 pub async fn delete_address_book_entry_with_options(
7788 &self,
7789 request: crate::proto::auth::v1::DeleteAddressBookEntryRequest,
7790 options: ::connectrpc::client::CallOptions,
7791 ) -> Result<
7792 ::connectrpc::client::UnaryResponse<
7793 ::buffa::view::OwnedView<
7794 crate::proto::auth::v1::__buffa::view::DeleteAddressBookEntryResponseView<
7795 'static,
7796 >,
7797 >,
7798 >,
7799 ::connectrpc::ConnectError,
7800 > {
7801 ::connectrpc::client::call_unary(
7802 &self.transport,
7803 &self.config,
7804 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7805 "DeleteAddressBookEntry",
7806 request,
7807 options,
7808 )
7809 .await
7810 }
7811 pub async fn copy_address_book_entry(
7813 &self,
7814 request: crate::proto::auth::v1::CopyAddressBookEntryRequest,
7815 ) -> Result<
7816 ::connectrpc::client::UnaryResponse<
7817 ::buffa::view::OwnedView<
7818 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryResponseView<
7819 'static,
7820 >,
7821 >,
7822 >,
7823 ::connectrpc::ConnectError,
7824 > {
7825 self.copy_address_book_entry_with_options(
7826 request,
7827 ::connectrpc::client::CallOptions::default(),
7828 )
7829 .await
7830 }
7831 pub async fn copy_address_book_entry_with_options(
7833 &self,
7834 request: crate::proto::auth::v1::CopyAddressBookEntryRequest,
7835 options: ::connectrpc::client::CallOptions,
7836 ) -> Result<
7837 ::connectrpc::client::UnaryResponse<
7838 ::buffa::view::OwnedView<
7839 crate::proto::auth::v1::__buffa::view::CopyAddressBookEntryResponseView<
7840 'static,
7841 >,
7842 >,
7843 >,
7844 ::connectrpc::ConnectError,
7845 > {
7846 ::connectrpc::client::call_unary(
7847 &self.transport,
7848 &self.config,
7849 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7850 "CopyAddressBookEntry",
7851 request,
7852 options,
7853 )
7854 .await
7855 }
7856 pub async fn create_address_book_tag(
7858 &self,
7859 request: crate::proto::auth::v1::CreateAddressBookTagRequest,
7860 ) -> Result<
7861 ::connectrpc::client::UnaryResponse<
7862 ::buffa::view::OwnedView<
7863 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagResponseView<
7864 'static,
7865 >,
7866 >,
7867 >,
7868 ::connectrpc::ConnectError,
7869 > {
7870 self.create_address_book_tag_with_options(
7871 request,
7872 ::connectrpc::client::CallOptions::default(),
7873 )
7874 .await
7875 }
7876 pub async fn create_address_book_tag_with_options(
7878 &self,
7879 request: crate::proto::auth::v1::CreateAddressBookTagRequest,
7880 options: ::connectrpc::client::CallOptions,
7881 ) -> Result<
7882 ::connectrpc::client::UnaryResponse<
7883 ::buffa::view::OwnedView<
7884 crate::proto::auth::v1::__buffa::view::CreateAddressBookTagResponseView<
7885 'static,
7886 >,
7887 >,
7888 >,
7889 ::connectrpc::ConnectError,
7890 > {
7891 ::connectrpc::client::call_unary(
7892 &self.transport,
7893 &self.config,
7894 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7895 "CreateAddressBookTag",
7896 request,
7897 options,
7898 )
7899 .await
7900 }
7901 pub async fn update_address_book_tag(
7903 &self,
7904 request: crate::proto::auth::v1::UpdateAddressBookTagRequest,
7905 ) -> Result<
7906 ::connectrpc::client::UnaryResponse<
7907 ::buffa::view::OwnedView<
7908 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagResponseView<
7909 'static,
7910 >,
7911 >,
7912 >,
7913 ::connectrpc::ConnectError,
7914 > {
7915 self.update_address_book_tag_with_options(
7916 request,
7917 ::connectrpc::client::CallOptions::default(),
7918 )
7919 .await
7920 }
7921 pub async fn update_address_book_tag_with_options(
7923 &self,
7924 request: crate::proto::auth::v1::UpdateAddressBookTagRequest,
7925 options: ::connectrpc::client::CallOptions,
7926 ) -> Result<
7927 ::connectrpc::client::UnaryResponse<
7928 ::buffa::view::OwnedView<
7929 crate::proto::auth::v1::__buffa::view::UpdateAddressBookTagResponseView<
7930 'static,
7931 >,
7932 >,
7933 >,
7934 ::connectrpc::ConnectError,
7935 > {
7936 ::connectrpc::client::call_unary(
7937 &self.transport,
7938 &self.config,
7939 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7940 "UpdateAddressBookTag",
7941 request,
7942 options,
7943 )
7944 .await
7945 }
7946 pub async fn delete_address_book_tag(
7948 &self,
7949 request: crate::proto::auth::v1::DeleteAddressBookTagRequest,
7950 ) -> Result<
7951 ::connectrpc::client::UnaryResponse<
7952 ::buffa::view::OwnedView<
7953 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagResponseView<
7954 'static,
7955 >,
7956 >,
7957 >,
7958 ::connectrpc::ConnectError,
7959 > {
7960 self.delete_address_book_tag_with_options(
7961 request,
7962 ::connectrpc::client::CallOptions::default(),
7963 )
7964 .await
7965 }
7966 pub async fn delete_address_book_tag_with_options(
7968 &self,
7969 request: crate::proto::auth::v1::DeleteAddressBookTagRequest,
7970 options: ::connectrpc::client::CallOptions,
7971 ) -> Result<
7972 ::connectrpc::client::UnaryResponse<
7973 ::buffa::view::OwnedView<
7974 crate::proto::auth::v1::__buffa::view::DeleteAddressBookTagResponseView<
7975 'static,
7976 >,
7977 >,
7978 >,
7979 ::connectrpc::ConnectError,
7980 > {
7981 ::connectrpc::client::call_unary(
7982 &self.transport,
7983 &self.config,
7984 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
7985 "DeleteAddressBookTag",
7986 request,
7987 options,
7988 )
7989 .await
7990 }
7991 pub async fn list_transfer_counterparties(
7993 &self,
7994 request: crate::proto::auth::v1::ListTransferCounterpartiesRequest,
7995 ) -> Result<
7996 ::connectrpc::client::UnaryResponse<
7997 ::buffa::view::OwnedView<
7998 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesResponseView<
7999 'static,
8000 >,
8001 >,
8002 >,
8003 ::connectrpc::ConnectError,
8004 > {
8005 self.list_transfer_counterparties_with_options(
8006 request,
8007 ::connectrpc::client::CallOptions::default(),
8008 )
8009 .await
8010 }
8011 pub async fn list_transfer_counterparties_with_options(
8013 &self,
8014 request: crate::proto::auth::v1::ListTransferCounterpartiesRequest,
8015 options: ::connectrpc::client::CallOptions,
8016 ) -> Result<
8017 ::connectrpc::client::UnaryResponse<
8018 ::buffa::view::OwnedView<
8019 crate::proto::auth::v1::__buffa::view::ListTransferCounterpartiesResponseView<
8020 'static,
8021 >,
8022 >,
8023 >,
8024 ::connectrpc::ConnectError,
8025 > {
8026 ::connectrpc::client::call_unary(
8027 &self.transport,
8028 &self.config,
8029 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
8030 "ListTransferCounterparties",
8031 request,
8032 options,
8033 )
8034 .await
8035 }
8036 pub async fn list_transfer_destinations(
8038 &self,
8039 request: crate::proto::auth::v1::ListTransferDestinationsRequest,
8040 ) -> Result<
8041 ::connectrpc::client::UnaryResponse<
8042 ::buffa::view::OwnedView<
8043 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsResponseView<
8044 'static,
8045 >,
8046 >,
8047 >,
8048 ::connectrpc::ConnectError,
8049 > {
8050 self.list_transfer_destinations_with_options(
8051 request,
8052 ::connectrpc::client::CallOptions::default(),
8053 )
8054 .await
8055 }
8056 pub async fn list_transfer_destinations_with_options(
8058 &self,
8059 request: crate::proto::auth::v1::ListTransferDestinationsRequest,
8060 options: ::connectrpc::client::CallOptions,
8061 ) -> Result<
8062 ::connectrpc::client::UnaryResponse<
8063 ::buffa::view::OwnedView<
8064 crate::proto::auth::v1::__buffa::view::ListTransferDestinationsResponseView<
8065 'static,
8066 >,
8067 >,
8068 >,
8069 ::connectrpc::ConnectError,
8070 > {
8071 ::connectrpc::client::call_unary(
8072 &self.transport,
8073 &self.config,
8074 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
8075 "ListTransferDestinations",
8076 request,
8077 options,
8078 )
8079 .await
8080 }
8081 pub async fn list_internal_transfer_whitelist_entries(
8083 &self,
8084 request: crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
8085 ) -> Result<
8086 ::connectrpc::client::UnaryResponse<
8087 ::buffa::view::OwnedView<
8088 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesResponseView<
8089 'static,
8090 >,
8091 >,
8092 >,
8093 ::connectrpc::ConnectError,
8094 > {
8095 self.list_internal_transfer_whitelist_entries_with_options(
8096 request,
8097 ::connectrpc::client::CallOptions::default(),
8098 )
8099 .await
8100 }
8101 pub async fn list_internal_transfer_whitelist_entries_with_options(
8103 &self,
8104 request: crate::proto::auth::v1::ListInternalTransferWhitelistEntriesRequest,
8105 options: ::connectrpc::client::CallOptions,
8106 ) -> Result<
8107 ::connectrpc::client::UnaryResponse<
8108 ::buffa::view::OwnedView<
8109 crate::proto::auth::v1::__buffa::view::ListInternalTransferWhitelistEntriesResponseView<
8110 'static,
8111 >,
8112 >,
8113 >,
8114 ::connectrpc::ConnectError,
8115 > {
8116 ::connectrpc::client::call_unary(
8117 &self.transport,
8118 &self.config,
8119 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
8120 "ListInternalTransferWhitelistEntries",
8121 request,
8122 options,
8123 )
8124 .await
8125 }
8126 pub async fn get_withdraw_whitelist_view(
8128 &self,
8129 request: crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
8130 ) -> Result<
8131 ::connectrpc::client::UnaryResponse<
8132 ::buffa::view::OwnedView<
8133 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewResponseView<
8134 'static,
8135 >,
8136 >,
8137 >,
8138 ::connectrpc::ConnectError,
8139 > {
8140 self.get_withdraw_whitelist_view_with_options(
8141 request,
8142 ::connectrpc::client::CallOptions::default(),
8143 )
8144 .await
8145 }
8146 pub async fn get_withdraw_whitelist_view_with_options(
8148 &self,
8149 request: crate::proto::auth::v1::GetWithdrawWhitelistViewRequest,
8150 options: ::connectrpc::client::CallOptions,
8151 ) -> Result<
8152 ::connectrpc::client::UnaryResponse<
8153 ::buffa::view::OwnedView<
8154 crate::proto::auth::v1::__buffa::view::GetWithdrawWhitelistViewResponseView<
8155 'static,
8156 >,
8157 >,
8158 >,
8159 ::connectrpc::ConnectError,
8160 > {
8161 ::connectrpc::client::call_unary(
8162 &self.transport,
8163 &self.config,
8164 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
8165 "GetWithdrawWhitelistView",
8166 request,
8167 options,
8168 )
8169 .await
8170 }
8171 pub async fn get_address_book_view(
8173 &self,
8174 request: crate::proto::auth::v1::GetAddressBookViewRequest,
8175 ) -> Result<
8176 ::connectrpc::client::UnaryResponse<
8177 ::buffa::view::OwnedView<
8178 crate::proto::auth::v1::__buffa::view::GetAddressBookViewResponseView<
8179 'static,
8180 >,
8181 >,
8182 >,
8183 ::connectrpc::ConnectError,
8184 > {
8185 self.get_address_book_view_with_options(
8186 request,
8187 ::connectrpc::client::CallOptions::default(),
8188 )
8189 .await
8190 }
8191 pub async fn get_address_book_view_with_options(
8193 &self,
8194 request: crate::proto::auth::v1::GetAddressBookViewRequest,
8195 options: ::connectrpc::client::CallOptions,
8196 ) -> Result<
8197 ::connectrpc::client::UnaryResponse<
8198 ::buffa::view::OwnedView<
8199 crate::proto::auth::v1::__buffa::view::GetAddressBookViewResponseView<
8200 'static,
8201 >,
8202 >,
8203 >,
8204 ::connectrpc::ConnectError,
8205 > {
8206 ::connectrpc::client::call_unary(
8207 &self.transport,
8208 &self.config,
8209 ADDRESS_BOOK_SERVICE_SERVICE_NAME,
8210 "GetAddressBookView",
8211 request,
8212 options,
8213 )
8214 .await
8215 }
8216}
8217
8218pub type OwnedListMfaFactorsRequestView = ::buffa::view::OwnedView<
8220 crate::proto::auth::v1::__buffa::view::ListMFAFactorsRequestView<'static>,
8221>;
8222pub type OwnedListMfaFactorsResponseView = ::buffa::view::OwnedView<
8224 crate::proto::auth::v1::__buffa::view::ListMFAFactorsResponseView<'static>,
8225>;
8226pub type OwnedBeginTotpEnrollmentRequestView = ::buffa::view::OwnedView<
8228 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentRequestView<'static>,
8229>;
8230pub type OwnedBeginTotpEnrollmentResponseView = ::buffa::view::OwnedView<
8232 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentResponseView<'static>,
8233>;
8234pub type OwnedFinishTotpEnrollmentRequestView = ::buffa::view::OwnedView<
8236 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentRequestView<'static>,
8237>;
8238pub type OwnedFinishTotpEnrollmentResponseView = ::buffa::view::OwnedView<
8240 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentResponseView<'static>,
8241>;
8242pub type OwnedBeginPasskeyEnrollmentRequestView = ::buffa::view::OwnedView<
8244 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentRequestView<'static>,
8245>;
8246pub type OwnedBeginPasskeyEnrollmentResponseView = ::buffa::view::OwnedView<
8248 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentResponseView<'static>,
8249>;
8250pub type OwnedFinishPasskeyEnrollmentRequestView = ::buffa::view::OwnedView<
8252 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentRequestView<'static>,
8253>;
8254pub type OwnedFinishPasskeyEnrollmentResponseView = ::buffa::view::OwnedView<
8256 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentResponseView<'static>,
8257>;
8258pub type OwnedBeginMfaChallengeRequestView = ::buffa::view::OwnedView<
8260 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeRequestView<'static>,
8261>;
8262pub type OwnedBeginMfaChallengeResponseView = ::buffa::view::OwnedView<
8264 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeResponseView<'static>,
8265>;
8266pub type OwnedVerifyTotpChallengeRequestView = ::buffa::view::OwnedView<
8268 crate::proto::auth::v1::__buffa::view::VerifyTOTPChallengeRequestView<'static>,
8269>;
8270pub type OwnedCompleteMfaChallengeResponseView = ::buffa::view::OwnedView<
8272 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<'static>,
8273>;
8274pub type OwnedFinishPasskeyChallengeRequestView = ::buffa::view::OwnedView<
8276 crate::proto::auth::v1::__buffa::view::FinishPasskeyChallengeRequestView<'static>,
8277>;
8278pub type OwnedVerifyRecoveryCodeChallengeRequestView = ::buffa::view::OwnedView<
8280 crate::proto::auth::v1::__buffa::view::VerifyRecoveryCodeChallengeRequestView<
8281 'static,
8282 >,
8283>;
8284pub type OwnedUpdateMfaFactorRequestView = ::buffa::view::OwnedView<
8286 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorRequestView<'static>,
8287>;
8288pub type OwnedUpdateMfaFactorResponseView = ::buffa::view::OwnedView<
8290 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorResponseView<'static>,
8291>;
8292pub type OwnedDeleteMfaFactorRequestView = ::buffa::view::OwnedView<
8294 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorRequestView<'static>,
8295>;
8296pub type OwnedDeleteMfaFactorResponseView = ::buffa::view::OwnedView<
8298 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorResponseView<'static>,
8299>;
8300pub type OwnedRegenerateRecoveryCodesRequestView = ::buffa::view::OwnedView<
8302 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesRequestView<'static>,
8303>;
8304pub type OwnedRegenerateRecoveryCodesResponseView = ::buffa::view::OwnedView<
8306 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesResponseView<'static>,
8307>;
8308pub type OwnedClaimFreshStepUpRequestView = ::buffa::view::OwnedView<
8310 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpRequestView<'static>,
8311>;
8312pub type OwnedClaimFreshStepUpResponseView = ::buffa::view::OwnedView<
8314 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpResponseView<'static>,
8315>;
8316pub type OwnedConsumeFreshStepUpRequestView = ::buffa::view::OwnedView<
8318 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpRequestView<'static>,
8319>;
8320pub type OwnedConsumeFreshStepUpResponseView = ::buffa::view::OwnedView<
8322 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpResponseView<'static>,
8323>;
8324pub type OwnedReleaseFreshStepUpRequestView = ::buffa::view::OwnedView<
8326 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpRequestView<'static>,
8327>;
8328pub type OwnedReleaseFreshStepUpResponseView = ::buffa::view::OwnedView<
8330 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpResponseView<'static>,
8331>;
8332impl ::connectrpc::Encodable<crate::proto::auth::v1::ListMFAFactorsResponse>
8333for crate::proto::auth::v1::__buffa::view::ListMFAFactorsResponseView<'_> {
8334 fn encode(
8335 &self,
8336 codec: ::connectrpc::CodecFormat,
8337 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8338 ::connectrpc::__codegen::encode_view_body(self, codec)
8339 }
8340}
8341impl ::connectrpc::Encodable<crate::proto::auth::v1::ListMFAFactorsResponse>
8342for ::buffa::view::OwnedView<
8343 crate::proto::auth::v1::__buffa::view::ListMFAFactorsResponseView<'static>,
8344> {
8345 fn encode(
8346 &self,
8347 codec: ::connectrpc::CodecFormat,
8348 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8349 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8350 }
8351}
8352impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginTOTPEnrollmentResponse>
8353for crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentResponseView<'_> {
8354 fn encode(
8355 &self,
8356 codec: ::connectrpc::CodecFormat,
8357 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8358 ::connectrpc::__codegen::encode_view_body(self, codec)
8359 }
8360}
8361impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginTOTPEnrollmentResponse>
8362for ::buffa::view::OwnedView<
8363 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentResponseView<'static>,
8364> {
8365 fn encode(
8366 &self,
8367 codec: ::connectrpc::CodecFormat,
8368 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8369 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8370 }
8371}
8372impl ::connectrpc::Encodable<crate::proto::auth::v1::FinishTOTPEnrollmentResponse>
8373for crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentResponseView<'_> {
8374 fn encode(
8375 &self,
8376 codec: ::connectrpc::CodecFormat,
8377 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8378 ::connectrpc::__codegen::encode_view_body(self, codec)
8379 }
8380}
8381impl ::connectrpc::Encodable<crate::proto::auth::v1::FinishTOTPEnrollmentResponse>
8382for ::buffa::view::OwnedView<
8383 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentResponseView<'static>,
8384> {
8385 fn encode(
8386 &self,
8387 codec: ::connectrpc::CodecFormat,
8388 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8389 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8390 }
8391}
8392impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginPasskeyEnrollmentResponse>
8393for crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentResponseView<'_> {
8394 fn encode(
8395 &self,
8396 codec: ::connectrpc::CodecFormat,
8397 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8398 ::connectrpc::__codegen::encode_view_body(self, codec)
8399 }
8400}
8401impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginPasskeyEnrollmentResponse>
8402for ::buffa::view::OwnedView<
8403 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentResponseView<'static>,
8404> {
8405 fn encode(
8406 &self,
8407 codec: ::connectrpc::CodecFormat,
8408 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8409 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8410 }
8411}
8412impl ::connectrpc::Encodable<crate::proto::auth::v1::FinishPasskeyEnrollmentResponse>
8413for crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentResponseView<'_> {
8414 fn encode(
8415 &self,
8416 codec: ::connectrpc::CodecFormat,
8417 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8418 ::connectrpc::__codegen::encode_view_body(self, codec)
8419 }
8420}
8421impl ::connectrpc::Encodable<crate::proto::auth::v1::FinishPasskeyEnrollmentResponse>
8422for ::buffa::view::OwnedView<
8423 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentResponseView<'static>,
8424> {
8425 fn encode(
8426 &self,
8427 codec: ::connectrpc::CodecFormat,
8428 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8429 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8430 }
8431}
8432impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginMFAChallengeResponse>
8433for crate::proto::auth::v1::__buffa::view::BeginMFAChallengeResponseView<'_> {
8434 fn encode(
8435 &self,
8436 codec: ::connectrpc::CodecFormat,
8437 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8438 ::connectrpc::__codegen::encode_view_body(self, codec)
8439 }
8440}
8441impl ::connectrpc::Encodable<crate::proto::auth::v1::BeginMFAChallengeResponse>
8442for ::buffa::view::OwnedView<
8443 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeResponseView<'static>,
8444> {
8445 fn encode(
8446 &self,
8447 codec: ::connectrpc::CodecFormat,
8448 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8449 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8450 }
8451}
8452impl ::connectrpc::Encodable<crate::proto::auth::v1::CompleteMFAChallengeResponse>
8453for crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<'_> {
8454 fn encode(
8455 &self,
8456 codec: ::connectrpc::CodecFormat,
8457 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8458 ::connectrpc::__codegen::encode_view_body(self, codec)
8459 }
8460}
8461impl ::connectrpc::Encodable<crate::proto::auth::v1::CompleteMFAChallengeResponse>
8462for ::buffa::view::OwnedView<
8463 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<'static>,
8464> {
8465 fn encode(
8466 &self,
8467 codec: ::connectrpc::CodecFormat,
8468 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8469 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8470 }
8471}
8472impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateMFAFactorResponse>
8473for crate::proto::auth::v1::__buffa::view::UpdateMFAFactorResponseView<'_> {
8474 fn encode(
8475 &self,
8476 codec: ::connectrpc::CodecFormat,
8477 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8478 ::connectrpc::__codegen::encode_view_body(self, codec)
8479 }
8480}
8481impl ::connectrpc::Encodable<crate::proto::auth::v1::UpdateMFAFactorResponse>
8482for ::buffa::view::OwnedView<
8483 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorResponseView<'static>,
8484> {
8485 fn encode(
8486 &self,
8487 codec: ::connectrpc::CodecFormat,
8488 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8489 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8490 }
8491}
8492impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteMFAFactorResponse>
8493for crate::proto::auth::v1::__buffa::view::DeleteMFAFactorResponseView<'_> {
8494 fn encode(
8495 &self,
8496 codec: ::connectrpc::CodecFormat,
8497 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8498 ::connectrpc::__codegen::encode_view_body(self, codec)
8499 }
8500}
8501impl ::connectrpc::Encodable<crate::proto::auth::v1::DeleteMFAFactorResponse>
8502for ::buffa::view::OwnedView<
8503 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorResponseView<'static>,
8504> {
8505 fn encode(
8506 &self,
8507 codec: ::connectrpc::CodecFormat,
8508 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8509 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8510 }
8511}
8512impl ::connectrpc::Encodable<crate::proto::auth::v1::RegenerateRecoveryCodesResponse>
8513for crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesResponseView<'_> {
8514 fn encode(
8515 &self,
8516 codec: ::connectrpc::CodecFormat,
8517 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8518 ::connectrpc::__codegen::encode_view_body(self, codec)
8519 }
8520}
8521impl ::connectrpc::Encodable<crate::proto::auth::v1::RegenerateRecoveryCodesResponse>
8522for ::buffa::view::OwnedView<
8523 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesResponseView<'static>,
8524> {
8525 fn encode(
8526 &self,
8527 codec: ::connectrpc::CodecFormat,
8528 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8529 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8530 }
8531}
8532impl ::connectrpc::Encodable<crate::proto::auth::v1::ClaimFreshStepUpResponse>
8533for crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpResponseView<'_> {
8534 fn encode(
8535 &self,
8536 codec: ::connectrpc::CodecFormat,
8537 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8538 ::connectrpc::__codegen::encode_view_body(self, codec)
8539 }
8540}
8541impl ::connectrpc::Encodable<crate::proto::auth::v1::ClaimFreshStepUpResponse>
8542for ::buffa::view::OwnedView<
8543 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpResponseView<'static>,
8544> {
8545 fn encode(
8546 &self,
8547 codec: ::connectrpc::CodecFormat,
8548 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8549 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8550 }
8551}
8552impl ::connectrpc::Encodable<crate::proto::auth::v1::ConsumeFreshStepUpResponse>
8553for crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpResponseView<'_> {
8554 fn encode(
8555 &self,
8556 codec: ::connectrpc::CodecFormat,
8557 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8558 ::connectrpc::__codegen::encode_view_body(self, codec)
8559 }
8560}
8561impl ::connectrpc::Encodable<crate::proto::auth::v1::ConsumeFreshStepUpResponse>
8562for ::buffa::view::OwnedView<
8563 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpResponseView<'static>,
8564> {
8565 fn encode(
8566 &self,
8567 codec: ::connectrpc::CodecFormat,
8568 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8569 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8570 }
8571}
8572impl ::connectrpc::Encodable<crate::proto::auth::v1::ReleaseFreshStepUpResponse>
8573for crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpResponseView<'_> {
8574 fn encode(
8575 &self,
8576 codec: ::connectrpc::CodecFormat,
8577 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8578 ::connectrpc::__codegen::encode_view_body(self, codec)
8579 }
8580}
8581impl ::connectrpc::Encodable<crate::proto::auth::v1::ReleaseFreshStepUpResponse>
8582for ::buffa::view::OwnedView<
8583 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpResponseView<'static>,
8584> {
8585 fn encode(
8586 &self,
8587 codec: ::connectrpc::CodecFormat,
8588 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
8589 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
8590 }
8591}
8592pub const MFA_SERVICE_SERVICE_NAME: &str = "auth.v1.MFAService";
8594pub const MFA_SERVICE_LIST_MFA_FACTORS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8599 "/auth.v1.MFAService/ListMFAFactors",
8600 ::connectrpc::StreamType::Unary,
8601 )
8602 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8603pub const MFA_SERVICE_BEGIN_TOTP_ENROLLMENT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8608 "/auth.v1.MFAService/BeginTOTPEnrollment",
8609 ::connectrpc::StreamType::Unary,
8610 )
8611 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8612pub const MFA_SERVICE_FINISH_TOTP_ENROLLMENT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8617 "/auth.v1.MFAService/FinishTOTPEnrollment",
8618 ::connectrpc::StreamType::Unary,
8619 )
8620 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8621pub const MFA_SERVICE_BEGIN_PASSKEY_ENROLLMENT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8626 "/auth.v1.MFAService/BeginPasskeyEnrollment",
8627 ::connectrpc::StreamType::Unary,
8628 )
8629 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8630pub const MFA_SERVICE_FINISH_PASSKEY_ENROLLMENT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8635 "/auth.v1.MFAService/FinishPasskeyEnrollment",
8636 ::connectrpc::StreamType::Unary,
8637 )
8638 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8639pub const MFA_SERVICE_BEGIN_MFA_CHALLENGE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8644 "/auth.v1.MFAService/BeginMFAChallenge",
8645 ::connectrpc::StreamType::Unary,
8646 )
8647 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8648pub const MFA_SERVICE_VERIFY_TOTP_CHALLENGE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8653 "/auth.v1.MFAService/VerifyTOTPChallenge",
8654 ::connectrpc::StreamType::Unary,
8655 )
8656 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8657pub const MFA_SERVICE_FINISH_PASSKEY_CHALLENGE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8662 "/auth.v1.MFAService/FinishPasskeyChallenge",
8663 ::connectrpc::StreamType::Unary,
8664 )
8665 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8666pub const MFA_SERVICE_VERIFY_RECOVERY_CODE_CHALLENGE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8671 "/auth.v1.MFAService/VerifyRecoveryCodeChallenge",
8672 ::connectrpc::StreamType::Unary,
8673 )
8674 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8675pub const MFA_SERVICE_UPDATE_MFA_FACTOR_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8680 "/auth.v1.MFAService/UpdateMFAFactor",
8681 ::connectrpc::StreamType::Unary,
8682 )
8683 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8684pub const MFA_SERVICE_DELETE_MFA_FACTOR_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8689 "/auth.v1.MFAService/DeleteMFAFactor",
8690 ::connectrpc::StreamType::Unary,
8691 )
8692 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8693pub const MFA_SERVICE_REGENERATE_RECOVERY_CODES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8698 "/auth.v1.MFAService/RegenerateRecoveryCodes",
8699 ::connectrpc::StreamType::Unary,
8700 )
8701 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8702pub const MFA_SERVICE_CLAIM_FRESH_STEP_UP_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8707 "/auth.v1.MFAService/ClaimFreshStepUp",
8708 ::connectrpc::StreamType::Unary,
8709 )
8710 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8711pub const MFA_SERVICE_CONSUME_FRESH_STEP_UP_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8716 "/auth.v1.MFAService/ConsumeFreshStepUp",
8717 ::connectrpc::StreamType::Unary,
8718 )
8719 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8720pub const MFA_SERVICE_RELEASE_FRESH_STEP_UP_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
8725 "/auth.v1.MFAService/ReleaseFreshStepUp",
8726 ::connectrpc::StreamType::Unary,
8727 )
8728 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
8729#[allow(clippy::type_complexity)]
8779pub trait MfaService: Send + Sync + 'static {
8780 fn list_mfa_factors<'a>(
8790 &'a self,
8791 ctx: ::connectrpc::RequestContext,
8792 request: ::connectrpc::ServiceRequest<
8793 '_,
8794 crate::proto::auth::v1::ListMFAFactorsRequest,
8795 >,
8796 ) -> impl ::std::future::Future<
8797 Output = ::connectrpc::ServiceResult<
8798 impl ::connectrpc::Encodable<
8799 crate::proto::auth::v1::ListMFAFactorsResponse,
8800 > + Send + use<'a, Self>,
8801 >,
8802 > + Send;
8803 fn begin_totp_enrollment<'a>(
8813 &'a self,
8814 ctx: ::connectrpc::RequestContext,
8815 request: ::connectrpc::ServiceRequest<
8816 '_,
8817 crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
8818 >,
8819 ) -> impl ::std::future::Future<
8820 Output = ::connectrpc::ServiceResult<
8821 impl ::connectrpc::Encodable<
8822 crate::proto::auth::v1::BeginTOTPEnrollmentResponse,
8823 > + Send + use<'a, Self>,
8824 >,
8825 > + Send;
8826 fn finish_totp_enrollment<'a>(
8836 &'a self,
8837 ctx: ::connectrpc::RequestContext,
8838 request: ::connectrpc::ServiceRequest<
8839 '_,
8840 crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
8841 >,
8842 ) -> impl ::std::future::Future<
8843 Output = ::connectrpc::ServiceResult<
8844 impl ::connectrpc::Encodable<
8845 crate::proto::auth::v1::FinishTOTPEnrollmentResponse,
8846 > + Send + use<'a, Self>,
8847 >,
8848 > + Send;
8849 fn begin_passkey_enrollment<'a>(
8859 &'a self,
8860 ctx: ::connectrpc::RequestContext,
8861 request: ::connectrpc::ServiceRequest<
8862 '_,
8863 crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
8864 >,
8865 ) -> impl ::std::future::Future<
8866 Output = ::connectrpc::ServiceResult<
8867 impl ::connectrpc::Encodable<
8868 crate::proto::auth::v1::BeginPasskeyEnrollmentResponse,
8869 > + Send + use<'a, Self>,
8870 >,
8871 > + Send;
8872 fn finish_passkey_enrollment<'a>(
8882 &'a self,
8883 ctx: ::connectrpc::RequestContext,
8884 request: ::connectrpc::ServiceRequest<
8885 '_,
8886 crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
8887 >,
8888 ) -> impl ::std::future::Future<
8889 Output = ::connectrpc::ServiceResult<
8890 impl ::connectrpc::Encodable<
8891 crate::proto::auth::v1::FinishPasskeyEnrollmentResponse,
8892 > + Send + use<'a, Self>,
8893 >,
8894 > + Send;
8895 fn begin_mfa_challenge<'a>(
8905 &'a self,
8906 ctx: ::connectrpc::RequestContext,
8907 request: ::connectrpc::ServiceRequest<
8908 '_,
8909 crate::proto::auth::v1::BeginMFAChallengeRequest,
8910 >,
8911 ) -> impl ::std::future::Future<
8912 Output = ::connectrpc::ServiceResult<
8913 impl ::connectrpc::Encodable<
8914 crate::proto::auth::v1::BeginMFAChallengeResponse,
8915 > + Send + use<'a, Self>,
8916 >,
8917 > + Send;
8918 fn verify_totp_challenge<'a>(
8928 &'a self,
8929 ctx: ::connectrpc::RequestContext,
8930 request: ::connectrpc::ServiceRequest<
8931 '_,
8932 crate::proto::auth::v1::VerifyTOTPChallengeRequest,
8933 >,
8934 ) -> impl ::std::future::Future<
8935 Output = ::connectrpc::ServiceResult<
8936 impl ::connectrpc::Encodable<
8937 crate::proto::auth::v1::CompleteMFAChallengeResponse,
8938 > + Send + use<'a, Self>,
8939 >,
8940 > + Send;
8941 fn finish_passkey_challenge<'a>(
8951 &'a self,
8952 ctx: ::connectrpc::RequestContext,
8953 request: ::connectrpc::ServiceRequest<
8954 '_,
8955 crate::proto::auth::v1::FinishPasskeyChallengeRequest,
8956 >,
8957 ) -> impl ::std::future::Future<
8958 Output = ::connectrpc::ServiceResult<
8959 impl ::connectrpc::Encodable<
8960 crate::proto::auth::v1::CompleteMFAChallengeResponse,
8961 > + Send + use<'a, Self>,
8962 >,
8963 > + Send;
8964 fn verify_recovery_code_challenge<'a>(
8974 &'a self,
8975 ctx: ::connectrpc::RequestContext,
8976 request: ::connectrpc::ServiceRequest<
8977 '_,
8978 crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
8979 >,
8980 ) -> impl ::std::future::Future<
8981 Output = ::connectrpc::ServiceResult<
8982 impl ::connectrpc::Encodable<
8983 crate::proto::auth::v1::CompleteMFAChallengeResponse,
8984 > + Send + use<'a, Self>,
8985 >,
8986 > + Send;
8987 fn update_mfa_factor<'a>(
8997 &'a self,
8998 ctx: ::connectrpc::RequestContext,
8999 request: ::connectrpc::ServiceRequest<
9000 '_,
9001 crate::proto::auth::v1::UpdateMFAFactorRequest,
9002 >,
9003 ) -> impl ::std::future::Future<
9004 Output = ::connectrpc::ServiceResult<
9005 impl ::connectrpc::Encodable<
9006 crate::proto::auth::v1::UpdateMFAFactorResponse,
9007 > + Send + use<'a, Self>,
9008 >,
9009 > + Send;
9010 fn delete_mfa_factor<'a>(
9020 &'a self,
9021 ctx: ::connectrpc::RequestContext,
9022 request: ::connectrpc::ServiceRequest<
9023 '_,
9024 crate::proto::auth::v1::DeleteMFAFactorRequest,
9025 >,
9026 ) -> impl ::std::future::Future<
9027 Output = ::connectrpc::ServiceResult<
9028 impl ::connectrpc::Encodable<
9029 crate::proto::auth::v1::DeleteMFAFactorResponse,
9030 > + Send + use<'a, Self>,
9031 >,
9032 > + Send;
9033 fn regenerate_recovery_codes<'a>(
9043 &'a self,
9044 ctx: ::connectrpc::RequestContext,
9045 request: ::connectrpc::ServiceRequest<
9046 '_,
9047 crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
9048 >,
9049 ) -> impl ::std::future::Future<
9050 Output = ::connectrpc::ServiceResult<
9051 impl ::connectrpc::Encodable<
9052 crate::proto::auth::v1::RegenerateRecoveryCodesResponse,
9053 > + Send + use<'a, Self>,
9054 >,
9055 > + Send;
9056 fn claim_fresh_step_up<'a>(
9066 &'a self,
9067 ctx: ::connectrpc::RequestContext,
9068 request: ::connectrpc::ServiceRequest<
9069 '_,
9070 crate::proto::auth::v1::ClaimFreshStepUpRequest,
9071 >,
9072 ) -> impl ::std::future::Future<
9073 Output = ::connectrpc::ServiceResult<
9074 impl ::connectrpc::Encodable<
9075 crate::proto::auth::v1::ClaimFreshStepUpResponse,
9076 > + Send + use<'a, Self>,
9077 >,
9078 > + Send;
9079 fn consume_fresh_step_up<'a>(
9089 &'a self,
9090 ctx: ::connectrpc::RequestContext,
9091 request: ::connectrpc::ServiceRequest<
9092 '_,
9093 crate::proto::auth::v1::ConsumeFreshStepUpRequest,
9094 >,
9095 ) -> impl ::std::future::Future<
9096 Output = ::connectrpc::ServiceResult<
9097 impl ::connectrpc::Encodable<
9098 crate::proto::auth::v1::ConsumeFreshStepUpResponse,
9099 > + Send + use<'a, Self>,
9100 >,
9101 > + Send;
9102 fn release_fresh_step_up<'a>(
9112 &'a self,
9113 ctx: ::connectrpc::RequestContext,
9114 request: ::connectrpc::ServiceRequest<
9115 '_,
9116 crate::proto::auth::v1::ReleaseFreshStepUpRequest,
9117 >,
9118 ) -> impl ::std::future::Future<
9119 Output = ::connectrpc::ServiceResult<
9120 impl ::connectrpc::Encodable<
9121 crate::proto::auth::v1::ReleaseFreshStepUpResponse,
9122 > + Send + use<'a, Self>,
9123 >,
9124 > + Send;
9125}
9126pub trait MfaServiceExt: MfaService {
9142 fn register(
9147 self: ::std::sync::Arc<Self>,
9148 router: ::connectrpc::Router,
9149 ) -> ::connectrpc::Router;
9150}
9151impl<S: MfaService> MfaServiceExt for S {
9152 fn register(
9153 self: ::std::sync::Arc<Self>,
9154 router: ::connectrpc::Router,
9155 ) -> ::connectrpc::Router {
9156 router
9157 .route_view(
9158 MFA_SERVICE_SERVICE_NAME,
9159 "ListMFAFactors",
9160 {
9161 let svc = ::std::sync::Arc::clone(&self);
9162 ::connectrpc::view_handler_fn(move |
9163 ctx,
9164 req: ::buffa::view::OwnedView<
9165 crate::proto::auth::v1::__buffa::view::ListMFAFactorsRequestView<
9166 'static,
9167 >,
9168 >,
9169 format|
9170 {
9171 let svc = ::std::sync::Arc::clone(&svc);
9172 async move {
9173 let sreq = ::connectrpc::ServiceRequest::<
9174 crate::proto::auth::v1::ListMFAFactorsRequest,
9175 >::from_parts(req.reborrow(), req.bytes());
9176 svc.list_mfa_factors(ctx, sreq)
9177 .await?
9178 .encode::<
9179 crate::proto::auth::v1::ListMFAFactorsResponse,
9180 >(format)
9181 }
9182 })
9183 },
9184 )
9185 .with_spec(MFA_SERVICE_LIST_MFA_FACTORS_SPEC)
9186 .route_view(
9187 MFA_SERVICE_SERVICE_NAME,
9188 "BeginTOTPEnrollment",
9189 {
9190 let svc = ::std::sync::Arc::clone(&self);
9191 ::connectrpc::view_handler_fn(move |
9192 ctx,
9193 req: ::buffa::view::OwnedView<
9194 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentRequestView<
9195 'static,
9196 >,
9197 >,
9198 format|
9199 {
9200 let svc = ::std::sync::Arc::clone(&svc);
9201 async move {
9202 let sreq = ::connectrpc::ServiceRequest::<
9203 crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
9204 >::from_parts(req.reborrow(), req.bytes());
9205 svc.begin_totp_enrollment(ctx, sreq)
9206 .await?
9207 .encode::<
9208 crate::proto::auth::v1::BeginTOTPEnrollmentResponse,
9209 >(format)
9210 }
9211 })
9212 },
9213 )
9214 .with_spec(MFA_SERVICE_BEGIN_TOTP_ENROLLMENT_SPEC)
9215 .route_view(
9216 MFA_SERVICE_SERVICE_NAME,
9217 "FinishTOTPEnrollment",
9218 {
9219 let svc = ::std::sync::Arc::clone(&self);
9220 ::connectrpc::view_handler_fn(move |
9221 ctx,
9222 req: ::buffa::view::OwnedView<
9223 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentRequestView<
9224 'static,
9225 >,
9226 >,
9227 format|
9228 {
9229 let svc = ::std::sync::Arc::clone(&svc);
9230 async move {
9231 let sreq = ::connectrpc::ServiceRequest::<
9232 crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
9233 >::from_parts(req.reborrow(), req.bytes());
9234 svc.finish_totp_enrollment(ctx, sreq)
9235 .await?
9236 .encode::<
9237 crate::proto::auth::v1::FinishTOTPEnrollmentResponse,
9238 >(format)
9239 }
9240 })
9241 },
9242 )
9243 .with_spec(MFA_SERVICE_FINISH_TOTP_ENROLLMENT_SPEC)
9244 .route_view(
9245 MFA_SERVICE_SERVICE_NAME,
9246 "BeginPasskeyEnrollment",
9247 {
9248 let svc = ::std::sync::Arc::clone(&self);
9249 ::connectrpc::view_handler_fn(move |
9250 ctx,
9251 req: ::buffa::view::OwnedView<
9252 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentRequestView<
9253 'static,
9254 >,
9255 >,
9256 format|
9257 {
9258 let svc = ::std::sync::Arc::clone(&svc);
9259 async move {
9260 let sreq = ::connectrpc::ServiceRequest::<
9261 crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
9262 >::from_parts(req.reborrow(), req.bytes());
9263 svc.begin_passkey_enrollment(ctx, sreq)
9264 .await?
9265 .encode::<
9266 crate::proto::auth::v1::BeginPasskeyEnrollmentResponse,
9267 >(format)
9268 }
9269 })
9270 },
9271 )
9272 .with_spec(MFA_SERVICE_BEGIN_PASSKEY_ENROLLMENT_SPEC)
9273 .route_view(
9274 MFA_SERVICE_SERVICE_NAME,
9275 "FinishPasskeyEnrollment",
9276 {
9277 let svc = ::std::sync::Arc::clone(&self);
9278 ::connectrpc::view_handler_fn(move |
9279 ctx,
9280 req: ::buffa::view::OwnedView<
9281 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentRequestView<
9282 'static,
9283 >,
9284 >,
9285 format|
9286 {
9287 let svc = ::std::sync::Arc::clone(&svc);
9288 async move {
9289 let sreq = ::connectrpc::ServiceRequest::<
9290 crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
9291 >::from_parts(req.reborrow(), req.bytes());
9292 svc.finish_passkey_enrollment(ctx, sreq)
9293 .await?
9294 .encode::<
9295 crate::proto::auth::v1::FinishPasskeyEnrollmentResponse,
9296 >(format)
9297 }
9298 })
9299 },
9300 )
9301 .with_spec(MFA_SERVICE_FINISH_PASSKEY_ENROLLMENT_SPEC)
9302 .route_view(
9303 MFA_SERVICE_SERVICE_NAME,
9304 "BeginMFAChallenge",
9305 {
9306 let svc = ::std::sync::Arc::clone(&self);
9307 ::connectrpc::view_handler_fn(move |
9308 ctx,
9309 req: ::buffa::view::OwnedView<
9310 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeRequestView<
9311 'static,
9312 >,
9313 >,
9314 format|
9315 {
9316 let svc = ::std::sync::Arc::clone(&svc);
9317 async move {
9318 let sreq = ::connectrpc::ServiceRequest::<
9319 crate::proto::auth::v1::BeginMFAChallengeRequest,
9320 >::from_parts(req.reborrow(), req.bytes());
9321 svc.begin_mfa_challenge(ctx, sreq)
9322 .await?
9323 .encode::<
9324 crate::proto::auth::v1::BeginMFAChallengeResponse,
9325 >(format)
9326 }
9327 })
9328 },
9329 )
9330 .with_spec(MFA_SERVICE_BEGIN_MFA_CHALLENGE_SPEC)
9331 .route_view(
9332 MFA_SERVICE_SERVICE_NAME,
9333 "VerifyTOTPChallenge",
9334 {
9335 let svc = ::std::sync::Arc::clone(&self);
9336 ::connectrpc::view_handler_fn(move |
9337 ctx,
9338 req: ::buffa::view::OwnedView<
9339 crate::proto::auth::v1::__buffa::view::VerifyTOTPChallengeRequestView<
9340 'static,
9341 >,
9342 >,
9343 format|
9344 {
9345 let svc = ::std::sync::Arc::clone(&svc);
9346 async move {
9347 let sreq = ::connectrpc::ServiceRequest::<
9348 crate::proto::auth::v1::VerifyTOTPChallengeRequest,
9349 >::from_parts(req.reborrow(), req.bytes());
9350 svc.verify_totp_challenge(ctx, sreq)
9351 .await?
9352 .encode::<
9353 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9354 >(format)
9355 }
9356 })
9357 },
9358 )
9359 .with_spec(MFA_SERVICE_VERIFY_TOTP_CHALLENGE_SPEC)
9360 .route_view(
9361 MFA_SERVICE_SERVICE_NAME,
9362 "FinishPasskeyChallenge",
9363 {
9364 let svc = ::std::sync::Arc::clone(&self);
9365 ::connectrpc::view_handler_fn(move |
9366 ctx,
9367 req: ::buffa::view::OwnedView<
9368 crate::proto::auth::v1::__buffa::view::FinishPasskeyChallengeRequestView<
9369 'static,
9370 >,
9371 >,
9372 format|
9373 {
9374 let svc = ::std::sync::Arc::clone(&svc);
9375 async move {
9376 let sreq = ::connectrpc::ServiceRequest::<
9377 crate::proto::auth::v1::FinishPasskeyChallengeRequest,
9378 >::from_parts(req.reborrow(), req.bytes());
9379 svc.finish_passkey_challenge(ctx, sreq)
9380 .await?
9381 .encode::<
9382 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9383 >(format)
9384 }
9385 })
9386 },
9387 )
9388 .with_spec(MFA_SERVICE_FINISH_PASSKEY_CHALLENGE_SPEC)
9389 .route_view(
9390 MFA_SERVICE_SERVICE_NAME,
9391 "VerifyRecoveryCodeChallenge",
9392 {
9393 let svc = ::std::sync::Arc::clone(&self);
9394 ::connectrpc::view_handler_fn(move |
9395 ctx,
9396 req: ::buffa::view::OwnedView<
9397 crate::proto::auth::v1::__buffa::view::VerifyRecoveryCodeChallengeRequestView<
9398 'static,
9399 >,
9400 >,
9401 format|
9402 {
9403 let svc = ::std::sync::Arc::clone(&svc);
9404 async move {
9405 let sreq = ::connectrpc::ServiceRequest::<
9406 crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
9407 >::from_parts(req.reborrow(), req.bytes());
9408 svc.verify_recovery_code_challenge(ctx, sreq)
9409 .await?
9410 .encode::<
9411 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9412 >(format)
9413 }
9414 })
9415 },
9416 )
9417 .with_spec(MFA_SERVICE_VERIFY_RECOVERY_CODE_CHALLENGE_SPEC)
9418 .route_view(
9419 MFA_SERVICE_SERVICE_NAME,
9420 "UpdateMFAFactor",
9421 {
9422 let svc = ::std::sync::Arc::clone(&self);
9423 ::connectrpc::view_handler_fn(move |
9424 ctx,
9425 req: ::buffa::view::OwnedView<
9426 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorRequestView<
9427 'static,
9428 >,
9429 >,
9430 format|
9431 {
9432 let svc = ::std::sync::Arc::clone(&svc);
9433 async move {
9434 let sreq = ::connectrpc::ServiceRequest::<
9435 crate::proto::auth::v1::UpdateMFAFactorRequest,
9436 >::from_parts(req.reborrow(), req.bytes());
9437 svc.update_mfa_factor(ctx, sreq)
9438 .await?
9439 .encode::<
9440 crate::proto::auth::v1::UpdateMFAFactorResponse,
9441 >(format)
9442 }
9443 })
9444 },
9445 )
9446 .with_spec(MFA_SERVICE_UPDATE_MFA_FACTOR_SPEC)
9447 .route_view(
9448 MFA_SERVICE_SERVICE_NAME,
9449 "DeleteMFAFactor",
9450 {
9451 let svc = ::std::sync::Arc::clone(&self);
9452 ::connectrpc::view_handler_fn(move |
9453 ctx,
9454 req: ::buffa::view::OwnedView<
9455 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorRequestView<
9456 'static,
9457 >,
9458 >,
9459 format|
9460 {
9461 let svc = ::std::sync::Arc::clone(&svc);
9462 async move {
9463 let sreq = ::connectrpc::ServiceRequest::<
9464 crate::proto::auth::v1::DeleteMFAFactorRequest,
9465 >::from_parts(req.reborrow(), req.bytes());
9466 svc.delete_mfa_factor(ctx, sreq)
9467 .await?
9468 .encode::<
9469 crate::proto::auth::v1::DeleteMFAFactorResponse,
9470 >(format)
9471 }
9472 })
9473 },
9474 )
9475 .with_spec(MFA_SERVICE_DELETE_MFA_FACTOR_SPEC)
9476 .route_view(
9477 MFA_SERVICE_SERVICE_NAME,
9478 "RegenerateRecoveryCodes",
9479 {
9480 let svc = ::std::sync::Arc::clone(&self);
9481 ::connectrpc::view_handler_fn(move |
9482 ctx,
9483 req: ::buffa::view::OwnedView<
9484 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesRequestView<
9485 'static,
9486 >,
9487 >,
9488 format|
9489 {
9490 let svc = ::std::sync::Arc::clone(&svc);
9491 async move {
9492 let sreq = ::connectrpc::ServiceRequest::<
9493 crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
9494 >::from_parts(req.reborrow(), req.bytes());
9495 svc.regenerate_recovery_codes(ctx, sreq)
9496 .await?
9497 .encode::<
9498 crate::proto::auth::v1::RegenerateRecoveryCodesResponse,
9499 >(format)
9500 }
9501 })
9502 },
9503 )
9504 .with_spec(MFA_SERVICE_REGENERATE_RECOVERY_CODES_SPEC)
9505 .route_view(
9506 MFA_SERVICE_SERVICE_NAME,
9507 "ClaimFreshStepUp",
9508 {
9509 let svc = ::std::sync::Arc::clone(&self);
9510 ::connectrpc::view_handler_fn(move |
9511 ctx,
9512 req: ::buffa::view::OwnedView<
9513 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpRequestView<
9514 'static,
9515 >,
9516 >,
9517 format|
9518 {
9519 let svc = ::std::sync::Arc::clone(&svc);
9520 async move {
9521 let sreq = ::connectrpc::ServiceRequest::<
9522 crate::proto::auth::v1::ClaimFreshStepUpRequest,
9523 >::from_parts(req.reborrow(), req.bytes());
9524 svc.claim_fresh_step_up(ctx, sreq)
9525 .await?
9526 .encode::<
9527 crate::proto::auth::v1::ClaimFreshStepUpResponse,
9528 >(format)
9529 }
9530 })
9531 },
9532 )
9533 .with_spec(MFA_SERVICE_CLAIM_FRESH_STEP_UP_SPEC)
9534 .route_view(
9535 MFA_SERVICE_SERVICE_NAME,
9536 "ConsumeFreshStepUp",
9537 {
9538 let svc = ::std::sync::Arc::clone(&self);
9539 ::connectrpc::view_handler_fn(move |
9540 ctx,
9541 req: ::buffa::view::OwnedView<
9542 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpRequestView<
9543 'static,
9544 >,
9545 >,
9546 format|
9547 {
9548 let svc = ::std::sync::Arc::clone(&svc);
9549 async move {
9550 let sreq = ::connectrpc::ServiceRequest::<
9551 crate::proto::auth::v1::ConsumeFreshStepUpRequest,
9552 >::from_parts(req.reborrow(), req.bytes());
9553 svc.consume_fresh_step_up(ctx, sreq)
9554 .await?
9555 .encode::<
9556 crate::proto::auth::v1::ConsumeFreshStepUpResponse,
9557 >(format)
9558 }
9559 })
9560 },
9561 )
9562 .with_spec(MFA_SERVICE_CONSUME_FRESH_STEP_UP_SPEC)
9563 .route_view(
9564 MFA_SERVICE_SERVICE_NAME,
9565 "ReleaseFreshStepUp",
9566 {
9567 let svc = ::std::sync::Arc::clone(&self);
9568 ::connectrpc::view_handler_fn(move |
9569 ctx,
9570 req: ::buffa::view::OwnedView<
9571 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpRequestView<
9572 'static,
9573 >,
9574 >,
9575 format|
9576 {
9577 let svc = ::std::sync::Arc::clone(&svc);
9578 async move {
9579 let sreq = ::connectrpc::ServiceRequest::<
9580 crate::proto::auth::v1::ReleaseFreshStepUpRequest,
9581 >::from_parts(req.reborrow(), req.bytes());
9582 svc.release_fresh_step_up(ctx, sreq)
9583 .await?
9584 .encode::<
9585 crate::proto::auth::v1::ReleaseFreshStepUpResponse,
9586 >(format)
9587 }
9588 })
9589 },
9590 )
9591 .with_spec(MFA_SERVICE_RELEASE_FRESH_STEP_UP_SPEC)
9592 }
9593}
9594#[doc(hidden)]
9596pub struct MfaServiceRegisterMarker;
9597impl<S: MfaService> ::connectrpc::ServiceRegister<MfaServiceRegisterMarker>
9598for ::std::sync::Arc<S> {
9599 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
9600 <S as MfaServiceExt>::register(self, router)
9601 }
9602}
9603pub struct MfaServiceServer<T> {
9617 inner: ::std::sync::Arc<T>,
9618}
9619impl<T: MfaService> MfaServiceServer<T> {
9620 pub fn new(service: T) -> Self {
9622 Self {
9623 inner: ::std::sync::Arc::new(service),
9624 }
9625 }
9626 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
9628 Self { inner }
9629 }
9630}
9631impl<T> Clone for MfaServiceServer<T> {
9632 fn clone(&self) -> Self {
9633 Self {
9634 inner: ::std::sync::Arc::clone(&self.inner),
9635 }
9636 }
9637}
9638impl<T: MfaService> ::connectrpc::Dispatcher for MfaServiceServer<T> {
9639 #[inline]
9640 fn lookup(
9641 &self,
9642 path: &str,
9643 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
9644 let method = path.strip_prefix("auth.v1.MFAService/")?;
9645 match method {
9646 "ListMFAFactors" => {
9647 Some(
9648 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9649 .with_spec(MFA_SERVICE_LIST_MFA_FACTORS_SPEC),
9650 )
9651 }
9652 "BeginTOTPEnrollment" => {
9653 Some(
9654 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9655 .with_spec(MFA_SERVICE_BEGIN_TOTP_ENROLLMENT_SPEC),
9656 )
9657 }
9658 "FinishTOTPEnrollment" => {
9659 Some(
9660 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9661 .with_spec(MFA_SERVICE_FINISH_TOTP_ENROLLMENT_SPEC),
9662 )
9663 }
9664 "BeginPasskeyEnrollment" => {
9665 Some(
9666 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9667 .with_spec(MFA_SERVICE_BEGIN_PASSKEY_ENROLLMENT_SPEC),
9668 )
9669 }
9670 "FinishPasskeyEnrollment" => {
9671 Some(
9672 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9673 .with_spec(MFA_SERVICE_FINISH_PASSKEY_ENROLLMENT_SPEC),
9674 )
9675 }
9676 "BeginMFAChallenge" => {
9677 Some(
9678 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9679 .with_spec(MFA_SERVICE_BEGIN_MFA_CHALLENGE_SPEC),
9680 )
9681 }
9682 "VerifyTOTPChallenge" => {
9683 Some(
9684 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9685 .with_spec(MFA_SERVICE_VERIFY_TOTP_CHALLENGE_SPEC),
9686 )
9687 }
9688 "FinishPasskeyChallenge" => {
9689 Some(
9690 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9691 .with_spec(MFA_SERVICE_FINISH_PASSKEY_CHALLENGE_SPEC),
9692 )
9693 }
9694 "VerifyRecoveryCodeChallenge" => {
9695 Some(
9696 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9697 .with_spec(MFA_SERVICE_VERIFY_RECOVERY_CODE_CHALLENGE_SPEC),
9698 )
9699 }
9700 "UpdateMFAFactor" => {
9701 Some(
9702 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9703 .with_spec(MFA_SERVICE_UPDATE_MFA_FACTOR_SPEC),
9704 )
9705 }
9706 "DeleteMFAFactor" => {
9707 Some(
9708 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9709 .with_spec(MFA_SERVICE_DELETE_MFA_FACTOR_SPEC),
9710 )
9711 }
9712 "RegenerateRecoveryCodes" => {
9713 Some(
9714 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9715 .with_spec(MFA_SERVICE_REGENERATE_RECOVERY_CODES_SPEC),
9716 )
9717 }
9718 "ClaimFreshStepUp" => {
9719 Some(
9720 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9721 .with_spec(MFA_SERVICE_CLAIM_FRESH_STEP_UP_SPEC),
9722 )
9723 }
9724 "ConsumeFreshStepUp" => {
9725 Some(
9726 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9727 .with_spec(MFA_SERVICE_CONSUME_FRESH_STEP_UP_SPEC),
9728 )
9729 }
9730 "ReleaseFreshStepUp" => {
9731 Some(
9732 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
9733 .with_spec(MFA_SERVICE_RELEASE_FRESH_STEP_UP_SPEC),
9734 )
9735 }
9736 _ => None,
9737 }
9738 }
9739 fn call_unary(
9740 &self,
9741 path: &str,
9742 ctx: ::connectrpc::RequestContext,
9743 request: ::connectrpc::Payload,
9744 format: ::connectrpc::CodecFormat,
9745 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
9746 let Some(method) = path.strip_prefix("auth.v1.MFAService/") else {
9747 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
9748 };
9749 let _ = (&ctx, &request, &format);
9750 match method {
9751 "ListMFAFactors" => {
9752 let svc = ::std::sync::Arc::clone(&self.inner);
9753 Box::pin(async move {
9754 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9755 crate::proto::auth::v1::ListMFAFactorsRequest,
9756 >(request.encoded()?, format)?;
9757 let req: crate::proto::auth::v1::__buffa::view::ListMFAFactorsRequestView<
9758 '_,
9759 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9760 &body,
9761 )?;
9762 let req = ::connectrpc::ServiceRequest::<
9763 crate::proto::auth::v1::ListMFAFactorsRequest,
9764 >::from_parts(&req, &body);
9765 svc.list_mfa_factors(ctx, req)
9766 .await?
9767 .encode::<crate::proto::auth::v1::ListMFAFactorsResponse>(format)
9768 })
9769 }
9770 "BeginTOTPEnrollment" => {
9771 let svc = ::std::sync::Arc::clone(&self.inner);
9772 Box::pin(async move {
9773 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9774 crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
9775 >(request.encoded()?, format)?;
9776 let req: crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentRequestView<
9777 '_,
9778 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9779 &body,
9780 )?;
9781 let req = ::connectrpc::ServiceRequest::<
9782 crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
9783 >::from_parts(&req, &body);
9784 svc.begin_totp_enrollment(ctx, req)
9785 .await?
9786 .encode::<
9787 crate::proto::auth::v1::BeginTOTPEnrollmentResponse,
9788 >(format)
9789 })
9790 }
9791 "FinishTOTPEnrollment" => {
9792 let svc = ::std::sync::Arc::clone(&self.inner);
9793 Box::pin(async move {
9794 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9795 crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
9796 >(request.encoded()?, format)?;
9797 let req: crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentRequestView<
9798 '_,
9799 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9800 &body,
9801 )?;
9802 let req = ::connectrpc::ServiceRequest::<
9803 crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
9804 >::from_parts(&req, &body);
9805 svc.finish_totp_enrollment(ctx, req)
9806 .await?
9807 .encode::<
9808 crate::proto::auth::v1::FinishTOTPEnrollmentResponse,
9809 >(format)
9810 })
9811 }
9812 "BeginPasskeyEnrollment" => {
9813 let svc = ::std::sync::Arc::clone(&self.inner);
9814 Box::pin(async move {
9815 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9816 crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
9817 >(request.encoded()?, format)?;
9818 let req: crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentRequestView<
9819 '_,
9820 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9821 &body,
9822 )?;
9823 let req = ::connectrpc::ServiceRequest::<
9824 crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
9825 >::from_parts(&req, &body);
9826 svc.begin_passkey_enrollment(ctx, req)
9827 .await?
9828 .encode::<
9829 crate::proto::auth::v1::BeginPasskeyEnrollmentResponse,
9830 >(format)
9831 })
9832 }
9833 "FinishPasskeyEnrollment" => {
9834 let svc = ::std::sync::Arc::clone(&self.inner);
9835 Box::pin(async move {
9836 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9837 crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
9838 >(request.encoded()?, format)?;
9839 let req: crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentRequestView<
9840 '_,
9841 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9842 &body,
9843 )?;
9844 let req = ::connectrpc::ServiceRequest::<
9845 crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
9846 >::from_parts(&req, &body);
9847 svc.finish_passkey_enrollment(ctx, req)
9848 .await?
9849 .encode::<
9850 crate::proto::auth::v1::FinishPasskeyEnrollmentResponse,
9851 >(format)
9852 })
9853 }
9854 "BeginMFAChallenge" => {
9855 let svc = ::std::sync::Arc::clone(&self.inner);
9856 Box::pin(async move {
9857 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9858 crate::proto::auth::v1::BeginMFAChallengeRequest,
9859 >(request.encoded()?, format)?;
9860 let req: crate::proto::auth::v1::__buffa::view::BeginMFAChallengeRequestView<
9861 '_,
9862 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9863 &body,
9864 )?;
9865 let req = ::connectrpc::ServiceRequest::<
9866 crate::proto::auth::v1::BeginMFAChallengeRequest,
9867 >::from_parts(&req, &body);
9868 svc.begin_mfa_challenge(ctx, req)
9869 .await?
9870 .encode::<
9871 crate::proto::auth::v1::BeginMFAChallengeResponse,
9872 >(format)
9873 })
9874 }
9875 "VerifyTOTPChallenge" => {
9876 let svc = ::std::sync::Arc::clone(&self.inner);
9877 Box::pin(async move {
9878 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9879 crate::proto::auth::v1::VerifyTOTPChallengeRequest,
9880 >(request.encoded()?, format)?;
9881 let req: crate::proto::auth::v1::__buffa::view::VerifyTOTPChallengeRequestView<
9882 '_,
9883 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9884 &body,
9885 )?;
9886 let req = ::connectrpc::ServiceRequest::<
9887 crate::proto::auth::v1::VerifyTOTPChallengeRequest,
9888 >::from_parts(&req, &body);
9889 svc.verify_totp_challenge(ctx, req)
9890 .await?
9891 .encode::<
9892 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9893 >(format)
9894 })
9895 }
9896 "FinishPasskeyChallenge" => {
9897 let svc = ::std::sync::Arc::clone(&self.inner);
9898 Box::pin(async move {
9899 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9900 crate::proto::auth::v1::FinishPasskeyChallengeRequest,
9901 >(request.encoded()?, format)?;
9902 let req: crate::proto::auth::v1::__buffa::view::FinishPasskeyChallengeRequestView<
9903 '_,
9904 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9905 &body,
9906 )?;
9907 let req = ::connectrpc::ServiceRequest::<
9908 crate::proto::auth::v1::FinishPasskeyChallengeRequest,
9909 >::from_parts(&req, &body);
9910 svc.finish_passkey_challenge(ctx, req)
9911 .await?
9912 .encode::<
9913 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9914 >(format)
9915 })
9916 }
9917 "VerifyRecoveryCodeChallenge" => {
9918 let svc = ::std::sync::Arc::clone(&self.inner);
9919 Box::pin(async move {
9920 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9921 crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
9922 >(request.encoded()?, format)?;
9923 let req: crate::proto::auth::v1::__buffa::view::VerifyRecoveryCodeChallengeRequestView<
9924 '_,
9925 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9926 &body,
9927 )?;
9928 let req = ::connectrpc::ServiceRequest::<
9929 crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
9930 >::from_parts(&req, &body);
9931 svc.verify_recovery_code_challenge(ctx, req)
9932 .await?
9933 .encode::<
9934 crate::proto::auth::v1::CompleteMFAChallengeResponse,
9935 >(format)
9936 })
9937 }
9938 "UpdateMFAFactor" => {
9939 let svc = ::std::sync::Arc::clone(&self.inner);
9940 Box::pin(async move {
9941 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9942 crate::proto::auth::v1::UpdateMFAFactorRequest,
9943 >(request.encoded()?, format)?;
9944 let req: crate::proto::auth::v1::__buffa::view::UpdateMFAFactorRequestView<
9945 '_,
9946 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9947 &body,
9948 )?;
9949 let req = ::connectrpc::ServiceRequest::<
9950 crate::proto::auth::v1::UpdateMFAFactorRequest,
9951 >::from_parts(&req, &body);
9952 svc.update_mfa_factor(ctx, req)
9953 .await?
9954 .encode::<
9955 crate::proto::auth::v1::UpdateMFAFactorResponse,
9956 >(format)
9957 })
9958 }
9959 "DeleteMFAFactor" => {
9960 let svc = ::std::sync::Arc::clone(&self.inner);
9961 Box::pin(async move {
9962 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9963 crate::proto::auth::v1::DeleteMFAFactorRequest,
9964 >(request.encoded()?, format)?;
9965 let req: crate::proto::auth::v1::__buffa::view::DeleteMFAFactorRequestView<
9966 '_,
9967 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9968 &body,
9969 )?;
9970 let req = ::connectrpc::ServiceRequest::<
9971 crate::proto::auth::v1::DeleteMFAFactorRequest,
9972 >::from_parts(&req, &body);
9973 svc.delete_mfa_factor(ctx, req)
9974 .await?
9975 .encode::<
9976 crate::proto::auth::v1::DeleteMFAFactorResponse,
9977 >(format)
9978 })
9979 }
9980 "RegenerateRecoveryCodes" => {
9981 let svc = ::std::sync::Arc::clone(&self.inner);
9982 Box::pin(async move {
9983 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
9984 crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
9985 >(request.encoded()?, format)?;
9986 let req: crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesRequestView<
9987 '_,
9988 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
9989 &body,
9990 )?;
9991 let req = ::connectrpc::ServiceRequest::<
9992 crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
9993 >::from_parts(&req, &body);
9994 svc.regenerate_recovery_codes(ctx, req)
9995 .await?
9996 .encode::<
9997 crate::proto::auth::v1::RegenerateRecoveryCodesResponse,
9998 >(format)
9999 })
10000 }
10001 "ClaimFreshStepUp" => {
10002 let svc = ::std::sync::Arc::clone(&self.inner);
10003 Box::pin(async move {
10004 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
10005 crate::proto::auth::v1::ClaimFreshStepUpRequest,
10006 >(request.encoded()?, format)?;
10007 let req: crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpRequestView<
10008 '_,
10009 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
10010 &body,
10011 )?;
10012 let req = ::connectrpc::ServiceRequest::<
10013 crate::proto::auth::v1::ClaimFreshStepUpRequest,
10014 >::from_parts(&req, &body);
10015 svc.claim_fresh_step_up(ctx, req)
10016 .await?
10017 .encode::<
10018 crate::proto::auth::v1::ClaimFreshStepUpResponse,
10019 >(format)
10020 })
10021 }
10022 "ConsumeFreshStepUp" => {
10023 let svc = ::std::sync::Arc::clone(&self.inner);
10024 Box::pin(async move {
10025 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
10026 crate::proto::auth::v1::ConsumeFreshStepUpRequest,
10027 >(request.encoded()?, format)?;
10028 let req: crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpRequestView<
10029 '_,
10030 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
10031 &body,
10032 )?;
10033 let req = ::connectrpc::ServiceRequest::<
10034 crate::proto::auth::v1::ConsumeFreshStepUpRequest,
10035 >::from_parts(&req, &body);
10036 svc.consume_fresh_step_up(ctx, req)
10037 .await?
10038 .encode::<
10039 crate::proto::auth::v1::ConsumeFreshStepUpResponse,
10040 >(format)
10041 })
10042 }
10043 "ReleaseFreshStepUp" => {
10044 let svc = ::std::sync::Arc::clone(&self.inner);
10045 Box::pin(async move {
10046 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
10047 crate::proto::auth::v1::ReleaseFreshStepUpRequest,
10048 >(request.encoded()?, format)?;
10049 let req: crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpRequestView<
10050 '_,
10051 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
10052 &body,
10053 )?;
10054 let req = ::connectrpc::ServiceRequest::<
10055 crate::proto::auth::v1::ReleaseFreshStepUpRequest,
10056 >::from_parts(&req, &body);
10057 svc.release_fresh_step_up(ctx, req)
10058 .await?
10059 .encode::<
10060 crate::proto::auth::v1::ReleaseFreshStepUpResponse,
10061 >(format)
10062 })
10063 }
10064 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
10065 }
10066 }
10067 fn call_server_streaming(
10068 &self,
10069 path: &str,
10070 ctx: ::connectrpc::RequestContext,
10071 request: ::buffa::bytes::Bytes,
10072 format: ::connectrpc::CodecFormat,
10073 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
10074 let Some(method) = path.strip_prefix("auth.v1.MFAService/") else {
10075 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
10076 };
10077 let _ = (&ctx, &request, &format);
10078 match method {
10079 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
10080 }
10081 }
10082 fn call_client_streaming(
10083 &self,
10084 path: &str,
10085 ctx: ::connectrpc::RequestContext,
10086 requests: ::connectrpc::dispatcher::codegen::RequestStream,
10087 format: ::connectrpc::CodecFormat,
10088 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
10089 let Some(method) = path.strip_prefix("auth.v1.MFAService/") else {
10090 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
10091 };
10092 let _ = (&ctx, &requests, &format);
10093 match method {
10094 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
10095 }
10096 }
10097 fn call_bidi_streaming(
10098 &self,
10099 path: &str,
10100 ctx: ::connectrpc::RequestContext,
10101 requests: ::connectrpc::dispatcher::codegen::RequestStream,
10102 format: ::connectrpc::CodecFormat,
10103 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
10104 let Some(method) = path.strip_prefix("auth.v1.MFAService/") else {
10105 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
10106 };
10107 let _ = (&ctx, &requests, &format);
10108 match method {
10109 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
10110 }
10111 }
10112}
10113#[derive(Clone)]
10145pub struct MfaServiceClient<T> {
10146 transport: T,
10147 config: ::connectrpc::client::ClientConfig,
10148}
10149impl<T> MfaServiceClient<T>
10150where
10151 T: ::connectrpc::client::ClientTransport,
10152 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
10153{
10154 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
10156 Self { transport, config }
10157 }
10158 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
10160 &self.config
10161 }
10162 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
10164 &mut self.config
10165 }
10166 pub async fn list_mfa_factors(
10168 &self,
10169 request: crate::proto::auth::v1::ListMFAFactorsRequest,
10170 ) -> Result<
10171 ::connectrpc::client::UnaryResponse<
10172 ::buffa::view::OwnedView<
10173 crate::proto::auth::v1::__buffa::view::ListMFAFactorsResponseView<
10174 'static,
10175 >,
10176 >,
10177 >,
10178 ::connectrpc::ConnectError,
10179 > {
10180 self.list_mfa_factors_with_options(
10181 request,
10182 ::connectrpc::client::CallOptions::default(),
10183 )
10184 .await
10185 }
10186 pub async fn list_mfa_factors_with_options(
10188 &self,
10189 request: crate::proto::auth::v1::ListMFAFactorsRequest,
10190 options: ::connectrpc::client::CallOptions,
10191 ) -> Result<
10192 ::connectrpc::client::UnaryResponse<
10193 ::buffa::view::OwnedView<
10194 crate::proto::auth::v1::__buffa::view::ListMFAFactorsResponseView<
10195 'static,
10196 >,
10197 >,
10198 >,
10199 ::connectrpc::ConnectError,
10200 > {
10201 ::connectrpc::client::call_unary(
10202 &self.transport,
10203 &self.config,
10204 MFA_SERVICE_SERVICE_NAME,
10205 "ListMFAFactors",
10206 request,
10207 options,
10208 )
10209 .await
10210 }
10211 pub async fn begin_totp_enrollment(
10213 &self,
10214 request: crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
10215 ) -> Result<
10216 ::connectrpc::client::UnaryResponse<
10217 ::buffa::view::OwnedView<
10218 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentResponseView<
10219 'static,
10220 >,
10221 >,
10222 >,
10223 ::connectrpc::ConnectError,
10224 > {
10225 self.begin_totp_enrollment_with_options(
10226 request,
10227 ::connectrpc::client::CallOptions::default(),
10228 )
10229 .await
10230 }
10231 pub async fn begin_totp_enrollment_with_options(
10233 &self,
10234 request: crate::proto::auth::v1::BeginTOTPEnrollmentRequest,
10235 options: ::connectrpc::client::CallOptions,
10236 ) -> Result<
10237 ::connectrpc::client::UnaryResponse<
10238 ::buffa::view::OwnedView<
10239 crate::proto::auth::v1::__buffa::view::BeginTOTPEnrollmentResponseView<
10240 'static,
10241 >,
10242 >,
10243 >,
10244 ::connectrpc::ConnectError,
10245 > {
10246 ::connectrpc::client::call_unary(
10247 &self.transport,
10248 &self.config,
10249 MFA_SERVICE_SERVICE_NAME,
10250 "BeginTOTPEnrollment",
10251 request,
10252 options,
10253 )
10254 .await
10255 }
10256 pub async fn finish_totp_enrollment(
10258 &self,
10259 request: crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
10260 ) -> Result<
10261 ::connectrpc::client::UnaryResponse<
10262 ::buffa::view::OwnedView<
10263 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentResponseView<
10264 'static,
10265 >,
10266 >,
10267 >,
10268 ::connectrpc::ConnectError,
10269 > {
10270 self.finish_totp_enrollment_with_options(
10271 request,
10272 ::connectrpc::client::CallOptions::default(),
10273 )
10274 .await
10275 }
10276 pub async fn finish_totp_enrollment_with_options(
10278 &self,
10279 request: crate::proto::auth::v1::FinishTOTPEnrollmentRequest,
10280 options: ::connectrpc::client::CallOptions,
10281 ) -> Result<
10282 ::connectrpc::client::UnaryResponse<
10283 ::buffa::view::OwnedView<
10284 crate::proto::auth::v1::__buffa::view::FinishTOTPEnrollmentResponseView<
10285 'static,
10286 >,
10287 >,
10288 >,
10289 ::connectrpc::ConnectError,
10290 > {
10291 ::connectrpc::client::call_unary(
10292 &self.transport,
10293 &self.config,
10294 MFA_SERVICE_SERVICE_NAME,
10295 "FinishTOTPEnrollment",
10296 request,
10297 options,
10298 )
10299 .await
10300 }
10301 pub async fn begin_passkey_enrollment(
10303 &self,
10304 request: crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
10305 ) -> Result<
10306 ::connectrpc::client::UnaryResponse<
10307 ::buffa::view::OwnedView<
10308 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentResponseView<
10309 'static,
10310 >,
10311 >,
10312 >,
10313 ::connectrpc::ConnectError,
10314 > {
10315 self.begin_passkey_enrollment_with_options(
10316 request,
10317 ::connectrpc::client::CallOptions::default(),
10318 )
10319 .await
10320 }
10321 pub async fn begin_passkey_enrollment_with_options(
10323 &self,
10324 request: crate::proto::auth::v1::BeginPasskeyEnrollmentRequest,
10325 options: ::connectrpc::client::CallOptions,
10326 ) -> Result<
10327 ::connectrpc::client::UnaryResponse<
10328 ::buffa::view::OwnedView<
10329 crate::proto::auth::v1::__buffa::view::BeginPasskeyEnrollmentResponseView<
10330 'static,
10331 >,
10332 >,
10333 >,
10334 ::connectrpc::ConnectError,
10335 > {
10336 ::connectrpc::client::call_unary(
10337 &self.transport,
10338 &self.config,
10339 MFA_SERVICE_SERVICE_NAME,
10340 "BeginPasskeyEnrollment",
10341 request,
10342 options,
10343 )
10344 .await
10345 }
10346 pub async fn finish_passkey_enrollment(
10348 &self,
10349 request: crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
10350 ) -> Result<
10351 ::connectrpc::client::UnaryResponse<
10352 ::buffa::view::OwnedView<
10353 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentResponseView<
10354 'static,
10355 >,
10356 >,
10357 >,
10358 ::connectrpc::ConnectError,
10359 > {
10360 self.finish_passkey_enrollment_with_options(
10361 request,
10362 ::connectrpc::client::CallOptions::default(),
10363 )
10364 .await
10365 }
10366 pub async fn finish_passkey_enrollment_with_options(
10368 &self,
10369 request: crate::proto::auth::v1::FinishPasskeyEnrollmentRequest,
10370 options: ::connectrpc::client::CallOptions,
10371 ) -> Result<
10372 ::connectrpc::client::UnaryResponse<
10373 ::buffa::view::OwnedView<
10374 crate::proto::auth::v1::__buffa::view::FinishPasskeyEnrollmentResponseView<
10375 'static,
10376 >,
10377 >,
10378 >,
10379 ::connectrpc::ConnectError,
10380 > {
10381 ::connectrpc::client::call_unary(
10382 &self.transport,
10383 &self.config,
10384 MFA_SERVICE_SERVICE_NAME,
10385 "FinishPasskeyEnrollment",
10386 request,
10387 options,
10388 )
10389 .await
10390 }
10391 pub async fn begin_mfa_challenge(
10393 &self,
10394 request: crate::proto::auth::v1::BeginMFAChallengeRequest,
10395 ) -> Result<
10396 ::connectrpc::client::UnaryResponse<
10397 ::buffa::view::OwnedView<
10398 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeResponseView<
10399 'static,
10400 >,
10401 >,
10402 >,
10403 ::connectrpc::ConnectError,
10404 > {
10405 self.begin_mfa_challenge_with_options(
10406 request,
10407 ::connectrpc::client::CallOptions::default(),
10408 )
10409 .await
10410 }
10411 pub async fn begin_mfa_challenge_with_options(
10413 &self,
10414 request: crate::proto::auth::v1::BeginMFAChallengeRequest,
10415 options: ::connectrpc::client::CallOptions,
10416 ) -> Result<
10417 ::connectrpc::client::UnaryResponse<
10418 ::buffa::view::OwnedView<
10419 crate::proto::auth::v1::__buffa::view::BeginMFAChallengeResponseView<
10420 'static,
10421 >,
10422 >,
10423 >,
10424 ::connectrpc::ConnectError,
10425 > {
10426 ::connectrpc::client::call_unary(
10427 &self.transport,
10428 &self.config,
10429 MFA_SERVICE_SERVICE_NAME,
10430 "BeginMFAChallenge",
10431 request,
10432 options,
10433 )
10434 .await
10435 }
10436 pub async fn verify_totp_challenge(
10438 &self,
10439 request: crate::proto::auth::v1::VerifyTOTPChallengeRequest,
10440 ) -> Result<
10441 ::connectrpc::client::UnaryResponse<
10442 ::buffa::view::OwnedView<
10443 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10444 'static,
10445 >,
10446 >,
10447 >,
10448 ::connectrpc::ConnectError,
10449 > {
10450 self.verify_totp_challenge_with_options(
10451 request,
10452 ::connectrpc::client::CallOptions::default(),
10453 )
10454 .await
10455 }
10456 pub async fn verify_totp_challenge_with_options(
10458 &self,
10459 request: crate::proto::auth::v1::VerifyTOTPChallengeRequest,
10460 options: ::connectrpc::client::CallOptions,
10461 ) -> Result<
10462 ::connectrpc::client::UnaryResponse<
10463 ::buffa::view::OwnedView<
10464 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10465 'static,
10466 >,
10467 >,
10468 >,
10469 ::connectrpc::ConnectError,
10470 > {
10471 ::connectrpc::client::call_unary(
10472 &self.transport,
10473 &self.config,
10474 MFA_SERVICE_SERVICE_NAME,
10475 "VerifyTOTPChallenge",
10476 request,
10477 options,
10478 )
10479 .await
10480 }
10481 pub async fn finish_passkey_challenge(
10483 &self,
10484 request: crate::proto::auth::v1::FinishPasskeyChallengeRequest,
10485 ) -> Result<
10486 ::connectrpc::client::UnaryResponse<
10487 ::buffa::view::OwnedView<
10488 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10489 'static,
10490 >,
10491 >,
10492 >,
10493 ::connectrpc::ConnectError,
10494 > {
10495 self.finish_passkey_challenge_with_options(
10496 request,
10497 ::connectrpc::client::CallOptions::default(),
10498 )
10499 .await
10500 }
10501 pub async fn finish_passkey_challenge_with_options(
10503 &self,
10504 request: crate::proto::auth::v1::FinishPasskeyChallengeRequest,
10505 options: ::connectrpc::client::CallOptions,
10506 ) -> Result<
10507 ::connectrpc::client::UnaryResponse<
10508 ::buffa::view::OwnedView<
10509 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10510 'static,
10511 >,
10512 >,
10513 >,
10514 ::connectrpc::ConnectError,
10515 > {
10516 ::connectrpc::client::call_unary(
10517 &self.transport,
10518 &self.config,
10519 MFA_SERVICE_SERVICE_NAME,
10520 "FinishPasskeyChallenge",
10521 request,
10522 options,
10523 )
10524 .await
10525 }
10526 pub async fn verify_recovery_code_challenge(
10528 &self,
10529 request: crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
10530 ) -> Result<
10531 ::connectrpc::client::UnaryResponse<
10532 ::buffa::view::OwnedView<
10533 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10534 'static,
10535 >,
10536 >,
10537 >,
10538 ::connectrpc::ConnectError,
10539 > {
10540 self.verify_recovery_code_challenge_with_options(
10541 request,
10542 ::connectrpc::client::CallOptions::default(),
10543 )
10544 .await
10545 }
10546 pub async fn verify_recovery_code_challenge_with_options(
10548 &self,
10549 request: crate::proto::auth::v1::VerifyRecoveryCodeChallengeRequest,
10550 options: ::connectrpc::client::CallOptions,
10551 ) -> Result<
10552 ::connectrpc::client::UnaryResponse<
10553 ::buffa::view::OwnedView<
10554 crate::proto::auth::v1::__buffa::view::CompleteMFAChallengeResponseView<
10555 'static,
10556 >,
10557 >,
10558 >,
10559 ::connectrpc::ConnectError,
10560 > {
10561 ::connectrpc::client::call_unary(
10562 &self.transport,
10563 &self.config,
10564 MFA_SERVICE_SERVICE_NAME,
10565 "VerifyRecoveryCodeChallenge",
10566 request,
10567 options,
10568 )
10569 .await
10570 }
10571 pub async fn update_mfa_factor(
10573 &self,
10574 request: crate::proto::auth::v1::UpdateMFAFactorRequest,
10575 ) -> Result<
10576 ::connectrpc::client::UnaryResponse<
10577 ::buffa::view::OwnedView<
10578 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorResponseView<
10579 'static,
10580 >,
10581 >,
10582 >,
10583 ::connectrpc::ConnectError,
10584 > {
10585 self.update_mfa_factor_with_options(
10586 request,
10587 ::connectrpc::client::CallOptions::default(),
10588 )
10589 .await
10590 }
10591 pub async fn update_mfa_factor_with_options(
10593 &self,
10594 request: crate::proto::auth::v1::UpdateMFAFactorRequest,
10595 options: ::connectrpc::client::CallOptions,
10596 ) -> Result<
10597 ::connectrpc::client::UnaryResponse<
10598 ::buffa::view::OwnedView<
10599 crate::proto::auth::v1::__buffa::view::UpdateMFAFactorResponseView<
10600 'static,
10601 >,
10602 >,
10603 >,
10604 ::connectrpc::ConnectError,
10605 > {
10606 ::connectrpc::client::call_unary(
10607 &self.transport,
10608 &self.config,
10609 MFA_SERVICE_SERVICE_NAME,
10610 "UpdateMFAFactor",
10611 request,
10612 options,
10613 )
10614 .await
10615 }
10616 pub async fn delete_mfa_factor(
10618 &self,
10619 request: crate::proto::auth::v1::DeleteMFAFactorRequest,
10620 ) -> Result<
10621 ::connectrpc::client::UnaryResponse<
10622 ::buffa::view::OwnedView<
10623 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorResponseView<
10624 'static,
10625 >,
10626 >,
10627 >,
10628 ::connectrpc::ConnectError,
10629 > {
10630 self.delete_mfa_factor_with_options(
10631 request,
10632 ::connectrpc::client::CallOptions::default(),
10633 )
10634 .await
10635 }
10636 pub async fn delete_mfa_factor_with_options(
10638 &self,
10639 request: crate::proto::auth::v1::DeleteMFAFactorRequest,
10640 options: ::connectrpc::client::CallOptions,
10641 ) -> Result<
10642 ::connectrpc::client::UnaryResponse<
10643 ::buffa::view::OwnedView<
10644 crate::proto::auth::v1::__buffa::view::DeleteMFAFactorResponseView<
10645 'static,
10646 >,
10647 >,
10648 >,
10649 ::connectrpc::ConnectError,
10650 > {
10651 ::connectrpc::client::call_unary(
10652 &self.transport,
10653 &self.config,
10654 MFA_SERVICE_SERVICE_NAME,
10655 "DeleteMFAFactor",
10656 request,
10657 options,
10658 )
10659 .await
10660 }
10661 pub async fn regenerate_recovery_codes(
10663 &self,
10664 request: crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
10665 ) -> Result<
10666 ::connectrpc::client::UnaryResponse<
10667 ::buffa::view::OwnedView<
10668 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesResponseView<
10669 'static,
10670 >,
10671 >,
10672 >,
10673 ::connectrpc::ConnectError,
10674 > {
10675 self.regenerate_recovery_codes_with_options(
10676 request,
10677 ::connectrpc::client::CallOptions::default(),
10678 )
10679 .await
10680 }
10681 pub async fn regenerate_recovery_codes_with_options(
10683 &self,
10684 request: crate::proto::auth::v1::RegenerateRecoveryCodesRequest,
10685 options: ::connectrpc::client::CallOptions,
10686 ) -> Result<
10687 ::connectrpc::client::UnaryResponse<
10688 ::buffa::view::OwnedView<
10689 crate::proto::auth::v1::__buffa::view::RegenerateRecoveryCodesResponseView<
10690 'static,
10691 >,
10692 >,
10693 >,
10694 ::connectrpc::ConnectError,
10695 > {
10696 ::connectrpc::client::call_unary(
10697 &self.transport,
10698 &self.config,
10699 MFA_SERVICE_SERVICE_NAME,
10700 "RegenerateRecoveryCodes",
10701 request,
10702 options,
10703 )
10704 .await
10705 }
10706 pub async fn claim_fresh_step_up(
10708 &self,
10709 request: crate::proto::auth::v1::ClaimFreshStepUpRequest,
10710 ) -> Result<
10711 ::connectrpc::client::UnaryResponse<
10712 ::buffa::view::OwnedView<
10713 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpResponseView<
10714 'static,
10715 >,
10716 >,
10717 >,
10718 ::connectrpc::ConnectError,
10719 > {
10720 self.claim_fresh_step_up_with_options(
10721 request,
10722 ::connectrpc::client::CallOptions::default(),
10723 )
10724 .await
10725 }
10726 pub async fn claim_fresh_step_up_with_options(
10728 &self,
10729 request: crate::proto::auth::v1::ClaimFreshStepUpRequest,
10730 options: ::connectrpc::client::CallOptions,
10731 ) -> Result<
10732 ::connectrpc::client::UnaryResponse<
10733 ::buffa::view::OwnedView<
10734 crate::proto::auth::v1::__buffa::view::ClaimFreshStepUpResponseView<
10735 'static,
10736 >,
10737 >,
10738 >,
10739 ::connectrpc::ConnectError,
10740 > {
10741 ::connectrpc::client::call_unary(
10742 &self.transport,
10743 &self.config,
10744 MFA_SERVICE_SERVICE_NAME,
10745 "ClaimFreshStepUp",
10746 request,
10747 options,
10748 )
10749 .await
10750 }
10751 pub async fn consume_fresh_step_up(
10753 &self,
10754 request: crate::proto::auth::v1::ConsumeFreshStepUpRequest,
10755 ) -> Result<
10756 ::connectrpc::client::UnaryResponse<
10757 ::buffa::view::OwnedView<
10758 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpResponseView<
10759 'static,
10760 >,
10761 >,
10762 >,
10763 ::connectrpc::ConnectError,
10764 > {
10765 self.consume_fresh_step_up_with_options(
10766 request,
10767 ::connectrpc::client::CallOptions::default(),
10768 )
10769 .await
10770 }
10771 pub async fn consume_fresh_step_up_with_options(
10773 &self,
10774 request: crate::proto::auth::v1::ConsumeFreshStepUpRequest,
10775 options: ::connectrpc::client::CallOptions,
10776 ) -> Result<
10777 ::connectrpc::client::UnaryResponse<
10778 ::buffa::view::OwnedView<
10779 crate::proto::auth::v1::__buffa::view::ConsumeFreshStepUpResponseView<
10780 'static,
10781 >,
10782 >,
10783 >,
10784 ::connectrpc::ConnectError,
10785 > {
10786 ::connectrpc::client::call_unary(
10787 &self.transport,
10788 &self.config,
10789 MFA_SERVICE_SERVICE_NAME,
10790 "ConsumeFreshStepUp",
10791 request,
10792 options,
10793 )
10794 .await
10795 }
10796 pub async fn release_fresh_step_up(
10798 &self,
10799 request: crate::proto::auth::v1::ReleaseFreshStepUpRequest,
10800 ) -> Result<
10801 ::connectrpc::client::UnaryResponse<
10802 ::buffa::view::OwnedView<
10803 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpResponseView<
10804 'static,
10805 >,
10806 >,
10807 >,
10808 ::connectrpc::ConnectError,
10809 > {
10810 self.release_fresh_step_up_with_options(
10811 request,
10812 ::connectrpc::client::CallOptions::default(),
10813 )
10814 .await
10815 }
10816 pub async fn release_fresh_step_up_with_options(
10818 &self,
10819 request: crate::proto::auth::v1::ReleaseFreshStepUpRequest,
10820 options: ::connectrpc::client::CallOptions,
10821 ) -> Result<
10822 ::connectrpc::client::UnaryResponse<
10823 ::buffa::view::OwnedView<
10824 crate::proto::auth::v1::__buffa::view::ReleaseFreshStepUpResponseView<
10825 'static,
10826 >,
10827 >,
10828 >,
10829 ::connectrpc::ConnectError,
10830 > {
10831 ::connectrpc::client::call_unary(
10832 &self.transport,
10833 &self.config,
10834 MFA_SERVICE_SERVICE_NAME,
10835 "ReleaseFreshStepUp",
10836 request,
10837 options,
10838 )
10839 .await
10840 }
10841}
10842
10843pub type OwnedGetNonceRequestView = ::buffa::view::OwnedView<
10845 crate::proto::auth::v1::__buffa::view::GetNonceRequestView<'static>,
10846>;
10847pub type OwnedGetNonceResponseView = ::buffa::view::OwnedView<
10849 crate::proto::auth::v1::__buffa::view::GetNonceResponseView<'static>,
10850>;
10851pub type OwnedLoginWithWalletRequestView = ::buffa::view::OwnedView<
10853 crate::proto::auth::v1::__buffa::view::LoginWithWalletRequestView<'static>,
10854>;
10855pub type OwnedLoginWithWalletResponseView = ::buffa::view::OwnedView<
10857 crate::proto::auth::v1::__buffa::view::LoginWithWalletResponseView<'static>,
10858>;
10859pub type OwnedMeRequestView = ::buffa::view::OwnedView<
10861 crate::proto::auth::v1::__buffa::view::MeRequestView<'static>,
10862>;
10863pub type OwnedMeResponseView = ::buffa::view::OwnedView<
10865 crate::proto::auth::v1::__buffa::view::MeResponseView<'static>,
10866>;
10867impl ::connectrpc::Encodable<crate::proto::auth::v1::GetNonceResponse>
10868for crate::proto::auth::v1::__buffa::view::GetNonceResponseView<'_> {
10869 fn encode(
10870 &self,
10871 codec: ::connectrpc::CodecFormat,
10872 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10873 ::connectrpc::__codegen::encode_view_body(self, codec)
10874 }
10875}
10876impl ::connectrpc::Encodable<crate::proto::auth::v1::GetNonceResponse>
10877for ::buffa::view::OwnedView<
10878 crate::proto::auth::v1::__buffa::view::GetNonceResponseView<'static>,
10879> {
10880 fn encode(
10881 &self,
10882 codec: ::connectrpc::CodecFormat,
10883 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10884 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
10885 }
10886}
10887impl ::connectrpc::Encodable<crate::proto::auth::v1::LoginWithWalletResponse>
10888for crate::proto::auth::v1::__buffa::view::LoginWithWalletResponseView<'_> {
10889 fn encode(
10890 &self,
10891 codec: ::connectrpc::CodecFormat,
10892 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10893 ::connectrpc::__codegen::encode_view_body(self, codec)
10894 }
10895}
10896impl ::connectrpc::Encodable<crate::proto::auth::v1::LoginWithWalletResponse>
10897for ::buffa::view::OwnedView<
10898 crate::proto::auth::v1::__buffa::view::LoginWithWalletResponseView<'static>,
10899> {
10900 fn encode(
10901 &self,
10902 codec: ::connectrpc::CodecFormat,
10903 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10904 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
10905 }
10906}
10907impl ::connectrpc::Encodable<crate::proto::auth::v1::MeResponse>
10908for crate::proto::auth::v1::__buffa::view::MeResponseView<'_> {
10909 fn encode(
10910 &self,
10911 codec: ::connectrpc::CodecFormat,
10912 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10913 ::connectrpc::__codegen::encode_view_body(self, codec)
10914 }
10915}
10916impl ::connectrpc::Encodable<crate::proto::auth::v1::MeResponse>
10917for ::buffa::view::OwnedView<
10918 crate::proto::auth::v1::__buffa::view::MeResponseView<'static>,
10919> {
10920 fn encode(
10921 &self,
10922 codec: ::connectrpc::CodecFormat,
10923 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
10924 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
10925 }
10926}
10927pub const AUTH_SERVICE_SERVICE_NAME: &str = "auth.v1.AuthService";
10929pub const AUTH_SERVICE_GET_NONCE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
10934 "/auth.v1.AuthService/GetNonce",
10935 ::connectrpc::StreamType::Unary,
10936 )
10937 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
10938pub const AUTH_SERVICE_LOGIN_WITH_WALLET_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
10943 "/auth.v1.AuthService/LoginWithWallet",
10944 ::connectrpc::StreamType::Unary,
10945 )
10946 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
10947pub const AUTH_SERVICE_ME_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
10952 "/auth.v1.AuthService/Me",
10953 ::connectrpc::StreamType::Unary,
10954 )
10955 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
10956#[allow(clippy::type_complexity)]
11006pub trait AuthService: Send + Sync + 'static {
11007 fn get_nonce<'a>(
11017 &'a self,
11018 ctx: ::connectrpc::RequestContext,
11019 request: ::connectrpc::ServiceRequest<
11020 '_,
11021 crate::proto::auth::v1::GetNonceRequest,
11022 >,
11023 ) -> impl ::std::future::Future<
11024 Output = ::connectrpc::ServiceResult<
11025 impl ::connectrpc::Encodable<
11026 crate::proto::auth::v1::GetNonceResponse,
11027 > + Send + use<'a, Self>,
11028 >,
11029 > + Send;
11030 fn login_with_wallet<'a>(
11040 &'a self,
11041 ctx: ::connectrpc::RequestContext,
11042 request: ::connectrpc::ServiceRequest<
11043 '_,
11044 crate::proto::auth::v1::LoginWithWalletRequest,
11045 >,
11046 ) -> impl ::std::future::Future<
11047 Output = ::connectrpc::ServiceResult<
11048 impl ::connectrpc::Encodable<
11049 crate::proto::auth::v1::LoginWithWalletResponse,
11050 > + Send + use<'a, Self>,
11051 >,
11052 > + Send;
11053 fn me<'a>(
11063 &'a self,
11064 ctx: ::connectrpc::RequestContext,
11065 request: ::connectrpc::ServiceRequest<'_, crate::proto::auth::v1::MeRequest>,
11066 ) -> impl ::std::future::Future<
11067 Output = ::connectrpc::ServiceResult<
11068 impl ::connectrpc::Encodable<
11069 crate::proto::auth::v1::MeResponse,
11070 > + Send + use<'a, Self>,
11071 >,
11072 > + Send;
11073}
11074pub trait AuthServiceExt: AuthService {
11090 fn register(
11095 self: ::std::sync::Arc<Self>,
11096 router: ::connectrpc::Router,
11097 ) -> ::connectrpc::Router;
11098}
11099impl<S: AuthService> AuthServiceExt for S {
11100 fn register(
11101 self: ::std::sync::Arc<Self>,
11102 router: ::connectrpc::Router,
11103 ) -> ::connectrpc::Router {
11104 router
11105 .route_view(
11106 AUTH_SERVICE_SERVICE_NAME,
11107 "GetNonce",
11108 {
11109 let svc = ::std::sync::Arc::clone(&self);
11110 ::connectrpc::view_handler_fn(move |
11111 ctx,
11112 req: ::buffa::view::OwnedView<
11113 crate::proto::auth::v1::__buffa::view::GetNonceRequestView<
11114 'static,
11115 >,
11116 >,
11117 format|
11118 {
11119 let svc = ::std::sync::Arc::clone(&svc);
11120 async move {
11121 let sreq = ::connectrpc::ServiceRequest::<
11122 crate::proto::auth::v1::GetNonceRequest,
11123 >::from_parts(req.reborrow(), req.bytes());
11124 svc.get_nonce(ctx, sreq)
11125 .await?
11126 .encode::<crate::proto::auth::v1::GetNonceResponse>(format)
11127 }
11128 })
11129 },
11130 )
11131 .with_spec(AUTH_SERVICE_GET_NONCE_SPEC)
11132 .route_view(
11133 AUTH_SERVICE_SERVICE_NAME,
11134 "LoginWithWallet",
11135 {
11136 let svc = ::std::sync::Arc::clone(&self);
11137 ::connectrpc::view_handler_fn(move |
11138 ctx,
11139 req: ::buffa::view::OwnedView<
11140 crate::proto::auth::v1::__buffa::view::LoginWithWalletRequestView<
11141 'static,
11142 >,
11143 >,
11144 format|
11145 {
11146 let svc = ::std::sync::Arc::clone(&svc);
11147 async move {
11148 let sreq = ::connectrpc::ServiceRequest::<
11149 crate::proto::auth::v1::LoginWithWalletRequest,
11150 >::from_parts(req.reborrow(), req.bytes());
11151 svc.login_with_wallet(ctx, sreq)
11152 .await?
11153 .encode::<
11154 crate::proto::auth::v1::LoginWithWalletResponse,
11155 >(format)
11156 }
11157 })
11158 },
11159 )
11160 .with_spec(AUTH_SERVICE_LOGIN_WITH_WALLET_SPEC)
11161 .route_view(
11162 AUTH_SERVICE_SERVICE_NAME,
11163 "Me",
11164 {
11165 let svc = ::std::sync::Arc::clone(&self);
11166 ::connectrpc::view_handler_fn(move |
11167 ctx,
11168 req: ::buffa::view::OwnedView<
11169 crate::proto::auth::v1::__buffa::view::MeRequestView<'static>,
11170 >,
11171 format|
11172 {
11173 let svc = ::std::sync::Arc::clone(&svc);
11174 async move {
11175 let sreq = ::connectrpc::ServiceRequest::<
11176 crate::proto::auth::v1::MeRequest,
11177 >::from_parts(req.reborrow(), req.bytes());
11178 svc.me(ctx, sreq)
11179 .await?
11180 .encode::<crate::proto::auth::v1::MeResponse>(format)
11181 }
11182 })
11183 },
11184 )
11185 .with_spec(AUTH_SERVICE_ME_SPEC)
11186 }
11187}
11188#[doc(hidden)]
11190pub struct AuthServiceRegisterMarker;
11191impl<S: AuthService> ::connectrpc::ServiceRegister<AuthServiceRegisterMarker>
11192for ::std::sync::Arc<S> {
11193 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
11194 <S as AuthServiceExt>::register(self, router)
11195 }
11196}
11197pub struct AuthServiceServer<T> {
11211 inner: ::std::sync::Arc<T>,
11212}
11213impl<T: AuthService> AuthServiceServer<T> {
11214 pub fn new(service: T) -> Self {
11216 Self {
11217 inner: ::std::sync::Arc::new(service),
11218 }
11219 }
11220 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
11222 Self { inner }
11223 }
11224}
11225impl<T> Clone for AuthServiceServer<T> {
11226 fn clone(&self) -> Self {
11227 Self {
11228 inner: ::std::sync::Arc::clone(&self.inner),
11229 }
11230 }
11231}
11232impl<T: AuthService> ::connectrpc::Dispatcher for AuthServiceServer<T> {
11233 #[inline]
11234 fn lookup(
11235 &self,
11236 path: &str,
11237 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
11238 let method = path.strip_prefix("auth.v1.AuthService/")?;
11239 match method {
11240 "GetNonce" => {
11241 Some(
11242 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11243 .with_spec(AUTH_SERVICE_GET_NONCE_SPEC),
11244 )
11245 }
11246 "LoginWithWallet" => {
11247 Some(
11248 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11249 .with_spec(AUTH_SERVICE_LOGIN_WITH_WALLET_SPEC),
11250 )
11251 }
11252 "Me" => {
11253 Some(
11254 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11255 .with_spec(AUTH_SERVICE_ME_SPEC),
11256 )
11257 }
11258 _ => None,
11259 }
11260 }
11261 fn call_unary(
11262 &self,
11263 path: &str,
11264 ctx: ::connectrpc::RequestContext,
11265 request: ::connectrpc::Payload,
11266 format: ::connectrpc::CodecFormat,
11267 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
11268 let Some(method) = path.strip_prefix("auth.v1.AuthService/") else {
11269 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
11270 };
11271 let _ = (&ctx, &request, &format);
11272 match method {
11273 "GetNonce" => {
11274 let svc = ::std::sync::Arc::clone(&self.inner);
11275 Box::pin(async move {
11276 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
11277 crate::proto::auth::v1::GetNonceRequest,
11278 >(request.encoded()?, format)?;
11279 let req: crate::proto::auth::v1::__buffa::view::GetNonceRequestView<
11280 '_,
11281 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
11282 &body,
11283 )?;
11284 let req = ::connectrpc::ServiceRequest::<
11285 crate::proto::auth::v1::GetNonceRequest,
11286 >::from_parts(&req, &body);
11287 svc.get_nonce(ctx, req)
11288 .await?
11289 .encode::<crate::proto::auth::v1::GetNonceResponse>(format)
11290 })
11291 }
11292 "LoginWithWallet" => {
11293 let svc = ::std::sync::Arc::clone(&self.inner);
11294 Box::pin(async move {
11295 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
11296 crate::proto::auth::v1::LoginWithWalletRequest,
11297 >(request.encoded()?, format)?;
11298 let req: crate::proto::auth::v1::__buffa::view::LoginWithWalletRequestView<
11299 '_,
11300 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
11301 &body,
11302 )?;
11303 let req = ::connectrpc::ServiceRequest::<
11304 crate::proto::auth::v1::LoginWithWalletRequest,
11305 >::from_parts(&req, &body);
11306 svc.login_with_wallet(ctx, req)
11307 .await?
11308 .encode::<
11309 crate::proto::auth::v1::LoginWithWalletResponse,
11310 >(format)
11311 })
11312 }
11313 "Me" => {
11314 let svc = ::std::sync::Arc::clone(&self.inner);
11315 Box::pin(async move {
11316 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
11317 crate::proto::auth::v1::MeRequest,
11318 >(request.encoded()?, format)?;
11319 let req: crate::proto::auth::v1::__buffa::view::MeRequestView<'_> = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
11320 &body,
11321 )?;
11322 let req = ::connectrpc::ServiceRequest::<
11323 crate::proto::auth::v1::MeRequest,
11324 >::from_parts(&req, &body);
11325 svc.me(ctx, req)
11326 .await?
11327 .encode::<crate::proto::auth::v1::MeResponse>(format)
11328 })
11329 }
11330 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
11331 }
11332 }
11333 fn call_server_streaming(
11334 &self,
11335 path: &str,
11336 ctx: ::connectrpc::RequestContext,
11337 request: ::buffa::bytes::Bytes,
11338 format: ::connectrpc::CodecFormat,
11339 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
11340 let Some(method) = path.strip_prefix("auth.v1.AuthService/") else {
11341 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
11342 };
11343 let _ = (&ctx, &request, &format);
11344 match method {
11345 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
11346 }
11347 }
11348 fn call_client_streaming(
11349 &self,
11350 path: &str,
11351 ctx: ::connectrpc::RequestContext,
11352 requests: ::connectrpc::dispatcher::codegen::RequestStream,
11353 format: ::connectrpc::CodecFormat,
11354 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
11355 let Some(method) = path.strip_prefix("auth.v1.AuthService/") else {
11356 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
11357 };
11358 let _ = (&ctx, &requests, &format);
11359 match method {
11360 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
11361 }
11362 }
11363 fn call_bidi_streaming(
11364 &self,
11365 path: &str,
11366 ctx: ::connectrpc::RequestContext,
11367 requests: ::connectrpc::dispatcher::codegen::RequestStream,
11368 format: ::connectrpc::CodecFormat,
11369 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
11370 let Some(method) = path.strip_prefix("auth.v1.AuthService/") else {
11371 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
11372 };
11373 let _ = (&ctx, &requests, &format);
11374 match method {
11375 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
11376 }
11377 }
11378}
11379#[derive(Clone)]
11411pub struct AuthServiceClient<T> {
11412 transport: T,
11413 config: ::connectrpc::client::ClientConfig,
11414}
11415impl<T> AuthServiceClient<T>
11416where
11417 T: ::connectrpc::client::ClientTransport,
11418 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
11419{
11420 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
11422 Self { transport, config }
11423 }
11424 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
11426 &self.config
11427 }
11428 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
11430 &mut self.config
11431 }
11432 pub async fn get_nonce(
11434 &self,
11435 request: crate::proto::auth::v1::GetNonceRequest,
11436 ) -> Result<
11437 ::connectrpc::client::UnaryResponse<
11438 ::buffa::view::OwnedView<
11439 crate::proto::auth::v1::__buffa::view::GetNonceResponseView<'static>,
11440 >,
11441 >,
11442 ::connectrpc::ConnectError,
11443 > {
11444 self.get_nonce_with_options(
11445 request,
11446 ::connectrpc::client::CallOptions::default(),
11447 )
11448 .await
11449 }
11450 pub async fn get_nonce_with_options(
11452 &self,
11453 request: crate::proto::auth::v1::GetNonceRequest,
11454 options: ::connectrpc::client::CallOptions,
11455 ) -> Result<
11456 ::connectrpc::client::UnaryResponse<
11457 ::buffa::view::OwnedView<
11458 crate::proto::auth::v1::__buffa::view::GetNonceResponseView<'static>,
11459 >,
11460 >,
11461 ::connectrpc::ConnectError,
11462 > {
11463 ::connectrpc::client::call_unary(
11464 &self.transport,
11465 &self.config,
11466 AUTH_SERVICE_SERVICE_NAME,
11467 "GetNonce",
11468 request,
11469 options,
11470 )
11471 .await
11472 }
11473 pub async fn login_with_wallet(
11475 &self,
11476 request: crate::proto::auth::v1::LoginWithWalletRequest,
11477 ) -> Result<
11478 ::connectrpc::client::UnaryResponse<
11479 ::buffa::view::OwnedView<
11480 crate::proto::auth::v1::__buffa::view::LoginWithWalletResponseView<
11481 'static,
11482 >,
11483 >,
11484 >,
11485 ::connectrpc::ConnectError,
11486 > {
11487 self.login_with_wallet_with_options(
11488 request,
11489 ::connectrpc::client::CallOptions::default(),
11490 )
11491 .await
11492 }
11493 pub async fn login_with_wallet_with_options(
11495 &self,
11496 request: crate::proto::auth::v1::LoginWithWalletRequest,
11497 options: ::connectrpc::client::CallOptions,
11498 ) -> Result<
11499 ::connectrpc::client::UnaryResponse<
11500 ::buffa::view::OwnedView<
11501 crate::proto::auth::v1::__buffa::view::LoginWithWalletResponseView<
11502 'static,
11503 >,
11504 >,
11505 >,
11506 ::connectrpc::ConnectError,
11507 > {
11508 ::connectrpc::client::call_unary(
11509 &self.transport,
11510 &self.config,
11511 AUTH_SERVICE_SERVICE_NAME,
11512 "LoginWithWallet",
11513 request,
11514 options,
11515 )
11516 .await
11517 }
11518 pub async fn me(
11520 &self,
11521 request: crate::proto::auth::v1::MeRequest,
11522 ) -> Result<
11523 ::connectrpc::client::UnaryResponse<
11524 ::buffa::view::OwnedView<
11525 crate::proto::auth::v1::__buffa::view::MeResponseView<'static>,
11526 >,
11527 >,
11528 ::connectrpc::ConnectError,
11529 > {
11530 self.me_with_options(request, ::connectrpc::client::CallOptions::default()).await
11531 }
11532 pub async fn me_with_options(
11534 &self,
11535 request: crate::proto::auth::v1::MeRequest,
11536 options: ::connectrpc::client::CallOptions,
11537 ) -> Result<
11538 ::connectrpc::client::UnaryResponse<
11539 ::buffa::view::OwnedView<
11540 crate::proto::auth::v1::__buffa::view::MeResponseView<'static>,
11541 >,
11542 >,
11543 ::connectrpc::ConnectError,
11544 > {
11545 ::connectrpc::client::call_unary(
11546 &self.transport,
11547 &self.config,
11548 AUTH_SERVICE_SERVICE_NAME,
11549 "Me",
11550 request,
11551 options,
11552 )
11553 .await
11554 }
11555}
11556
11557pub type OwnedGetProfileRequestView = ::buffa::view::OwnedView<
11559 crate::proto::auth::v1::__buffa::view::GetProfileRequestView<'static>,
11560>;
11561pub type OwnedUserProfileView = ::buffa::view::OwnedView<
11563 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
11564>;
11565pub type OwnedUserProfilePatchView = ::buffa::view::OwnedView<
11567 crate::proto::auth::v1::__buffa::view::UserProfilePatchView<'static>,
11568>;
11569pub type OwnedGetUsernameHistoryRequestView = ::buffa::view::OwnedView<
11571 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryRequestView<'static>,
11572>;
11573pub type OwnedGetUsernameHistoryResponseView = ::buffa::view::OwnedView<
11575 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryResponseView<'static>,
11576>;
11577impl ::connectrpc::Encodable<crate::proto::auth::v1::UserProfile>
11578for crate::proto::auth::v1::__buffa::view::UserProfileView<'_> {
11579 fn encode(
11580 &self,
11581 codec: ::connectrpc::CodecFormat,
11582 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
11583 ::connectrpc::__codegen::encode_view_body(self, codec)
11584 }
11585}
11586impl ::connectrpc::Encodable<crate::proto::auth::v1::UserProfile>
11587for ::buffa::view::OwnedView<
11588 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
11589> {
11590 fn encode(
11591 &self,
11592 codec: ::connectrpc::CodecFormat,
11593 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
11594 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
11595 }
11596}
11597impl ::connectrpc::Encodable<crate::proto::auth::v1::GetUsernameHistoryResponse>
11598for crate::proto::auth::v1::__buffa::view::GetUsernameHistoryResponseView<'_> {
11599 fn encode(
11600 &self,
11601 codec: ::connectrpc::CodecFormat,
11602 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
11603 ::connectrpc::__codegen::encode_view_body(self, codec)
11604 }
11605}
11606impl ::connectrpc::Encodable<crate::proto::auth::v1::GetUsernameHistoryResponse>
11607for ::buffa::view::OwnedView<
11608 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryResponseView<'static>,
11609> {
11610 fn encode(
11611 &self,
11612 codec: ::connectrpc::CodecFormat,
11613 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
11614 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
11615 }
11616}
11617pub const PROFILE_SERVICE_SERVICE_NAME: &str = "auth.v1.ProfileService";
11619pub const PROFILE_SERVICE_GET_PROFILE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
11624 "/auth.v1.ProfileService/GetProfile",
11625 ::connectrpc::StreamType::Unary,
11626 )
11627 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
11628pub const PROFILE_SERVICE_UPDATE_PROFILE_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
11633 "/auth.v1.ProfileService/UpdateProfile",
11634 ::connectrpc::StreamType::Unary,
11635 )
11636 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
11637pub const PROFILE_SERVICE_GET_USERNAME_HISTORY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
11642 "/auth.v1.ProfileService/GetUsernameHistory",
11643 ::connectrpc::StreamType::Unary,
11644 )
11645 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
11646#[allow(clippy::type_complexity)]
11696pub trait ProfileService: Send + Sync + 'static {
11697 fn get_profile<'a>(
11707 &'a self,
11708 ctx: ::connectrpc::RequestContext,
11709 request: ::connectrpc::ServiceRequest<
11710 '_,
11711 crate::proto::auth::v1::GetProfileRequest,
11712 >,
11713 ) -> impl ::std::future::Future<
11714 Output = ::connectrpc::ServiceResult<
11715 impl ::connectrpc::Encodable<
11716 crate::proto::auth::v1::UserProfile,
11717 > + Send + use<'a, Self>,
11718 >,
11719 > + Send;
11720 fn update_profile<'a>(
11731 &'a self,
11732 ctx: ::connectrpc::RequestContext,
11733 request: ::connectrpc::ServiceRequest<
11734 '_,
11735 crate::proto::auth::v1::UserProfilePatch,
11736 >,
11737 ) -> impl ::std::future::Future<
11738 Output = ::connectrpc::ServiceResult<
11739 impl ::connectrpc::Encodable<
11740 crate::proto::auth::v1::UserProfile,
11741 > + Send + use<'a, Self>,
11742 >,
11743 > + Send;
11744 fn get_username_history<'a>(
11755 &'a self,
11756 ctx: ::connectrpc::RequestContext,
11757 request: ::connectrpc::ServiceRequest<
11758 '_,
11759 crate::proto::auth::v1::GetUsernameHistoryRequest,
11760 >,
11761 ) -> impl ::std::future::Future<
11762 Output = ::connectrpc::ServiceResult<
11763 impl ::connectrpc::Encodable<
11764 crate::proto::auth::v1::GetUsernameHistoryResponse,
11765 > + Send + use<'a, Self>,
11766 >,
11767 > + Send;
11768}
11769pub trait ProfileServiceExt: ProfileService {
11785 fn register(
11790 self: ::std::sync::Arc<Self>,
11791 router: ::connectrpc::Router,
11792 ) -> ::connectrpc::Router;
11793}
11794impl<S: ProfileService> ProfileServiceExt for S {
11795 fn register(
11796 self: ::std::sync::Arc<Self>,
11797 router: ::connectrpc::Router,
11798 ) -> ::connectrpc::Router {
11799 router
11800 .route_view(
11801 PROFILE_SERVICE_SERVICE_NAME,
11802 "GetProfile",
11803 {
11804 let svc = ::std::sync::Arc::clone(&self);
11805 ::connectrpc::view_handler_fn(move |
11806 ctx,
11807 req: ::buffa::view::OwnedView<
11808 crate::proto::auth::v1::__buffa::view::GetProfileRequestView<
11809 'static,
11810 >,
11811 >,
11812 format|
11813 {
11814 let svc = ::std::sync::Arc::clone(&svc);
11815 async move {
11816 let sreq = ::connectrpc::ServiceRequest::<
11817 crate::proto::auth::v1::GetProfileRequest,
11818 >::from_parts(req.reborrow(), req.bytes());
11819 svc.get_profile(ctx, sreq)
11820 .await?
11821 .encode::<crate::proto::auth::v1::UserProfile>(format)
11822 }
11823 })
11824 },
11825 )
11826 .with_spec(PROFILE_SERVICE_GET_PROFILE_SPEC)
11827 .route_view(
11828 PROFILE_SERVICE_SERVICE_NAME,
11829 "UpdateProfile",
11830 {
11831 let svc = ::std::sync::Arc::clone(&self);
11832 ::connectrpc::view_handler_fn(move |
11833 ctx,
11834 req: ::buffa::view::OwnedView<
11835 crate::proto::auth::v1::__buffa::view::UserProfilePatchView<
11836 'static,
11837 >,
11838 >,
11839 format|
11840 {
11841 let svc = ::std::sync::Arc::clone(&svc);
11842 async move {
11843 let sreq = ::connectrpc::ServiceRequest::<
11844 crate::proto::auth::v1::UserProfilePatch,
11845 >::from_parts(req.reborrow(), req.bytes());
11846 svc.update_profile(ctx, sreq)
11847 .await?
11848 .encode::<crate::proto::auth::v1::UserProfile>(format)
11849 }
11850 })
11851 },
11852 )
11853 .with_spec(PROFILE_SERVICE_UPDATE_PROFILE_SPEC)
11854 .route_view(
11855 PROFILE_SERVICE_SERVICE_NAME,
11856 "GetUsernameHistory",
11857 {
11858 let svc = ::std::sync::Arc::clone(&self);
11859 ::connectrpc::view_handler_fn(move |
11860 ctx,
11861 req: ::buffa::view::OwnedView<
11862 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryRequestView<
11863 'static,
11864 >,
11865 >,
11866 format|
11867 {
11868 let svc = ::std::sync::Arc::clone(&svc);
11869 async move {
11870 let sreq = ::connectrpc::ServiceRequest::<
11871 crate::proto::auth::v1::GetUsernameHistoryRequest,
11872 >::from_parts(req.reborrow(), req.bytes());
11873 svc.get_username_history(ctx, sreq)
11874 .await?
11875 .encode::<
11876 crate::proto::auth::v1::GetUsernameHistoryResponse,
11877 >(format)
11878 }
11879 })
11880 },
11881 )
11882 .with_spec(PROFILE_SERVICE_GET_USERNAME_HISTORY_SPEC)
11883 }
11884}
11885#[doc(hidden)]
11887pub struct ProfileServiceRegisterMarker;
11888impl<S: ProfileService> ::connectrpc::ServiceRegister<ProfileServiceRegisterMarker>
11889for ::std::sync::Arc<S> {
11890 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
11891 <S as ProfileServiceExt>::register(self, router)
11892 }
11893}
11894pub struct ProfileServiceServer<T> {
11908 inner: ::std::sync::Arc<T>,
11909}
11910impl<T: ProfileService> ProfileServiceServer<T> {
11911 pub fn new(service: T) -> Self {
11913 Self {
11914 inner: ::std::sync::Arc::new(service),
11915 }
11916 }
11917 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
11919 Self { inner }
11920 }
11921}
11922impl<T> Clone for ProfileServiceServer<T> {
11923 fn clone(&self) -> Self {
11924 Self {
11925 inner: ::std::sync::Arc::clone(&self.inner),
11926 }
11927 }
11928}
11929impl<T: ProfileService> ::connectrpc::Dispatcher for ProfileServiceServer<T> {
11930 #[inline]
11931 fn lookup(
11932 &self,
11933 path: &str,
11934 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
11935 let method = path.strip_prefix("auth.v1.ProfileService/")?;
11936 match method {
11937 "GetProfile" => {
11938 Some(
11939 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11940 .with_spec(PROFILE_SERVICE_GET_PROFILE_SPEC),
11941 )
11942 }
11943 "UpdateProfile" => {
11944 Some(
11945 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11946 .with_spec(PROFILE_SERVICE_UPDATE_PROFILE_SPEC),
11947 )
11948 }
11949 "GetUsernameHistory" => {
11950 Some(
11951 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
11952 .with_spec(PROFILE_SERVICE_GET_USERNAME_HISTORY_SPEC),
11953 )
11954 }
11955 _ => None,
11956 }
11957 }
11958 fn call_unary(
11959 &self,
11960 path: &str,
11961 ctx: ::connectrpc::RequestContext,
11962 request: ::connectrpc::Payload,
11963 format: ::connectrpc::CodecFormat,
11964 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
11965 let Some(method) = path.strip_prefix("auth.v1.ProfileService/") else {
11966 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
11967 };
11968 let _ = (&ctx, &request, &format);
11969 match method {
11970 "GetProfile" => {
11971 let svc = ::std::sync::Arc::clone(&self.inner);
11972 Box::pin(async move {
11973 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
11974 crate::proto::auth::v1::GetProfileRequest,
11975 >(request.encoded()?, format)?;
11976 let req: crate::proto::auth::v1::__buffa::view::GetProfileRequestView<
11977 '_,
11978 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
11979 &body,
11980 )?;
11981 let req = ::connectrpc::ServiceRequest::<
11982 crate::proto::auth::v1::GetProfileRequest,
11983 >::from_parts(&req, &body);
11984 svc.get_profile(ctx, req)
11985 .await?
11986 .encode::<crate::proto::auth::v1::UserProfile>(format)
11987 })
11988 }
11989 "UpdateProfile" => {
11990 let svc = ::std::sync::Arc::clone(&self.inner);
11991 Box::pin(async move {
11992 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
11993 crate::proto::auth::v1::UserProfilePatch,
11994 >(request.encoded()?, format)?;
11995 let req: crate::proto::auth::v1::__buffa::view::UserProfilePatchView<
11996 '_,
11997 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
11998 &body,
11999 )?;
12000 let req = ::connectrpc::ServiceRequest::<
12001 crate::proto::auth::v1::UserProfilePatch,
12002 >::from_parts(&req, &body);
12003 svc.update_profile(ctx, req)
12004 .await?
12005 .encode::<crate::proto::auth::v1::UserProfile>(format)
12006 })
12007 }
12008 "GetUsernameHistory" => {
12009 let svc = ::std::sync::Arc::clone(&self.inner);
12010 Box::pin(async move {
12011 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
12012 crate::proto::auth::v1::GetUsernameHistoryRequest,
12013 >(request.encoded()?, format)?;
12014 let req: crate::proto::auth::v1::__buffa::view::GetUsernameHistoryRequestView<
12015 '_,
12016 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
12017 &body,
12018 )?;
12019 let req = ::connectrpc::ServiceRequest::<
12020 crate::proto::auth::v1::GetUsernameHistoryRequest,
12021 >::from_parts(&req, &body);
12022 svc.get_username_history(ctx, req)
12023 .await?
12024 .encode::<
12025 crate::proto::auth::v1::GetUsernameHistoryResponse,
12026 >(format)
12027 })
12028 }
12029 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
12030 }
12031 }
12032 fn call_server_streaming(
12033 &self,
12034 path: &str,
12035 ctx: ::connectrpc::RequestContext,
12036 request: ::buffa::bytes::Bytes,
12037 format: ::connectrpc::CodecFormat,
12038 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
12039 let Some(method) = path.strip_prefix("auth.v1.ProfileService/") else {
12040 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
12041 };
12042 let _ = (&ctx, &request, &format);
12043 match method {
12044 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
12045 }
12046 }
12047 fn call_client_streaming(
12048 &self,
12049 path: &str,
12050 ctx: ::connectrpc::RequestContext,
12051 requests: ::connectrpc::dispatcher::codegen::RequestStream,
12052 format: ::connectrpc::CodecFormat,
12053 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
12054 let Some(method) = path.strip_prefix("auth.v1.ProfileService/") else {
12055 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
12056 };
12057 let _ = (&ctx, &requests, &format);
12058 match method {
12059 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
12060 }
12061 }
12062 fn call_bidi_streaming(
12063 &self,
12064 path: &str,
12065 ctx: ::connectrpc::RequestContext,
12066 requests: ::connectrpc::dispatcher::codegen::RequestStream,
12067 format: ::connectrpc::CodecFormat,
12068 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
12069 let Some(method) = path.strip_prefix("auth.v1.ProfileService/") else {
12070 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
12071 };
12072 let _ = (&ctx, &requests, &format);
12073 match method {
12074 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
12075 }
12076 }
12077}
12078#[derive(Clone)]
12110pub struct ProfileServiceClient<T> {
12111 transport: T,
12112 config: ::connectrpc::client::ClientConfig,
12113}
12114impl<T> ProfileServiceClient<T>
12115where
12116 T: ::connectrpc::client::ClientTransport,
12117 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
12118{
12119 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
12121 Self { transport, config }
12122 }
12123 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
12125 &self.config
12126 }
12127 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
12129 &mut self.config
12130 }
12131 pub async fn get_profile(
12133 &self,
12134 request: crate::proto::auth::v1::GetProfileRequest,
12135 ) -> Result<
12136 ::connectrpc::client::UnaryResponse<
12137 ::buffa::view::OwnedView<
12138 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
12139 >,
12140 >,
12141 ::connectrpc::ConnectError,
12142 > {
12143 self.get_profile_with_options(
12144 request,
12145 ::connectrpc::client::CallOptions::default(),
12146 )
12147 .await
12148 }
12149 pub async fn get_profile_with_options(
12151 &self,
12152 request: crate::proto::auth::v1::GetProfileRequest,
12153 options: ::connectrpc::client::CallOptions,
12154 ) -> Result<
12155 ::connectrpc::client::UnaryResponse<
12156 ::buffa::view::OwnedView<
12157 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
12158 >,
12159 >,
12160 ::connectrpc::ConnectError,
12161 > {
12162 ::connectrpc::client::call_unary(
12163 &self.transport,
12164 &self.config,
12165 PROFILE_SERVICE_SERVICE_NAME,
12166 "GetProfile",
12167 request,
12168 options,
12169 )
12170 .await
12171 }
12172 pub async fn update_profile(
12174 &self,
12175 request: crate::proto::auth::v1::UserProfilePatch,
12176 ) -> Result<
12177 ::connectrpc::client::UnaryResponse<
12178 ::buffa::view::OwnedView<
12179 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
12180 >,
12181 >,
12182 ::connectrpc::ConnectError,
12183 > {
12184 self.update_profile_with_options(
12185 request,
12186 ::connectrpc::client::CallOptions::default(),
12187 )
12188 .await
12189 }
12190 pub async fn update_profile_with_options(
12192 &self,
12193 request: crate::proto::auth::v1::UserProfilePatch,
12194 options: ::connectrpc::client::CallOptions,
12195 ) -> Result<
12196 ::connectrpc::client::UnaryResponse<
12197 ::buffa::view::OwnedView<
12198 crate::proto::auth::v1::__buffa::view::UserProfileView<'static>,
12199 >,
12200 >,
12201 ::connectrpc::ConnectError,
12202 > {
12203 ::connectrpc::client::call_unary(
12204 &self.transport,
12205 &self.config,
12206 PROFILE_SERVICE_SERVICE_NAME,
12207 "UpdateProfile",
12208 request,
12209 options,
12210 )
12211 .await
12212 }
12213 pub async fn get_username_history(
12215 &self,
12216 request: crate::proto::auth::v1::GetUsernameHistoryRequest,
12217 ) -> Result<
12218 ::connectrpc::client::UnaryResponse<
12219 ::buffa::view::OwnedView<
12220 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryResponseView<
12221 'static,
12222 >,
12223 >,
12224 >,
12225 ::connectrpc::ConnectError,
12226 > {
12227 self.get_username_history_with_options(
12228 request,
12229 ::connectrpc::client::CallOptions::default(),
12230 )
12231 .await
12232 }
12233 pub async fn get_username_history_with_options(
12235 &self,
12236 request: crate::proto::auth::v1::GetUsernameHistoryRequest,
12237 options: ::connectrpc::client::CallOptions,
12238 ) -> Result<
12239 ::connectrpc::client::UnaryResponse<
12240 ::buffa::view::OwnedView<
12241 crate::proto::auth::v1::__buffa::view::GetUsernameHistoryResponseView<
12242 'static,
12243 >,
12244 >,
12245 >,
12246 ::connectrpc::ConnectError,
12247 > {
12248 ::connectrpc::client::call_unary(
12249 &self.transport,
12250 &self.config,
12251 PROFILE_SERVICE_SERVICE_NAME,
12252 "GetUsernameHistory",
12253 request,
12254 options,
12255 )
12256 .await
12257 }
12258}
12259
12260pub type OwnedResolveAccountRequestView = ::buffa::view::OwnedView<
12262 crate::proto::auth::v1::__buffa::view::ResolveAccountRequestView<'static>,
12263>;
12264pub type OwnedResolveAccountResponseView = ::buffa::view::OwnedView<
12266 crate::proto::auth::v1::__buffa::view::ResolveAccountResponseView<'static>,
12267>;
12268impl ::connectrpc::Encodable<crate::proto::auth::v1::ResolveAccountResponse>
12269for crate::proto::auth::v1::__buffa::view::ResolveAccountResponseView<'_> {
12270 fn encode(
12271 &self,
12272 codec: ::connectrpc::CodecFormat,
12273 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12274 ::connectrpc::__codegen::encode_view_body(self, codec)
12275 }
12276}
12277impl ::connectrpc::Encodable<crate::proto::auth::v1::ResolveAccountResponse>
12278for ::buffa::view::OwnedView<
12279 crate::proto::auth::v1::__buffa::view::ResolveAccountResponseView<'static>,
12280> {
12281 fn encode(
12282 &self,
12283 codec: ::connectrpc::CodecFormat,
12284 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12285 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
12286 }
12287}
12288pub const RESOLVE_SERVICE_SERVICE_NAME: &str = "auth.v1.ResolveService";
12290pub const RESOLVE_SERVICE_RESOLVE_ACCOUNT_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
12295 "/auth.v1.ResolveService/ResolveAccount",
12296 ::connectrpc::StreamType::Unary,
12297 )
12298 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
12299#[allow(clippy::type_complexity)]
12350pub trait ResolveService: Send + Sync + 'static {
12351 fn resolve_account<'a>(
12362 &'a self,
12363 ctx: ::connectrpc::RequestContext,
12364 request: ::connectrpc::ServiceRequest<
12365 '_,
12366 crate::proto::auth::v1::ResolveAccountRequest,
12367 >,
12368 ) -> impl ::std::future::Future<
12369 Output = ::connectrpc::ServiceResult<
12370 impl ::connectrpc::Encodable<
12371 crate::proto::auth::v1::ResolveAccountResponse,
12372 > + Send + use<'a, Self>,
12373 >,
12374 > + Send;
12375}
12376pub trait ResolveServiceExt: ResolveService {
12392 fn register(
12397 self: ::std::sync::Arc<Self>,
12398 router: ::connectrpc::Router,
12399 ) -> ::connectrpc::Router;
12400}
12401impl<S: ResolveService> ResolveServiceExt for S {
12402 fn register(
12403 self: ::std::sync::Arc<Self>,
12404 router: ::connectrpc::Router,
12405 ) -> ::connectrpc::Router {
12406 router
12407 .route_view(
12408 RESOLVE_SERVICE_SERVICE_NAME,
12409 "ResolveAccount",
12410 {
12411 let svc = ::std::sync::Arc::clone(&self);
12412 ::connectrpc::view_handler_fn(move |
12413 ctx,
12414 req: ::buffa::view::OwnedView<
12415 crate::proto::auth::v1::__buffa::view::ResolveAccountRequestView<
12416 'static,
12417 >,
12418 >,
12419 format|
12420 {
12421 let svc = ::std::sync::Arc::clone(&svc);
12422 async move {
12423 let sreq = ::connectrpc::ServiceRequest::<
12424 crate::proto::auth::v1::ResolveAccountRequest,
12425 >::from_parts(req.reborrow(), req.bytes());
12426 svc.resolve_account(ctx, sreq)
12427 .await?
12428 .encode::<
12429 crate::proto::auth::v1::ResolveAccountResponse,
12430 >(format)
12431 }
12432 })
12433 },
12434 )
12435 .with_spec(RESOLVE_SERVICE_RESOLVE_ACCOUNT_SPEC)
12436 }
12437}
12438#[doc(hidden)]
12440pub struct ResolveServiceRegisterMarker;
12441impl<S: ResolveService> ::connectrpc::ServiceRegister<ResolveServiceRegisterMarker>
12442for ::std::sync::Arc<S> {
12443 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
12444 <S as ResolveServiceExt>::register(self, router)
12445 }
12446}
12447pub struct ResolveServiceServer<T> {
12461 inner: ::std::sync::Arc<T>,
12462}
12463impl<T: ResolveService> ResolveServiceServer<T> {
12464 pub fn new(service: T) -> Self {
12466 Self {
12467 inner: ::std::sync::Arc::new(service),
12468 }
12469 }
12470 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
12472 Self { inner }
12473 }
12474}
12475impl<T> Clone for ResolveServiceServer<T> {
12476 fn clone(&self) -> Self {
12477 Self {
12478 inner: ::std::sync::Arc::clone(&self.inner),
12479 }
12480 }
12481}
12482impl<T: ResolveService> ::connectrpc::Dispatcher for ResolveServiceServer<T> {
12483 #[inline]
12484 fn lookup(
12485 &self,
12486 path: &str,
12487 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
12488 let method = path.strip_prefix("auth.v1.ResolveService/")?;
12489 match method {
12490 "ResolveAccount" => {
12491 Some(
12492 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
12493 .with_spec(RESOLVE_SERVICE_RESOLVE_ACCOUNT_SPEC),
12494 )
12495 }
12496 _ => None,
12497 }
12498 }
12499 fn call_unary(
12500 &self,
12501 path: &str,
12502 ctx: ::connectrpc::RequestContext,
12503 request: ::connectrpc::Payload,
12504 format: ::connectrpc::CodecFormat,
12505 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
12506 let Some(method) = path.strip_prefix("auth.v1.ResolveService/") else {
12507 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
12508 };
12509 let _ = (&ctx, &request, &format);
12510 match method {
12511 "ResolveAccount" => {
12512 let svc = ::std::sync::Arc::clone(&self.inner);
12513 Box::pin(async move {
12514 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
12515 crate::proto::auth::v1::ResolveAccountRequest,
12516 >(request.encoded()?, format)?;
12517 let req: crate::proto::auth::v1::__buffa::view::ResolveAccountRequestView<
12518 '_,
12519 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
12520 &body,
12521 )?;
12522 let req = ::connectrpc::ServiceRequest::<
12523 crate::proto::auth::v1::ResolveAccountRequest,
12524 >::from_parts(&req, &body);
12525 svc.resolve_account(ctx, req)
12526 .await?
12527 .encode::<crate::proto::auth::v1::ResolveAccountResponse>(format)
12528 })
12529 }
12530 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
12531 }
12532 }
12533 fn call_server_streaming(
12534 &self,
12535 path: &str,
12536 ctx: ::connectrpc::RequestContext,
12537 request: ::buffa::bytes::Bytes,
12538 format: ::connectrpc::CodecFormat,
12539 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
12540 let Some(method) = path.strip_prefix("auth.v1.ResolveService/") else {
12541 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
12542 };
12543 let _ = (&ctx, &request, &format);
12544 match method {
12545 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
12546 }
12547 }
12548 fn call_client_streaming(
12549 &self,
12550 path: &str,
12551 ctx: ::connectrpc::RequestContext,
12552 requests: ::connectrpc::dispatcher::codegen::RequestStream,
12553 format: ::connectrpc::CodecFormat,
12554 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
12555 let Some(method) = path.strip_prefix("auth.v1.ResolveService/") else {
12556 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
12557 };
12558 let _ = (&ctx, &requests, &format);
12559 match method {
12560 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
12561 }
12562 }
12563 fn call_bidi_streaming(
12564 &self,
12565 path: &str,
12566 ctx: ::connectrpc::RequestContext,
12567 requests: ::connectrpc::dispatcher::codegen::RequestStream,
12568 format: ::connectrpc::CodecFormat,
12569 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
12570 let Some(method) = path.strip_prefix("auth.v1.ResolveService/") else {
12571 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
12572 };
12573 let _ = (&ctx, &requests, &format);
12574 match method {
12575 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
12576 }
12577 }
12578}
12579#[derive(Clone)]
12611pub struct ResolveServiceClient<T> {
12612 transport: T,
12613 config: ::connectrpc::client::ClientConfig,
12614}
12615impl<T> ResolveServiceClient<T>
12616where
12617 T: ::connectrpc::client::ClientTransport,
12618 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
12619{
12620 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
12622 Self { transport, config }
12623 }
12624 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
12626 &self.config
12627 }
12628 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
12630 &mut self.config
12631 }
12632 pub async fn resolve_account(
12634 &self,
12635 request: crate::proto::auth::v1::ResolveAccountRequest,
12636 ) -> Result<
12637 ::connectrpc::client::UnaryResponse<
12638 ::buffa::view::OwnedView<
12639 crate::proto::auth::v1::__buffa::view::ResolveAccountResponseView<
12640 'static,
12641 >,
12642 >,
12643 >,
12644 ::connectrpc::ConnectError,
12645 > {
12646 self.resolve_account_with_options(
12647 request,
12648 ::connectrpc::client::CallOptions::default(),
12649 )
12650 .await
12651 }
12652 pub async fn resolve_account_with_options(
12654 &self,
12655 request: crate::proto::auth::v1::ResolveAccountRequest,
12656 options: ::connectrpc::client::CallOptions,
12657 ) -> Result<
12658 ::connectrpc::client::UnaryResponse<
12659 ::buffa::view::OwnedView<
12660 crate::proto::auth::v1::__buffa::view::ResolveAccountResponseView<
12661 'static,
12662 >,
12663 >,
12664 >,
12665 ::connectrpc::ConnectError,
12666 > {
12667 ::connectrpc::client::call_unary(
12668 &self.transport,
12669 &self.config,
12670 RESOLVE_SERVICE_SERVICE_NAME,
12671 "ResolveAccount",
12672 request,
12673 options,
12674 )
12675 .await
12676 }
12677}
12678
12679pub type OwnedStartSocialVerificationRequestView = ::buffa::view::OwnedView<
12681 crate::proto::auth::v1::__buffa::view::StartSocialVerificationRequestView<'static>,
12682>;
12683pub type OwnedStartSocialVerificationResponseView = ::buffa::view::OwnedView<
12685 crate::proto::auth::v1::__buffa::view::StartSocialVerificationResponseView<'static>,
12686>;
12687pub type OwnedSocialVerificationReadyRequestView = ::buffa::view::OwnedView<
12689 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyRequestView<'static>,
12690>;
12691pub type OwnedSocialVerificationReadyResponseView = ::buffa::view::OwnedView<
12693 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyResponseView<'static>,
12694>;
12695pub type OwnedGetSocialVerificationRequestView = ::buffa::view::OwnedView<
12697 crate::proto::auth::v1::__buffa::view::GetSocialVerificationRequestView<'static>,
12698>;
12699pub type OwnedGetSocialVerificationResponseView = ::buffa::view::OwnedView<
12701 crate::proto::auth::v1::__buffa::view::GetSocialVerificationResponseView<'static>,
12702>;
12703impl ::connectrpc::Encodable<crate::proto::auth::v1::StartSocialVerificationResponse>
12704for crate::proto::auth::v1::__buffa::view::StartSocialVerificationResponseView<'_> {
12705 fn encode(
12706 &self,
12707 codec: ::connectrpc::CodecFormat,
12708 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12709 ::connectrpc::__codegen::encode_view_body(self, codec)
12710 }
12711}
12712impl ::connectrpc::Encodable<crate::proto::auth::v1::StartSocialVerificationResponse>
12713for ::buffa::view::OwnedView<
12714 crate::proto::auth::v1::__buffa::view::StartSocialVerificationResponseView<'static>,
12715> {
12716 fn encode(
12717 &self,
12718 codec: ::connectrpc::CodecFormat,
12719 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12720 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
12721 }
12722}
12723impl ::connectrpc::Encodable<crate::proto::auth::v1::SocialVerificationReadyResponse>
12724for crate::proto::auth::v1::__buffa::view::SocialVerificationReadyResponseView<'_> {
12725 fn encode(
12726 &self,
12727 codec: ::connectrpc::CodecFormat,
12728 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12729 ::connectrpc::__codegen::encode_view_body(self, codec)
12730 }
12731}
12732impl ::connectrpc::Encodable<crate::proto::auth::v1::SocialVerificationReadyResponse>
12733for ::buffa::view::OwnedView<
12734 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyResponseView<'static>,
12735> {
12736 fn encode(
12737 &self,
12738 codec: ::connectrpc::CodecFormat,
12739 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12740 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
12741 }
12742}
12743impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSocialVerificationResponse>
12744for crate::proto::auth::v1::__buffa::view::GetSocialVerificationResponseView<'_> {
12745 fn encode(
12746 &self,
12747 codec: ::connectrpc::CodecFormat,
12748 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12749 ::connectrpc::__codegen::encode_view_body(self, codec)
12750 }
12751}
12752impl ::connectrpc::Encodable<crate::proto::auth::v1::GetSocialVerificationResponse>
12753for ::buffa::view::OwnedView<
12754 crate::proto::auth::v1::__buffa::view::GetSocialVerificationResponseView<'static>,
12755> {
12756 fn encode(
12757 &self,
12758 codec: ::connectrpc::CodecFormat,
12759 ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
12760 ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
12761 }
12762}
12763pub const SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME: &str = "auth.v1.SocialVerificationService";
12765pub const SOCIAL_VERIFICATION_SERVICE_START_SOCIAL_VERIFICATION_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
12770 "/auth.v1.SocialVerificationService/StartSocialVerification",
12771 ::connectrpc::StreamType::Unary,
12772 )
12773 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
12774pub const SOCIAL_VERIFICATION_SERVICE_SOCIAL_VERIFICATION_READY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
12779 "/auth.v1.SocialVerificationService/SocialVerificationReady",
12780 ::connectrpc::StreamType::Unary,
12781 )
12782 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
12783pub const SOCIAL_VERIFICATION_SERVICE_GET_SOCIAL_VERIFICATION_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
12788 "/auth.v1.SocialVerificationService/GetSocialVerification",
12789 ::connectrpc::StreamType::Unary,
12790 )
12791 .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
12792#[allow(clippy::type_complexity)]
12842pub trait SocialVerificationService: Send + Sync + 'static {
12843 fn start_social_verification<'a>(
12853 &'a self,
12854 ctx: ::connectrpc::RequestContext,
12855 request: ::connectrpc::ServiceRequest<
12856 '_,
12857 crate::proto::auth::v1::StartSocialVerificationRequest,
12858 >,
12859 ) -> impl ::std::future::Future<
12860 Output = ::connectrpc::ServiceResult<
12861 impl ::connectrpc::Encodable<
12862 crate::proto::auth::v1::StartSocialVerificationResponse,
12863 > + Send + use<'a, Self>,
12864 >,
12865 > + Send;
12866 fn social_verification_ready<'a>(
12876 &'a self,
12877 ctx: ::connectrpc::RequestContext,
12878 request: ::connectrpc::ServiceRequest<
12879 '_,
12880 crate::proto::auth::v1::SocialVerificationReadyRequest,
12881 >,
12882 ) -> impl ::std::future::Future<
12883 Output = ::connectrpc::ServiceResult<
12884 impl ::connectrpc::Encodable<
12885 crate::proto::auth::v1::SocialVerificationReadyResponse,
12886 > + Send + use<'a, Self>,
12887 >,
12888 > + Send;
12889 fn get_social_verification<'a>(
12899 &'a self,
12900 ctx: ::connectrpc::RequestContext,
12901 request: ::connectrpc::ServiceRequest<
12902 '_,
12903 crate::proto::auth::v1::GetSocialVerificationRequest,
12904 >,
12905 ) -> impl ::std::future::Future<
12906 Output = ::connectrpc::ServiceResult<
12907 impl ::connectrpc::Encodable<
12908 crate::proto::auth::v1::GetSocialVerificationResponse,
12909 > + Send + use<'a, Self>,
12910 >,
12911 > + Send;
12912}
12913pub trait SocialVerificationServiceExt: SocialVerificationService {
12929 fn register(
12934 self: ::std::sync::Arc<Self>,
12935 router: ::connectrpc::Router,
12936 ) -> ::connectrpc::Router;
12937}
12938impl<S: SocialVerificationService> SocialVerificationServiceExt for S {
12939 fn register(
12940 self: ::std::sync::Arc<Self>,
12941 router: ::connectrpc::Router,
12942 ) -> ::connectrpc::Router {
12943 router
12944 .route_view(
12945 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
12946 "StartSocialVerification",
12947 {
12948 let svc = ::std::sync::Arc::clone(&self);
12949 ::connectrpc::view_handler_fn(move |
12950 ctx,
12951 req: ::buffa::view::OwnedView<
12952 crate::proto::auth::v1::__buffa::view::StartSocialVerificationRequestView<
12953 'static,
12954 >,
12955 >,
12956 format|
12957 {
12958 let svc = ::std::sync::Arc::clone(&svc);
12959 async move {
12960 let sreq = ::connectrpc::ServiceRequest::<
12961 crate::proto::auth::v1::StartSocialVerificationRequest,
12962 >::from_parts(req.reborrow(), req.bytes());
12963 svc.start_social_verification(ctx, sreq)
12964 .await?
12965 .encode::<
12966 crate::proto::auth::v1::StartSocialVerificationResponse,
12967 >(format)
12968 }
12969 })
12970 },
12971 )
12972 .with_spec(SOCIAL_VERIFICATION_SERVICE_START_SOCIAL_VERIFICATION_SPEC)
12973 .route_view(
12974 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
12975 "SocialVerificationReady",
12976 {
12977 let svc = ::std::sync::Arc::clone(&self);
12978 ::connectrpc::view_handler_fn(move |
12979 ctx,
12980 req: ::buffa::view::OwnedView<
12981 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyRequestView<
12982 'static,
12983 >,
12984 >,
12985 format|
12986 {
12987 let svc = ::std::sync::Arc::clone(&svc);
12988 async move {
12989 let sreq = ::connectrpc::ServiceRequest::<
12990 crate::proto::auth::v1::SocialVerificationReadyRequest,
12991 >::from_parts(req.reborrow(), req.bytes());
12992 svc.social_verification_ready(ctx, sreq)
12993 .await?
12994 .encode::<
12995 crate::proto::auth::v1::SocialVerificationReadyResponse,
12996 >(format)
12997 }
12998 })
12999 },
13000 )
13001 .with_spec(SOCIAL_VERIFICATION_SERVICE_SOCIAL_VERIFICATION_READY_SPEC)
13002 .route_view(
13003 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
13004 "GetSocialVerification",
13005 {
13006 let svc = ::std::sync::Arc::clone(&self);
13007 ::connectrpc::view_handler_fn(move |
13008 ctx,
13009 req: ::buffa::view::OwnedView<
13010 crate::proto::auth::v1::__buffa::view::GetSocialVerificationRequestView<
13011 'static,
13012 >,
13013 >,
13014 format|
13015 {
13016 let svc = ::std::sync::Arc::clone(&svc);
13017 async move {
13018 let sreq = ::connectrpc::ServiceRequest::<
13019 crate::proto::auth::v1::GetSocialVerificationRequest,
13020 >::from_parts(req.reborrow(), req.bytes());
13021 svc.get_social_verification(ctx, sreq)
13022 .await?
13023 .encode::<
13024 crate::proto::auth::v1::GetSocialVerificationResponse,
13025 >(format)
13026 }
13027 })
13028 },
13029 )
13030 .with_spec(SOCIAL_VERIFICATION_SERVICE_GET_SOCIAL_VERIFICATION_SPEC)
13031 }
13032}
13033#[doc(hidden)]
13035pub struct SocialVerificationServiceRegisterMarker;
13036impl<
13037 S: SocialVerificationService,
13038> ::connectrpc::ServiceRegister<SocialVerificationServiceRegisterMarker>
13039for ::std::sync::Arc<S> {
13040 fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
13041 <S as SocialVerificationServiceExt>::register(self, router)
13042 }
13043}
13044pub struct SocialVerificationServiceServer<T> {
13058 inner: ::std::sync::Arc<T>,
13059}
13060impl<T: SocialVerificationService> SocialVerificationServiceServer<T> {
13061 pub fn new(service: T) -> Self {
13063 Self {
13064 inner: ::std::sync::Arc::new(service),
13065 }
13066 }
13067 pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
13069 Self { inner }
13070 }
13071}
13072impl<T> Clone for SocialVerificationServiceServer<T> {
13073 fn clone(&self) -> Self {
13074 Self {
13075 inner: ::std::sync::Arc::clone(&self.inner),
13076 }
13077 }
13078}
13079impl<T: SocialVerificationService> ::connectrpc::Dispatcher
13080for SocialVerificationServiceServer<T> {
13081 #[inline]
13082 fn lookup(
13083 &self,
13084 path: &str,
13085 ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
13086 let method = path.strip_prefix("auth.v1.SocialVerificationService/")?;
13087 match method {
13088 "StartSocialVerification" => {
13089 Some(
13090 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
13091 .with_spec(
13092 SOCIAL_VERIFICATION_SERVICE_START_SOCIAL_VERIFICATION_SPEC,
13093 ),
13094 )
13095 }
13096 "SocialVerificationReady" => {
13097 Some(
13098 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
13099 .with_spec(
13100 SOCIAL_VERIFICATION_SERVICE_SOCIAL_VERIFICATION_READY_SPEC,
13101 ),
13102 )
13103 }
13104 "GetSocialVerification" => {
13105 Some(
13106 ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
13107 .with_spec(
13108 SOCIAL_VERIFICATION_SERVICE_GET_SOCIAL_VERIFICATION_SPEC,
13109 ),
13110 )
13111 }
13112 _ => None,
13113 }
13114 }
13115 fn call_unary(
13116 &self,
13117 path: &str,
13118 ctx: ::connectrpc::RequestContext,
13119 request: ::connectrpc::Payload,
13120 format: ::connectrpc::CodecFormat,
13121 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
13122 let Some(method) = path.strip_prefix("auth.v1.SocialVerificationService/") else {
13123 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
13124 };
13125 let _ = (&ctx, &request, &format);
13126 match method {
13127 "StartSocialVerification" => {
13128 let svc = ::std::sync::Arc::clone(&self.inner);
13129 Box::pin(async move {
13130 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
13131 crate::proto::auth::v1::StartSocialVerificationRequest,
13132 >(request.encoded()?, format)?;
13133 let req: crate::proto::auth::v1::__buffa::view::StartSocialVerificationRequestView<
13134 '_,
13135 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
13136 &body,
13137 )?;
13138 let req = ::connectrpc::ServiceRequest::<
13139 crate::proto::auth::v1::StartSocialVerificationRequest,
13140 >::from_parts(&req, &body);
13141 svc.start_social_verification(ctx, req)
13142 .await?
13143 .encode::<
13144 crate::proto::auth::v1::StartSocialVerificationResponse,
13145 >(format)
13146 })
13147 }
13148 "SocialVerificationReady" => {
13149 let svc = ::std::sync::Arc::clone(&self.inner);
13150 Box::pin(async move {
13151 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
13152 crate::proto::auth::v1::SocialVerificationReadyRequest,
13153 >(request.encoded()?, format)?;
13154 let req: crate::proto::auth::v1::__buffa::view::SocialVerificationReadyRequestView<
13155 '_,
13156 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
13157 &body,
13158 )?;
13159 let req = ::connectrpc::ServiceRequest::<
13160 crate::proto::auth::v1::SocialVerificationReadyRequest,
13161 >::from_parts(&req, &body);
13162 svc.social_verification_ready(ctx, req)
13163 .await?
13164 .encode::<
13165 crate::proto::auth::v1::SocialVerificationReadyResponse,
13166 >(format)
13167 })
13168 }
13169 "GetSocialVerification" => {
13170 let svc = ::std::sync::Arc::clone(&self.inner);
13171 Box::pin(async move {
13172 let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
13173 crate::proto::auth::v1::GetSocialVerificationRequest,
13174 >(request.encoded()?, format)?;
13175 let req: crate::proto::auth::v1::__buffa::view::GetSocialVerificationRequestView<
13176 '_,
13177 > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
13178 &body,
13179 )?;
13180 let req = ::connectrpc::ServiceRequest::<
13181 crate::proto::auth::v1::GetSocialVerificationRequest,
13182 >::from_parts(&req, &body);
13183 svc.get_social_verification(ctx, req)
13184 .await?
13185 .encode::<
13186 crate::proto::auth::v1::GetSocialVerificationResponse,
13187 >(format)
13188 })
13189 }
13190 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
13191 }
13192 }
13193 fn call_server_streaming(
13194 &self,
13195 path: &str,
13196 ctx: ::connectrpc::RequestContext,
13197 request: ::buffa::bytes::Bytes,
13198 format: ::connectrpc::CodecFormat,
13199 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
13200 let Some(method) = path.strip_prefix("auth.v1.SocialVerificationService/") else {
13201 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
13202 };
13203 let _ = (&ctx, &request, &format);
13204 match method {
13205 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
13206 }
13207 }
13208 fn call_client_streaming(
13209 &self,
13210 path: &str,
13211 ctx: ::connectrpc::RequestContext,
13212 requests: ::connectrpc::dispatcher::codegen::RequestStream,
13213 format: ::connectrpc::CodecFormat,
13214 ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
13215 let Some(method) = path.strip_prefix("auth.v1.SocialVerificationService/") else {
13216 return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
13217 };
13218 let _ = (&ctx, &requests, &format);
13219 match method {
13220 _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
13221 }
13222 }
13223 fn call_bidi_streaming(
13224 &self,
13225 path: &str,
13226 ctx: ::connectrpc::RequestContext,
13227 requests: ::connectrpc::dispatcher::codegen::RequestStream,
13228 format: ::connectrpc::CodecFormat,
13229 ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
13230 let Some(method) = path.strip_prefix("auth.v1.SocialVerificationService/") else {
13231 return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
13232 };
13233 let _ = (&ctx, &requests, &format);
13234 match method {
13235 _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
13236 }
13237 }
13238}
13239#[derive(Clone)]
13271pub struct SocialVerificationServiceClient<T> {
13272 transport: T,
13273 config: ::connectrpc::client::ClientConfig,
13274}
13275impl<T> SocialVerificationServiceClient<T>
13276where
13277 T: ::connectrpc::client::ClientTransport,
13278 <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
13279{
13280 pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
13282 Self { transport, config }
13283 }
13284 pub fn config(&self) -> &::connectrpc::client::ClientConfig {
13286 &self.config
13287 }
13288 pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
13290 &mut self.config
13291 }
13292 pub async fn start_social_verification(
13294 &self,
13295 request: crate::proto::auth::v1::StartSocialVerificationRequest,
13296 ) -> Result<
13297 ::connectrpc::client::UnaryResponse<
13298 ::buffa::view::OwnedView<
13299 crate::proto::auth::v1::__buffa::view::StartSocialVerificationResponseView<
13300 'static,
13301 >,
13302 >,
13303 >,
13304 ::connectrpc::ConnectError,
13305 > {
13306 self.start_social_verification_with_options(
13307 request,
13308 ::connectrpc::client::CallOptions::default(),
13309 )
13310 .await
13311 }
13312 pub async fn start_social_verification_with_options(
13314 &self,
13315 request: crate::proto::auth::v1::StartSocialVerificationRequest,
13316 options: ::connectrpc::client::CallOptions,
13317 ) -> Result<
13318 ::connectrpc::client::UnaryResponse<
13319 ::buffa::view::OwnedView<
13320 crate::proto::auth::v1::__buffa::view::StartSocialVerificationResponseView<
13321 'static,
13322 >,
13323 >,
13324 >,
13325 ::connectrpc::ConnectError,
13326 > {
13327 ::connectrpc::client::call_unary(
13328 &self.transport,
13329 &self.config,
13330 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
13331 "StartSocialVerification",
13332 request,
13333 options,
13334 )
13335 .await
13336 }
13337 pub async fn social_verification_ready(
13339 &self,
13340 request: crate::proto::auth::v1::SocialVerificationReadyRequest,
13341 ) -> Result<
13342 ::connectrpc::client::UnaryResponse<
13343 ::buffa::view::OwnedView<
13344 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyResponseView<
13345 'static,
13346 >,
13347 >,
13348 >,
13349 ::connectrpc::ConnectError,
13350 > {
13351 self.social_verification_ready_with_options(
13352 request,
13353 ::connectrpc::client::CallOptions::default(),
13354 )
13355 .await
13356 }
13357 pub async fn social_verification_ready_with_options(
13359 &self,
13360 request: crate::proto::auth::v1::SocialVerificationReadyRequest,
13361 options: ::connectrpc::client::CallOptions,
13362 ) -> Result<
13363 ::connectrpc::client::UnaryResponse<
13364 ::buffa::view::OwnedView<
13365 crate::proto::auth::v1::__buffa::view::SocialVerificationReadyResponseView<
13366 'static,
13367 >,
13368 >,
13369 >,
13370 ::connectrpc::ConnectError,
13371 > {
13372 ::connectrpc::client::call_unary(
13373 &self.transport,
13374 &self.config,
13375 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
13376 "SocialVerificationReady",
13377 request,
13378 options,
13379 )
13380 .await
13381 }
13382 pub async fn get_social_verification(
13384 &self,
13385 request: crate::proto::auth::v1::GetSocialVerificationRequest,
13386 ) -> Result<
13387 ::connectrpc::client::UnaryResponse<
13388 ::buffa::view::OwnedView<
13389 crate::proto::auth::v1::__buffa::view::GetSocialVerificationResponseView<
13390 'static,
13391 >,
13392 >,
13393 >,
13394 ::connectrpc::ConnectError,
13395 > {
13396 self.get_social_verification_with_options(
13397 request,
13398 ::connectrpc::client::CallOptions::default(),
13399 )
13400 .await
13401 }
13402 pub async fn get_social_verification_with_options(
13404 &self,
13405 request: crate::proto::auth::v1::GetSocialVerificationRequest,
13406 options: ::connectrpc::client::CallOptions,
13407 ) -> Result<
13408 ::connectrpc::client::UnaryResponse<
13409 ::buffa::view::OwnedView<
13410 crate::proto::auth::v1::__buffa::view::GetSocialVerificationResponseView<
13411 'static,
13412 >,
13413 >,
13414 >,
13415 ::connectrpc::ConnectError,
13416 > {
13417 ::connectrpc::client::call_unary(
13418 &self.transport,
13419 &self.config,
13420 SOCIAL_VERIFICATION_SERVICE_SERVICE_NAME,
13421 "GetSocialVerification",
13422 request,
13423 options,
13424 )
13425 .await
13426 }
13427}