pub mod user_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct UserServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UserServiceClient<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> UserServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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,
) -> UserServiceClient<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> + Send + Sync,
{
UserServiceClient::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 add_human_user(
&mut self,
request: impl tonic::IntoRequest<super::AddHumanUserRequest>,
) -> std::result::Result<
tonic::Response<super::AddHumanUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/AddHumanUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "AddHumanUser"),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_email(
&mut self,
request: impl tonic::IntoRequest<super::SetEmailRequest>,
) -> std::result::Result<
tonic::Response<super::SetEmailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/SetEmail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("zitadel.user.v2alpha.UserService", "SetEmail"));
self.inner.unary(req, path, codec).await
}
pub async fn verify_email(
&mut self,
request: impl tonic::IntoRequest<super::VerifyEmailRequest>,
) -> std::result::Result<
tonic::Response<super::VerifyEmailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/VerifyEmail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "VerifyEmail"),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_phone(
&mut self,
request: impl tonic::IntoRequest<super::SetPhoneRequest>,
) -> std::result::Result<
tonic::Response<super::SetPhoneResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/SetPhone",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("zitadel.user.v2alpha.UserService", "SetPhone"));
self.inner.unary(req, path, codec).await
}
pub async fn verify_phone(
&mut self,
request: impl tonic::IntoRequest<super::VerifyPhoneRequest>,
) -> std::result::Result<
tonic::Response<super::VerifyPhoneResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/VerifyPhone",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "VerifyPhone"),
);
self.inner.unary(req, path, codec).await
}
pub async fn register_passkey(
&mut self,
request: impl tonic::IntoRequest<super::RegisterPasskeyRequest>,
) -> std::result::Result<
tonic::Response<super::RegisterPasskeyResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RegisterPasskey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"RegisterPasskey",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn verify_passkey_registration(
&mut self,
request: impl tonic::IntoRequest<super::VerifyPasskeyRegistrationRequest>,
) -> std::result::Result<
tonic::Response<super::VerifyPasskeyRegistrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/VerifyPasskeyRegistration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"VerifyPasskeyRegistration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_passkey_registration_link(
&mut self,
request: impl tonic::IntoRequest<super::CreatePasskeyRegistrationLinkRequest>,
) -> std::result::Result<
tonic::Response<super::CreatePasskeyRegistrationLinkResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/CreatePasskeyRegistrationLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"CreatePasskeyRegistrationLink",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn register_u2f(
&mut self,
request: impl tonic::IntoRequest<super::RegisterU2fRequest>,
) -> std::result::Result<
tonic::Response<super::RegisterU2fResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RegisterU2F",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "RegisterU2F"),
);
self.inner.unary(req, path, codec).await
}
pub async fn verify_u2f_registration(
&mut self,
request: impl tonic::IntoRequest<super::VerifyU2fRegistrationRequest>,
) -> std::result::Result<
tonic::Response<super::VerifyU2fRegistrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/VerifyU2FRegistration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"VerifyU2FRegistration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn register_totp(
&mut self,
request: impl tonic::IntoRequest<super::RegisterTotpRequest>,
) -> std::result::Result<
tonic::Response<super::RegisterTotpResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RegisterTOTP",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "RegisterTOTP"),
);
self.inner.unary(req, path, codec).await
}
pub async fn verify_totp_registration(
&mut self,
request: impl tonic::IntoRequest<super::VerifyTotpRegistrationRequest>,
) -> std::result::Result<
tonic::Response<super::VerifyTotpRegistrationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/VerifyTOTPRegistration",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"VerifyTOTPRegistration",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_otpsms(
&mut self,
request: impl tonic::IntoRequest<super::AddOtpsmsRequest>,
) -> std::result::Result<
tonic::Response<super::AddOtpsmsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/AddOTPSMS",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "AddOTPSMS"),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_otpsms(
&mut self,
request: impl tonic::IntoRequest<super::RemoveOtpsmsRequest>,
) -> std::result::Result<
tonic::Response<super::RemoveOtpsmsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RemoveOTPSMS",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "RemoveOTPSMS"),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_otp_email(
&mut self,
request: impl tonic::IntoRequest<super::AddOtpEmailRequest>,
) -> std::result::Result<
tonic::Response<super::AddOtpEmailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/AddOTPEmail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "AddOTPEmail"),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_otp_email(
&mut self,
request: impl tonic::IntoRequest<super::RemoveOtpEmailRequest>,
) -> std::result::Result<
tonic::Response<super::RemoveOtpEmailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RemoveOTPEmail",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "RemoveOTPEmail"),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_identity_provider_intent(
&mut self,
request: impl tonic::IntoRequest<super::StartIdentityProviderIntentRequest>,
) -> std::result::Result<
tonic::Response<super::StartIdentityProviderIntentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/StartIdentityProviderIntent",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"StartIdentityProviderIntent",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn retrieve_identity_provider_intent(
&mut self,
request: impl tonic::IntoRequest<
super::RetrieveIdentityProviderIntentRequest,
>,
) -> std::result::Result<
tonic::Response<super::RetrieveIdentityProviderIntentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/RetrieveIdentityProviderIntent",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"RetrieveIdentityProviderIntent",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn add_idp_link(
&mut self,
request: impl tonic::IntoRequest<super::AddIdpLinkRequest>,
) -> std::result::Result<
tonic::Response<super::AddIdpLinkResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/AddIDPLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "AddIDPLink"),
);
self.inner.unary(req, path, codec).await
}
pub async fn password_reset(
&mut self,
request: impl tonic::IntoRequest<super::PasswordResetRequest>,
) -> std::result::Result<
tonic::Response<super::PasswordResetResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/PasswordReset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "PasswordReset"),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_password(
&mut self,
request: impl tonic::IntoRequest<super::SetPasswordRequest>,
) -> std::result::Result<
tonic::Response<super::SetPasswordResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/SetPassword",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("zitadel.user.v2alpha.UserService", "SetPassword"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_authentication_method_types(
&mut self,
request: impl tonic::IntoRequest<super::ListAuthenticationMethodTypesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAuthenticationMethodTypesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/zitadel.user.v2alpha.UserService/ListAuthenticationMethodTypes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"zitadel.user.v2alpha.UserService",
"ListAuthenticationMethodTypes",
),
);
self.inner.unary(req, path, codec).await
}
}
}