#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetSpParametersRequest {
#[prost(uint32, tag = "1")]
pub team_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpParameters {
#[prost(string, tag = "1")]
pub metadata_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub signing_cert_pem: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name_id_format: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub assertion_consumer_service_url: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub binding: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpParametersResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<SpParameters>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpParameters {
#[prost(bool, tag = "2")]
pub active: bool,
#[prost(uint32, optional, tag = "5")]
pub team_entity_id: ::core::option::Option<u32>,
#[prost(string, repeated, tag = "6")]
pub group_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "idp_parameters::Metadata", tags = "3, 4")]
pub metadata: ::core::option::Option<idp_parameters::Metadata>,
}
pub mod idp_parameters {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Metadata {
#[prost(string, tag = "3")]
MetadataUrl(::prost::alloc::string::String),
#[prost(string, tag = "4")]
MetadataContent(::prost::alloc::string::String),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetIdpParametersRequest {
#[prost(uint32, tag = "1")]
pub team_id: u32,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<IdpParameters>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetIdpParametersResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetActiveRequest {
#[prost(uint32, tag = "1")]
pub team_id: u32,
#[prost(bool, tag = "2")]
pub is_active: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetActiveResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetConfigurationRequest {
#[prost(uint32, tag = "1")]
pub team_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConfigurationResponse {
#[prost(uint32, tag = "1")]
pub team_id: u32,
#[prost(message, optional, tag = "2")]
pub sp_parameters: ::core::option::Option<SpParameters>,
#[prost(message, optional, tag = "3")]
pub idp_parameters: ::core::option::Option<IdpParameters>,
#[prost(message, optional, tag = "4")]
pub idp_details: ::core::option::Option<get_configuration_response::IdpDetails>,
}
pub mod get_configuration_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpDetails {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub icon: ::prost::alloc::string::String,
}
}
pub mod saml_configuration_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SamlConfigurationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SamlConfigurationServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> SamlConfigurationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SamlConfigurationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
SamlConfigurationServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_sp_parameters(
&mut self,
request: impl tonic::IntoRequest<super::GetSpParametersRequest>,
) -> std::result::Result<
tonic::Response<super::GetSpParametersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/GetSPParameters",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
"GetSPParameters",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_idp_parameters(
&mut self,
request: impl tonic::IntoRequest<super::SetIdpParametersRequest>,
) -> std::result::Result<
tonic::Response<super::SetIdpParametersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/SetIDPParameters",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
"SetIDPParameters",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_active(
&mut self,
request: impl tonic::IntoRequest<super::SetActiveRequest>,
) -> std::result::Result<
tonic::Response<super::SetActiveResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/SetActive",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
"SetActive",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_configuration(
&mut self,
request: impl tonic::IntoRequest<super::GetConfigurationRequest>,
) -> std::result::Result<
tonic::Response<super::GetConfigurationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.aaa.sso.v2.SamlConfigurationService/GetConfiguration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.sso.v2.SamlConfigurationService",
"GetConfiguration",
),
);
self.inner.unary(req, path, codec).await
}
}
}