1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5pub struct GetSpParametersRequest {
6 #[prost(uint32, tag = "1")]
7 pub team_id: u32,
8}
9#[derive(serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "snake_case")]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct SpParameters {
13 #[prost(string, tag = "1")]
14 pub metadata_url: ::prost::alloc::string::String,
15 #[prost(string, tag = "2")]
16 pub signing_cert_pem: ::prost::alloc::string::String,
17 #[prost(string, tag = "3")]
18 pub name_id_format: ::prost::alloc::string::String,
19 #[prost(string, tag = "4")]
20 pub assertion_consumer_service_url: ::prost::alloc::string::String,
21 #[prost(string, tag = "5")]
22 pub binding: ::prost::alloc::string::String,
23}
24#[derive(serde::Serialize, serde::Deserialize)]
25#[serde(rename_all = "snake_case")]
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct GetSpParametersResponse {
28 #[prost(message, optional, tag = "1")]
29 pub params: ::core::option::Option<SpParameters>,
30}
31#[derive(serde::Serialize, serde::Deserialize)]
32#[serde(rename_all = "snake_case")]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct IdpParameters {
35 #[prost(bool, tag = "2")]
36 pub active: bool,
37 #[prost(uint32, optional, tag = "5")]
38 pub team_entity_id: ::core::option::Option<u32>,
39 #[prost(string, repeated, tag = "6")]
40 pub group_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
41 #[prost(oneof = "idp_parameters::Metadata", tags = "3, 4")]
42 pub metadata: ::core::option::Option<idp_parameters::Metadata>,
43}
44pub mod idp_parameters {
46 #[derive(serde::Serialize, serde::Deserialize)]
47 #[serde(rename_all = "snake_case")]
48 #[derive(Clone, PartialEq, ::prost::Oneof)]
49 pub enum Metadata {
50 #[prost(string, tag = "3")]
51 MetadataUrl(::prost::alloc::string::String),
52 #[prost(string, tag = "4")]
53 MetadataContent(::prost::alloc::string::String),
54 }
55}
56#[derive(serde::Serialize, serde::Deserialize)]
57#[serde(rename_all = "snake_case")]
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct SetIdpParametersRequest {
60 #[prost(uint32, tag = "1")]
61 pub team_id: u32,
62 #[prost(message, optional, tag = "2")]
63 pub params: ::core::option::Option<IdpParameters>,
64}
65#[derive(serde::Serialize, serde::Deserialize)]
66#[serde(rename_all = "snake_case")]
67#[derive(Clone, Copy, PartialEq, ::prost::Message)]
68pub struct SetIdpParametersResponse {}
69#[derive(serde::Serialize, serde::Deserialize)]
70#[serde(rename_all = "snake_case")]
71#[derive(Clone, Copy, PartialEq, ::prost::Message)]
72pub struct SetActiveRequest {
73 #[prost(uint32, tag = "1")]
74 pub team_id: u32,
75 #[prost(bool, tag = "2")]
76 pub is_active: bool,
77}
78#[derive(serde::Serialize, serde::Deserialize)]
79#[serde(rename_all = "snake_case")]
80#[derive(Clone, Copy, PartialEq, ::prost::Message)]
81pub struct SetActiveResponse {}
82#[derive(serde::Serialize, serde::Deserialize)]
83#[serde(rename_all = "snake_case")]
84#[derive(Clone, Copy, PartialEq, ::prost::Message)]
85pub struct GetConfigurationRequest {
86 #[prost(uint32, tag = "1")]
87 pub team_id: u32,
88}
89#[derive(serde::Serialize, serde::Deserialize)]
90#[serde(rename_all = "snake_case")]
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct GetConfigurationResponse {
93 #[prost(uint32, tag = "1")]
94 pub team_id: u32,
95 #[prost(message, optional, tag = "2")]
96 pub sp_parameters: ::core::option::Option<SpParameters>,
97 #[prost(message, optional, tag = "3")]
98 pub idp_parameters: ::core::option::Option<IdpParameters>,
99 #[prost(message, optional, tag = "4")]
100 pub idp_details: ::core::option::Option<get_configuration_response::IdpDetails>,
101}
102pub mod get_configuration_response {
104 #[derive(serde::Serialize, serde::Deserialize)]
105 #[serde(rename_all = "snake_case")]
106 #[derive(Clone, PartialEq, ::prost::Message)]
107 pub struct IdpDetails {
108 #[prost(string, tag = "1")]
109 pub name: ::prost::alloc::string::String,
110 #[prost(string, tag = "2")]
111 pub icon: ::prost::alloc::string::String,
112 }
113}
114pub mod saml_configuration_service_client {
116 #![allow(
117 unused_variables,
118 dead_code,
119 missing_docs,
120 clippy::wildcard_imports,
121 clippy::let_unit_value,
122 )]
123 use tonic::codegen::*;
124 use tonic::codegen::http::Uri;
125 #[derive(Debug, Clone)]
126 pub struct SamlConfigurationServiceClient<T> {
127 inner: tonic::client::Grpc<T>,
128 }
129 impl SamlConfigurationServiceClient<tonic::transport::Channel> {
130 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
132 where
133 D: TryInto<tonic::transport::Endpoint>,
134 D::Error: Into<StdError>,
135 {
136 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
137 Ok(Self::new(conn))
138 }
139 }
140 impl<T> SamlConfigurationServiceClient<T>
141 where
142 T: tonic::client::GrpcService<tonic::body::BoxBody>,
143 T::Error: Into<StdError>,
144 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
145 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
146 {
147 pub fn new(inner: T) -> Self {
148 let inner = tonic::client::Grpc::new(inner);
149 Self { inner }
150 }
151 pub fn with_origin(inner: T, origin: Uri) -> Self {
152 let inner = tonic::client::Grpc::with_origin(inner, origin);
153 Self { inner }
154 }
155 pub fn with_interceptor<F>(
156 inner: T,
157 interceptor: F,
158 ) -> SamlConfigurationServiceClient<InterceptedService<T, F>>
159 where
160 F: tonic::service::Interceptor,
161 T::ResponseBody: Default,
162 T: tonic::codegen::Service<
163 http::Request<tonic::body::BoxBody>,
164 Response = http::Response<
165 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
166 >,
167 >,
168 <T as tonic::codegen::Service<
169 http::Request<tonic::body::BoxBody>,
170 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
171 {
172 SamlConfigurationServiceClient::new(
173 InterceptedService::new(inner, interceptor),
174 )
175 }
176 #[must_use]
181 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
182 self.inner = self.inner.send_compressed(encoding);
183 self
184 }
185 #[must_use]
187 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
188 self.inner = self.inner.accept_compressed(encoding);
189 self
190 }
191 #[must_use]
195 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
196 self.inner = self.inner.max_decoding_message_size(limit);
197 self
198 }
199 #[must_use]
203 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
204 self.inner = self.inner.max_encoding_message_size(limit);
205 self
206 }
207 pub async fn get_sp_parameters(
208 &mut self,
209 request: impl tonic::IntoRequest<super::GetSpParametersRequest>,
210 ) -> std::result::Result<
211 tonic::Response<super::GetSpParametersResponse>,
212 tonic::Status,
213 > {
214 self.inner
215 .ready()
216 .await
217 .map_err(|e| {
218 tonic::Status::unknown(
219 format!("Service was not ready: {}", e.into()),
220 )
221 })?;
222 let codec = tonic::codec::ProstCodec::default();
223 let path = http::uri::PathAndQuery::from_static(
224 "/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/GetSPParameters",
225 );
226 let mut req = request.into_request();
227 req.extensions_mut()
228 .insert(
229 GrpcMethod::new(
230 "com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
231 "GetSPParameters",
232 ),
233 );
234 self.inner.unary(req, path, codec).await
235 }
236 pub async fn set_idp_parameters(
237 &mut self,
238 request: impl tonic::IntoRequest<super::SetIdpParametersRequest>,
239 ) -> std::result::Result<
240 tonic::Response<super::SetIdpParametersResponse>,
241 tonic::Status,
242 > {
243 self.inner
244 .ready()
245 .await
246 .map_err(|e| {
247 tonic::Status::unknown(
248 format!("Service was not ready: {}", e.into()),
249 )
250 })?;
251 let codec = tonic::codec::ProstCodec::default();
252 let path = http::uri::PathAndQuery::from_static(
253 "/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/SetIDPParameters",
254 );
255 let mut req = request.into_request();
256 req.extensions_mut()
257 .insert(
258 GrpcMethod::new(
259 "com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
260 "SetIDPParameters",
261 ),
262 );
263 self.inner.unary(req, path, codec).await
264 }
265 pub async fn set_active(
266 &mut self,
267 request: impl tonic::IntoRequest<super::SetActiveRequest>,
268 ) -> std::result::Result<
269 tonic::Response<super::SetActiveResponse>,
270 tonic::Status,
271 > {
272 self.inner
273 .ready()
274 .await
275 .map_err(|e| {
276 tonic::Status::unknown(
277 format!("Service was not ready: {}", e.into()),
278 )
279 })?;
280 let codec = tonic::codec::ProstCodec::default();
281 let path = http::uri::PathAndQuery::from_static(
282 "/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/SetActive",
283 );
284 let mut req = request.into_request();
285 req.extensions_mut()
286 .insert(
287 GrpcMethod::new(
288 "com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
289 "SetActive",
290 ),
291 );
292 self.inner.unary(req, path, codec).await
293 }
294 pub async fn get_configuration(
295 &mut self,
296 request: impl tonic::IntoRequest<super::GetConfigurationRequest>,
297 ) -> std::result::Result<
298 tonic::Response<super::GetConfigurationResponse>,
299 tonic::Status,
300 > {
301 self.inner
302 .ready()
303 .await
304 .map_err(|e| {
305 tonic::Status::unknown(
306 format!("Service was not ready: {}", e.into()),
307 )
308 })?;
309 let codec = tonic::codec::ProstCodec::default();
310 let path = http::uri::PathAndQuery::from_static(
311 "/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/GetConfiguration",
312 );
313 let mut req = request.into_request();
314 req.extensions_mut()
315 .insert(
316 GrpcMethod::new(
317 "com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
318 "GetConfiguration",
319 ),
320 );
321 self.inner.unary(req, path, codec).await
322 }
323 }
324}