1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Certificate {
5 #[prost(string, tag = "1")]
7 pub id: ::prost::alloc::string::String,
8 #[prost(string, tag = "2")]
10 pub federation_id: ::prost::alloc::string::String,
11 #[prost(string, tag = "3")]
13 pub name: ::prost::alloc::string::String,
14 #[prost(string, tag = "4")]
16 pub description: ::prost::alloc::string::String,
17 #[prost(message, optional, tag = "5")]
19 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
20 #[prost(string, tag = "6")]
22 pub data: ::prost::alloc::string::String,
23}
24#[allow(clippy::derive_partial_eq_without_eq)]
25#[derive(Clone, PartialEq, ::prost::Message)]
26pub struct GetCertificateRequest {
27 #[prost(string, tag = "1")]
30 pub certificate_id: ::prost::alloc::string::String,
31}
32#[allow(clippy::derive_partial_eq_without_eq)]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct ListCertificatesRequest {
35 #[prost(string, tag = "1")]
38 pub federation_id: ::prost::alloc::string::String,
39 #[prost(int64, tag = "2")]
44 pub page_size: i64,
45 #[prost(string, tag = "3")]
49 pub page_token: ::prost::alloc::string::String,
50 #[prost(string, tag = "4")]
56 pub filter: ::prost::alloc::string::String,
57}
58#[allow(clippy::derive_partial_eq_without_eq)]
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct ListCertificatesResponse {
61 #[prost(message, repeated, tag = "1")]
63 pub certificates: ::prost::alloc::vec::Vec<Certificate>,
64 #[prost(string, tag = "2")]
71 pub next_page_token: ::prost::alloc::string::String,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct CreateCertificateRequest {
76 #[prost(string, tag = "1")]
79 pub federation_id: ::prost::alloc::string::String,
80 #[prost(string, tag = "2")]
83 pub name: ::prost::alloc::string::String,
84 #[prost(string, tag = "3")]
86 pub description: ::prost::alloc::string::String,
87 #[prost(string, tag = "4")]
89 pub data: ::prost::alloc::string::String,
90}
91#[allow(clippy::derive_partial_eq_without_eq)]
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct CreateCertificateMetadata {
94 #[prost(string, tag = "1")]
96 pub certificate_id: ::prost::alloc::string::String,
97}
98#[allow(clippy::derive_partial_eq_without_eq)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct UpdateCertificateRequest {
101 #[prost(string, tag = "1")]
104 pub certificate_id: ::prost::alloc::string::String,
105 #[prost(message, optional, tag = "2")]
107 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
108 #[prost(string, tag = "3")]
111 pub name: ::prost::alloc::string::String,
112 #[prost(string, tag = "4")]
114 pub description: ::prost::alloc::string::String,
115 #[prost(string, tag = "5")]
117 pub data: ::prost::alloc::string::String,
118}
119#[allow(clippy::derive_partial_eq_without_eq)]
120#[derive(Clone, PartialEq, ::prost::Message)]
121pub struct UpdateCertificateMetadata {
122 #[prost(string, tag = "1")]
124 pub certificate_id: ::prost::alloc::string::String,
125}
126#[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct DeleteCertificateRequest {
129 #[prost(string, tag = "1")]
132 pub certificate_id: ::prost::alloc::string::String,
133}
134#[allow(clippy::derive_partial_eq_without_eq)]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct DeleteCertificateMetadata {
137 #[prost(string, tag = "1")]
139 pub certificate_id: ::prost::alloc::string::String,
140}
141#[allow(clippy::derive_partial_eq_without_eq)]
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct ListCertificateOperationsRequest {
144 #[prost(string, tag = "1")]
146 pub certificate_id: ::prost::alloc::string::String,
147 #[prost(int64, tag = "2")]
152 pub page_size: i64,
153 #[prost(string, tag = "3")]
157 pub page_token: ::prost::alloc::string::String,
158}
159#[allow(clippy::derive_partial_eq_without_eq)]
160#[derive(Clone, PartialEq, ::prost::Message)]
161pub struct ListCertificateOperationsResponse {
162 #[prost(message, repeated, tag = "1")]
164 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
165 #[prost(string, tag = "2")]
170 pub next_page_token: ::prost::alloc::string::String,
171}
172pub mod certificate_service_client {
174 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
175 use tonic::codegen::*;
176 use tonic::codegen::http::Uri;
177 #[derive(Debug, Clone)]
179 pub struct CertificateServiceClient<T> {
180 inner: tonic::client::Grpc<T>,
181 }
182 impl CertificateServiceClient<tonic::transport::Channel> {
183 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
185 where
186 D: TryInto<tonic::transport::Endpoint>,
187 D::Error: Into<StdError>,
188 {
189 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
190 Ok(Self::new(conn))
191 }
192 }
193 impl<T> CertificateServiceClient<T>
194 where
195 T: tonic::client::GrpcService<tonic::body::BoxBody>,
196 T::Error: Into<StdError>,
197 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
198 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
199 {
200 pub fn new(inner: T) -> Self {
201 let inner = tonic::client::Grpc::new(inner);
202 Self { inner }
203 }
204 pub fn with_origin(inner: T, origin: Uri) -> Self {
205 let inner = tonic::client::Grpc::with_origin(inner, origin);
206 Self { inner }
207 }
208 pub fn with_interceptor<F>(
209 inner: T,
210 interceptor: F,
211 ) -> CertificateServiceClient<InterceptedService<T, F>>
212 where
213 F: tonic::service::Interceptor,
214 T::ResponseBody: Default,
215 T: tonic::codegen::Service<
216 http::Request<tonic::body::BoxBody>,
217 Response = http::Response<
218 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
219 >,
220 >,
221 <T as tonic::codegen::Service<
222 http::Request<tonic::body::BoxBody>,
223 >>::Error: Into<StdError> + Send + Sync,
224 {
225 CertificateServiceClient::new(InterceptedService::new(inner, interceptor))
226 }
227 #[must_use]
232 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
233 self.inner = self.inner.send_compressed(encoding);
234 self
235 }
236 #[must_use]
238 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
239 self.inner = self.inner.accept_compressed(encoding);
240 self
241 }
242 #[must_use]
246 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
247 self.inner = self.inner.max_decoding_message_size(limit);
248 self
249 }
250 #[must_use]
254 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
255 self.inner = self.inner.max_encoding_message_size(limit);
256 self
257 }
258 pub async fn get(
262 &mut self,
263 request: impl tonic::IntoRequest<super::GetCertificateRequest>,
264 ) -> std::result::Result<tonic::Response<super::Certificate>, tonic::Status> {
265 self.inner
266 .ready()
267 .await
268 .map_err(|e| {
269 tonic::Status::new(
270 tonic::Code::Unknown,
271 format!("Service was not ready: {}", e.into()),
272 )
273 })?;
274 let codec = tonic::codec::ProstCodec::default();
275 let path = http::uri::PathAndQuery::from_static(
276 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/Get",
277 );
278 let mut req = request.into_request();
279 req.extensions_mut()
280 .insert(
281 GrpcMethod::new(
282 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
283 "Get",
284 ),
285 );
286 self.inner.unary(req, path, codec).await
287 }
288 pub async fn list(
290 &mut self,
291 request: impl tonic::IntoRequest<super::ListCertificatesRequest>,
292 ) -> std::result::Result<
293 tonic::Response<super::ListCertificatesResponse>,
294 tonic::Status,
295 > {
296 self.inner
297 .ready()
298 .await
299 .map_err(|e| {
300 tonic::Status::new(
301 tonic::Code::Unknown,
302 format!("Service was not ready: {}", e.into()),
303 )
304 })?;
305 let codec = tonic::codec::ProstCodec::default();
306 let path = http::uri::PathAndQuery::from_static(
307 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/List",
308 );
309 let mut req = request.into_request();
310 req.extensions_mut()
311 .insert(
312 GrpcMethod::new(
313 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
314 "List",
315 ),
316 );
317 self.inner.unary(req, path, codec).await
318 }
319 pub async fn create(
321 &mut self,
322 request: impl tonic::IntoRequest<super::CreateCertificateRequest>,
323 ) -> std::result::Result<
324 tonic::Response<super::super::super::super::operation::Operation>,
325 tonic::Status,
326 > {
327 self.inner
328 .ready()
329 .await
330 .map_err(|e| {
331 tonic::Status::new(
332 tonic::Code::Unknown,
333 format!("Service was not ready: {}", e.into()),
334 )
335 })?;
336 let codec = tonic::codec::ProstCodec::default();
337 let path = http::uri::PathAndQuery::from_static(
338 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/Create",
339 );
340 let mut req = request.into_request();
341 req.extensions_mut()
342 .insert(
343 GrpcMethod::new(
344 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
345 "Create",
346 ),
347 );
348 self.inner.unary(req, path, codec).await
349 }
350 pub async fn update(
352 &mut self,
353 request: impl tonic::IntoRequest<super::UpdateCertificateRequest>,
354 ) -> std::result::Result<
355 tonic::Response<super::super::super::super::operation::Operation>,
356 tonic::Status,
357 > {
358 self.inner
359 .ready()
360 .await
361 .map_err(|e| {
362 tonic::Status::new(
363 tonic::Code::Unknown,
364 format!("Service was not ready: {}", e.into()),
365 )
366 })?;
367 let codec = tonic::codec::ProstCodec::default();
368 let path = http::uri::PathAndQuery::from_static(
369 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/Update",
370 );
371 let mut req = request.into_request();
372 req.extensions_mut()
373 .insert(
374 GrpcMethod::new(
375 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
376 "Update",
377 ),
378 );
379 self.inner.unary(req, path, codec).await
380 }
381 pub async fn delete(
383 &mut self,
384 request: impl tonic::IntoRequest<super::DeleteCertificateRequest>,
385 ) -> std::result::Result<
386 tonic::Response<super::super::super::super::operation::Operation>,
387 tonic::Status,
388 > {
389 self.inner
390 .ready()
391 .await
392 .map_err(|e| {
393 tonic::Status::new(
394 tonic::Code::Unknown,
395 format!("Service was not ready: {}", e.into()),
396 )
397 })?;
398 let codec = tonic::codec::ProstCodec::default();
399 let path = http::uri::PathAndQuery::from_static(
400 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/Delete",
401 );
402 let mut req = request.into_request();
403 req.extensions_mut()
404 .insert(
405 GrpcMethod::new(
406 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
407 "Delete",
408 ),
409 );
410 self.inner.unary(req, path, codec).await
411 }
412 pub async fn list_operations(
414 &mut self,
415 request: impl tonic::IntoRequest<super::ListCertificateOperationsRequest>,
416 ) -> std::result::Result<
417 tonic::Response<super::ListCertificateOperationsResponse>,
418 tonic::Status,
419 > {
420 self.inner
421 .ready()
422 .await
423 .map_err(|e| {
424 tonic::Status::new(
425 tonic::Code::Unknown,
426 format!("Service was not ready: {}", e.into()),
427 )
428 })?;
429 let codec = tonic::codec::ProstCodec::default();
430 let path = http::uri::PathAndQuery::from_static(
431 "/yandex.cloud.organizationmanager.v1.saml.CertificateService/ListOperations",
432 );
433 let mut req = request.into_request();
434 req.extensions_mut()
435 .insert(
436 GrpcMethod::new(
437 "yandex.cloud.organizationmanager.v1.saml.CertificateService",
438 "ListOperations",
439 ),
440 );
441 self.inner.unary(req, path, codec).await
442 }
443 }
444}
445#[allow(clippy::derive_partial_eq_without_eq)]
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct Federation {
450 #[prost(string, tag = "1")]
452 pub id: ::prost::alloc::string::String,
453 #[prost(string, tag = "2")]
455 pub organization_id: ::prost::alloc::string::String,
456 #[prost(string, tag = "3")]
458 pub name: ::prost::alloc::string::String,
459 #[prost(string, tag = "4")]
461 pub description: ::prost::alloc::string::String,
462 #[prost(message, optional, tag = "5")]
464 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
465 #[prost(message, optional, tag = "6")]
469 pub cookie_max_age: ::core::option::Option<::prost_types::Duration>,
470 #[prost(bool, tag = "7")]
477 pub auto_create_account_on_login: bool,
478 #[prost(string, tag = "8")]
481 pub issuer: ::prost::alloc::string::String,
482 #[prost(enumeration = "BindingType", tag = "9")]
487 pub sso_binding: i32,
488 #[prost(string, tag = "10")]
491 pub sso_url: ::prost::alloc::string::String,
492 #[prost(message, optional, tag = "11")]
494 pub security_settings: ::core::option::Option<FederationSecuritySettings>,
495 #[prost(bool, tag = "12")]
497 pub case_insensitive_name_ids: bool,
498 #[prost(map = "string, string", tag = "13")]
500 pub labels: ::std::collections::HashMap<
501 ::prost::alloc::string::String,
502 ::prost::alloc::string::String,
503 >,
504}
505#[allow(clippy::derive_partial_eq_without_eq)]
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct FederationSecuritySettings {
509 #[prost(bool, tag = "1")]
511 pub encrypted_assertions: bool,
512 #[prost(bool, tag = "2")]
514 pub force_authn: bool,
515}
516#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
517#[repr(i32)]
518pub enum BindingType {
519 Unspecified = 0,
520 Post = 1,
522 Redirect = 2,
524 Artifact = 3,
526}
527impl BindingType {
528 pub fn as_str_name(&self) -> &'static str {
533 match self {
534 BindingType::Unspecified => "BINDING_TYPE_UNSPECIFIED",
535 BindingType::Post => "POST",
536 BindingType::Redirect => "REDIRECT",
537 BindingType::Artifact => "ARTIFACT",
538 }
539 }
540 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
542 match value {
543 "BINDING_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
544 "POST" => Some(Self::Post),
545 "REDIRECT" => Some(Self::Redirect),
546 "ARTIFACT" => Some(Self::Artifact),
547 _ => None,
548 }
549 }
550}
551#[allow(clippy::derive_partial_eq_without_eq)]
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct GetFederationRequest {
554 #[prost(string, tag = "1")]
557 pub federation_id: ::prost::alloc::string::String,
558}
559#[allow(clippy::derive_partial_eq_without_eq)]
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct ListFederationsRequest {
562 #[prost(string, tag = "6")]
565 pub organization_id: ::prost::alloc::string::String,
566 #[prost(int64, tag = "3")]
572 pub page_size: i64,
573 #[prost(string, tag = "4")]
577 pub page_token: ::prost::alloc::string::String,
578 #[prost(string, tag = "5")]
584 pub filter: ::prost::alloc::string::String,
585}
586#[allow(clippy::derive_partial_eq_without_eq)]
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct ListFederationsResponse {
589 #[prost(message, repeated, tag = "1")]
591 pub federations: ::prost::alloc::vec::Vec<Federation>,
592 #[prost(string, tag = "2")]
599 pub next_page_token: ::prost::alloc::string::String,
600}
601#[allow(clippy::derive_partial_eq_without_eq)]
602#[derive(Clone, PartialEq, ::prost::Message)]
603pub struct CreateFederationRequest {
604 #[prost(string, tag = "1")]
607 pub organization_id: ::prost::alloc::string::String,
608 #[prost(string, tag = "2")]
611 pub name: ::prost::alloc::string::String,
612 #[prost(string, tag = "3")]
614 pub description: ::prost::alloc::string::String,
615 #[prost(message, optional, tag = "4")]
620 pub cookie_max_age: ::core::option::Option<::prost_types::Duration>,
621 #[prost(bool, tag = "5")]
628 pub auto_create_account_on_login: bool,
629 #[prost(string, tag = "6")]
632 pub issuer: ::prost::alloc::string::String,
633 #[prost(enumeration = "BindingType", tag = "7")]
638 pub sso_binding: i32,
639 #[prost(string, tag = "8")]
642 pub sso_url: ::prost::alloc::string::String,
643 #[prost(message, optional, tag = "9")]
645 pub security_settings: ::core::option::Option<FederationSecuritySettings>,
646 #[prost(bool, tag = "10")]
648 pub case_insensitive_name_ids: bool,
649 #[prost(map = "string, string", tag = "11")]
651 pub labels: ::std::collections::HashMap<
652 ::prost::alloc::string::String,
653 ::prost::alloc::string::String,
654 >,
655}
656#[allow(clippy::derive_partial_eq_without_eq)]
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct CreateFederationMetadata {
659 #[prost(string, tag = "1")]
661 pub federation_id: ::prost::alloc::string::String,
662}
663#[allow(clippy::derive_partial_eq_without_eq)]
664#[derive(Clone, PartialEq, ::prost::Message)]
665pub struct UpdateFederationRequest {
666 #[prost(string, tag = "1")]
669 pub federation_id: ::prost::alloc::string::String,
670 #[prost(message, optional, tag = "2")]
672 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
673 #[prost(string, tag = "3")]
676 pub name: ::prost::alloc::string::String,
677 #[prost(string, tag = "4")]
679 pub description: ::prost::alloc::string::String,
680 #[prost(message, optional, tag = "5")]
685 pub cookie_max_age: ::core::option::Option<::prost_types::Duration>,
686 #[prost(bool, tag = "6")]
693 pub auto_create_account_on_login: bool,
694 #[prost(string, tag = "7")]
697 pub issuer: ::prost::alloc::string::String,
698 #[prost(enumeration = "BindingType", tag = "8")]
703 pub sso_binding: i32,
704 #[prost(string, tag = "9")]
707 pub sso_url: ::prost::alloc::string::String,
708 #[prost(message, optional, tag = "10")]
710 pub security_settings: ::core::option::Option<FederationSecuritySettings>,
711 #[prost(bool, tag = "12")]
713 pub case_insensitive_name_ids: bool,
714 #[prost(map = "string, string", tag = "13")]
716 pub labels: ::std::collections::HashMap<
717 ::prost::alloc::string::String,
718 ::prost::alloc::string::String,
719 >,
720}
721#[allow(clippy::derive_partial_eq_without_eq)]
722#[derive(Clone, PartialEq, ::prost::Message)]
723pub struct UpdateFederationMetadata {
724 #[prost(string, tag = "1")]
726 pub federation_id: ::prost::alloc::string::String,
727}
728#[allow(clippy::derive_partial_eq_without_eq)]
729#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct DeleteFederationRequest {
731 #[prost(string, tag = "1")]
734 pub federation_id: ::prost::alloc::string::String,
735}
736#[allow(clippy::derive_partial_eq_without_eq)]
737#[derive(Clone, PartialEq, ::prost::Message)]
738pub struct DeleteFederationMetadata {
739 #[prost(string, tag = "1")]
741 pub federation_id: ::prost::alloc::string::String,
742}
743#[allow(clippy::derive_partial_eq_without_eq)]
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct AddFederatedUserAccountsRequest {
746 #[prost(string, tag = "1")]
748 pub federation_id: ::prost::alloc::string::String,
749 #[prost(string, repeated, tag = "2")]
752 pub name_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
753}
754#[allow(clippy::derive_partial_eq_without_eq)]
755#[derive(Clone, PartialEq, ::prost::Message)]
756pub struct AddFederatedUserAccountsMetadata {
757 #[prost(string, tag = "1")]
759 pub federation_id: ::prost::alloc::string::String,
760}
761#[allow(clippy::derive_partial_eq_without_eq)]
762#[derive(Clone, PartialEq, ::prost::Message)]
763pub struct AddFederatedUserAccountsResponse {
764 #[prost(message, repeated, tag = "1")]
766 pub user_accounts: ::prost::alloc::vec::Vec<super::UserAccount>,
767}
768#[allow(clippy::derive_partial_eq_without_eq)]
769#[derive(Clone, PartialEq, ::prost::Message)]
770pub struct DeleteFederatedUserAccountsRequest {
771 #[prost(string, tag = "1")]
773 pub federation_id: ::prost::alloc::string::String,
774 #[prost(string, repeated, tag = "2")]
776 pub subject_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
777}
778#[allow(clippy::derive_partial_eq_without_eq)]
779#[derive(Clone, PartialEq, ::prost::Message)]
780pub struct DeleteFederatedUserAccountsMetadata {
781 #[prost(string, tag = "1")]
783 pub federation_id: ::prost::alloc::string::String,
784}
785#[allow(clippy::derive_partial_eq_without_eq)]
786#[derive(Clone, PartialEq, ::prost::Message)]
787pub struct DeleteFederatedUserAccountsResponse {
788 #[prost(string, repeated, tag = "1")]
790 pub deleted_subjects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
791 #[prost(string, repeated, tag = "2")]
793 pub non_existing_subjects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
794}
795#[allow(clippy::derive_partial_eq_without_eq)]
796#[derive(Clone, PartialEq, ::prost::Message)]
797pub struct ListFederatedUserAccountsRequest {
798 #[prost(string, tag = "1")]
800 pub federation_id: ::prost::alloc::string::String,
801 #[prost(int64, tag = "2")]
806 pub page_size: i64,
807 #[prost(string, tag = "3")]
811 pub page_token: ::prost::alloc::string::String,
812 #[prost(string, tag = "4")]
819 pub filter: ::prost::alloc::string::String,
820}
821#[allow(clippy::derive_partial_eq_without_eq)]
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct ListFederatedUserAccountsResponse {
824 #[prost(message, repeated, tag = "1")]
826 pub user_accounts: ::prost::alloc::vec::Vec<super::UserAccount>,
827 #[prost(string, tag = "2")]
832 pub next_page_token: ::prost::alloc::string::String,
833}
834#[allow(clippy::derive_partial_eq_without_eq)]
835#[derive(Clone, PartialEq, ::prost::Message)]
836pub struct ListFederationOperationsRequest {
837 #[prost(string, tag = "1")]
839 pub federation_id: ::prost::alloc::string::String,
840 #[prost(int64, tag = "2")]
845 pub page_size: i64,
846 #[prost(string, tag = "3")]
850 pub page_token: ::prost::alloc::string::String,
851}
852#[allow(clippy::derive_partial_eq_without_eq)]
853#[derive(Clone, PartialEq, ::prost::Message)]
854pub struct ListFederationOperationsResponse {
855 #[prost(message, repeated, tag = "1")]
857 pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
858 #[prost(string, tag = "2")]
863 pub next_page_token: ::prost::alloc::string::String,
864}
865pub mod federation_service_client {
867 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
868 use tonic::codegen::*;
869 use tonic::codegen::http::Uri;
870 #[derive(Debug, Clone)]
872 pub struct FederationServiceClient<T> {
873 inner: tonic::client::Grpc<T>,
874 }
875 impl FederationServiceClient<tonic::transport::Channel> {
876 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
878 where
879 D: TryInto<tonic::transport::Endpoint>,
880 D::Error: Into<StdError>,
881 {
882 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
883 Ok(Self::new(conn))
884 }
885 }
886 impl<T> FederationServiceClient<T>
887 where
888 T: tonic::client::GrpcService<tonic::body::BoxBody>,
889 T::Error: Into<StdError>,
890 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
891 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
892 {
893 pub fn new(inner: T) -> Self {
894 let inner = tonic::client::Grpc::new(inner);
895 Self { inner }
896 }
897 pub fn with_origin(inner: T, origin: Uri) -> Self {
898 let inner = tonic::client::Grpc::with_origin(inner, origin);
899 Self { inner }
900 }
901 pub fn with_interceptor<F>(
902 inner: T,
903 interceptor: F,
904 ) -> FederationServiceClient<InterceptedService<T, F>>
905 where
906 F: tonic::service::Interceptor,
907 T::ResponseBody: Default,
908 T: tonic::codegen::Service<
909 http::Request<tonic::body::BoxBody>,
910 Response = http::Response<
911 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
912 >,
913 >,
914 <T as tonic::codegen::Service<
915 http::Request<tonic::body::BoxBody>,
916 >>::Error: Into<StdError> + Send + Sync,
917 {
918 FederationServiceClient::new(InterceptedService::new(inner, interceptor))
919 }
920 #[must_use]
925 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
926 self.inner = self.inner.send_compressed(encoding);
927 self
928 }
929 #[must_use]
931 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
932 self.inner = self.inner.accept_compressed(encoding);
933 self
934 }
935 #[must_use]
939 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
940 self.inner = self.inner.max_decoding_message_size(limit);
941 self
942 }
943 #[must_use]
947 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
948 self.inner = self.inner.max_encoding_message_size(limit);
949 self
950 }
951 pub async fn get(
955 &mut self,
956 request: impl tonic::IntoRequest<super::GetFederationRequest>,
957 ) -> std::result::Result<tonic::Response<super::Federation>, tonic::Status> {
958 self.inner
959 .ready()
960 .await
961 .map_err(|e| {
962 tonic::Status::new(
963 tonic::Code::Unknown,
964 format!("Service was not ready: {}", e.into()),
965 )
966 })?;
967 let codec = tonic::codec::ProstCodec::default();
968 let path = http::uri::PathAndQuery::from_static(
969 "/yandex.cloud.organizationmanager.v1.saml.FederationService/Get",
970 );
971 let mut req = request.into_request();
972 req.extensions_mut()
973 .insert(
974 GrpcMethod::new(
975 "yandex.cloud.organizationmanager.v1.saml.FederationService",
976 "Get",
977 ),
978 );
979 self.inner.unary(req, path, codec).await
980 }
981 pub async fn list(
983 &mut self,
984 request: impl tonic::IntoRequest<super::ListFederationsRequest>,
985 ) -> std::result::Result<
986 tonic::Response<super::ListFederationsResponse>,
987 tonic::Status,
988 > {
989 self.inner
990 .ready()
991 .await
992 .map_err(|e| {
993 tonic::Status::new(
994 tonic::Code::Unknown,
995 format!("Service was not ready: {}", e.into()),
996 )
997 })?;
998 let codec = tonic::codec::ProstCodec::default();
999 let path = http::uri::PathAndQuery::from_static(
1000 "/yandex.cloud.organizationmanager.v1.saml.FederationService/List",
1001 );
1002 let mut req = request.into_request();
1003 req.extensions_mut()
1004 .insert(
1005 GrpcMethod::new(
1006 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1007 "List",
1008 ),
1009 );
1010 self.inner.unary(req, path, codec).await
1011 }
1012 pub async fn create(
1014 &mut self,
1015 request: impl tonic::IntoRequest<super::CreateFederationRequest>,
1016 ) -> std::result::Result<
1017 tonic::Response<super::super::super::super::operation::Operation>,
1018 tonic::Status,
1019 > {
1020 self.inner
1021 .ready()
1022 .await
1023 .map_err(|e| {
1024 tonic::Status::new(
1025 tonic::Code::Unknown,
1026 format!("Service was not ready: {}", e.into()),
1027 )
1028 })?;
1029 let codec = tonic::codec::ProstCodec::default();
1030 let path = http::uri::PathAndQuery::from_static(
1031 "/yandex.cloud.organizationmanager.v1.saml.FederationService/Create",
1032 );
1033 let mut req = request.into_request();
1034 req.extensions_mut()
1035 .insert(
1036 GrpcMethod::new(
1037 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1038 "Create",
1039 ),
1040 );
1041 self.inner.unary(req, path, codec).await
1042 }
1043 pub async fn update(
1045 &mut self,
1046 request: impl tonic::IntoRequest<super::UpdateFederationRequest>,
1047 ) -> std::result::Result<
1048 tonic::Response<super::super::super::super::operation::Operation>,
1049 tonic::Status,
1050 > {
1051 self.inner
1052 .ready()
1053 .await
1054 .map_err(|e| {
1055 tonic::Status::new(
1056 tonic::Code::Unknown,
1057 format!("Service was not ready: {}", e.into()),
1058 )
1059 })?;
1060 let codec = tonic::codec::ProstCodec::default();
1061 let path = http::uri::PathAndQuery::from_static(
1062 "/yandex.cloud.organizationmanager.v1.saml.FederationService/Update",
1063 );
1064 let mut req = request.into_request();
1065 req.extensions_mut()
1066 .insert(
1067 GrpcMethod::new(
1068 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1069 "Update",
1070 ),
1071 );
1072 self.inner.unary(req, path, codec).await
1073 }
1074 pub async fn delete(
1076 &mut self,
1077 request: impl tonic::IntoRequest<super::DeleteFederationRequest>,
1078 ) -> std::result::Result<
1079 tonic::Response<super::super::super::super::operation::Operation>,
1080 tonic::Status,
1081 > {
1082 self.inner
1083 .ready()
1084 .await
1085 .map_err(|e| {
1086 tonic::Status::new(
1087 tonic::Code::Unknown,
1088 format!("Service was not ready: {}", e.into()),
1089 )
1090 })?;
1091 let codec = tonic::codec::ProstCodec::default();
1092 let path = http::uri::PathAndQuery::from_static(
1093 "/yandex.cloud.organizationmanager.v1.saml.FederationService/Delete",
1094 );
1095 let mut req = request.into_request();
1096 req.extensions_mut()
1097 .insert(
1098 GrpcMethod::new(
1099 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1100 "Delete",
1101 ),
1102 );
1103 self.inner.unary(req, path, codec).await
1104 }
1105 pub async fn add_user_accounts(
1107 &mut self,
1108 request: impl tonic::IntoRequest<super::AddFederatedUserAccountsRequest>,
1109 ) -> std::result::Result<
1110 tonic::Response<super::super::super::super::operation::Operation>,
1111 tonic::Status,
1112 > {
1113 self.inner
1114 .ready()
1115 .await
1116 .map_err(|e| {
1117 tonic::Status::new(
1118 tonic::Code::Unknown,
1119 format!("Service was not ready: {}", e.into()),
1120 )
1121 })?;
1122 let codec = tonic::codec::ProstCodec::default();
1123 let path = http::uri::PathAndQuery::from_static(
1124 "/yandex.cloud.organizationmanager.v1.saml.FederationService/AddUserAccounts",
1125 );
1126 let mut req = request.into_request();
1127 req.extensions_mut()
1128 .insert(
1129 GrpcMethod::new(
1130 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1131 "AddUserAccounts",
1132 ),
1133 );
1134 self.inner.unary(req, path, codec).await
1135 }
1136 pub async fn delete_user_accounts(
1138 &mut self,
1139 request: impl tonic::IntoRequest<super::DeleteFederatedUserAccountsRequest>,
1140 ) -> std::result::Result<
1141 tonic::Response<super::super::super::super::operation::Operation>,
1142 tonic::Status,
1143 > {
1144 self.inner
1145 .ready()
1146 .await
1147 .map_err(|e| {
1148 tonic::Status::new(
1149 tonic::Code::Unknown,
1150 format!("Service was not ready: {}", e.into()),
1151 )
1152 })?;
1153 let codec = tonic::codec::ProstCodec::default();
1154 let path = http::uri::PathAndQuery::from_static(
1155 "/yandex.cloud.organizationmanager.v1.saml.FederationService/DeleteUserAccounts",
1156 );
1157 let mut req = request.into_request();
1158 req.extensions_mut()
1159 .insert(
1160 GrpcMethod::new(
1161 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1162 "DeleteUserAccounts",
1163 ),
1164 );
1165 self.inner.unary(req, path, codec).await
1166 }
1167 pub async fn list_user_accounts(
1169 &mut self,
1170 request: impl tonic::IntoRequest<super::ListFederatedUserAccountsRequest>,
1171 ) -> std::result::Result<
1172 tonic::Response<super::ListFederatedUserAccountsResponse>,
1173 tonic::Status,
1174 > {
1175 self.inner
1176 .ready()
1177 .await
1178 .map_err(|e| {
1179 tonic::Status::new(
1180 tonic::Code::Unknown,
1181 format!("Service was not ready: {}", e.into()),
1182 )
1183 })?;
1184 let codec = tonic::codec::ProstCodec::default();
1185 let path = http::uri::PathAndQuery::from_static(
1186 "/yandex.cloud.organizationmanager.v1.saml.FederationService/ListUserAccounts",
1187 );
1188 let mut req = request.into_request();
1189 req.extensions_mut()
1190 .insert(
1191 GrpcMethod::new(
1192 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1193 "ListUserAccounts",
1194 ),
1195 );
1196 self.inner.unary(req, path, codec).await
1197 }
1198 pub async fn list_operations(
1200 &mut self,
1201 request: impl tonic::IntoRequest<super::ListFederationOperationsRequest>,
1202 ) -> std::result::Result<
1203 tonic::Response<super::ListFederationOperationsResponse>,
1204 tonic::Status,
1205 > {
1206 self.inner
1207 .ready()
1208 .await
1209 .map_err(|e| {
1210 tonic::Status::new(
1211 tonic::Code::Unknown,
1212 format!("Service was not ready: {}", e.into()),
1213 )
1214 })?;
1215 let codec = tonic::codec::ProstCodec::default();
1216 let path = http::uri::PathAndQuery::from_static(
1217 "/yandex.cloud.organizationmanager.v1.saml.FederationService/ListOperations",
1218 );
1219 let mut req = request.into_request();
1220 req.extensions_mut()
1221 .insert(
1222 GrpcMethod::new(
1223 "yandex.cloud.organizationmanager.v1.saml.FederationService",
1224 "ListOperations",
1225 ),
1226 );
1227 self.inner.unary(req, path, codec).await
1228 }
1229 }
1230}