diff --git a/.gitignore b/.gitignore index 0001b22..5b6e41c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ /target Cargo.lock temp* -src/api/generated -crates/zitadel-gen/src/api/ .idea diff --git a/crates/zitadel-gen/src/api/mod.rs b/crates/zitadel-gen/src/api/mod.rs new file mode 100644 index 0000000..43a2adf --- /dev/null +++ b/crates/zitadel-gen/src/api/mod.rs @@ -0,0 +1,367 @@ +// @generated +pub mod zitadel { + pub mod action { + #[cfg(feature = "zitadel-action-v1")] + // @@protoc_insertion_point(attribute:zitadel.action.v1) + pub mod v1 { + include!("zitadel.action.v1.rs"); + // @@protoc_insertion_point(zitadel.action.v1) + } + } + pub mod admin { + #[cfg(feature = "zitadel-admin-v1")] + // @@protoc_insertion_point(attribute:zitadel.admin.v1) + pub mod v1 { + include!("zitadel.admin.v1.rs"); + // @@protoc_insertion_point(zitadel.admin.v1) + } + } + pub mod app { + #[cfg(feature = "zitadel-app-v1")] + // @@protoc_insertion_point(attribute:zitadel.app.v1) + pub mod v1 { + include!("zitadel.app.v1.rs"); + // @@protoc_insertion_point(zitadel.app.v1) + } + } + pub mod auth { + #[cfg(feature = "zitadel-auth-v1")] + // @@protoc_insertion_point(attribute:zitadel.auth.v1) + pub mod v1 { + include!("zitadel.auth.v1.rs"); + // @@protoc_insertion_point(zitadel.auth.v1) + } + } + pub mod authn { + #[cfg(feature = "zitadel-authn-v1")] + // @@protoc_insertion_point(attribute:zitadel.authn.v1) + pub mod v1 { + include!("zitadel.authn.v1.rs"); + // @@protoc_insertion_point(zitadel.authn.v1) + } + } + pub mod change { + #[cfg(feature = "zitadel-change-v1")] + // @@protoc_insertion_point(attribute:zitadel.change.v1) + pub mod v1 { + include!("zitadel.change.v1.rs"); + // @@protoc_insertion_point(zitadel.change.v1) + } + } + pub mod event { + #[cfg(feature = "zitadel-event-v1")] + // @@protoc_insertion_point(attribute:zitadel.event.v1) + pub mod v1 { + include!("zitadel.event.v1.rs"); + // @@protoc_insertion_point(zitadel.event.v1) + } + } + pub mod feature { + #[cfg(feature = "zitadel-feature-v1")] + // @@protoc_insertion_point(attribute:zitadel.feature.v1) + pub mod v1 { + include!("zitadel.feature.v1.rs"); + // @@protoc_insertion_point(zitadel.feature.v1) + } + #[cfg(feature = "zitadel-feature-v2")] + // @@protoc_insertion_point(attribute:zitadel.feature.v2) + pub mod v2 { + include!("zitadel.feature.v2.rs"); + // @@protoc_insertion_point(zitadel.feature.v2) + } + #[cfg(feature = "zitadel-feature-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.feature.v2beta) + pub mod v2beta { + include!("zitadel.feature.v2beta.rs"); + // @@protoc_insertion_point(zitadel.feature.v2beta) + } + } + pub mod idp { + #[cfg(feature = "zitadel-idp-v1")] + // @@protoc_insertion_point(attribute:zitadel.idp.v1) + pub mod v1 { + include!("zitadel.idp.v1.rs"); + // @@protoc_insertion_point(zitadel.idp.v1) + } + #[cfg(feature = "zitadel-idp-v2")] + // @@protoc_insertion_point(attribute:zitadel.idp.v2) + pub mod v2 { + include!("zitadel.idp.v2.rs"); + // @@protoc_insertion_point(zitadel.idp.v2) + } + } + pub mod instance { + #[cfg(feature = "zitadel-instance-v1")] + // @@protoc_insertion_point(attribute:zitadel.instance.v1) + pub mod v1 { + include!("zitadel.instance.v1.rs"); + // @@protoc_insertion_point(zitadel.instance.v1) + } + } + pub mod management { + #[cfg(feature = "zitadel-management-v1")] + // @@protoc_insertion_point(attribute:zitadel.management.v1) + pub mod v1 { + include!("zitadel.management.v1.rs"); + // @@protoc_insertion_point(zitadel.management.v1) + } + } + pub mod member { + #[cfg(feature = "zitadel-member-v1")] + // @@protoc_insertion_point(attribute:zitadel.member.v1) + pub mod v1 { + include!("zitadel.member.v1.rs"); + // @@protoc_insertion_point(zitadel.member.v1) + } + } + pub mod metadata { + #[cfg(feature = "zitadel-metadata-v1")] + // @@protoc_insertion_point(attribute:zitadel.metadata.v1) + pub mod v1 { + include!("zitadel.metadata.v1.rs"); + // @@protoc_insertion_point(zitadel.metadata.v1) + } + } + pub mod milestone { + #[cfg(feature = "zitadel-milestone-v1")] + // @@protoc_insertion_point(attribute:zitadel.milestone.v1) + pub mod v1 { + include!("zitadel.milestone.v1.rs"); + // @@protoc_insertion_point(zitadel.milestone.v1) + } + } + pub mod object { + #[cfg(feature = "zitadel-object-v2")] + // @@protoc_insertion_point(attribute:zitadel.object.v2) + pub mod v2 { + include!("zitadel.object.v2.rs"); + // @@protoc_insertion_point(zitadel.object.v2) + } + #[cfg(feature = "zitadel-object-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.object.v2beta) + pub mod v2beta { + include!("zitadel.object.v2beta.rs"); + // @@protoc_insertion_point(zitadel.object.v2beta) + } + #[cfg(feature = "zitadel-object-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.object.v3alpha) + pub mod v3alpha { + include!("zitadel.object.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.object.v3alpha) + } + } + pub mod oidc { + #[cfg(feature = "zitadel-oidc-v2")] + // @@protoc_insertion_point(attribute:zitadel.oidc.v2) + pub mod v2 { + include!("zitadel.oidc.v2.rs"); + // @@protoc_insertion_point(zitadel.oidc.v2) + } + #[cfg(feature = "zitadel-oidc-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.oidc.v2beta) + pub mod v2beta { + include!("zitadel.oidc.v2beta.rs"); + // @@protoc_insertion_point(zitadel.oidc.v2beta) + } + } + pub mod org { + #[cfg(feature = "zitadel-org-v1")] + // @@protoc_insertion_point(attribute:zitadel.org.v1) + pub mod v1 { + include!("zitadel.org.v1.rs"); + // @@protoc_insertion_point(zitadel.org.v1) + } + #[cfg(feature = "zitadel-org-v2")] + // @@protoc_insertion_point(attribute:zitadel.org.v2) + pub mod v2 { + include!("zitadel.org.v2.rs"); + // @@protoc_insertion_point(zitadel.org.v2) + } + #[cfg(feature = "zitadel-org-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.org.v2beta) + pub mod v2beta { + include!("zitadel.org.v2beta.rs"); + // @@protoc_insertion_point(zitadel.org.v2beta) + } + } + pub mod policy { + #[cfg(feature = "zitadel-policy-v1")] + // @@protoc_insertion_point(attribute:zitadel.policy.v1) + pub mod v1 { + include!("zitadel.policy.v1.rs"); + // @@protoc_insertion_point(zitadel.policy.v1) + } + } + pub mod project { + #[cfg(feature = "zitadel-project-v1")] + // @@protoc_insertion_point(attribute:zitadel.project.v1) + pub mod v1 { + include!("zitadel.project.v1.rs"); + // @@protoc_insertion_point(zitadel.project.v1) + } + } + pub mod protoc_gen_zitadel { + #[cfg(feature = "zitadel-protoc_gen_zitadel-v2")] + // @@protoc_insertion_point(attribute:zitadel.protoc_gen_zitadel.v2) + pub mod v2 { + include!("zitadel.protoc_gen_zitadel.v2.rs"); + // @@protoc_insertion_point(zitadel.protoc_gen_zitadel.v2) + } + } + pub mod quota { + #[cfg(feature = "zitadel-quota-v1")] + // @@protoc_insertion_point(attribute:zitadel.quota.v1) + pub mod v1 { + include!("zitadel.quota.v1.rs"); + // @@protoc_insertion_point(zitadel.quota.v1) + } + } + pub mod resources { + pub mod action { + #[cfg(feature = "zitadel-resources-action-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.action.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.action.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.action.v3alpha) + } + } + pub mod debug_events { + #[cfg(feature = "zitadel-resources-debug_events-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.debug_events.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.debug_events.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.debug_events.v3alpha) + } + } + pub mod object { + #[cfg(feature = "zitadel-resources-object-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.object.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.object.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.object.v3alpha) + } + } + pub mod user { + #[cfg(feature = "zitadel-resources-user-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.user.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.user.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.user.v3alpha) + } + } + pub mod userschema { + #[cfg(feature = "zitadel-resources-userschema-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.userschema.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.userschema.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.userschema.v3alpha) + } + } + pub mod webkey { + #[cfg(feature = "zitadel-resources-webkey-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.resources.webkey.v3alpha) + pub mod v3alpha { + include!("zitadel.resources.webkey.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.resources.webkey.v3alpha) + } + } + } + pub mod saml { + #[cfg(feature = "zitadel-saml-v2")] + // @@protoc_insertion_point(attribute:zitadel.saml.v2) + pub mod v2 { + include!("zitadel.saml.v2.rs"); + // @@protoc_insertion_point(zitadel.saml.v2) + } + } + pub mod session { + #[cfg(feature = "zitadel-session-v2")] + // @@protoc_insertion_point(attribute:zitadel.session.v2) + pub mod v2 { + include!("zitadel.session.v2.rs"); + // @@protoc_insertion_point(zitadel.session.v2) + } + #[cfg(feature = "zitadel-session-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.session.v2beta) + pub mod v2beta { + include!("zitadel.session.v2beta.rs"); + // @@protoc_insertion_point(zitadel.session.v2beta) + } + } + pub mod settings { + pub mod object { + #[cfg(feature = "zitadel-settings-object-v3alpha")] + // @@protoc_insertion_point(attribute:zitadel.settings.object.v3alpha) + pub mod v3alpha { + include!("zitadel.settings.object.v3alpha.rs"); + // @@protoc_insertion_point(zitadel.settings.object.v3alpha) + } + } + #[cfg(feature = "zitadel-settings-v1")] + // @@protoc_insertion_point(attribute:zitadel.settings.v1) + pub mod v1 { + include!("zitadel.settings.v1.rs"); + // @@protoc_insertion_point(zitadel.settings.v1) + } + #[cfg(feature = "zitadel-settings-v2")] + // @@protoc_insertion_point(attribute:zitadel.settings.v2) + pub mod v2 { + include!("zitadel.settings.v2.rs"); + // @@protoc_insertion_point(zitadel.settings.v2) + } + #[cfg(feature = "zitadel-settings-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.settings.v2beta) + pub mod v2beta { + include!("zitadel.settings.v2beta.rs"); + // @@protoc_insertion_point(zitadel.settings.v2beta) + } + } + pub mod system { + #[cfg(feature = "zitadel-system-v1")] + // @@protoc_insertion_point(attribute:zitadel.system.v1) + pub mod v1 { + include!("zitadel.system.v1.rs"); + // @@protoc_insertion_point(zitadel.system.v1) + } + } + pub mod text { + #[cfg(feature = "zitadel-text-v1")] + // @@protoc_insertion_point(attribute:zitadel.text.v1) + pub mod v1 { + include!("zitadel.text.v1.rs"); + // @@protoc_insertion_point(zitadel.text.v1) + } + } + pub mod user { + #[cfg(feature = "zitadel-user-v1")] + // @@protoc_insertion_point(attribute:zitadel.user.v1) + pub mod v1 { + include!("zitadel.user.v1.rs"); + // @@protoc_insertion_point(zitadel.user.v1) + } + #[cfg(feature = "zitadel-user-v2")] + // @@protoc_insertion_point(attribute:zitadel.user.v2) + pub mod v2 { + include!("zitadel.user.v2.rs"); + // @@protoc_insertion_point(zitadel.user.v2) + } + #[cfg(feature = "zitadel-user-v2beta")] + // @@protoc_insertion_point(attribute:zitadel.user.v2beta) + pub mod v2beta { + include!("zitadel.user.v2beta.rs"); + // @@protoc_insertion_point(zitadel.user.v2beta) + } + } + #[cfg(feature = "zitadel-v1")] + // @@protoc_insertion_point(attribute:zitadel.v1) + pub mod v1 { + include!("zitadel.v1.rs"); + // @@protoc_insertion_point(zitadel.v1) + #[cfg(feature = "zitadel-v1-v1")] + // @@protoc_insertion_point(attribute:zitadel.v1.v1) + pub mod v1 { + include!("zitadel.v1.v1.rs"); + // @@protoc_insertion_point(zitadel.v1.v1) + } + } +} \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.action.v1.rs b/crates/zitadel-gen/src/api/zitadel.action.v1.rs new file mode 100644 index 0000000..d3c2889 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.action.v1.rs @@ -0,0 +1,174 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Action { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="ActionState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub script: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, tag="7")] + pub allowed_to_fail: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActionIdQuery { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActionNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +/// ActionStateQuery always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ActionStateQuery { + #[prost(enumeration="ActionState", tag="1")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Flow { + /// id of the flow type + #[prost(message, optional, tag="1")] + pub r#type: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="FlowState", tag="3")] + pub state: i32, + #[prost(message, repeated, tag="4")] + pub trigger_actions: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FlowType { + /// identifier of the type + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// key and name of the type + #[prost(message, optional, tag="2")] + pub name: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TriggerType { + /// identifier of the type + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// key and name of the type + #[prost(message, optional, tag="2")] + pub name: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TriggerAction { + /// id of the trigger type + #[prost(message, optional, tag="1")] + pub trigger_type: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub actions: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ActionState { + Unspecified = 0, + Inactive = 1, + Active = 2, +} +impl ActionState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ActionState::Unspecified => "ACTION_STATE_UNSPECIFIED", + ActionState::Inactive => "ACTION_STATE_INACTIVE", + ActionState::Active => "ACTION_STATE_ACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACTION_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "ACTION_STATE_INACTIVE" => Some(Self::Inactive), + "ACTION_STATE_ACTIVE" => Some(Self::Active), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ActionFieldName { + Unspecified = 0, + Name = 1, + Id = 2, + State = 3, +} +impl ActionFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ActionFieldName::Unspecified => "ACTION_FIELD_NAME_UNSPECIFIED", + ActionFieldName::Name => "ACTION_FIELD_NAME_NAME", + ActionFieldName::Id => "ACTION_FIELD_NAME_ID", + ActionFieldName::State => "ACTION_FIELD_NAME_STATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACTION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "ACTION_FIELD_NAME_NAME" => Some(Self::Name), + "ACTION_FIELD_NAME_ID" => Some(Self::Id), + "ACTION_FIELD_NAME_STATE" => Some(Self::State), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FlowState { + Unspecified = 0, + Inactive = 1, + Active = 2, +} +impl FlowState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FlowState::Unspecified => "FLOW_STATE_UNSPECIFIED", + FlowState::Inactive => "FLOW_STATE_INACTIVE", + FlowState::Active => "FLOW_STATE_ACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FLOW_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "FLOW_STATE_INACTIVE" => Some(Self::Inactive), + "FLOW_STATE_ACTIVE" => Some(Self::Active), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.admin.v1.rs b/crates/zitadel-gen/src/api/zitadel.admin.v1.rs new file mode 100644 index 0000000..066151a --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.admin.v1.rs @@ -0,0 +1,3945 @@ +// @generated +// This file is @generated by prost-build. +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzRequest { +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzResponse { +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesResponse { + #[prost(string, repeated, tag="1")] + pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetAllowedLanguagesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAllowedLanguagesResponse { + #[prost(string, repeated, tag="1")] + pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultLanguageRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultLanguageResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultLanguageRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLanguageResponse { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultOrgRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultOrgResponse { + #[prost(message, optional, tag="1")] + pub org: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyInstanceRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyInstanceResponse { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceDomainsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceDomainsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceTrustedDomainsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstanceTrustedDomainsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddInstanceTrustedDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddInstanceTrustedDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveInstanceTrustedDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveInstanceTrustedDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSecretGeneratorsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSecretGeneratorsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSecretGeneratorRequest { + #[prost(enumeration="super::super::settings::v1::SecretGeneratorType", tag="1")] + pub generator_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSecretGeneratorResponse { + #[prost(message, optional, tag="1")] + pub secret_generator: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateSecretGeneratorRequest { + #[prost(enumeration="super::super::settings::v1::SecretGeneratorType", tag="1")] + pub generator_type: i32, + #[prost(uint32, tag="2")] + pub length: u32, + #[prost(message, optional, tag="3")] + pub expiry: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, tag="4")] + pub include_lower_letters: bool, + #[prost(bool, tag="5")] + pub include_upper_letters: bool, + #[prost(bool, tag="6")] + pub include_digits: bool, + #[prost(bool, tag="7")] + pub include_symbols: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSecretGeneratorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSmtpConfigRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub smtp_config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSmtpConfigByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSmtpConfigByIdResponse { + #[prost(message, optional, tag="1")] + pub smtp_config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListSmtpConfigsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSmtpConfigsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmtpConfigRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub reply_to_address: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmtpConfigRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub reply_to_address: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmtpConfigPasswordRequest { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmtpConfigPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateSmtpConfigRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateSmtpConfigRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSmtpConfigRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSmtpConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TestSmtpConfigByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub receiver_address: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TestSmtpConfigByIdResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TestSmtpConfigRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub receiver_address: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub id: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TestSmtpConfigResponse { +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetEmailProviderRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetEmailProviderResponse { + #[prost(message, optional, tag="1")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetEmailProviderByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetEmailProviderByIdResponse { + #[prost(message, optional, tag="1")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListEmailProvidersRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEmailProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddEmailProviderSmtpRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub reply_to_address: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddEmailProviderSmtpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderSmtpRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub reply_to_address: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderSmtpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderSmtpPasswordRequest { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderSmtpPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddEmailProviderHttpRequest { + #[prost(string, tag="1")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddEmailProviderHttpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderHttpRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateEmailProviderHttpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateEmailProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateEmailProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateEmailProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateEmailProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveEmailProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveEmailProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TestEmailProviderSmtpByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub receiver_address: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TestEmailProviderSmtpByIdResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TestEmailProviderSmtpRequest { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub receiver_address: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub id: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TestEmailProviderSmtpResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListSmsProvidersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSmsProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSmsProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSmsProviderResponse { + #[prost(message, optional, tag="1")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmsProviderTwilioRequest { + #[prost(string, tag="1")] + pub sid: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub sender_number: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub verify_service_sid: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmsProviderTwilioResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderTwilioRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sid: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub sender_number: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub verify_service_sid: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderTwilioResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderTwilioTokenRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderTwilioTokenResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmsProviderHttpRequest { + #[prost(string, tag="1")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSmsProviderHttpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderHttpRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSmsProviderHttpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateSmsProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateSmsProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateSmsProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateSmsProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSmsProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSmsProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetFileSystemNotificationProviderRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetFileSystemNotificationProviderResponse { + #[prost(message, optional, tag="1")] + pub provider: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLogNotificationProviderRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLogNotificationProviderResponse { + #[prost(message, optional, tag="1")] + pub provider: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetOidcSettingsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOidcSettingsResponse { + #[prost(message, optional, tag="1")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddOidcSettingsRequest { + #[prost(message, optional, tag="1")] + pub access_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="2")] + pub id_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="3")] + pub refresh_token_idle_expiration: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="4")] + pub refresh_token_expiration: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOidcSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateOidcSettingsRequest { + #[prost(message, optional, tag="1")] + pub access_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="2")] + pub id_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="3")] + pub refresh_token_idle_expiration: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="4")] + pub refresh_token_expiration: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOidcSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSecurityPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSecurityPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecurityPolicyRequest { + /// states if iframe embedding is enabled or disabled + #[prost(bool, tag="1")] + pub enable_iframe_embedding: bool, + /// origins allowed loading ZITADEL in an iframe if enable_iframe_embedding is true + #[prost(string, repeated, tag="2")] + pub allowed_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well" + #[prost(bool, tag="3")] + pub enable_impersonation: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecurityPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// if name or domain is already in use, org is not unique +/// at least one argument has to be provided +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IsOrgUniqueRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IsOrgUniqueResponse { + #[prost(bool, tag="1")] + pub is_unique: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgByIdResponse { + #[prost(message, optional, tag="1")] + pub org: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::org::v1::OrgFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::org::v1::OrgFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUpOrgRequest { + #[prost(message, optional, tag="1")] + pub org: ::core::option::Option, + /// specify Org Member Roles for the provided user (default is ORG_OWNER if roles are empty) + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof="set_up_org_request::User", tags="2")] + pub user: ::core::option::Option, +} +/// Nested message and enum types in `SetUpOrgRequest`. +pub mod set_up_org_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Org { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Human { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, + #[prost(string, tag="5")] + pub password: ::prost::alloc::string::String, + } + /// Nested message and enum types in `Human`. + pub mod human { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::super::super::user::v1::Gender", tag="6")] + pub gender: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Phone { + /// has to be a global number + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_phone_verified: bool, + } + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum User { + /// oneof field for the user managing the organization + #[prost(message, tag="2")] + Human(Human), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUpOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub org_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdpByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdpByIdResponse { + #[prost(message, optional, tag="1")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIdPsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::idp::v1::IdpFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpQuery { + #[prost(oneof="idp_query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `IDPQuery`. +pub mod idp_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdpIdQuery(super::super::super::idp::v1::IdpidQuery), + #[prost(message, tag="2")] + IdpNameQuery(super::super::super::idp::v1::IdpNameQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::idp::v1::IdpFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOidcidpRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="2")] + pub styling_type: i32, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="7")] + pub display_name_mapping: i32, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="8")] + pub username_mapping: i32, + #[prost(bool, tag="9")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOidcidpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtidpRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="2")] + pub styling_type: i32, + #[prost(string, tag="3")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub header_name: ::prost::alloc::string::String, + #[prost(bool, tag="7")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtidpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="3")] + pub styling_type: i32, + #[prost(bool, tag="4")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpoidcConfigRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="6")] + pub display_name_mapping: i32, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="7")] + pub username_mapping: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpoidcConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpjwtConfigRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub header_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIdpjwtConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProvidersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProviderQuery { + #[prost(oneof="provider_query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `ProviderQuery`. +pub mod provider_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdpIdQuery(super::super::super::idp::v1::IdpidQuery), + #[prost(message, tag="2")] + IdpNameQuery(super::super::super::idp::v1::IdpNameQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProviderByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProviderByIdResponse { + #[prost(message, optional, tag="1")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOAuthProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// identifying attribute of the user in the response of the user_endpoint + #[prost(string, tag="8")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOAuthProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOAuthProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// identifying attribute of the user in the response of the user_endpoint + #[prost(string, tag="9")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(message, optional, tag="10")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOAuthProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, + #[prost(bool, tag="7")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="5")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, + #[prost(bool, tag="8")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MigrateGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(oneof="migrate_generic_oidc_provider_request::Template", tags="2, 3")] + pub template: ::core::option::Option, +} +/// Nested message and enum types in `MigrateGenericOIDCProviderRequest`. +pub mod migrate_generic_oidc_provider_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Template { + #[prost(message, tag="2")] + Azure(super::AddAzureAdProviderRequest), + #[prost(message, tag="3")] + Google(super::AddGoogleProviderRequest), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MigrateGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub header_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateJwtProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub header_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateJwtProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAzureAdProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + /// if not provided the `common` tenant will be used + #[prost(message, optional, tag="4")] + pub tenant: ::core::option::Option, + #[prost(bool, tag="5")] + pub email_verified: bool, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAzureAdProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAzureAdProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + /// if not provided the `common` tenant will be used + #[prost(message, optional, tag="5")] + pub tenant: ::core::option::Option, + #[prost(bool, tag="6")] + pub email_verified: bool, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAzureAdProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubProviderRequest { + /// GitHub will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubEnterpriseServerProviderRequest { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubEnterpriseServerProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubEnterpriseServerProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="9")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubEnterpriseServerProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabProviderRequest { + /// GitLab will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabSelfHostedProviderRequest { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabSelfHostedProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabSelfHostedProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="5")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabSelfHostedProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGoogleProviderRequest { + /// Google will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGoogleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGoogleProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGoogleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddLdapProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="3")] + pub start_tls: bool, + #[prost(string, tag="4")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub bind_password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="9")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="10")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub attributes: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddLdapProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLdapProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="4")] + pub start_tls: bool, + #[prost(string, tag="5")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub bind_password: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="9")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="10")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="11")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub attributes: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLdapProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppleProviderRequest { + /// Apple will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub team_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub key_id: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="5")] + pub private_key: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppleProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub team_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub key_id: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="6")] + pub private_key: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="super::super::idp::v1::SamlBinding", tag="4")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed. + #[prost(bool, tag="5")] + pub with_signed_request: bool, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, + /// Optionally specify the `nameid-format` requested. + #[prost(enumeration="super::super::idp::v1::SamlNameIdFormat", optional, tag="7")] + pub name_id_format: ::core::option::Option, + /// Optionally specify the name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="8")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(oneof="add_saml_provider_request::Metadata", tags="2, 3")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `AddSAMLProviderRequest`. +pub mod add_saml_provider_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + /// Metadata of the SAML identity provider. + #[prost(bytes, tag="2")] + MetadataXml(::prost::alloc::vec::Vec), + /// Url to the metadata of the SAML identity provider. + #[prost(string, tag="3")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="super::super::idp::v1::SamlBinding", tag="5")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed + #[prost(bool, tag="6")] + pub with_signed_request: bool, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, + /// Optionally specify the `nameid-format` requested. + #[prost(enumeration="super::super::idp::v1::SamlNameIdFormat", optional, tag="8")] + pub name_id_format: ::core::option::Option, + /// Optionally specify the name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="9")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, + /// Metadata of the SAML identity provider. + #[prost(oneof="update_saml_provider_request::Metadata", tags="3, 4")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSAMLProviderRequest`. +pub mod update_saml_provider_request { + /// Metadata of the SAML identity provider. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + #[prost(bytes, tag="3")] + MetadataXml(::prost::alloc::vec::Vec), + /// Url to the metadata of the SAML identity provider + #[prost(string, tag="4")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateSamlProviderCertificateRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateSamlProviderCertificateResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetOrgIamPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateOrgIamPolicyRequest { + #[prost(bool, tag="1")] + pub user_login_must_be_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomOrgIamPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.OrgIAMPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomOrgIamPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + /// the username has to end with the domain of its organization (uniqueness is organization based) + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomOrgIamPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomOrgIamPolicyToDefaultRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomOrgIamPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDomainPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateDomainPolicyRequest { + #[prost(bool, tag="1")] + pub user_login_must_be_domain: bool, + #[prost(bool, tag="2")] + pub validate_org_domains: bool, + #[prost(bool, tag="3")] + pub smtp_sender_address_matches_instance_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.DomainPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomDomainPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + /// the username has to end with the domain of its organization (uniqueness is organization based) + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, + #[prost(bool, tag="3")] + pub validate_org_domains: bool, + #[prost(bool, tag="4")] + pub smtp_sender_address_matches_instance_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomDomainPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, + #[prost(bool, tag="3")] + pub validate_org_domains: bool, + #[prost(bool, tag="4")] + pub smtp_sender_address_matches_instance_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainPolicyToDefaultRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPreviewLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPreviewLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLabelPolicyRequest { + #[prost(string, tag="1")] + pub primary_color: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub hide_login_name_suffix: bool, + #[prost(string, tag="4")] + pub warn_color: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub background_color: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub font_color: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub primary_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub background_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub warn_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub font_color_dark: ::prost::alloc::string::String, + #[prost(bool, tag="11")] + pub disable_watermark: bool, + #[prost(enumeration="super::super::policy::v1::ThemeMode", tag="12")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ActivateLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyLogoRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyLogoResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyLogoDarkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyLogoDarkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyIconRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyIconResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyIconDarkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyIconDarkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyFontRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveLabelPolicyFontResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLoginPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLoginPolicyRequest { + #[prost(bool, tag="1")] + pub allow_username_password: bool, + #[prost(bool, tag="2")] + pub allow_register: bool, + #[prost(bool, tag="3")] + pub allow_external_idp: bool, + #[prost(bool, tag="4")] + pub force_mfa: bool, + #[prost(enumeration="super::super::policy::v1::PasswordlessType", tag="5")] + pub passwordless_type: i32, + #[prost(bool, tag="6")] + pub hide_password_reset: bool, + #[prost(bool, tag="7")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="8")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="10")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="14")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="15")] + pub disable_login_with_email: bool, + #[prost(bool, tag="16")] + pub disable_login_with_phone: bool, + #[prost(bool, tag="17")] + pub force_mfa_local_only: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyIdPsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpToLoginPolicyRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpFromLoginPolicyRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicySecondFactorsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicySecondFactorsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::policy::v1::SecondFactorType", repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddSecondFactorToLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::SecondFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSecondFactorToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveSecondFactorFromLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::SecondFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSecondFactorFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyMultiFactorsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyMultiFactorsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::policy::v1::MultiFactorType", repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMultiFactorToLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::MultiFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMultiFactorToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMultiFactorFromLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::MultiFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMultiFactorFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexityPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdatePasswordComplexityPolicyRequest { + #[prost(uint32, tag="1")] + pub min_length: u32, + #[prost(bool, tag="2")] + pub has_uppercase: bool, + #[prost(bool, tag="3")] + pub has_lowercase: bool, + #[prost(bool, tag="4")] + pub has_number: bool, + #[prost(bool, tag="5")] + pub has_symbol: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdatePasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPasswordAgePolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdatePasswordAgePolicyRequest { + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint32, tag="1")] + pub max_age_days: u32, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint32, tag="2")] + pub expire_warn_days: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdatePasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLockoutPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateLockoutPolicyRequest { + /// failed attempts until a user gets locked + #[prost(uint32, tag="1")] + pub max_password_attempts: u32, + #[prost(uint32, tag="2")] + pub max_otp_attempts: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPrivacyPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdatePrivacyPolicyRequest { + #[prost(string, tag="1")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub privacy_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub support_email: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdatePrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddNotificationPolicyRequest { + #[prost(bool, tag="1")] + pub password_change: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetNotificationPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateNotificationPolicyRequest { + #[prost(bool, tag="1")] + pub password_change: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInitMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInitMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordResetMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordResetMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyPhoneMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyPhoneMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifySmsotpMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifySmsotpMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailOtpMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailOtpMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainClaimedMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainClaimedMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordChangeMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordChangeMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInviteUserMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInviteUserMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetDefaultPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub select_account_text: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub login_text: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub password_text: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub username_change_text: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub username_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub init_password_text: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub init_password_done_text: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub email_verification_text: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub email_verification_done_text: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub initialize_user_text: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub initialize_done_text: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub init_mfa_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="14")] + pub init_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="15")] + pub init_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="16")] + pub init_mfa_done_text: ::core::option::Option, + #[prost(message, optional, tag="17")] + pub mfa_providers_text: ::core::option::Option, + #[prost(message, optional, tag="18")] + pub verify_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="19")] + pub verify_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="20")] + pub passwordless_text: ::core::option::Option, + #[prost(message, optional, tag="21")] + pub password_change_text: ::core::option::Option, + #[prost(message, optional, tag="22")] + pub password_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="23")] + pub password_reset_done_text: ::core::option::Option, + #[prost(message, optional, tag="24")] + pub registration_option_text: ::core::option::Option, + #[prost(message, optional, tag="25")] + pub registration_user_text: ::core::option::Option, + #[prost(message, optional, tag="26")] + pub registration_org_text: ::core::option::Option, + #[prost(message, optional, tag="27")] + pub linking_user_done_text: ::core::option::Option, + #[prost(message, optional, tag="28")] + pub external_user_not_found_text: ::core::option::Option, + #[prost(message, optional, tag="29")] + pub success_login_text: ::core::option::Option, + #[prost(message, optional, tag="30")] + pub logout_text: ::core::option::Option, + #[prost(message, optional, tag="31")] + pub footer_text: ::core::option::Option, + #[prost(message, optional, tag="32")] + pub passwordless_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="33")] + pub passwordless_registration_text: ::core::option::Option, + #[prost(message, optional, tag="34")] + pub passwordless_registration_done_text: ::core::option::Option, + #[prost(message, optional, tag="35")] + pub external_registration_user_overview_text: ::core::option::Option, + /// Deprecated: the linking user prompt screen no longer exists + #[deprecated] + #[prost(message, optional, tag="36")] + pub linking_user_prompt_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomLoginTextsToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomLoginTextsToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIamMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIamMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIamMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateIamMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIamMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIamMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListIamMemberRolesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIamMemberRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIamMembersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIamMembersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListViewsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListViewsResponse { + /// TODO: list details + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListFailedEventsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFailedEventsResponse { + /// TODO: list details + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveFailedEventRequest { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub failed_sequence: u64, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveFailedEventResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct View { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub processed_sequence: u64, + /// The timestamp the event occurred + #[prost(message, optional, tag="4")] + pub event_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="5")] + pub last_successful_spooler_run: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FailedEvent { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub failed_sequence: u64, + #[prost(uint64, tag="4")] + pub failure_count: u64, + #[prost(string, tag="5")] + pub error_message: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub last_failed: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataRequest { + #[prost(string, tag="9")] + pub timeout: ::prost::alloc::string::String, + #[prost(oneof="import_data_request::Data", tags="1, 2, 3, 4, 5, 6, 7, 8")] + pub data: ::core::option::Option, +} +/// Nested message and enum types in `ImportDataRequest`. +pub mod import_data_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct LocalInput { + #[prost(string, tag="1")] + pub path: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct S3Input { + #[prost(string, tag="1")] + pub path: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub access_key_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub secret_access_key: ::prost::alloc::string::String, + #[prost(bool, tag="5")] + pub ssl: bool, + #[prost(string, tag="6")] + pub bucket: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct GcsInput { + #[prost(string, tag="1")] + pub bucket: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub serviceaccount_json: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub path: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Data { + #[prost(message, tag="1")] + DataOrgs(super::ImportDataOrg), + #[prost(message, tag="2")] + DataOrgsv1(super::super::super::v1::v1::ImportDataOrg), + #[prost(message, tag="3")] + DataOrgsLocal(LocalInput), + #[prost(message, tag="4")] + DataOrgsv1Local(LocalInput), + #[prost(message, tag="5")] + DataOrgsS3(S3Input), + #[prost(message, tag="6")] + DataOrgsv1S3(S3Input), + #[prost(message, tag="7")] + DataOrgsGcs(GcsInput), + #[prost(message, tag="8")] + DataOrgsv1Gcs(GcsInput), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataOrg { + #[prost(message, repeated, tag="1")] + pub orgs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataOrg { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub org: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub domain_policy: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub label_policy: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub lockout_policy: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub login_policy: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub password_complexity_policy: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub privacy_policy: ::core::option::Option, + #[prost(message, repeated, tag="10")] + pub projects: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="11")] + pub project_roles: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="12")] + pub api_apps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="13")] + pub oidc_apps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="14")] + pub human_users: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="15")] + pub machine_users: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="16")] + pub trigger_actions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="17")] + pub actions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="18")] + pub project_grants: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="19")] + pub user_grants: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="20")] + pub org_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="21")] + pub project_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="22")] + pub project_grant_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="23")] + pub user_metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="24")] + pub login_texts: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="25")] + pub init_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="26")] + pub password_reset_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="27")] + pub verify_email_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="28")] + pub verify_phone_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="29")] + pub domain_claimed_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="30")] + pub passwordless_registration_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="31")] + pub oidc_idps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="32")] + pub jwt_idps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="33")] + pub user_links: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="34")] + pub domains: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="35")] + pub app_keys: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="36")] + pub machine_keys: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="37")] + pub verify_sms_otp_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="38")] + pub verify_email_otp_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="39")] + pub invite_user_messages: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataResponse { + #[prost(message, repeated, tag="1")] + pub errors: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="2")] + pub success: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataError { + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccess { + #[prost(message, repeated, tag="1")] + pub orgs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessOrg { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub project_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="3")] + pub project_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="4")] + pub oidc_app_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="5")] + pub api_app_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="6")] + pub human_user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="7")] + pub machine_user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="8")] + pub action_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="9")] + pub trigger_actions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="10")] + pub project_grants: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="11")] + pub user_grants: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="12")] + pub org_members: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="13")] + pub project_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="14")] + pub project_grant_members: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="15")] + pub oidc_ipds: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="16")] + pub jwt_idps: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="17")] + pub idp_links: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="18")] + pub user_links: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="19")] + pub user_metadata: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="20")] + pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="21")] + pub app_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="22")] + pub machine_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessProjectGrant { + #[prost(string, tag="1")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub org_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessUserGrant { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessProjectMember { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessProjectGrantMember { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessUserLinks { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub external_user_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataSuccessUserMetadata { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportDataRequest { + #[prost(string, repeated, tag="1")] + pub org_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="2")] + pub excluded_org_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="3")] + pub with_passwords: bool, + #[prost(bool, tag="4")] + pub with_otp: bool, + #[prost(bool, tag="5")] + pub response_output: bool, + #[prost(message, optional, tag="6")] + pub local_output: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub s3_output: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub gcs_output: ::core::option::Option, + #[prost(string, tag="9")] + pub timeout: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ExportDataRequest`. +pub mod export_data_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct LocalOutput { + #[prost(string, tag="1")] + pub path: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct S3Output { + #[prost(string, tag="1")] + pub path: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub access_key_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub secret_access_key: ::prost::alloc::string::String, + #[prost(bool, tag="5")] + pub ssl: bool, + #[prost(string, tag="6")] + pub bucket: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct GcsOutput { + #[prost(string, tag="1")] + pub bucket: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub serviceaccount_json: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub path: ::prost::alloc::string::String, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportDataResponse { + #[prost(message, repeated, tag="1")] + pub orgs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEventsRequest { + #[prost(uint64, tag="1")] + pub sequence: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + #[prost(bool, tag="3")] + pub asc: bool, + #[prost(string, tag="4")] + pub editor_user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub event_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="6")] + pub aggregate_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="7")] + pub aggregate_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="8")] + pub resource_owner: ::prost::alloc::string::String, + #[deprecated] + #[prost(message, optional, tag="9")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(oneof="list_events_request::CreationDateFilter", tags="10, 11")] + pub creation_date_filter: ::core::option::Option, +} +/// Nested message and enum types in `ListEventsRequest`. +pub mod list_events_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct CreationDateRange { + #[prost(message, optional, tag="1")] + pub since: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="2")] + pub until: ::core::option::Option<::pbjson_types::Timestamp>, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum CreationDateFilter { + #[prost(message, tag="10")] + Range(CreationDateRange), + #[prost(message, tag="11")] + From(::pbjson_types::Timestamp), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEventsResponse { + #[prost(message, repeated, tag="1")] + pub events: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListEventTypesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListEventTypesResponse { + #[prost(message, repeated, tag="1")] + pub event_types: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListAggregateTypesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAggregateTypesResponse { + #[prost(message, repeated, tag="1")] + pub aggregate_types: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ActivateFeatureLoginDefaultOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateFeatureLoginDefaultOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMilestonesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::milestone::v1::MilestoneFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMilestonesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetRestrictionsRequest { + #[prost(bool, optional, tag="1")] + pub disallow_public_org_registration: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub allowed_languages: ::core::option::Option, +} +/// We have to wrap the languages list into a message so we can serialize empty lists. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SelectLanguages { + #[prost(string, repeated, tag="1")] + pub list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetRestrictionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetRestrictionsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRestrictionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub disallow_public_org_registration: bool, + #[prost(string, repeated, tag="3")] + pub allowed_languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +include!("zitadel.admin.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.admin.v1.tonic.rs b/crates/zitadel-gen/src/api/zitadel.admin.v1.tonic.rs new file mode 100644 index 0000000..f38006c --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.admin.v1.tonic.rs @@ -0,0 +1,6091 @@ +// @generated +/// Generated client implementations. +pub mod admin_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 AdminServiceClient { + inner: tonic::client::Grpc, + } + impl AdminServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl AdminServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> AdminServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + AdminServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 healthz( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/Healthz", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "Healthz")); + self.inner.unary(req, path, codec).await + } + pub async fn get_supported_languages( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSupportedLanguages", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetSupportedLanguages", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_allowed_languages( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetAllowedLanguages", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetAllowedLanguages", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_language( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultLanguage", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultLanguage", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_language( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultLanguage", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultLanguage", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetMyInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetMyInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_instance_domains( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListInstanceDomains", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListInstanceDomains", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_instance_trusted_domains( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListInstanceTrustedDomains", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListInstanceTrustedDomains", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_instance_trusted_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddInstanceTrustedDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddInstanceTrustedDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_instance_trusted_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveInstanceTrustedDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveInstanceTrustedDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_secret_generators( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListSecretGenerators", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListSecretGenerators", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_secret_generator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSecretGenerator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetSecretGenerator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_secret_generator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSecretGenerator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSecretGenerator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetSMTPConfig"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_smtp_config_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSMTPConfigById", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetSMTPConfigById"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddSMTPConfig"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateSMTPConfig"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_smtp_config_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSMTPConfigPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSMTPConfigPassword", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ActivateSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ActivateSMTPConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/DeactivateSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "DeactivateSMTPConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveSMTPConfig"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn test_smtp_config_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/TestSMTPConfigById", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "TestSMTPConfigById", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn test_smtp_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/TestSMTPConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "TestSMTPConfig"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_smtp_configs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListSMTPConfigs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListSMTPConfigs"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_email_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListEmailProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListEmailProviders", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_email_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetEmailProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetEmailProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_email_provider_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetEmailProviderById", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetEmailProviderById", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_email_provider_smtp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddEmailProviderSMTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddEmailProviderSMTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_email_provider_smtp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateEmailProviderSMTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateEmailProviderSMTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_email_provider_http( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddEmailProviderHTTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddEmailProviderHTTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_email_provider_http( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateEmailProviderHTTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateEmailProviderHTTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_email_provider_smtp_password( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateEmailProviderSmtpPasswordRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateEmailProviderSMTPPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateEmailProviderSMTPPassword", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_email_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ActivateEmailProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ActivateEmailProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_email_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/DeactivateEmailProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "DeactivateEmailProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_email_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveEmailProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveEmailProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn test_email_provider_smtp_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/TestEmailProviderSMTPById", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "TestEmailProviderSMTPById", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn test_email_provider_smtp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/TestEmailProviderSMTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "TestEmailProviderSMTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_sms_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListSMSProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListSMSProviders"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_sms_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSMSProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetSMSProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_sms_provider_twilio( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddSMSProviderTwilio", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddSMSProviderTwilio", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_sms_provider_twilio( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSMSProviderTwilio", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSMSProviderTwilio", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_sms_provider_twilio_token( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSMSProviderTwilioToken", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSMSProviderTwilioToken", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_sms_provider_http( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddSMSProviderHTTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddSMSProviderHTTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_sms_provider_http( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSMSProviderHTTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSMSProviderHTTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_sms_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ActivateSMSProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ActivateSMSProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_sms_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/DeactivateSMSProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "DeactivateSMSProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_sms_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveSMSProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveSMSProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_oidc_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetOIDCSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetOIDCSettings"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_oidc_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddOIDCSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddOIDCSettings"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_oidc_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateOIDCSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateOIDCSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_file_system_notification_provider( + &mut self, + request: impl tonic::IntoRequest< + super::GetFileSystemNotificationProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetFileSystemNotificationProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetFileSystemNotificationProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_log_notification_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetLogNotificationProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetLogNotificationProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_security_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetSecurityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetSecurityPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_security_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetSecurityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "SetSecurityPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetOrgByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "GetOrgByID")); + self.inner.unary(req, path, codec).await + } + pub async fn is_org_unique( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/IsOrgUnique", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "IsOrgUnique")); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "SetDefaultOrg"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetDefaultOrg"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_orgs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListOrgs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ListOrgs")); + self.inner.unary(req, path, codec).await + } + pub async fn set_up_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetUpOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "SetUpOrg")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveOrg")); + self.inner.unary(req, path, codec).await + } + pub async fn get_idp_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetIDPByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "GetIDPByID")); + self.inner.unary(req, path, codec).await + } + pub async fn list_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ListIDPs")); + self.inner.unary(req, path, codec).await + } + pub async fn add_oidcidp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddOIDCIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "AddOIDCIDP")); + self.inner.unary(req, path, codec).await + } + pub async fn add_jwtidp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddJWTIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "AddJWTIDP")); + self.inner.unary(req, path, codec).await + } + pub async fn update_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateIDP")); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/DeactivateIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "DeactivateIDP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ReactivateIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ReactivateIDP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveIDP")); + self.inner.unary(req, path, codec).await + } + pub async fn update_idpoidc_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateIDPOIDCConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateIDPOIDCConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_idpjwt_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateIDPJWTConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateIDPJWTConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListProviders"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_provider_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetProviderByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetProviderByID"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_generic_o_auth_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGenericOAuthProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddGenericOAuthProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_generic_o_auth_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGenericOAuthProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGenericOAuthProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn migrate_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/MigrateGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "MigrateGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_jwt_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddJWTProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddJWTProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_jwt_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateJWTProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateJWTProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_azure_ad_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddAzureADProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddAzureADProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_azure_ad_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateAzureADProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateAzureADProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_hub_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGitHubProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddGitHubProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_hub_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGitHubProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGitHubProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_hub_enterprise_server_provider( + &mut self, + request: impl tonic::IntoRequest< + super::AddGitHubEnterpriseServerProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGitHubEnterpriseServerProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddGitHubEnterpriseServerProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_hub_enterprise_server_provider( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateGitHubEnterpriseServerProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGitHubEnterpriseServerProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGitHubEnterpriseServerProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_lab_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGitLabProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddGitLabProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_lab_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGitLabProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGitLabProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_lab_self_hosted_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGitLabSelfHostedProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddGitLabSelfHostedProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_lab_self_hosted_provider( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateGitLabSelfHostedProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGitLabSelfHostedProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGitLabSelfHostedProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_google_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddGoogleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddGoogleProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_google_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateGoogleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateGoogleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_ldap_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddLDAPProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddLDAPProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_ldap_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateLDAPProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateLDAPProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_apple_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddAppleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddAppleProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_apple_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateAppleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateAppleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_saml_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddSAMLProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddSAMLProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_saml_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateSAMLProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateSAMLProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn regenerate_saml_provider_certificate( + &mut self, + request: impl tonic::IntoRequest< + super::RegenerateSamlProviderCertificateRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RegenerateSAMLProviderCertificate", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RegenerateSAMLProviderCertificate", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/DeleteProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "DeleteProvider"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetOrgIAMPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateOrgIAMPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomOrgIAMPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddCustomOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddCustomOrgIAMPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateCustomOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateCustomOrgIAMPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_org_iam_policy_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomOrgIamPolicyToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomOrgIAMPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomOrgIAMPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetDomainPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateDomainPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomDomainPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddCustomDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddCustomDomainPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateCustomDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateCustomDomainPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_domain_policy_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomDomainPolicyToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomDomainPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomDomainPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetLabelPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_preview_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetPreviewLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetPreviewLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateLabelPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ActivateLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ActivateLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_label_policy_logo( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveLabelPolicyLogo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveLabelPolicyLogo", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_label_policy_logo_dark( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveLabelPolicyLogoDark", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveLabelPolicyLogoDark", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_label_policy_icon( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveLabelPolicyIcon", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveLabelPolicyIcon", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_label_policy_icon_dark( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveLabelPolicyIconDark", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveLabelPolicyIconDark", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_label_policy_font( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveLabelPolicyFont", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveLabelPolicyFont", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetLoginPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateLoginPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListLoginPolicyIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListLoginPolicyIDPs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_idp_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddIDPToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddIDPToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_idp_from_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveIDPFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveIDPFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_second_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListLoginPolicySecondFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListLoginPolicySecondFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_second_factor_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddSecondFactorToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddSecondFactorToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_second_factor_from_login_policy( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveSecondFactorFromLoginPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveSecondFactorFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveSecondFactorFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_multi_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListLoginPolicyMultiFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListLoginPolicyMultiFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_multi_factor_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddMultiFactorToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddMultiFactorToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_multi_factor_from_login_policy( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveMultiFactorFromLoginPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveMultiFactorFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "RemoveMultiFactorFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest< + super::UpdatePasswordComplexityPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdatePasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdatePasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetPasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetPasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdatePasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdatePasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetLockoutPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateLockoutPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetPrivacyPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdatePrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdatePrivacyPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "AddNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "UpdateNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_init_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomInitMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomInitMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomInitMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_password_reset_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordResetMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomPasswordResetMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomPasswordResetMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_email_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyEmailMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomVerifyEmailMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomVerifyEmailMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_phone_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyPhoneMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomVerifyPhoneMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomVerifyPhoneMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_smsotp_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifySmsotpMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomVerifySMSOTPMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomVerifySMSOTPMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_email_otp_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyEmailOtpMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomVerifyEmailOtpMessageTextToDefaultResponse, + >, + 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.admin.v1.AdminService/ResetCustomVerifyEmailOTPMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomVerifyEmailOTPMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_domain_claimed_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultDomainClaimedMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultDomainClaimedMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_domain_claimed_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomDomainClaimedMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomDomainClaimedMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_domain_claimed_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultDomainClaimedMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultDomainClaimedMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_domain_claimed_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomDomainClaimedMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomDomainClaimedMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomDomainClaimedMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_passwordless_registration_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::GetDefaultPasswordlessRegistrationMessageTextResponse, + >, + 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.admin.v1.AdminService/GetDefaultPasswordlessRegistrationMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultPasswordlessRegistrationMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_passwordless_registration_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomPasswordlessRegistrationMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomPasswordlessRegistrationMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_passwordless_registration_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::SetDefaultPasswordlessRegistrationMessageTextResponse, + >, + 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.admin.v1.AdminService/SetDefaultPasswordlessRegistrationMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultPasswordlessRegistrationMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_passwordless_registration_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse, + >, + 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.admin.v1.AdminService/ResetCustomPasswordlessRegistrationMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomPasswordlessRegistrationMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_change_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultPasswordChangeMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultPasswordChangeMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_password_change_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomPasswordChangeMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomPasswordChangeMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_password_change_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultPasswordChangeMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultPasswordChangeMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_password_change_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordChangeMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomPasswordChangeMessageTextToDefaultResponse, + >, + 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.admin.v1.AdminService/ResetCustomPasswordChangeMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomPasswordChangeMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_invite_user_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultInviteUserMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultInviteUserMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_invite_user_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomInviteUserMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomInviteUserMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_default_invite_user_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetDefaultInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetDefaultInviteUserMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetDefaultInviteUserMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_invite_user_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomInviteUserMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomInviteUserMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomInviteUserMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_login_texts( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetDefaultLoginTexts", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetDefaultLoginTexts", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_login_texts( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetCustomLoginTexts", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "GetCustomLoginTexts", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_login_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetCustomLoginText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "SetCustomLoginText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_login_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomLoginTextsToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ResetCustomLoginTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ResetCustomLoginTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_iam_member_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListIAMMemberRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListIAMMemberRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_iam_members( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListIAMMembers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListIAMMembers"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_iam_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/AddIAMMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "AddIAMMember"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_iam_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/UpdateIAMMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "UpdateIAMMember"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_iam_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveIAMMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveIAMMember"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_views( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListViews", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ListViews")); + self.inner.unary(req, path, codec).await + } + pub async fn list_failed_events( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListFailedEvents", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListFailedEvents"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_failed_event( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/RemoveFailedEvent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "RemoveFailedEvent"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn import_data( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ImportData", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ImportData")); + self.inner.unary(req, path, codec).await + } + pub async fn export_data( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ExportData", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ExportData")); + self.inner.unary(req, path, codec).await + } + pub async fn list_event_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListEventTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListEventTypes"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_events( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListEvents", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.admin.v1.AdminService", "ListEvents")); + self.inner.unary(req, path, codec).await + } + pub async fn list_aggregate_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListAggregateTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ListAggregateTypes", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_feature_login_default_org( + &mut self, + request: impl tonic::IntoRequest< + super::ActivateFeatureLoginDefaultOrgRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ActivateFeatureLoginDefaultOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.admin.v1.AdminService", + "ActivateFeatureLoginDefaultOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_milestones( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/ListMilestones", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "ListMilestones"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_restrictions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/SetRestrictions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "SetRestrictions"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_restrictions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.admin.v1.AdminService/GetRestrictions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.admin.v1.AdminService", "GetRestrictions"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.app.v1.rs b/crates/zitadel-gen/src/api/zitadel.app.v1.rs new file mode 100644 index 0000000..a3a8d53 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.app.v1.rs @@ -0,0 +1,381 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct App { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="AppState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(oneof="app::Config", tags="5, 6, 7")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `App`. +pub mod app { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="5")] + OidcConfig(super::OidcConfig), + #[prost(message, tag="6")] + ApiConfig(super::ApiConfig), + #[prost(message, tag="7")] + SamlConfig(super::SamlConfig), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AppQuery { + #[prost(oneof="app_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `AppQuery`. +pub mod app_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + NameQuery(super::AppNameQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AppNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OidcConfig { + #[prost(string, repeated, tag="1")] + pub redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="OidcResponseType", repeated, packed="false", tag="2")] + pub response_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="OidcGrantType", repeated, packed="false", tag="3")] + pub grant_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="OidcAppType", tag="4")] + pub app_type: i32, + #[prost(string, tag="5")] + pub client_id: ::prost::alloc::string::String, + #[prost(enumeration="OidcAuthMethodType", tag="7")] + pub auth_method_type: i32, + #[prost(string, repeated, tag="8")] + pub post_logout_redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="OidcVersion", tag="9")] + pub version: i32, + #[prost(bool, tag="10")] + pub none_compliant: bool, + #[prost(message, repeated, tag="11")] + pub compliance_problems: ::prost::alloc::vec::Vec, + #[prost(bool, tag="12")] + pub dev_mode: bool, + #[prost(enumeration="OidcTokenType", tag="13")] + pub access_token_type: i32, + #[prost(bool, tag="14")] + pub access_token_role_assertion: bool, + #[prost(bool, tag="15")] + pub id_token_role_assertion: bool, + #[prost(bool, tag="16")] + pub id_token_userinfo_assertion: bool, + #[prost(message, optional, tag="17")] + pub clock_skew: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, repeated, tag="18")] + pub additional_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="19")] + pub allowed_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="20")] + pub skip_native_app_success_page: bool, + #[prost(string, tag="21")] + pub back_channel_logout_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="22")] + pub login_version: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SamlConfig { + #[prost(oneof="saml_config::Metadata", tags="1, 2")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `SAMLConfig`. +pub mod saml_config { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + #[prost(bytes, tag="1")] + MetadataXml(::prost::alloc::vec::Vec), + #[prost(string, tag="2")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ApiConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(enumeration="ApiAuthMethodType", tag="3")] + pub auth_method_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginVersion { + #[prost(oneof="login_version::Version", tags="1, 2")] + pub version: ::core::option::Option, +} +/// Nested message and enum types in `LoginVersion`. +pub mod login_version { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Version { + #[prost(message, tag="1")] + LoginV1(super::LoginV1), + #[prost(message, tag="2")] + LoginV2(super::LoginV2), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct LoginV1 { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginV2 { + /// Optionally specify a base uri of the login UI. If unspecified the default URI will be used. + #[prost(string, optional, tag="1")] + pub base_uri: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AppState { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl AppState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AppState::Unspecified => "APP_STATE_UNSPECIFIED", + AppState::Active => "APP_STATE_ACTIVE", + AppState::Inactive => "APP_STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "APP_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "APP_STATE_ACTIVE" => Some(Self::Active), + "APP_STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcResponseType { + Code = 0, + IdToken = 1, + IdTokenToken = 2, +} +impl OidcResponseType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcResponseType::Code => "OIDC_RESPONSE_TYPE_CODE", + OidcResponseType::IdToken => "OIDC_RESPONSE_TYPE_ID_TOKEN", + OidcResponseType::IdTokenToken => "OIDC_RESPONSE_TYPE_ID_TOKEN_TOKEN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_RESPONSE_TYPE_CODE" => Some(Self::Code), + "OIDC_RESPONSE_TYPE_ID_TOKEN" => Some(Self::IdToken), + "OIDC_RESPONSE_TYPE_ID_TOKEN_TOKEN" => Some(Self::IdTokenToken), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcGrantType { + AuthorizationCode = 0, + Implicit = 1, + RefreshToken = 2, + DeviceCode = 3, + TokenExchange = 4, +} +impl OidcGrantType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcGrantType::AuthorizationCode => "OIDC_GRANT_TYPE_AUTHORIZATION_CODE", + OidcGrantType::Implicit => "OIDC_GRANT_TYPE_IMPLICIT", + OidcGrantType::RefreshToken => "OIDC_GRANT_TYPE_REFRESH_TOKEN", + OidcGrantType::DeviceCode => "OIDC_GRANT_TYPE_DEVICE_CODE", + OidcGrantType::TokenExchange => "OIDC_GRANT_TYPE_TOKEN_EXCHANGE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_GRANT_TYPE_AUTHORIZATION_CODE" => Some(Self::AuthorizationCode), + "OIDC_GRANT_TYPE_IMPLICIT" => Some(Self::Implicit), + "OIDC_GRANT_TYPE_REFRESH_TOKEN" => Some(Self::RefreshToken), + "OIDC_GRANT_TYPE_DEVICE_CODE" => Some(Self::DeviceCode), + "OIDC_GRANT_TYPE_TOKEN_EXCHANGE" => Some(Self::TokenExchange), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcAppType { + Web = 0, + UserAgent = 1, + Native = 2, +} +impl OidcAppType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcAppType::Web => "OIDC_APP_TYPE_WEB", + OidcAppType::UserAgent => "OIDC_APP_TYPE_USER_AGENT", + OidcAppType::Native => "OIDC_APP_TYPE_NATIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_APP_TYPE_WEB" => Some(Self::Web), + "OIDC_APP_TYPE_USER_AGENT" => Some(Self::UserAgent), + "OIDC_APP_TYPE_NATIVE" => Some(Self::Native), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcAuthMethodType { + Basic = 0, + Post = 1, + None = 2, + PrivateKeyJwt = 3, +} +impl OidcAuthMethodType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcAuthMethodType::Basic => "OIDC_AUTH_METHOD_TYPE_BASIC", + OidcAuthMethodType::Post => "OIDC_AUTH_METHOD_TYPE_POST", + OidcAuthMethodType::None => "OIDC_AUTH_METHOD_TYPE_NONE", + OidcAuthMethodType::PrivateKeyJwt => "OIDC_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_AUTH_METHOD_TYPE_BASIC" => Some(Self::Basic), + "OIDC_AUTH_METHOD_TYPE_POST" => Some(Self::Post), + "OIDC_AUTH_METHOD_TYPE_NONE" => Some(Self::None), + "OIDC_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT" => Some(Self::PrivateKeyJwt), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcVersion { + OidcVersion10 = 0, +} +impl OidcVersion { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcVersion::OidcVersion10 => "OIDC_VERSION_1_0", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_VERSION_1_0" => Some(Self::OidcVersion10), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcTokenType { + Bearer = 0, + Jwt = 1, +} +impl OidcTokenType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcTokenType::Bearer => "OIDC_TOKEN_TYPE_BEARER", + OidcTokenType::Jwt => "OIDC_TOKEN_TYPE_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_TOKEN_TYPE_BEARER" => Some(Self::Bearer), + "OIDC_TOKEN_TYPE_JWT" => Some(Self::Jwt), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ApiAuthMethodType { + Basic = 0, + PrivateKeyJwt = 1, +} +impl ApiAuthMethodType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ApiAuthMethodType::Basic => "API_AUTH_METHOD_TYPE_BASIC", + ApiAuthMethodType::PrivateKeyJwt => "API_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "API_AUTH_METHOD_TYPE_BASIC" => Some(Self::Basic), + "API_AUTH_METHOD_TYPE_PRIVATE_KEY_JWT" => Some(Self::PrivateKeyJwt), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.auth.v1.rs b/crates/zitadel-gen/src/api/zitadel.auth.v1.rs new file mode 100644 index 0000000..a2d4a21 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.auth.v1.rs @@ -0,0 +1,762 @@ +// @generated +// This file is @generated by prost-build. +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzRequest { +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzResponse { +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesResponse { + #[prost(string, repeated, tag="1")] + pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// This is an empty request +/// the request parameters are read from the token-header +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyUserRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyUserResponse { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub last_login: ::core::option::Option<::pbjson_types::Timestamp>, +} +/// This is an empty request +/// the request parameters are read from the token-header +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyUserRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyUserChangesRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyUserChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyUserSessionsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyUserSessionsResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyMetadataRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub metadata: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetMyMetadataRequest { + #[prost(message, repeated, tag="1")] + pub metadata: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `BulkSetMyMetadataRequest`. +pub mod bulk_set_my_metadata_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Metadata { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveMyMetadataRequest { + #[prost(string, repeated, tag="1")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveMyMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyRefreshTokensRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyRefreshTokensResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RevokeMyRefreshTokenRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RevokeMyRefreshTokenResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RevokeAllMyRefreshTokensRequest { +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RevokeAllMyRefreshTokensResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyUserNameRequest { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyUserNameResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyPasswordComplexityPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyPasswordRequest { + #[prost(string, tag="1")] + pub old_password: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub new_password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyProfileRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyProfileResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyProfileRequest { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::user::v1::Gender", tag="6")] + pub gender: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMyProfileResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyEmailRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyEmailRequest { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyEmailRequest { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResendMyEmailVerificationRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendMyEmailVerificationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyPhoneRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyPhoneRequest { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyPhoneRequest { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResendMyPhoneVerificationRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendMyPhoneVerificationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyPhoneRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyAvatarRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAvatarResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyLinkedIdPsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyLinkedIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyLinkedIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub linked_user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyLinkedIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyAuthFactorsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyAuthFactorsResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorU2fRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorU2fResponse { + #[prost(message, optional, tag="1")] + pub key: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpResponse { + #[prost(string, tag="1")] + pub url: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub secret: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyAuthFactorOtpRequest { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyAuthFactorOtpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyAuthFactorU2fRequest { + #[prost(message, optional, tag="1")] + pub verification: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyAuthFactorU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpsmsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpsmsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpEmailRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyAuthFactorOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpEmailRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorU2fRequest { + #[prost(string, tag="1")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyAuthFactorU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyPasswordlessRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyPasswordlessResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyPasswordlessRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyPasswordlessResponse { + #[prost(message, optional, tag="1")] + pub key: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMyPasswordlessLinkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMyPasswordlessLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub link: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub expiration: ::core::option::Option<::pbjson_types::Duration>, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SendMyPasswordlessLinkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendMyPasswordlessLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyPasswordlessRequest { + #[prost(message, optional, tag="1")] + pub verification: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMyPasswordlessResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyPasswordlessRequest { + #[prost(string, tag="1")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMyPasswordlessResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyUserGrantsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyUserGrantsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrant { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, + /// Deprecated: user role_keys + #[prost(string, repeated, tag="4")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub org_name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub grant_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="7")] + pub details: ::core::option::Option, + #[prost(string, tag="8")] + pub org_domain: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub project_name: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub project_grant_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="11")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::user::v1::Type", tag="12")] + pub user_type: i32, + #[prost(enumeration="super::super::user::v1::UserGrantState", tag="13")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyProjectOrgsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, + /// States by which field the results are sorted. + #[prost(enumeration="super::super::org::v1::OrgFieldName", tag="3")] + pub sorting_column: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyProjectOrgsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyZitadelPermissionsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyZitadelPermissionsResponse { + #[prost(string, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListMyProjectPermissionsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyProjectPermissionsResponse { + #[prost(string, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyMembershipsRequest { + /// the field the result is sorted + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMyMembershipsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyPrivacyPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyLoginPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +include!("zitadel.auth.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.auth.v1.tonic.rs b/crates/zitadel-gen/src/api/zitadel.auth.v1.tonic.rs new file mode 100644 index 0000000..e46ec05 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.auth.v1.tonic.rs @@ -0,0 +1,1555 @@ +// @generated +/// Generated client implementations. +pub mod auth_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 AuthServiceClient { + inner: tonic::client::Grpc, + } + impl AuthServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl AuthServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> AuthServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + AuthServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 healthz( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/Healthz", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "Healthz")); + self.inner.unary(req, path, codec).await + } + pub async fn get_supported_languages( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetSupportedLanguages", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "GetSupportedLanguages", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyUser")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "RemoveMyUser")); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_user_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyUserChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyUserChanges"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_user_sessions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyUserSessions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyUserSessions"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyMetadata"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyMetadata")); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_refresh_tokens( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyRefreshTokens", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyRefreshTokens"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn revoke_my_refresh_token( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RevokeMyRefreshToken", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RevokeMyRefreshToken", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn revoke_all_my_refresh_tokens( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RevokeAllMyRefreshTokens", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RevokeAllMyRefreshTokens", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_my_user_name( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/UpdateMyUserName", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "UpdateMyUserName"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "GetMyPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_my_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/UpdateMyPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "UpdateMyPassword"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_profile( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyProfile", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyProfile")); + self.inner.unary(req, path, codec).await + } + pub async fn update_my_profile( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/UpdateMyProfile", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "UpdateMyProfile"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn set_my_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/SetMyEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "SetMyEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_my_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/VerifyMyEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "VerifyMyEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn resend_my_email_verification( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ResendMyEmailVerification", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "ResendMyEmailVerification", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn set_my_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/SetMyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "SetMyPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_my_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/VerifyMyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "VerifyMyPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn resend_my_phone_verification( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ResendMyPhoneVerification", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "ResendMyPhoneVerification", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.auth.v1.AuthService", "RemoveMyPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_avatar( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyAvatar", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "RemoveMyAvatar"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_linked_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyLinkedIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyLinkedIDPs"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_linked_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyLinkedIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "RemoveMyLinkedIDP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_auth_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyAuthFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyAuthFactors"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_auth_factor_otp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyAuthFactorOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "AddMyAuthFactorOTP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_my_auth_factor_otp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/VerifyMyAuthFactorOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "VerifyMyAuthFactorOTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_auth_factor_otp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyAuthFactorOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RemoveMyAuthFactorOTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_auth_factor_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyAuthFactorOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "AddMyAuthFactorOTPSMS", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_auth_factor_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyAuthFactorOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RemoveMyAuthFactorOTPSMS", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_auth_factor_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyAuthFactorOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "AddMyAuthFactorOTPEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_auth_factor_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyAuthFactorOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RemoveMyAuthFactorOTPEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_auth_factor_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyAuthFactorU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "AddMyAuthFactorU2F"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_my_auth_factor_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/VerifyMyAuthFactorU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "VerifyMyAuthFactorU2F", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_auth_factor_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyAuthFactorU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RemoveMyAuthFactorU2F", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyPasswordless"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "AddMyPasswordless"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_my_passwordless_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/AddMyPasswordlessLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "AddMyPasswordlessLink", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn send_my_passwordless_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/SendMyPasswordlessLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "SendMyPasswordlessLink", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_my_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/VerifyMyPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "VerifyMyPasswordless", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_my_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/RemoveMyPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "RemoveMyPasswordless", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_user_grants( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyUserGrants", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyUserGrants"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_project_orgs( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyProjectOrgs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyProjectOrgs"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_zitadel_permissions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyZitadelPermissions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "ListMyZitadelPermissions", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_project_permissions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyProjectPermissions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.auth.v1.AuthService", + "ListMyProjectPermissions", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_my_memberships( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/ListMyMemberships", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "ListMyMemberships"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyLabelPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyPrivacyPolicy"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.auth.v1.AuthService/GetMyLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.auth.v1.AuthService", "GetMyLoginPolicy"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.authn.v1.rs b/crates/zitadel-gen/src/api/zitadel.authn.v1.rs new file mode 100644 index 0000000..5e24dde --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.authn.v1.rs @@ -0,0 +1,41 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Key { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="KeyType", tag="3")] + pub r#type: i32, + #[prost(message, optional, tag="4")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum KeyType { + Unspecified = 0, + Json = 1, +} +impl KeyType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + KeyType::Unspecified => "KEY_TYPE_UNSPECIFIED", + KeyType::Json => "KEY_TYPE_JSON", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "KEY_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "KEY_TYPE_JSON" => Some(Self::Json), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.change.v1.rs b/crates/zitadel-gen/src/api/zitadel.change.v1.rs new file mode 100644 index 0000000..8c57f8a --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.change.v1.rs @@ -0,0 +1,33 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Change { + #[prost(message, optional, tag="1")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="2")] + pub event_type: ::core::option::Option, + #[prost(uint64, tag="3")] + pub sequence: u64, + #[prost(string, tag="4")] + pub editor_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub editor_display_name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub resource_owner_id: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub editor_preferred_login_name: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub editor_avatar_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ChangeQuery { + #[prost(uint64, tag="1")] + pub sequence: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + #[prost(bool, tag="3")] + pub asc: bool, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.event.v1.rs b/crates/zitadel-gen/src/api/zitadel.event.v1.rs new file mode 100644 index 0000000..0eeb93b --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.event.v1.rs @@ -0,0 +1,55 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Event { + #[prost(message, optional, tag="1")] + pub editor: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub aggregate: ::core::option::Option, + #[prost(uint64, tag="3")] + pub sequence: u64, + #[prost(message, optional, tag="4")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="5")] + pub payload: ::core::option::Option<::pbjson_types::Struct>, + #[prost(message, optional, tag="6")] + pub r#type: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Editor { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub service: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Aggregate { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub r#type: ::core::option::Option, + #[prost(string, tag="3")] + pub resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventType { + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub localized: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AggregateType { + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub localized: ::core::option::Option, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.feature.v1.rs b/crates/zitadel-gen/src/api/zitadel.feature.v1.rs new file mode 100644 index 0000000..74a54d4 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.feature.v1.rs @@ -0,0 +1,29 @@ +// @generated +// This file is @generated by prost-build. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum InstanceFeature { + Unspecified = 0, + LoginDefaultOrg = 1, +} +impl InstanceFeature { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + InstanceFeature::Unspecified => "INSTANCE_FEATURE_UNSPECIFIED", + InstanceFeature::LoginDefaultOrg => "INSTANCE_FEATURE_LOGIN_DEFAULT_ORG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INSTANCE_FEATURE_UNSPECIFIED" => Some(Self::Unspecified), + "INSTANCE_FEATURE_LOGIN_DEFAULT_ORG" => Some(Self::LoginDefaultOrg), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.feature.v2.rs b/crates/zitadel-gen/src/api/zitadel.feature.v2.rs new file mode 100644 index 0000000..6b1093c --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.feature.v2.rs @@ -0,0 +1,372 @@ +// @generated +// This file is @generated by prost-build. +/// FeatureFlag is a simple boolean Feature setting, without further payload. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeatureFlag { + #[prost(bool, tag="1")] + pub enabled: bool, + #[prost(enumeration="Source", tag="2")] + pub source: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImprovedPerformanceFeatureFlag { + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="1")] + pub execution_paths: ::prost::alloc::vec::Vec, + #[prost(enumeration="Source", tag="2")] + pub source: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginV2FeatureFlag { + #[prost(bool, tag="1")] + pub required: bool, + #[prost(string, optional, tag="2")] + pub base_uri: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="Source", tag="3")] + pub source: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginV2 { + /// Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference. + #[prost(bool, tag="1")] + pub required: bool, + /// Optionally specify a base uri of the login UI. If unspecified the default URI will be used. + #[prost(string, optional, tag="2")] + pub base_uri: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Source { + Unspecified = 0, + System = 2, + Instance = 3, + Organization = 4, + /// reserved for future use + Project = 5, + /// reserved for future use + App = 6, + User = 7, +} +impl Source { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Source::Unspecified => "SOURCE_UNSPECIFIED", + Source::System => "SOURCE_SYSTEM", + Source::Instance => "SOURCE_INSTANCE", + Source::Organization => "SOURCE_ORGANIZATION", + Source::Project => "SOURCE_PROJECT", + Source::App => "SOURCE_APP", + Source::User => "SOURCE_USER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SOURCE_UNSPECIFIED" => Some(Self::Unspecified), + "SOURCE_SYSTEM" => Some(Self::System), + "SOURCE_INSTANCE" => Some(Self::Instance), + "SOURCE_ORGANIZATION" => Some(Self::Organization), + "SOURCE_PROJECT" => Some(Self::Project), + "SOURCE_APP" => Some(Self::App), + "SOURCE_USER" => Some(Self::User), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ImprovedPerformance { + Unspecified = 0, + /// Uses the eventstore to query the org by id + /// instead of the sql table. + OrgById = 1, + /// Improves performance on write side by using + /// optimized processes to query data to determine + /// correctnes of data. + ProjectGrant = 2, + Project = 3, + UserGrant = 4, + /// Improve performance on write side when + /// users are checked against verified domains + /// from other organizations. + OrgDomainVerified = 5, +} +impl ImprovedPerformance { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ImprovedPerformance::Unspecified => "IMPROVED_PERFORMANCE_UNSPECIFIED", + ImprovedPerformance::OrgById => "IMPROVED_PERFORMANCE_ORG_BY_ID", + ImprovedPerformance::ProjectGrant => "IMPROVED_PERFORMANCE_PROJECT_GRANT", + ImprovedPerformance::Project => "IMPROVED_PERFORMANCE_PROJECT", + ImprovedPerformance::UserGrant => "IMPROVED_PERFORMANCE_USER_GRANT", + ImprovedPerformance::OrgDomainVerified => "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IMPROVED_PERFORMANCE_UNSPECIFIED" => Some(Self::Unspecified), + "IMPROVED_PERFORMANCE_ORG_BY_ID" => Some(Self::OrgById), + "IMPROVED_PERFORMANCE_PROJECT_GRANT" => Some(Self::ProjectGrant), + "IMPROVED_PERFORMANCE_PROJECT" => Some(Self::Project), + "IMPROVED_PERFORMANCE_USER_GRANT" => Some(Self::UserGrant), + "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED" => Some(Self::OrgDomainVerified), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSystemFeaturesRequest { + #[prost(bool, optional, tag="1")] + pub login_default_org: ::core::option::Option, + #[prost(bool, optional, tag="2")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(bool, optional, tag="4")] + pub user_schema: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(bool, optional, tag="6")] + pub actions: ::core::option::Option, + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="7")] + pub improved_performance: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag="8")] + pub oidc_single_v1_session_termination: ::core::option::Option, + #[prost(bool, optional, tag="9")] + pub disable_user_token_event: ::core::option::Option, + #[prost(bool, optional, tag="10")] + pub enable_back_channel_logout: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub login_v2: ::core::option::Option, + #[prost(bool, optional, tag="12")] + pub permission_check_v2: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetSystemFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSystemFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub login_default_org: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub user_schema: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub actions: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub improved_performance: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub oidc_single_v1_session_termination: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub disable_user_token_event: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub enable_back_channel_logout: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub login_v2: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub permission_check_v2: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeaturesRequest { + #[prost(bool, optional, tag="1")] + pub login_default_org: ::core::option::Option, + #[prost(bool, optional, tag="2")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(bool, optional, tag="4")] + pub user_schema: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(bool, optional, tag="6")] + pub actions: ::core::option::Option, + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="7")] + pub improved_performance: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag="8")] + pub web_key: ::core::option::Option, + #[prost(bool, optional, tag="9")] + pub debug_oidc_parent_error: ::core::option::Option, + #[prost(bool, optional, tag="10")] + pub oidc_single_v1_session_termination: ::core::option::Option, + #[prost(bool, optional, tag="11")] + pub disable_user_token_event: ::core::option::Option, + #[prost(bool, optional, tag="12")] + pub enable_back_channel_logout: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub login_v2: ::core::option::Option, + #[prost(bool, optional, tag="14")] + pub permission_check_v2: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetInstanceFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetInstanceFeaturesRequest { + #[prost(bool, tag="1")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub login_default_org: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub user_schema: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub actions: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub improved_performance: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub web_key: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub debug_oidc_parent_error: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub oidc_single_v1_session_termination: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub disable_user_token_event: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub enable_back_channel_logout: ::core::option::Option, + #[prost(message, optional, tag="14")] + pub login_v2: ::core::option::Option, + #[prost(message, optional, tag="15")] + pub permission_check_v2: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserFeatureRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetUserFeaturesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserFeaturesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.feature.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.feature.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.feature.v2.tonic.rs new file mode 100644 index 0000000..65bbcdd --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.feature.v2.tonic.rs @@ -0,0 +1,459 @@ +// @generated +/// Generated client implementations. +pub mod feature_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 FeatureServiceClient { + inner: tonic::client::Grpc, + } + impl FeatureServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl FeatureServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> FeatureServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + FeatureServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 set_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/SetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "SetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/ResetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "ResetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/GetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "GetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/SetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "SetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/ResetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "ResetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/GetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "GetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/SetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "SetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/ResetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "ResetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/GetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "GetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/SetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "SetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/ResetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "ResetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2.FeatureService/GetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2.FeatureService", + "GetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.feature.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.feature.v2beta.rs new file mode 100644 index 0000000..2676a74 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.feature.v2beta.rs @@ -0,0 +1,320 @@ +// @generated +// This file is @generated by prost-build. +/// FeatureFlag is a simple boolean Feature setting, without further payload. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct FeatureFlag { + #[prost(bool, tag="1")] + pub enabled: bool, + #[prost(enumeration="Source", tag="2")] + pub source: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImprovedPerformanceFeatureFlag { + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="1")] + pub execution_paths: ::prost::alloc::vec::Vec, + #[prost(enumeration="Source", tag="2")] + pub source: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Source { + Unspecified = 0, + System = 2, + Instance = 3, + Organization = 4, + /// reserved for future use + Project = 5, + /// reserved for future use + App = 6, + User = 7, +} +impl Source { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Source::Unspecified => "SOURCE_UNSPECIFIED", + Source::System => "SOURCE_SYSTEM", + Source::Instance => "SOURCE_INSTANCE", + Source::Organization => "SOURCE_ORGANIZATION", + Source::Project => "SOURCE_PROJECT", + Source::App => "SOURCE_APP", + Source::User => "SOURCE_USER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SOURCE_UNSPECIFIED" => Some(Self::Unspecified), + "SOURCE_SYSTEM" => Some(Self::System), + "SOURCE_INSTANCE" => Some(Self::Instance), + "SOURCE_ORGANIZATION" => Some(Self::Organization), + "SOURCE_PROJECT" => Some(Self::Project), + "SOURCE_APP" => Some(Self::App), + "SOURCE_USER" => Some(Self::User), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ImprovedPerformance { + Unspecified = 0, + /// Uses the eventstore to query the org by id + /// instead of the sql table. + OrgById = 1, + /// Improves performance on write side by using + /// optimized processes to query data to determine + /// correctnes of data. + ProjectGrant = 2, + Project = 3, + UserGrant = 4, + /// Improve performance on write side when + /// users are checked against verified domains + /// from other organizations. + OrgDomainVerified = 5, +} +impl ImprovedPerformance { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ImprovedPerformance::Unspecified => "IMPROVED_PERFORMANCE_UNSPECIFIED", + ImprovedPerformance::OrgById => "IMPROVED_PERFORMANCE_ORG_BY_ID", + ImprovedPerformance::ProjectGrant => "IMPROVED_PERFORMANCE_PROJECT_GRANT", + ImprovedPerformance::Project => "IMPROVED_PERFORMANCE_PROJECT", + ImprovedPerformance::UserGrant => "IMPROVED_PERFORMANCE_USER_GRANT", + ImprovedPerformance::OrgDomainVerified => "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IMPROVED_PERFORMANCE_UNSPECIFIED" => Some(Self::Unspecified), + "IMPROVED_PERFORMANCE_ORG_BY_ID" => Some(Self::OrgById), + "IMPROVED_PERFORMANCE_PROJECT_GRANT" => Some(Self::ProjectGrant), + "IMPROVED_PERFORMANCE_PROJECT" => Some(Self::Project), + "IMPROVED_PERFORMANCE_USER_GRANT" => Some(Self::UserGrant), + "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED" => Some(Self::OrgDomainVerified), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSystemFeaturesRequest { + #[prost(bool, optional, tag="1")] + pub login_default_org: ::core::option::Option, + #[prost(bool, optional, tag="2")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(bool, optional, tag="4")] + pub user_schema: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(bool, optional, tag="6")] + pub actions: ::core::option::Option, + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="7")] + pub improved_performance: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag="8")] + pub oidc_single_v1_session_termination: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetSystemFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSystemFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSystemFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub login_default_org: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub user_schema: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub actions: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub improved_performance: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub oidc_single_v1_session_termination: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeaturesRequest { + #[prost(bool, optional, tag="1")] + pub login_default_org: ::core::option::Option, + #[prost(bool, optional, tag="2")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(bool, optional, tag="4")] + pub user_schema: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(bool, optional, tag="6")] + pub actions: ::core::option::Option, + #[prost(enumeration="ImprovedPerformance", repeated, packed="false", tag="7")] + pub improved_performance: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag="8")] + pub web_key: ::core::option::Option, + #[prost(bool, optional, tag="9")] + pub debug_oidc_parent_error: ::core::option::Option, + #[prost(bool, optional, tag="10")] + pub oidc_single_v1_session_termination: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetInstanceFeaturesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetInstanceFeaturesRequest { + #[prost(bool, tag="1")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetInstanceFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub login_default_org: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub oidc_trigger_introspection_projections: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub oidc_legacy_introspection: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub user_schema: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub oidc_token_exchange: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub actions: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub improved_performance: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub web_key: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub debug_oidc_parent_error: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub oidc_single_v1_session_termination: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrganizationFeaturesRequest { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrganizationFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserFeatureRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetUserFeaturesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserFeaturesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub inheritance: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserFeaturesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.feature.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.feature.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.feature.v2beta.tonic.rs new file mode 100644 index 0000000..fbdb069 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.feature.v2beta.tonic.rs @@ -0,0 +1,459 @@ +// @generated +/// Generated client implementations. +pub mod feature_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 FeatureServiceClient { + inner: tonic::client::Grpc, + } + impl FeatureServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl FeatureServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> FeatureServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + FeatureServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 set_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/SetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "SetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/ResetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "ResetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_system_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/GetSystemFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "GetSystemFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/SetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "SetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/ResetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "ResetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_instance_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/GetInstanceFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "GetInstanceFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/SetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "SetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/ResetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "ResetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_organization_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/GetOrganizationFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "GetOrganizationFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn set_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/SetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "SetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn reset_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/ResetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "ResetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + /// + pub async fn get_user_features( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.feature.v2beta.FeatureService/GetUserFeatures", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.feature.v2beta.FeatureService", + "GetUserFeatures", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.idp.v1.rs b/crates/zitadel-gen/src/api/zitadel.idp.v1.rs new file mode 100644 index 0000000..02304b6 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.idp.v1.rs @@ -0,0 +1,723 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Idp { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="IdpState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="IdpStylingType", tag="5")] + pub styling_type: i32, + #[prost(enumeration="IdpOwnerType", tag="6")] + pub owner: i32, + #[prost(bool, tag="8")] + pub auto_register: bool, + #[prost(oneof="idp::Config", tags="7, 9")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `IDP`. +pub mod idp { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="7")] + OidcConfig(super::OidcConfig), + #[prost(message, tag="9")] + JwtConfig(super::JwtConfig), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpUserLink { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub idp_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub provided_user_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub provided_user_name: ::prost::alloc::string::String, + #[prost(enumeration="IdpType", tag="6")] + pub idp_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpLoginPolicyLink { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_name: ::prost::alloc::string::String, + #[prost(enumeration="IdpType", tag="3")] + pub idp_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OidcConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="OidcMappingField", tag="4")] + pub display_name_mapping: i32, + #[prost(enumeration="OidcMappingField", tag="5")] + pub username_mapping: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct JwtConfig { + #[prost(string, tag="1")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub header_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpidQuery { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IdpOwnerTypeQuery { + #[prost(enumeration="IdpOwnerType", tag="1")] + pub owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Provider { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="IdpState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="IdpOwnerType", tag="5")] + pub owner: i32, + #[prost(enumeration="ProviderType", tag="6")] + pub r#type: i32, + #[prost(message, optional, tag="7")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProviderConfig { + #[prost(message, optional, tag="1")] + pub options: ::core::option::Option, + #[prost(oneof="provider_config::Config", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `ProviderConfig`. +pub mod provider_config { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="2")] + Ldap(super::LdapConfig), + #[prost(message, tag="3")] + Google(super::GoogleConfig), + #[prost(message, tag="4")] + Oauth(super::OAuthConfig), + #[prost(message, tag="5")] + Oidc(super::GenericOidcConfig), + #[prost(message, tag="6")] + Jwt(super::JwtConfig), + #[prost(message, tag="7")] + Github(super::GitHubConfig), + #[prost(message, tag="8")] + GithubEs(super::GitHubEnterpriseServerConfig), + #[prost(message, tag="9")] + Gitlab(super::GitLabConfig), + #[prost(message, tag="10")] + GitlabSelfHosted(super::GitLabSelfHostedConfig), + #[prost(message, tag="11")] + AzureAd(super::AzureAdConfig), + #[prost(message, tag="12")] + Apple(super::AppleConfig), + #[prost(message, tag="13")] + Saml(super::SamlConfig), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OAuthConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="6")] + pub id_attribute: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenericOidcConfig { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="4")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitHubConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitHubEnterpriseServerConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GoogleConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitLabConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitLabSelfHostedConfig { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapConfig { + #[prost(string, repeated, tag="1")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="2")] + pub start_tls: bool, + #[prost(string, tag="3")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="7")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="9")] + pub attributes: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SamlConfig { + /// Metadata of the SAML identity provider. + #[prost(bytes="vec", tag="1")] + pub metadata_xml: ::prost::alloc::vec::Vec, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="SamlBinding", tag="2")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed. + #[prost(bool, tag="3")] + pub with_signed_request: bool, + /// `nameid-format` for the SAML Request. + #[prost(enumeration="SamlNameIdFormat", tag="4")] + pub name_id_format: i32, + /// Optional name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="5")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AzureAdConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub tenant: ::core::option::Option, + #[prost(bool, tag="3")] + pub email_verified: bool, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Options { + #[prost(bool, tag="1")] + pub is_linking_allowed: bool, + #[prost(bool, tag="2")] + pub is_creation_allowed: bool, + #[prost(bool, tag="3")] + pub is_auto_creation: bool, + #[prost(bool, tag="4")] + pub is_auto_update: bool, + #[prost(enumeration="AutoLinkingOption", tag="5")] + pub auto_linking: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapAttributes { + #[prost(string, tag="1")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub first_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub last_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub nick_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub preferred_username_attribute: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub email_attribute: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub email_verified_attribute: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub phone_attribute: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub phone_verified_attribute: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub preferred_language_attribute: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub avatar_url_attribute: ::prost::alloc::string::String, + #[prost(string, tag="13")] + pub profile_attribute: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AzureAdTenant { + #[prost(oneof="azure_ad_tenant::Type", tags="1, 2")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `AzureADTenant`. +pub mod azure_ad_tenant { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(enumeration="super::AzureAdTenantType", tag="1")] + TenantType(i32), + #[prost(string, tag="2")] + TenantId(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AppleConfig { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub team_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub key_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpState { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl IdpState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpState::Unspecified => "IDP_STATE_UNSPECIFIED", + IdpState::Active => "IDP_STATE_ACTIVE", + IdpState::Inactive => "IDP_STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_STATE_ACTIVE" => Some(Self::Active), + "IDP_STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpStylingType { + StylingTypeUnspecified = 0, + StylingTypeGoogle = 1, +} +impl IdpStylingType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpStylingType::StylingTypeUnspecified => "STYLING_TYPE_UNSPECIFIED", + IdpStylingType::StylingTypeGoogle => "STYLING_TYPE_GOOGLE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STYLING_TYPE_UNSPECIFIED" => Some(Self::StylingTypeUnspecified), + "STYLING_TYPE_GOOGLE" => Some(Self::StylingTypeGoogle), + _ => None, + } + } +} +/// authorization framework of the identity provider +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpType { + Unspecified = 0, + Oidc = 1, + Jwt = 3, +} +impl IdpType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpType::Unspecified => "IDP_TYPE_UNSPECIFIED", + IdpType::Oidc => "IDP_TYPE_OIDC", + IdpType::Jwt => "IDP_TYPE_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_TYPE_OIDC" => Some(Self::Oidc), + "IDP_TYPE_JWT" => Some(Self::Jwt), + _ => None, + } + } +} +/// the owner of the identity provider. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpOwnerType { + Unspecified = 0, + /// system is managed by the ZITADEL administrators + System = 1, + /// org is managed by de organization administrators + Org = 2, +} +impl IdpOwnerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpOwnerType::Unspecified => "IDP_OWNER_TYPE_UNSPECIFIED", + IdpOwnerType::System => "IDP_OWNER_TYPE_SYSTEM", + IdpOwnerType::Org => "IDP_OWNER_TYPE_ORG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_OWNER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_OWNER_TYPE_SYSTEM" => Some(Self::System), + "IDP_OWNER_TYPE_ORG" => Some(Self::Org), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OidcMappingField { + Unspecified = 0, + PreferredUsername = 1, + Email = 2, +} +impl OidcMappingField { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OidcMappingField::Unspecified => "OIDC_MAPPING_FIELD_UNSPECIFIED", + OidcMappingField::PreferredUsername => "OIDC_MAPPING_FIELD_PREFERRED_USERNAME", + OidcMappingField::Email => "OIDC_MAPPING_FIELD_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OIDC_MAPPING_FIELD_UNSPECIFIED" => Some(Self::Unspecified), + "OIDC_MAPPING_FIELD_PREFERRED_USERNAME" => Some(Self::PreferredUsername), + "OIDC_MAPPING_FIELD_EMAIL" => Some(Self::Email), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpFieldName { + Unspecified = 0, + Name = 1, +} +impl IdpFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpFieldName::Unspecified => "IDP_FIELD_NAME_UNSPECIFIED", + IdpFieldName::Name => "IDP_FIELD_NAME_NAME", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_FIELD_NAME_NAME" => Some(Self::Name), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ProviderType { + Unspecified = 0, + Oidc = 1, + Jwt = 2, + Ldap = 3, + Oauth = 4, + AzureAd = 5, + Github = 6, + GithubEs = 7, + Gitlab = 8, + GitlabSelfHosted = 9, + Google = 10, + Apple = 11, + Saml = 12, +} +impl ProviderType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ProviderType::Unspecified => "PROVIDER_TYPE_UNSPECIFIED", + ProviderType::Oidc => "PROVIDER_TYPE_OIDC", + ProviderType::Jwt => "PROVIDER_TYPE_JWT", + ProviderType::Ldap => "PROVIDER_TYPE_LDAP", + ProviderType::Oauth => "PROVIDER_TYPE_OAUTH", + ProviderType::AzureAd => "PROVIDER_TYPE_AZURE_AD", + ProviderType::Github => "PROVIDER_TYPE_GITHUB", + ProviderType::GithubEs => "PROVIDER_TYPE_GITHUB_ES", + ProviderType::Gitlab => "PROVIDER_TYPE_GITLAB", + ProviderType::GitlabSelfHosted => "PROVIDER_TYPE_GITLAB_SELF_HOSTED", + ProviderType::Google => "PROVIDER_TYPE_GOOGLE", + ProviderType::Apple => "PROVIDER_TYPE_APPLE", + ProviderType::Saml => "PROVIDER_TYPE_SAML", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROVIDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "PROVIDER_TYPE_OIDC" => Some(Self::Oidc), + "PROVIDER_TYPE_JWT" => Some(Self::Jwt), + "PROVIDER_TYPE_LDAP" => Some(Self::Ldap), + "PROVIDER_TYPE_OAUTH" => Some(Self::Oauth), + "PROVIDER_TYPE_AZURE_AD" => Some(Self::AzureAd), + "PROVIDER_TYPE_GITHUB" => Some(Self::Github), + "PROVIDER_TYPE_GITHUB_ES" => Some(Self::GithubEs), + "PROVIDER_TYPE_GITLAB" => Some(Self::Gitlab), + "PROVIDER_TYPE_GITLAB_SELF_HOSTED" => Some(Self::GitlabSelfHosted), + "PROVIDER_TYPE_GOOGLE" => Some(Self::Google), + "PROVIDER_TYPE_APPLE" => Some(Self::Apple), + "PROVIDER_TYPE_SAML" => Some(Self::Saml), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SamlBinding { + Unspecified = 0, + Post = 1, + Redirect = 2, + Artifact = 3, +} +impl SamlBinding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SamlBinding::Unspecified => "SAML_BINDING_UNSPECIFIED", + SamlBinding::Post => "SAML_BINDING_POST", + SamlBinding::Redirect => "SAML_BINDING_REDIRECT", + SamlBinding::Artifact => "SAML_BINDING_ARTIFACT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SAML_BINDING_UNSPECIFIED" => Some(Self::Unspecified), + "SAML_BINDING_POST" => Some(Self::Post), + "SAML_BINDING_REDIRECT" => Some(Self::Redirect), + "SAML_BINDING_ARTIFACT" => Some(Self::Artifact), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SamlNameIdFormat { + Unspecified = 0, + EmailAddress = 1, + Persistent = 2, + Transient = 3, +} +impl SamlNameIdFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SamlNameIdFormat::Unspecified => "SAML_NAME_ID_FORMAT_UNSPECIFIED", + SamlNameIdFormat::EmailAddress => "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS", + SamlNameIdFormat::Persistent => "SAML_NAME_ID_FORMAT_PERSISTENT", + SamlNameIdFormat::Transient => "SAML_NAME_ID_FORMAT_TRANSIENT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SAML_NAME_ID_FORMAT_UNSPECIFIED" => Some(Self::Unspecified), + "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS" => Some(Self::EmailAddress), + "SAML_NAME_ID_FORMAT_PERSISTENT" => Some(Self::Persistent), + "SAML_NAME_ID_FORMAT_TRANSIENT" => Some(Self::Transient), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AutoLinkingOption { + /// AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. + Unspecified = 0, + /// AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. + Username = 1, + /// AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email + /// Note that in case multiple users match, no prompt will be shown. + Email = 2, +} +impl AutoLinkingOption { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AutoLinkingOption::Unspecified => "AUTO_LINKING_OPTION_UNSPECIFIED", + AutoLinkingOption::Username => "AUTO_LINKING_OPTION_USERNAME", + AutoLinkingOption::Email => "AUTO_LINKING_OPTION_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTO_LINKING_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "AUTO_LINKING_OPTION_USERNAME" => Some(Self::Username), + "AUTO_LINKING_OPTION_EMAIL" => Some(Self::Email), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AzureAdTenantType { + Common = 0, + Organisations = 1, + Consumers = 2, +} +impl AzureAdTenantType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AzureAdTenantType::Common => "AZURE_AD_TENANT_TYPE_COMMON", + AzureAdTenantType::Organisations => "AZURE_AD_TENANT_TYPE_ORGANISATIONS", + AzureAdTenantType::Consumers => "AZURE_AD_TENANT_TYPE_CONSUMERS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AZURE_AD_TENANT_TYPE_COMMON" => Some(Self::Common), + "AZURE_AD_TENANT_TYPE_ORGANISATIONS" => Some(Self::Organisations), + "AZURE_AD_TENANT_TYPE_CONSUMERS" => Some(Self::Consumers), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.idp.v2.rs b/crates/zitadel-gen/src/api/zitadel.idp.v2.rs new file mode 100644 index 0000000..9e16d1b --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.idp.v2.rs @@ -0,0 +1,547 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Idp { + /// Unique identifier for the identity provider. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + /// Current state of the identity provider. + #[prost(enumeration="IdpState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + /// Type of the identity provider, for example OIDC, JWT, LDAP and SAML. + #[prost(enumeration="IdpType", tag="5")] + pub r#type: i32, + /// Configuration for the type of the identity provider. + #[prost(message, optional, tag="6")] + pub config: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpConfig { + #[prost(message, optional, tag="1")] + pub options: ::core::option::Option, + #[prost(oneof="idp_config::Config", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `IDPConfig`. +pub mod idp_config { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="2")] + Ldap(super::LdapConfig), + #[prost(message, tag="3")] + Google(super::GoogleConfig), + #[prost(message, tag="4")] + Oauth(super::OAuthConfig), + #[prost(message, tag="5")] + Oidc(super::GenericOidcConfig), + #[prost(message, tag="6")] + Jwt(super::JwtConfig), + #[prost(message, tag="7")] + Github(super::GitHubConfig), + #[prost(message, tag="8")] + GithubEs(super::GitHubEnterpriseServerConfig), + #[prost(message, tag="9")] + Gitlab(super::GitLabConfig), + #[prost(message, tag="10")] + GitlabSelfHosted(super::GitLabSelfHostedConfig), + #[prost(message, tag="11")] + AzureAd(super::AzureAdConfig), + #[prost(message, tag="12")] + Apple(super::AppleConfig), + #[prost(message, tag="13")] + Saml(super::SamlConfig), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct JwtConfig { + /// The endpoint where the JWT can be extracted. + #[prost(string, tag="1")] + pub jwt_endpoint: ::prost::alloc::string::String, + /// The issuer of the JWT (for validation). + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + /// The endpoint to the key (JWK) which is used to sign the JWT with. + #[prost(string, tag="3")] + pub keys_endpoint: ::prost::alloc::string::String, + /// The name of the header where the JWT is sent in, default is authorization. + #[prost(string, tag="4")] + pub header_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OAuthConfig { + /// Client id generated by the identity provider. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// The endpoint where ZITADEL send the user to authenticate. + #[prost(string, tag="2")] + pub authorization_endpoint: ::prost::alloc::string::String, + /// The endpoint where ZITADEL can get the token. + #[prost(string, tag="3")] + pub token_endpoint: ::prost::alloc::string::String, + /// The endpoint where ZITADEL can get the user information. + #[prost(string, tag="4")] + pub user_endpoint: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request on the identity provider. + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Defines how the attribute is called where ZITADEL can get the id of the user. + #[prost(string, tag="6")] + pub id_attribute: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenericOidcConfig { + /// The OIDC issuer of the identity provider. + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + /// Client id generated by the identity provider. + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request on the identity provider. + #[prost(string, repeated, tag="3")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// If true, provider information get mapped from the id token, not from the userinfo endpoint. + #[prost(bool, tag="4")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitHubConfig { + /// The client ID of the GitHub App. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to GitHub. + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitHubEnterpriseServerConfig { + /// The client ID of the GitHub App. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub user_endpoint: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to GitHub. + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GoogleConfig { + /// Client id of the Google application. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to Google. + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitLabConfig { + /// Client id of the GitLab application. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to GitLab. + #[prost(string, repeated, tag="2")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GitLabSelfHostedConfig { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + /// Client id of the GitLab application. + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to GitLab. + #[prost(string, repeated, tag="3")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapConfig { + #[prost(string, repeated, tag="1")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="2")] + pub start_tls: bool, + #[prost(string, tag="3")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="7")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="9")] + pub attributes: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SamlConfig { + /// Metadata of the SAML identity provider. + #[prost(bytes="vec", tag="1")] + pub metadata_xml: ::prost::alloc::vec::Vec, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="SamlBinding", tag="2")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed. + #[prost(bool, tag="3")] + pub with_signed_request: bool, + /// `nameid-format` for the SAML Request. + #[prost(enumeration="SamlNameIdFormat", tag="4")] + pub name_id_format: i32, + /// Optional name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="5")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AzureAdConfig { + /// Client id of the Azure AD application + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// Defines what user accounts should be able to login (Personal, Organizational, All). + #[prost(message, optional, tag="2")] + pub tenant: ::core::option::Option, + /// Azure AD doesn't send if the email has been verified. Enable this if the user email should always be added verified in ZITADEL (no verification emails will be sent). + #[prost(bool, tag="3")] + pub email_verified: bool, + /// The scopes requested by ZITADEL during the request to Azure AD. + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Options { + /// Enable if users should be able to link an existing ZITADEL user with an external account. + #[prost(bool, tag="1")] + pub is_linking_allowed: bool, + /// Enable if users should be able to create a new account in ZITADEL when using an external account. + #[prost(bool, tag="2")] + pub is_creation_allowed: bool, + /// Enable if a new account in ZITADEL should be created automatically when login with an external account. + #[prost(bool, tag="3")] + pub is_auto_creation: bool, + /// Enable if a the ZITADEL account fields should be updated automatically on each login. + #[prost(bool, tag="4")] + pub is_auto_update: bool, + /// Enable if users should get prompted to link an existing ZITADEL user to an external account if the selected attribute matches. + #[prost(enumeration="AutoLinkingOption", tag="5")] + pub auto_linking: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapAttributes { + #[prost(string, tag="1")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub first_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub last_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub nick_name_attribute: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub preferred_username_attribute: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub email_attribute: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub email_verified_attribute: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub phone_attribute: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub phone_verified_attribute: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub preferred_language_attribute: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub avatar_url_attribute: ::prost::alloc::string::String, + #[prost(string, tag="13")] + pub profile_attribute: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AzureAdTenant { + #[prost(oneof="azure_ad_tenant::Type", tags="1, 2")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `AzureADTenant`. +pub mod azure_ad_tenant { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(enumeration="super::AzureAdTenantType", tag="1")] + TenantType(i32), + #[prost(string, tag="2")] + TenantId(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AppleConfig { + /// Client id (App ID or Service ID) provided by Apple. + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + /// Team ID provided by Apple. + #[prost(string, tag="2")] + pub team_id: ::prost::alloc::string::String, + /// ID of the private key generated by Apple. + #[prost(string, tag="3")] + pub key_id: ::prost::alloc::string::String, + /// The scopes requested by ZITADEL during the request to Apple. + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Removed = 3, + Migrated = 4, +} +impl IdpState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpState::Unspecified => "IDP_STATE_UNSPECIFIED", + IdpState::Active => "IDP_STATE_ACTIVE", + IdpState::Inactive => "IDP_STATE_INACTIVE", + IdpState::Removed => "IDP_STATE_REMOVED", + IdpState::Migrated => "IDP_STATE_MIGRATED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_STATE_ACTIVE" => Some(Self::Active), + "IDP_STATE_INACTIVE" => Some(Self::Inactive), + "IDP_STATE_REMOVED" => Some(Self::Removed), + "IDP_STATE_MIGRATED" => Some(Self::Migrated), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdpType { + Unspecified = 0, + Oidc = 1, + Jwt = 2, + Ldap = 3, + Oauth = 4, + AzureAd = 5, + Github = 6, + GithubEs = 7, + Gitlab = 8, + GitlabSelfHosted = 9, + Google = 10, + Apple = 11, + Saml = 12, +} +impl IdpType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdpType::Unspecified => "IDP_TYPE_UNSPECIFIED", + IdpType::Oidc => "IDP_TYPE_OIDC", + IdpType::Jwt => "IDP_TYPE_JWT", + IdpType::Ldap => "IDP_TYPE_LDAP", + IdpType::Oauth => "IDP_TYPE_OAUTH", + IdpType::AzureAd => "IDP_TYPE_AZURE_AD", + IdpType::Github => "IDP_TYPE_GITHUB", + IdpType::GithubEs => "IDP_TYPE_GITHUB_ES", + IdpType::Gitlab => "IDP_TYPE_GITLAB", + IdpType::GitlabSelfHosted => "IDP_TYPE_GITLAB_SELF_HOSTED", + IdpType::Google => "IDP_TYPE_GOOGLE", + IdpType::Apple => "IDP_TYPE_APPLE", + IdpType::Saml => "IDP_TYPE_SAML", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDP_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "IDP_TYPE_OIDC" => Some(Self::Oidc), + "IDP_TYPE_JWT" => Some(Self::Jwt), + "IDP_TYPE_LDAP" => Some(Self::Ldap), + "IDP_TYPE_OAUTH" => Some(Self::Oauth), + "IDP_TYPE_AZURE_AD" => Some(Self::AzureAd), + "IDP_TYPE_GITHUB" => Some(Self::Github), + "IDP_TYPE_GITHUB_ES" => Some(Self::GithubEs), + "IDP_TYPE_GITLAB" => Some(Self::Gitlab), + "IDP_TYPE_GITLAB_SELF_HOSTED" => Some(Self::GitlabSelfHosted), + "IDP_TYPE_GOOGLE" => Some(Self::Google), + "IDP_TYPE_APPLE" => Some(Self::Apple), + "IDP_TYPE_SAML" => Some(Self::Saml), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SamlBinding { + Unspecified = 0, + Post = 1, + Redirect = 2, + Artifact = 3, +} +impl SamlBinding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SamlBinding::Unspecified => "SAML_BINDING_UNSPECIFIED", + SamlBinding::Post => "SAML_BINDING_POST", + SamlBinding::Redirect => "SAML_BINDING_REDIRECT", + SamlBinding::Artifact => "SAML_BINDING_ARTIFACT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SAML_BINDING_UNSPECIFIED" => Some(Self::Unspecified), + "SAML_BINDING_POST" => Some(Self::Post), + "SAML_BINDING_REDIRECT" => Some(Self::Redirect), + "SAML_BINDING_ARTIFACT" => Some(Self::Artifact), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SamlNameIdFormat { + Unspecified = 0, + EmailAddress = 1, + Persistent = 2, + Transient = 3, +} +impl SamlNameIdFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SamlNameIdFormat::Unspecified => "SAML_NAME_ID_FORMAT_UNSPECIFIED", + SamlNameIdFormat::EmailAddress => "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS", + SamlNameIdFormat::Persistent => "SAML_NAME_ID_FORMAT_PERSISTENT", + SamlNameIdFormat::Transient => "SAML_NAME_ID_FORMAT_TRANSIENT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SAML_NAME_ID_FORMAT_UNSPECIFIED" => Some(Self::Unspecified), + "SAML_NAME_ID_FORMAT_EMAIL_ADDRESS" => Some(Self::EmailAddress), + "SAML_NAME_ID_FORMAT_PERSISTENT" => Some(Self::Persistent), + "SAML_NAME_ID_FORMAT_TRANSIENT" => Some(Self::Transient), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AutoLinkingOption { + /// AUTO_LINKING_OPTION_UNSPECIFIED disables the auto linking prompt. + Unspecified = 0, + /// AUTO_LINKING_OPTION_USERNAME will use the username of the external user to check for a corresponding ZITADEL user. + Username = 1, + /// AUTO_LINKING_OPTION_EMAIL will use the email of the external user to check for a corresponding ZITADEL user with the same verified email + /// Note that in case multiple users match, no prompt will be shown. + Email = 2, +} +impl AutoLinkingOption { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AutoLinkingOption::Unspecified => "AUTO_LINKING_OPTION_UNSPECIFIED", + AutoLinkingOption::Username => "AUTO_LINKING_OPTION_USERNAME", + AutoLinkingOption::Email => "AUTO_LINKING_OPTION_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTO_LINKING_OPTION_UNSPECIFIED" => Some(Self::Unspecified), + "AUTO_LINKING_OPTION_USERNAME" => Some(Self::Username), + "AUTO_LINKING_OPTION_EMAIL" => Some(Self::Email), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AzureAdTenantType { + Common = 0, + Organisations = 1, + Consumers = 2, +} +impl AzureAdTenantType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AzureAdTenantType::Common => "AZURE_AD_TENANT_TYPE_COMMON", + AzureAdTenantType::Organisations => "AZURE_AD_TENANT_TYPE_ORGANISATIONS", + AzureAdTenantType::Consumers => "AZURE_AD_TENANT_TYPE_CONSUMERS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AZURE_AD_TENANT_TYPE_COMMON" => Some(Self::Common), + "AZURE_AD_TENANT_TYPE_ORGANISATIONS" => Some(Self::Organisations), + "AZURE_AD_TENANT_TYPE_CONSUMERS" => Some(Self::Consumers), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdpByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdpByIdResponse { + #[prost(message, optional, tag="1")] + pub idp: ::core::option::Option, +} +include!("zitadel.idp.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.idp.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.idp.v2.tonic.rs new file mode 100644 index 0000000..ab6743b --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.idp.v2.tonic.rs @@ -0,0 +1,120 @@ +// @generated +/// Generated client implementations. +pub mod identity_provider_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 IdentityProviderServiceClient { + inner: tonic::client::Grpc, + } + impl IdentityProviderServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl IdentityProviderServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> IdentityProviderServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + IdentityProviderServiceClient::new( + InterceptedService::new(inner, interceptor), + ) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_idp_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.idp.v2.IdentityProviderService/GetIDPByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.idp.v2.IdentityProviderService", + "GetIDPByID", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.instance.v1.rs b/crates/zitadel-gen/src/api/zitadel.instance.v1.rs new file mode 100644 index 0000000..9ca46bd --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.instance.v1.rs @@ -0,0 +1,243 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Instance { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="State", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub version: ::prost::alloc::string::String, + #[prost(message, repeated, tag="6")] + pub domains: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstanceDetail { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="State", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub version: ::prost::alloc::string::String, + #[prost(message, repeated, tag="6")] + pub domains: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Query { + #[prost(oneof="query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `Query`. +pub mod query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdQuery(super::IdsQuery), + #[prost(message, tag="2")] + DomainQuery(super::DomainsQuery), + } +} +/// IdQuery always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdsQuery { + #[prost(string, repeated, tag="1")] + pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainsQuery { + #[prost(string, repeated, tag="1")] + pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Domain { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub primary: bool, + #[prost(bool, tag="4")] + pub generated: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainSearchQuery { + #[prost(oneof="domain_search_query::Query", tags="1, 2, 3")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `DomainSearchQuery`. +pub mod domain_search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + DomainQuery(super::DomainQuery), + #[prost(message, tag="2")] + GeneratedQuery(super::DomainGeneratedQuery), + #[prost(message, tag="3")] + PrimaryQuery(super::DomainPrimaryQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainQuery { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +/// DomainGeneratedQuery is always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DomainGeneratedQuery { + #[prost(bool, tag="1")] + pub generated: bool, +} +/// DomainPrimaryQuery is always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DomainPrimaryQuery { + #[prost(bool, tag="1")] + pub primary: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrustedDomain { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TrustedDomainSearchQuery { + #[prost(oneof="trusted_domain_search_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `TrustedDomainSearchQuery`. +pub mod trusted_domain_search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + DomainQuery(super::DomainQuery), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum State { + Unspecified = 0, + Creating = 1, + Running = 2, + Stopping = 3, + Stopped = 4, +} +impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Creating => "STATE_CREATING", + State::Running => "STATE_RUNNING", + State::Stopping => "STATE_STOPPING", + State::Stopped => "STATE_STOPPED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STATE_UNSPECIFIED" => Some(Self::Unspecified), + "STATE_CREATING" => Some(Self::Creating), + "STATE_RUNNING" => Some(Self::Running), + "STATE_STOPPING" => Some(Self::Stopping), + "STATE_STOPPED" => Some(Self::Stopped), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FieldName { + Unspecified = 0, + Id = 1, + Name = 2, + CreationDate = 3, +} +impl FieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FieldName::Unspecified => "FIELD_NAME_UNSPECIFIED", + FieldName::Id => "FIELD_NAME_ID", + FieldName::Name => "FIELD_NAME_NAME", + FieldName::CreationDate => "FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "FIELD_NAME_ID" => Some(Self::Id), + "FIELD_NAME_NAME" => Some(Self::Name), + "FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum DomainFieldName { + Unspecified = 0, + Domain = 1, + Primary = 2, + Generated = 3, + CreationDate = 4, +} +impl DomainFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DomainFieldName::Unspecified => "DOMAIN_FIELD_NAME_UNSPECIFIED", + DomainFieldName::Domain => "DOMAIN_FIELD_NAME_DOMAIN", + DomainFieldName::Primary => "DOMAIN_FIELD_NAME_PRIMARY", + DomainFieldName::Generated => "DOMAIN_FIELD_NAME_GENERATED", + DomainFieldName::CreationDate => "DOMAIN_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DOMAIN_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "DOMAIN_FIELD_NAME_DOMAIN" => Some(Self::Domain), + "DOMAIN_FIELD_NAME_PRIMARY" => Some(Self::Primary), + "DOMAIN_FIELD_NAME_GENERATED" => Some(Self::Generated), + "DOMAIN_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.management.v1.rs b/crates/zitadel-gen/src/api/zitadel.management.v1.rs new file mode 100644 index 0000000..f808a57 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.management.v1.rs @@ -0,0 +1,5252 @@ +// @generated +// This file is @generated by prost-build. +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzRequest { +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzResponse { +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetOidcInformationRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOidcInformationResponse { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub discovery_endpoint: ::prost::alloc::string::String, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetIamRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIamResponse { + /// deprecated: use default_org_id instead + #[prost(string, tag="1")] + pub global_org_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub iam_project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub default_org_id: ::prost::alloc::string::String, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSupportedLanguagesResponse { + #[prost(string, repeated, tag="1")] + pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdResponse { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByLoginNameGlobalRequest { + #[prost(string, tag="1")] + pub login_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByLoginNameGlobalResponse { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::user::v1::UserFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::user::v1::UserFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserChangesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IsUserUniqueRequest { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub email: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IsUserUniqueResponse { + #[prost(bool, tag="1")] + pub is_unique: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserRequest { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, + #[prost(string, tag="5")] + pub initial_password: ::prost::alloc::string::String, +} +/// Nested message and enum types in `AddHumanUserRequest`. +pub mod add_human_user_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::super::user::v1::Gender", tag="6")] + pub gender: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Phone { + /// has to be a global number + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_phone_verified: bool, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserResponse { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +/// Describe my Import Human User Request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportHumanUserRequest { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, + #[prost(string, tag="5")] + pub password: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub hashed_password: ::core::option::Option, + #[prost(bool, tag="7")] + pub password_change_required: bool, + #[prost(bool, tag="8")] + pub request_passwordless_registration: bool, + #[prost(string, tag="9")] + pub otp_code: ::prost::alloc::string::String, + #[prost(message, repeated, tag="10")] + pub idps: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `ImportHumanUserRequest`. +pub mod import_human_user_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::super::user::v1::Gender", tag="6")] + pub gender: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Phone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_phone_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct HashedPassword { + #[prost(string, tag="1")] + pub value: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Idp { + #[prost(string, tag="1")] + pub config_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub external_user_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub display_name: ::prost::alloc::string::String, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportHumanUserResponse { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub passwordless_registration: ::core::option::Option, +} +/// Nested message and enum types in `ImportHumanUserResponse`. +pub mod import_human_user_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct PasswordlessRegistration { + #[prost(string, tag="1")] + pub link: ::prost::alloc::string::String, + /// deprecated: use expiration instead + #[prost(message, optional, tag="2")] + pub lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="3")] + pub expiration: ::core::option::Option<::pbjson_types::Duration>, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMachineUserRequest { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description: ::prost::alloc::string::String, + #[prost(enumeration="super::super::user::v1::AccessTokenType", tag="4")] + pub access_token_type: i32, + /// optionally set your own id unique for the user. + #[prost(string, optional, tag="5")] + pub user_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMachineUserResponse { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateUserNameRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateUserNameResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserMetadataResponse { + #[prost(message, optional, tag="1")] + pub metadata: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="3")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUserMetadataResponse { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub metadata: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `BulkSetUserMetadataRequest`. +pub mod bulk_set_user_metadata_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Metadata { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetUserMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveUserMetadataRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveUserMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanProfileRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanProfileResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanProfileRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::user::v1::Gender", tag="7")] + pub gender: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanProfileResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub is_email_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanInitializationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub email: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanInitializationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanEmailVerificationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanEmailVerificationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetHumanPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub is_phone_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanPhoneVerificationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendHumanPhoneVerificationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAvatarRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAvatarResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanInitialPasswordRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanInitialPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanPasswordRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub no_change_required: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendHumanResetPasswordNotificationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(enumeration="send_human_reset_password_notification_request::Type", tag="2")] + pub r#type: i32, +} +/// Nested message and enum types in `SendHumanResetPasswordNotificationRequest`. +pub mod send_human_reset_password_notification_request { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Type { + Email = 0, + Sms = 1, + } + impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Email => "TYPE_EMAIL", + Type::Sms => "TYPE_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TYPE_EMAIL" => Some(Self::Email), + "TYPE_SMS" => Some(Self::Sms), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendHumanResetPasswordNotificationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanAuthFactorsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanAuthFactorsResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorU2fRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpsmsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanAuthFactorOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanPasswordlessRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanPasswordlessResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddPasswordlessRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddPasswordlessRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub link: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub expiration: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasswordlessRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasswordlessRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanPasswordlessRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanPasswordlessResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMachineRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::user::v1::AccessTokenType", tag="4")] + pub access_token_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMachineResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenerateMachineSecretRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenerateMachineSecretResponse { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_secret: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMachineSecretRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMachineSecretResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMachineKeyByIDsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMachineKeyByIDsResponse { + #[prost(message, optional, tag="1")] + pub key: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMachineKeysRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListMachineKeysResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMachineKeyRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::authn::v1::KeyType", tag="2")] + pub r#type: i32, + #[prost(message, optional, tag="3")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bytes="vec", tag="4")] + pub public_key: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMachineKeyResponse { + #[prost(string, tag="1")] + pub key_id: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub key_details: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="3")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMachineKeyRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub key_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMachineKeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPersonalAccessTokenByIDsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPersonalAccessTokenByIDsResponse { + #[prost(message, optional, tag="1")] + pub token: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPersonalAccessTokensRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPersonalAccessTokensResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddPersonalAccessTokenRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddPersonalAccessTokenResponse { + #[prost(string, tag="1")] + pub token_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePersonalAccessTokenRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub token_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePersonalAccessTokenResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanLinkedIdPsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListHumanLinkedIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanLinkedIdpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub linked_user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveHumanLinkedIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserMembershipsRequest { + /// list limitations and ordering + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// the field the result is sorted + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserMembershipsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetMyOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetMyOrgResponse { + #[prost(message, optional, tag="1")] + pub org: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgByDomainGlobalRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListOrgChangesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgByDomainGlobalResponse { + #[prost(message, optional, tag="1")] + pub org: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgResponse { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DeactivateOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReactivateOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveOrgRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgDomainsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgDomainsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenerateOrgDomainValidationRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(enumeration="super::super::org::v1::DomainValidationType", tag="2")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenerateOrgDomainValidationResponse { + #[prost(string, tag="1")] + pub token: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidateOrgDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidateOrgDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPrimaryOrgDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPrimaryOrgDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListOrgMemberRolesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgMemberRolesResponse { + #[prost(string, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgMembersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgMembersResponse { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgMemberRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgMetadataRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub metadata: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrgMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetOrgMetadataRequest { + #[prost(message, repeated, tag="1")] + pub metadata: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `BulkSetOrgMetadataRequest`. +pub mod bulk_set_org_metadata_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Metadata { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgMetadataRequest { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveOrgMetadataRequest { + #[prost(string, repeated, tag="1")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveOrgMetadataResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProjectByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProjectByIdResponse { + #[prost(message, optional, tag="1")] + pub project: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetGrantedProjectByIdRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetGrantedProjectByIdResponse { + #[prost(message, optional, tag="1")] + pub granted_project: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListGrantedProjectsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListGrantedProjectsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectChangesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub project_role_assertion: bool, + #[prost(bool, tag="3")] + pub project_role_check: bool, + #[prost(bool, tag="4")] + pub has_project_check: bool, + #[prost(enumeration="super::super::project::v1::PrivateLabelingSetting", tag="5")] + pub private_labeling_setting: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectResponse { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub project_role_assertion: bool, + #[prost(bool, tag="4")] + pub project_role_check: bool, + #[prost(bool, tag="5")] + pub has_project_check: bool, + #[prost(enumeration="super::super::project::v1::PrivateLabelingSetting", tag="6")] + pub private_labeling_setting: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateProjectRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateProjectResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateProjectRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateProjectResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListProjectMemberRolesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectMemberRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectRoleRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub role_key: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub group: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectRoleResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkAddProjectRolesRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub roles: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `BulkAddProjectRolesRequest`. +pub mod bulk_add_project_roles_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Role { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub group: ::prost::alloc::string::String, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkAddProjectRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectRoleRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub role_key: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub group: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectRoleResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectRoleRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub role_key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectRoleResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectRolesRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListGrantedProjectRolesRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="3")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="4")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListGrantedProjectRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectMembersRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectMembersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAppByIdRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAppByIdResponse { + #[prost(message, optional, tag="1")] + pub app: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppsRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppChangesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOidcAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::app::v1::OidcResponseType", repeated, packed="false", tag="4")] + pub response_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="super::super::app::v1::OidcGrantType", repeated, packed="false", tag="5")] + pub grant_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="super::super::app::v1::OidcAppType", tag="6")] + pub app_type: i32, + #[prost(enumeration="super::super::app::v1::OidcAuthMethodType", tag="7")] + pub auth_method_type: i32, + #[prost(string, repeated, tag="8")] + pub post_logout_redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::app::v1::OidcVersion", tag="9")] + pub version: i32, + #[prost(bool, tag="10")] + pub dev_mode: bool, + #[prost(enumeration="super::super::app::v1::OidcTokenType", tag="11")] + pub access_token_type: i32, + #[prost(bool, tag="12")] + pub access_token_role_assertion: bool, + #[prost(bool, tag="13")] + pub id_token_role_assertion: bool, + #[prost(bool, tag="14")] + pub id_token_userinfo_assertion: bool, + #[prost(message, optional, tag="15")] + pub clock_skew: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, repeated, tag="16")] + pub additional_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="17")] + pub skip_native_app_success_page: bool, + #[prost(string, tag="18")] + pub back_channel_logout_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="19")] + pub login_version: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOidcAppResponse { + #[prost(string, tag="1")] + pub app_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(bool, tag="5")] + pub none_compliant: bool, + #[prost(message, repeated, tag="6")] + pub compliance_problems: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(oneof="add_saml_app_request::Metadata", tags="3, 4")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `AddSAMLAppRequest`. +pub mod add_saml_app_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + #[prost(bytes, tag="3")] + MetadataXml(::prost::alloc::vec::Vec), + #[prost(string, tag="4")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlAppResponse { + #[prost(string, tag="1")] + pub app_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddApiAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::app::v1::ApiAuthMethodType", tag="3")] + pub auth_method_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddApiAppResponse { + #[prost(string, tag="1")] + pub app_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOidcAppConfigRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::app::v1::OidcResponseType", repeated, packed="false", tag="4")] + pub response_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="super::super::app::v1::OidcGrantType", repeated, packed="false", tag="5")] + pub grant_types: ::prost::alloc::vec::Vec, + #[prost(enumeration="super::super::app::v1::OidcAppType", tag="6")] + pub app_type: i32, + #[prost(enumeration="super::super::app::v1::OidcAuthMethodType", tag="7")] + pub auth_method_type: i32, + #[prost(string, repeated, tag="8")] + pub post_logout_redirect_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="9")] + pub dev_mode: bool, + #[prost(enumeration="super::super::app::v1::OidcTokenType", tag="10")] + pub access_token_type: i32, + #[prost(bool, tag="11")] + pub access_token_role_assertion: bool, + #[prost(bool, tag="12")] + pub id_token_role_assertion: bool, + #[prost(bool, tag="13")] + pub id_token_userinfo_assertion: bool, + #[prost(message, optional, tag="14")] + pub clock_skew: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, repeated, tag="15")] + pub additional_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="16")] + pub skip_native_app_success_page: bool, + #[prost(string, tag="17")] + pub back_channel_logout_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="18")] + pub login_version: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOidcAppConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlAppConfigRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(oneof="update_saml_app_config_request::Metadata", tags="3, 4")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSAMLAppConfigRequest`. +pub mod update_saml_app_config_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + #[prost(bytes, tag="3")] + MetadataXml(::prost::alloc::vec::Vec), + #[prost(string, tag="4")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlAppConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateApiAppConfigRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::app::v1::ApiAuthMethodType", tag="7")] + pub auth_method_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateApiAppConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateAppResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateAppResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveAppRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveAppResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateOidcClientSecretRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateOidcClientSecretResponse { + #[prost(string, tag="1")] + pub client_secret: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateApiClientSecretRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateApiClientSecretResponse { + #[prost(string, tag="1")] + pub client_secret: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAppKeyRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub key_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAppKeyResponse { + #[prost(message, optional, tag="1")] + pub key: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppKeysRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub project_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAppKeysResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppKeyRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::authn::v1::KeyType", tag="3")] + pub r#type: i32, + #[prost(message, optional, tag="4")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppKeyResponse { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(bytes="vec", tag="3")] + pub key_details: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveAppKeyRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub key_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveAppKeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantChangesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantChangesResponse { + /// zitadel.v1.ListDetails details = 1; was always returned empty (as we cannot get the necessary info) + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProjectGrantByIdRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProjectGrantByIdResponse { + #[prost(message, optional, tag="1")] + pub project_grant: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantsRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAllProjectGrantsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAllProjectGrantsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectGrantRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub granted_org_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectGrantResponse { + #[prost(string, tag="1")] + pub grant_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectGrantRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateProjectGrantRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateProjectGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateProjectGrantRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateProjectGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectGrantRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantMemberRolesRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantMemberRolesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantMembersRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="3")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="4")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProjectGrantMembersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectGrantMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddProjectGrantMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectGrantMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateProjectGrantMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectGrantMemberRequest { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveProjectGrantMemberResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserGrantByIdRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserGrantByIdResponse { + #[prost(message, optional, tag="1")] + pub user_grant: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserGrantRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUserGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddUserGrantRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub project_grant_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddUserGrantResponse { + #[prost(string, tag="1")] + pub user_grant_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateUserGrantRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateUserGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserGrantRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserGrantRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserGrantRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUserGrantResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkRemoveUserGrantRequest { + #[prost(string, repeated, tag="1")] + pub grant_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct BulkRemoveUserGrantResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetOrgIamPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgIamPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDomainPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLoginPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.LoginPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomLoginPolicyRequest { + #[prost(bool, tag="1")] + pub allow_username_password: bool, + #[prost(bool, tag="2")] + pub allow_register: bool, + #[prost(bool, tag="3")] + pub allow_external_idp: bool, + #[prost(bool, tag="4")] + pub force_mfa: bool, + #[prost(enumeration="super::super::policy::v1::PasswordlessType", tag="5")] + pub passwordless_type: i32, + #[prost(bool, tag="6")] + pub hide_password_reset: bool, + #[prost(bool, tag="7")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="8")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="10")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(enumeration="super::super::policy::v1::SecondFactorType", repeated, tag="14")] + pub second_factors: ::prost::alloc::vec::Vec, + #[prost(enumeration="super::super::policy::v1::MultiFactorType", repeated, tag="15")] + pub multi_factors: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="16")] + pub idps: ::prost::alloc::vec::Vec, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="17")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="18")] + pub disable_login_with_email: bool, + #[prost(bool, tag="19")] + pub disable_login_with_phone: bool, + #[prost(bool, tag="20")] + pub force_mfa_local_only: bool, +} +/// Nested message and enum types in `AddCustomLoginPolicyRequest`. +pub mod add_custom_login_policy_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Idp { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::super::idp::v1::IdpOwnerType", tag="2")] + pub owner_type: i32, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomLoginPolicyRequest { + #[prost(bool, tag="1")] + pub allow_username_password: bool, + #[prost(bool, tag="2")] + pub allow_register: bool, + #[prost(bool, tag="3")] + pub allow_external_idp: bool, + #[prost(bool, tag="4")] + pub force_mfa: bool, + #[prost(enumeration="super::super::policy::v1::PasswordlessType", tag="5")] + pub passwordless_type: i32, + #[prost(bool, tag="6")] + pub hide_password_reset: bool, + #[prost(bool, tag="7")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="8")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="10")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="14")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="15")] + pub disable_login_with_email: bool, + #[prost(bool, tag="16")] + pub disable_login_with_phone: bool, + #[prost(bool, tag="17")] + pub force_mfa_local_only: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetLoginPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetLoginPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyIdPsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpToLoginPolicyRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpOwnerType", tag="2")] + pub owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpFromLoginPolicyRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicySecondFactorsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicySecondFactorsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::policy::v1::SecondFactorType", repeated, packed="false", tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddSecondFactorToLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::SecondFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSecondFactorToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveSecondFactorFromLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::SecondFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveSecondFactorFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyMultiFactorsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListLoginPolicyMultiFactorsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::policy::v1::MultiFactorType", repeated, packed="false", tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddMultiFactorToLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::MultiFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddMultiFactorToLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveMultiFactorFromLoginPolicyRequest { + #[prost(enumeration="super::super::policy::v1::MultiFactorType", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveMultiFactorFromLoginPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexityPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.PasswordComplexityPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordComplexityPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddCustomPasswordComplexityPolicyRequest { + #[prost(uint64, tag="1")] + pub min_length: u64, + #[prost(bool, tag="2")] + pub has_uppercase: bool, + #[prost(bool, tag="3")] + pub has_lowercase: bool, + #[prost(bool, tag="4")] + pub has_number: bool, + #[prost(bool, tag="5")] + pub has_symbol: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateCustomPasswordComplexityPolicyRequest { + #[prost(uint64, tag="1")] + pub min_length: u64, + #[prost(bool, tag="2")] + pub has_uppercase: bool, + #[prost(bool, tag="3")] + pub has_lowercase: bool, + #[prost(bool, tag="4")] + pub has_number: bool, + #[prost(bool, tag="5")] + pub has_symbol: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomPasswordComplexityPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetPasswordComplexityPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetPasswordComplexityPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPasswordAgePolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.PasswordAgePolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordAgePolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddCustomPasswordAgePolicyRequest { + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint32, tag="1")] + pub max_age_days: u32, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint32, tag="2")] + pub expire_warn_days: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomPasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateCustomPasswordAgePolicyRequest { + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint32, tag="1")] + pub max_age_days: u32, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint32, tag="2")] + pub expire_warn_days: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomPasswordAgePolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetPasswordAgePolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetPasswordAgePolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLockoutPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.LockoutPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultLockoutPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddCustomLockoutPolicyRequest { + #[prost(uint32, tag="1")] + pub max_password_attempts: u32, + #[prost(uint32, tag="2")] + pub max_otp_attempts: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateCustomLockoutPolicyRequest { + #[prost(uint32, tag="1")] + pub max_password_attempts: u32, + #[prost(uint32, tag="2")] + pub max_otp_attempts: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomLockoutPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetLockoutPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetLockoutPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPrivacyPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultPrivacyPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomPrivacyPolicyRequest { + #[prost(string, tag="1")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub privacy_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub support_email: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomPrivacyPolicyRequest { + #[prost(string, tag="1")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub privacy_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub support_email: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomPrivacyPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetPrivacyPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetPrivacyPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetNotificationPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultNotificationPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AddCustomNotificationPolicyRequest { + #[prost(bool, tag="1")] + pub password_change: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UpdateCustomNotificationPolicyRequest { + #[prost(bool, tag="1")] + pub password_change: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomNotificationPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetNotificationPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetNotificationPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.LabelPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetPreviewLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPreviewLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, + /// deprecated: is_default is also defined in zitadel.policy.v1.LabelPolicy + #[prost(bool, tag="2")] + pub is_default: bool, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetDefaultLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub policy: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomLabelPolicyRequest { + #[prost(string, tag="1")] + pub primary_color: ::prost::alloc::string::String, + /// hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set + #[prost(bool, tag="3")] + pub hide_login_name_suffix: bool, + #[prost(string, tag="4")] + pub warn_color: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub background_color: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub font_color: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub primary_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub background_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub warn_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub font_color_dark: ::prost::alloc::string::String, + #[prost(bool, tag="11")] + pub disable_watermark: bool, + #[prost(enumeration="super::super::policy::v1::ThemeMode", tag="12")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomLabelPolicyRequest { + #[prost(string, tag="1")] + pub primary_color: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub hide_login_name_suffix: bool, + #[prost(string, tag="4")] + pub warn_color: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub background_color: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub font_color: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub primary_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub background_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub warn_color_dark: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub font_color_dark: ::prost::alloc::string::String, + #[prost(bool, tag="11")] + pub disable_watermark: bool, + #[prost(enumeration="super::super::policy::v1::ThemeMode", tag="12")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateCustomLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ActivateCustomLabelPolicyRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateCustomLabelPolicyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyLogoRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyLogoResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyLogoDarkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyLogoDarkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyIconRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyIconResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyIconDarkRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyIconDarkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyFontRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveCustomLabelPolicyFontResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ResetLabelPolicyToDefaultRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetLabelPolicyToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomInitMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomInitMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInitMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInitMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomLoginTextsRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub select_account_text: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub login_text: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub password_text: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub username_change_text: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub username_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub init_password_text: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub init_password_done_text: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub email_verification_text: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub email_verification_done_text: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub initialize_user_text: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub initialize_done_text: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub init_mfa_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="14")] + pub init_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="15")] + pub init_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="16")] + pub init_mfa_done_text: ::core::option::Option, + #[prost(message, optional, tag="17")] + pub mfa_providers_text: ::core::option::Option, + #[prost(message, optional, tag="18")] + pub verify_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="19")] + pub verify_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="20")] + pub passwordless_text: ::core::option::Option, + #[prost(message, optional, tag="21")] + pub password_change_text: ::core::option::Option, + #[prost(message, optional, tag="22")] + pub password_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="23")] + pub password_reset_done_text: ::core::option::Option, + #[prost(message, optional, tag="24")] + pub registration_option_text: ::core::option::Option, + #[prost(message, optional, tag="25")] + pub registration_user_text: ::core::option::Option, + #[prost(message, optional, tag="26")] + pub registration_org_text: ::core::option::Option, + #[prost(message, optional, tag="27")] + pub linking_user_done_text: ::core::option::Option, + #[prost(message, optional, tag="28")] + pub external_user_not_found_text: ::core::option::Option, + #[prost(message, optional, tag="29")] + pub success_login_text: ::core::option::Option, + #[prost(message, optional, tag="30")] + pub logout_text: ::core::option::Option, + #[prost(message, optional, tag="31")] + pub footer_text: ::core::option::Option, + #[prost(message, optional, tag="32")] + pub passwordless_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="33")] + pub passwordless_registration_text: ::core::option::Option, + #[prost(message, optional, tag="34")] + pub passwordless_registration_done_text: ::core::option::Option, + #[prost(message, optional, tag="35")] + pub external_registration_user_overview_text: ::core::option::Option, + /// Deprecated: the linking user prompt screen no longer exists + #[deprecated] + #[prost(message, optional, tag="36")] + pub linking_user_prompt_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomLoginTextsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomLoginTextsToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomLoginTextsToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordResetMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordResetMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordResetMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordResetMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyEmailMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyEmailMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyPhoneMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyPhoneMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyPhoneMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyPhoneMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifySmsotpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifySmsotpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifySmsotpMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifySmsotpMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyEmailOtpMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomVerifyEmailOtpMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailOtpMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomVerifyEmailOtpMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomDomainClaimedMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomDomainClaimedMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainClaimedMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomDomainClaimedMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordlessRegistrationMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordlessRegistrationMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordChangeMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomPasswordChangeMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordChangeMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomPasswordChangeMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCustomInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDefaultInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub custom_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomInviteUserMessageTextRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetCustomInviteUserMessageTextResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInviteUserMessageTextToDefaultRequest { + #[prost(string, tag="1")] + pub language: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetCustomInviteUserMessageTextToDefaultResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgIdpByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrgIdpByIdResponse { + #[prost(message, optional, tag="1")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgIdPsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::idp::v1::IdpFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpQuery { + #[prost(oneof="idp_query::Query", tags="1, 2, 3")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `IDPQuery`. +pub mod idp_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdpIdQuery(super::super::super::idp::v1::IdpidQuery), + #[prost(message, tag="2")] + IdpNameQuery(super::super::super::idp::v1::IdpNameQuery), + #[prost(message, tag="3")] + OwnerTypeQuery(super::super::super::idp::v1::IdpOwnerTypeQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrgIdPsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::idp::v1::IdpFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgOidcidpRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="2")] + pub styling_type: i32, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="7")] + pub display_name_mapping: i32, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="8")] + pub username_mapping: i32, + #[prost(bool, tag="9")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgOidcidpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgJwtidpRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="2")] + pub styling_type: i32, + #[prost(string, tag="3")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub header_name: ::prost::alloc::string::String, + #[prost(bool, tag="7")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrgJwtidpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateOrgIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateOrgIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateOrgIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateOrgIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOrgIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveOrgIdpResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::idp::v1::IdpStylingType", tag="3")] + pub styling_type: i32, + #[prost(bool, tag="4")] + pub auto_register: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpoidcConfigRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="6")] + pub display_name_mapping: i32, + #[prost(enumeration="super::super::idp::v1::OidcMappingField", tag="7")] + pub username_mapping: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpoidcConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpjwtConfigRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub header_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateOrgIdpjwtConfigResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProvidersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// criteria the client is looking for + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProviderQuery { + #[prost(oneof="provider_query::Query", tags="1, 2, 3")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `ProviderQuery`. +pub mod provider_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdpIdQuery(super::super::super::idp::v1::IdpidQuery), + #[prost(message, tag="2")] + IdpNameQuery(super::super::super::idp::v1::IdpNameQuery), + #[prost(message, tag="3")] + OwnerTypeQuery(super::super::super::idp::v1::IdpOwnerTypeQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProviderByIdRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProviderByIdResponse { + #[prost(message, optional, tag="1")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOAuthProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// identifying attribute of the user in the response of the user_endpoint + #[prost(string, tag="8")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOAuthProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOAuthProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// identifying attribute of the user in the response of the user_endpoint + #[prost(string, tag="9")] + pub id_attribute: ::prost::alloc::string::String, + #[prost(message, optional, tag="10")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOAuthProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, + #[prost(bool, tag="7")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="5")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, + #[prost(bool, tag="8")] + pub is_id_token_mapping: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MigrateGenericOidcProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(oneof="migrate_generic_oidc_provider_request::Template", tags="2, 3")] + pub template: ::core::option::Option, +} +/// Nested message and enum types in `MigrateGenericOIDCProviderRequest`. +pub mod migrate_generic_oidc_provider_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Template { + #[prost(message, tag="2")] + Azure(super::AddAzureAdProviderRequest), + #[prost(message, tag="3")] + Google(super::AddGoogleProviderRequest), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MigrateGenericOidcProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub header_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddJwtProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateJwtProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub jwt_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub keys_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub header_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateJwtProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAzureAdProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + /// if not provided the `common` tenant will be used + #[prost(message, optional, tag="4")] + pub tenant: ::core::option::Option, + #[prost(bool, tag="5")] + pub email_verified: bool, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAzureAdProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAzureAdProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + /// if not provided the `common` tenant will be used + #[prost(message, optional, tag="5")] + pub tenant: ::core::option::Option, + #[prost(bool, tag="6")] + pub email_verified: bool, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAzureAdProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubProviderRequest { + /// GitHub will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubEnterpriseServerProviderRequest { + #[prost(string, tag="1")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitHubEnterpriseServerProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubEnterpriseServerProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub authorization_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub token_endpoint: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_endpoint: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="9")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitHubEnterpriseServerProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabProviderRequest { + /// GitLab will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabSelfHostedProviderRequest { + #[prost(string, tag="1")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGitLabSelfHostedProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabSelfHostedProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="5")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGitLabSelfHostedProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGoogleProviderRequest { + /// Google will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="5")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddGoogleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGoogleProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + /// client_secret will only be updated if provided + #[prost(string, tag="4")] + pub client_secret: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateGoogleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddLdapProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="2")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="3")] + pub start_tls: bool, + #[prost(string, tag="4")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub bind_password: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="8")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="9")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="10")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub attributes: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddLdapProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLdapProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub servers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag="4")] + pub start_tls: bool, + #[prost(string, tag="5")] + pub base_dn: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub bind_dn: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub bind_password: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub user_base: ::prost::alloc::string::String, + #[prost(string, repeated, tag="9")] + pub user_object_classes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="10")] + pub user_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="11")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub attributes: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateLdapProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlProviderRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="super::super::idp::v1::SamlBinding", tag="4")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed. + #[prost(bool, tag="5")] + pub with_signed_request: bool, + #[prost(message, optional, tag="6")] + pub provider_options: ::core::option::Option, + /// Optionally specify the `nameid-format` requested. + #[prost(enumeration="super::super::idp::v1::SamlNameIdFormat", optional, tag="7")] + pub name_id_format: ::core::option::Option, + /// Optionally specify the name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="8")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(oneof="add_saml_provider_request::Metadata", tags="2, 3")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `AddSAMLProviderRequest`. +pub mod add_saml_provider_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + /// Metadata of the SAML identity provider. + #[prost(bytes, tag="2")] + MetadataXml(::prost::alloc::vec::Vec), + /// Url to the metadata of the SAML identity provider. + #[prost(string, tag="3")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddSamlProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + /// Binding which defines the type of communication with the identity provider. + #[prost(enumeration="super::super::idp::v1::SamlBinding", tag="5")] + pub binding: i32, + /// Boolean which defines if the authentication requests are signed. + #[prost(bool, tag="6")] + pub with_signed_request: bool, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, + /// Optionally specify the `nameid-format` requested. + #[prost(enumeration="super::super::idp::v1::SamlNameIdFormat", optional, tag="8")] + pub name_id_format: ::core::option::Option, + /// Optionally specify the name of the attribute, which will be used to map the user + /// in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`. + #[prost(string, optional, tag="9")] + pub transient_mapping_attribute_name: ::core::option::Option<::prost::alloc::string::String>, + /// Metadata of the SAML identity provider. + #[prost(oneof="update_saml_provider_request::Metadata", tags="3, 4")] + pub metadata: ::core::option::Option, +} +/// Nested message and enum types in `UpdateSAMLProviderRequest`. +pub mod update_saml_provider_request { + /// Metadata of the SAML identity provider. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Metadata { + #[prost(bytes, tag="3")] + MetadataXml(::prost::alloc::vec::Vec), + /// Url to the metadata of the SAML identity provider. + #[prost(string, tag="4")] + MetadataUrl(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateSamlProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateSamlProviderCertificateRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegenerateSamlProviderCertificateResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppleProviderRequest { + /// Apple will be used as default, if no name is provided + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub team_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub key_id: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="5")] + pub private_key: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="6")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="7")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddAppleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppleProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub team_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub key_id: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="6")] + pub private_key: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, optional, tag="8")] + pub provider_options: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateAppleProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteProviderRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteProviderResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListActionsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::action::v1::ActionFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActionQuery { + #[prost(oneof="action_query::Query", tags="1, 2, 3")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `ActionQuery`. +pub mod action_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + ActionIdQuery(super::super::super::action::v1::ActionIdQuery), + #[prost(message, tag="2")] + ActionNameQuery(super::super::super::action::v1::ActionNameQuery), + #[prost(message, tag="3")] + ActionStateQuery(super::super::super::action::v1::ActionStateQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListActionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::action::v1::ActionFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateActionRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub script: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, tag="4")] + pub allowed_to_fail: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateActionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActionRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActionResponse { + #[prost(message, optional, tag="1")] + pub action: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateActionRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub script: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, tag="5")] + pub allowed_to_fail: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateActionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteActionRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DeleteActionResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListFlowTypesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFlowTypesResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFlowTriggerTypesRequest { + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFlowTriggerTypesResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateActionRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateActionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateActionRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateActionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetFlowRequest { + /// id of the flow + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetFlowResponse { + #[prost(message, optional, tag="1")] + pub flow: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClearFlowRequest { + /// id of the flow + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClearFlowResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTriggerActionsRequest { + /// id of the flow type. + /// Following flows are currently allowed: + /// - External Authentication: FLOW_TYPE_EXTERNAL_AUTHENTICATION or 1 + /// - Internal Authentication: 3 + /// - Complement Token: 2 + /// - Complement SAML Response: 4 + #[prost(string, tag="1")] + pub flow_type: ::prost::alloc::string::String, + /// id of the trigger type. + /// Following triggers are currently allowed: + /// - External Authentication: + /// - Post Authentication: TRIGGER_TYPE_POST_AUTHENTICATION or 1 + /// - Pre Creation: TRIGGER_TYPE_PRE_CREATION or 2 + /// - Post Creation: TRIGGER_TYPE_POST_CREATION or 3 + /// - Internal Authentication: + /// - Post Authentication: TRIGGER_TYPE_POST_AUTHENTICATION or 1 + /// - Pre Creation: TRIGGER_TYPE_PRE_CREATION or 2 + /// - Post Creation: TRIGGER_TYPE_POST_CREATION or 3 + /// - Complement Token: + /// - Pre Userinfo Creation: 4 + /// - Pre Access Token Creation: 5 + /// - Complement SAML Response: + /// - Pre SAML Response Creation: 6 + #[prost(string, tag="2")] + pub trigger_type: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub action_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTriggerActionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.management.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.management.v1.tonic.rs b/crates/zitadel-gen/src/api/zitadel.management.v1.tonic.rs new file mode 100644 index 0000000..6ae06b2 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.management.v1.tonic.rs @@ -0,0 +1,9066 @@ +// @generated +/// Generated client implementations. +pub mod management_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 ManagementServiceClient { + inner: tonic::client::Grpc, + } + impl ManagementServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ManagementServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ManagementServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ManagementServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 healthz( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/Healthz", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.management.v1.ManagementService", "Healthz"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_oidc_information( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetOIDCInformation", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetOIDCInformation", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_iam( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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.management.v1.ManagementService/GetIAM", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.management.v1.ManagementService", "GetIAM"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_supported_languages( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetSupportedLanguages", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetSupportedLanguages", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetUserByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetUserByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_by_login_name_global( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetUserByLoginNameGlobal", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetUserByLoginNameGlobal", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_users( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListUsers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListUsers", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_user_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListUserChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListUserChanges", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn is_user_unique( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/IsUserUnique", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "IsUserUnique", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_human_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddHumanUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn import_human_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ImportHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ImportHumanUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_machine_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddMachineUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddMachineUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn lock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/LockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "LockUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn unlock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UnlockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UnlockUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_user_name( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateUserName", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateUserName", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_set_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkSetUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkSetUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_remove_user_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkRemoveUserMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkRemoveUserMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_human_profile( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetHumanProfile", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetHumanProfile", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_human_profile( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateHumanProfile", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateHumanProfile", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_human_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetHumanEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetHumanEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_human_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateHumanEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateHumanEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_human_initialization( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResendHumanInitialization", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResendHumanInitialization", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_human_email_verification( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResendHumanEmailVerification", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResendHumanEmailVerification", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_human_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetHumanPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetHumanPhone", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_human_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateHumanPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateHumanPhone", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanPhone", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_human_phone_verification( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResendHumanPhoneVerification", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResendHumanPhoneVerification", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_avatar( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanAvatar", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanAvatar", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_human_initial_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetHumanInitialPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetHumanInitialPassword", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_human_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetHumanPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetHumanPassword", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn send_human_reset_password_notification( + &mut self, + request: impl tonic::IntoRequest< + super::SendHumanResetPasswordNotificationRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SendHumanResetPasswordNotification", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SendHumanResetPasswordNotification", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_human_auth_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListHumanAuthFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListHumanAuthFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_auth_factor_otp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanAuthFactorOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanAuthFactorOTP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_auth_factor_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanAuthFactorU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanAuthFactorU2F", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_auth_factor_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanAuthFactorOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanAuthFactorOTPSMS", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_auth_factor_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanAuthFactorOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanAuthFactorOTPEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_human_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListHumanPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListHumanPasswordless", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_passwordless_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddPasswordlessRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddPasswordlessRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn send_passwordless_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SendPasswordlessRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SendPasswordlessRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_passwordless( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanPasswordless", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanPasswordless", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_machine( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateMachine", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateMachine", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn generate_machine_secret( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GenerateMachineSecret", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GenerateMachineSecret", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_machine_secret( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveMachineSecret", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveMachineSecret", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_machine_key_by_i_ds( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetMachineKeyByIDs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetMachineKeyByIDs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_machine_keys( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListMachineKeys", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListMachineKeys", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_machine_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddMachineKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddMachineKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_machine_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveMachineKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveMachineKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_personal_access_token_by_i_ds( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetPersonalAccessTokenByIDs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetPersonalAccessTokenByIDs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_personal_access_tokens( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListPersonalAccessTokens", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListPersonalAccessTokens", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_personal_access_token( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddPersonalAccessToken", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddPersonalAccessToken", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_personal_access_token( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemovePersonalAccessToken", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemovePersonalAccessToken", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_human_linked_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListHumanLinkedIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListHumanLinkedIDPs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_human_linked_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveHumanLinkedIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveHumanLinkedIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_user_memberships( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListUserMemberships", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListUserMemberships", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_my_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetMyOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetMyOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_by_domain_global( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetOrgByDomainGlobal", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetOrgByDomainGlobal", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgChanges", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, 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.management.v1.ManagementService/AddOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.management.v1.ManagementService", "AddOrg"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveOrg", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveOrg", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_set_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkSetOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkSetOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_remove_org_metadata( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkRemoveOrgMetadata", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkRemoveOrgMetadata", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_domains( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgDomains", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgDomains", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_org_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddOrgDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddOrgDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveOrgDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveOrgDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn generate_org_domain_validation( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GenerateOrgDomainValidation", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GenerateOrgDomainValidation", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn validate_org_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ValidateOrgDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ValidateOrgDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_primary_org_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetPrimaryOrgDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetPrimaryOrgDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_member_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgMemberRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgMemberRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_members( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgMembers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgMembers", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_org_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddOrgMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddOrgMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOrgMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOrgMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveOrgMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveOrgMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_project_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetProjectByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetProjectByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_granted_project_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetGrantedProjectByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetGrantedProjectByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_projects( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjects", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjects", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_granted_projects( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListGrantedProjects", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListGrantedProjects", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_granted_project_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListGrantedProjectRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListGrantedProjectRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectChanges", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_project( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddProject", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddProject", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_project( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateProject", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateProject", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_project( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateProject", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateProject", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_project( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateProject", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateProject", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_project( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveProject", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveProject", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_project_role( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddProjectRole", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddProjectRole", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_add_project_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkAddProjectRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkAddProjectRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_project_role( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateProjectRole", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateProjectRole", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_project_role( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveProjectRole", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveProjectRole", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_member_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectMemberRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectMemberRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_members( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectMembers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectMembers", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_project_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddProjectMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddProjectMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_project_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateProjectMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateProjectMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_project_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveProjectMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveProjectMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_app_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetAppByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetAppByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_apps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListApps", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListApps", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_app_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListAppChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListAppChanges", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_oidc_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddOIDCApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddOIDCApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_saml_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddSAMLApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddSAMLApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_api_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddAPIApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddAPIApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_oidc_app_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOIDCAppConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOIDCAppConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_saml_app_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateSAMLAppConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateSAMLAppConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_api_app_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateAPIAppConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateAPIAppConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_app( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveApp", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveApp", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn regenerate_oidc_client_secret( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RegenerateOIDCClientSecret", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RegenerateOIDCClientSecret", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn regenerate_api_client_secret( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RegenerateAPIClientSecret", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RegenerateAPIClientSecret", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_app_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetAppKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetAppKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_app_keys( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListAppKeys", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListAppKeys", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_app_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddAppKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddAppKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_app_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveAppKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveAppKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_grant_changes( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectGrantChanges", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectGrantChanges", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_project_grant_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetProjectGrantByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetProjectGrantByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_grants( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectGrants", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectGrants", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_all_project_grants( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListAllProjectGrants", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListAllProjectGrants", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_project_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddProjectGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddProjectGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_project_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateProjectGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateProjectGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_project_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateProjectGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateProjectGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_project_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateProjectGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateProjectGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_project_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveProjectGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveProjectGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_grant_member_roles( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectGrantMemberRoles", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectGrantMemberRoles", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_project_grant_members( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProjectGrantMembers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProjectGrantMembers", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_project_grant_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddProjectGrantMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddProjectGrantMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_project_grant_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateProjectGrantMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateProjectGrantMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_project_grant_member( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveProjectGrantMember", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveProjectGrantMember", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_grant_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetUserGrantByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetUserGrantByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_user_grants( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListUserGrants", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListUserGrants", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_remove_user_grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/BulkRemoveUserGrant", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "BulkRemoveUserGrant", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_iam_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetOrgIAMPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetOrgIAMPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_domain_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDomainPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDomainPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_login_policy_to_default( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetLoginPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetLoginPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListLoginPolicyIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListLoginPolicyIDPs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_idp_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddIDPToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddIDPToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_idp_from_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveIDPFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveIDPFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_second_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListLoginPolicySecondFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListLoginPolicySecondFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_second_factor_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddSecondFactorToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddSecondFactorToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_second_factor_from_login_policy( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveSecondFactorFromLoginPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveSecondFactorFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveSecondFactorFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_login_policy_multi_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListLoginPolicyMultiFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListLoginPolicyMultiFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_multi_factor_to_login_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddMultiFactorToLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddMultiFactorToLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_multi_factor_from_login_policy( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveMultiFactorFromLoginPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveMultiFactorFromLoginPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveMultiFactorFromLoginPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordComplexityPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest< + super::AddCustomPasswordComplexityPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_password_complexity_policy( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateCustomPasswordComplexityPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomPasswordComplexityPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomPasswordComplexityPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_password_complexity_policy_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetPasswordComplexityPolicyToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetPasswordComplexityPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetPasswordComplexityPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetPasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetPasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultPasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomPasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomPasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_password_age_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomPasswordAgePolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomPasswordAgePolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_password_age_policy_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetPasswordAgePolicyToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetPasswordAgePolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetPasswordAgePolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetLockoutPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultLockoutPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomLockoutPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_lockout_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomLockoutPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomLockoutPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_lockout_policy_to_default( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetLockoutPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetLockoutPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetPrivacyPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPrivacyPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomPrivacyPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_privacy_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomPrivacyPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomPrivacyPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_privacy_policy_to_default( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetPrivacyPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetPrivacyPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_notification_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_notification_policy( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateCustomNotificationPolicyRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomNotificationPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomNotificationPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_notification_policy_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetNotificationPolicyToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetNotificationPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetNotificationPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_preview_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetPreviewLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetPreviewLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_custom_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddCustomLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddCustomLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_custom_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateCustomLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateCustomLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_custom_label_policy( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ActivateCustomLabelPolicy", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ActivateCustomLabelPolicy", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_custom_label_policy_logo( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveCustomLabelPolicyLogo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveCustomLabelPolicyLogo", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_custom_label_policy_logo_dark( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveCustomLabelPolicyLogoDarkRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveCustomLabelPolicyLogoDark", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveCustomLabelPolicyLogoDark", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_custom_label_policy_icon( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveCustomLabelPolicyIcon", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveCustomLabelPolicyIcon", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_custom_label_policy_icon_dark( + &mut self, + request: impl tonic::IntoRequest< + super::RemoveCustomLabelPolicyIconDarkRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveCustomLabelPolicyIconDark", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveCustomLabelPolicyIconDark", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_custom_label_policy_font( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveCustomLabelPolicyFont", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveCustomLabelPolicyFont", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_label_policy_to_default( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetLabelPolicyToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetLabelPolicyToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_init_message_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomInitMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomInitMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_init_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomInitMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomInitMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomInitMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_password_reset_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomPasswordResetMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomPasswordResetMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomPasswordResetMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_password_reset_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordResetMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomPasswordResetMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomPasswordResetMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_verify_email_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomVerifyEmailMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomVerifyEmailMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomVerifyEmailMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_email_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyEmailMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomVerifyEmailMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomVerifyEmailMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_verify_phone_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomVerifyPhoneMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomVerifyPhoneMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomVerifyPhoneMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_phone_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyPhoneMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomVerifyPhoneMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomVerifyPhoneMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_verify_smsotp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomVerifySmsotpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomVerifySMSOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomVerifySMSOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_smsotp_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifySmsotpMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomVerifySMSOTPMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomVerifySMSOTPMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_verify_email_otp_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomVerifyEmailOtpMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomVerifyEmailOTPMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomVerifyEmailOTPMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_verify_email_otp_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomVerifyEmailOtpMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomVerifyEmailOtpMessageTextToDefaultResponse, + >, + 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.management.v1.ManagementService/ResetCustomVerifyEmailOTPMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomVerifyEmailOTPMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_domain_claimed_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomDomainClaimedMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomDomainClaimedMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_domain_claimed_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultDomainClaimedMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultDomainClaimedMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_domain_claimed_message_custom_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomDomainClaimedMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomDomainClaimedMessageCustomText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomDomainClaimedMessageCustomText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_domain_claimed_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomDomainClaimedMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomDomainClaimedMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomDomainClaimedMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_passwordless_registration_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomPasswordlessRegistrationMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomPasswordlessRegistrationMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_passwordless_registration_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::GetDefaultPasswordlessRegistrationMessageTextResponse, + >, + 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.management.v1.ManagementService/GetDefaultPasswordlessRegistrationMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPasswordlessRegistrationMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_passwordless_registration_message_custom_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomPasswordlessRegistrationMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomPasswordlessRegistrationMessageCustomText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomPasswordlessRegistrationMessageCustomText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_passwordless_registration_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse, + >, + 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.management.v1.ManagementService/ResetCustomPasswordlessRegistrationMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomPasswordlessRegistrationMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_password_change_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomPasswordChangeMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomPasswordChangeMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_password_change_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultPasswordChangeMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultPasswordChangeMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_password_change_message_custom_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomPasswordChangeMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomPasswordChangeMessageCustomText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomPasswordChangeMessageCustomText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_password_change_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomPasswordChangeMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response< + super::ResetCustomPasswordChangeMessageTextToDefaultResponse, + >, + 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.management.v1.ManagementService/ResetCustomPasswordChangeMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomPasswordChangeMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_invite_user_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetCustomInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomInviteUserMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomInviteUserMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_invite_user_message_text( + &mut self, + request: impl tonic::IntoRequest< + super::GetDefaultInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultInviteUserMessageText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultInviteUserMessageText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_invite_user_message_custom_text( + &mut self, + request: impl tonic::IntoRequest< + super::SetCustomInviteUserMessageTextRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomInviteUserMessageCustomText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomInviteUserMessageCustomText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_invite_user_message_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomInviteUserMessageTextToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomInviteUserMessageTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomInviteUserMessageTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_custom_login_texts( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetCustomLoginTexts", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetCustomLoginTexts", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_default_login_texts( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetDefaultLoginTexts", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetDefaultLoginTexts", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_custom_login_text( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetCustomLoginText", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetCustomLoginText", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_custom_login_text_to_default( + &mut self, + request: impl tonic::IntoRequest< + super::ResetCustomLoginTextsToDefaultRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ResetCustomLoginTextToDefault", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ResetCustomLoginTextToDefault", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_org_idp_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetOrgIDPByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetOrgIDPByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_org_id_ps( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListOrgIDPs", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListOrgIDPs", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_org_oidcidp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddOrgOIDCIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddOrgOIDCIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_org_jwtidp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddOrgJWTIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddOrgJWTIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_org_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateOrgIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateOrgIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_org_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateOrgIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateOrgIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_org_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RemoveOrgIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RemoveOrgIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org_idp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOrgIDP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOrgIDP", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org_idpoidc_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOrgIDPOIDCConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOrgIDPOIDCConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_org_idpjwt_config( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateOrgIDPJWTConfig", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateOrgIDPJWTConfig", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListProviders", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_provider_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetProviderByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetProviderByID", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_generic_o_auth_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGenericOAuthProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGenericOAuthProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_generic_o_auth_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGenericOAuthProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGenericOAuthProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn migrate_generic_oidc_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/MigrateGenericOIDCProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "MigrateGenericOIDCProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_jwt_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddJWTProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddJWTProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_jwt_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateJWTProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateJWTProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_azure_ad_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddAzureADProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddAzureADProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_azure_ad_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateAzureADProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateAzureADProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_hub_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGitHubProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGitHubProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_hub_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGitHubProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGitHubProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_hub_enterprise_server_provider( + &mut self, + request: impl tonic::IntoRequest< + super::AddGitHubEnterpriseServerProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGitHubEnterpriseServerProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGitHubEnterpriseServerProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_hub_enterprise_server_provider( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateGitHubEnterpriseServerProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGitHubEnterpriseServerProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGitHubEnterpriseServerProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_lab_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGitLabProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGitLabProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_lab_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGitLabProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGitLabProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_git_lab_self_hosted_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGitLabSelfHostedProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGitLabSelfHostedProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_git_lab_self_hosted_provider( + &mut self, + request: impl tonic::IntoRequest< + super::UpdateGitLabSelfHostedProviderRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGitLabSelfHostedProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGitLabSelfHostedProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_google_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddGoogleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddGoogleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_google_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateGoogleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateGoogleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_ldap_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddLDAPProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddLDAPProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_ldap_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateLDAPProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateLDAPProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_apple_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddAppleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddAppleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_apple_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateAppleProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateAppleProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_saml_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/AddSAMLProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "AddSAMLProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_saml_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateSAMLProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateSAMLProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn regenerate_saml_provider_certificate( + &mut self, + request: impl tonic::IntoRequest< + super::RegenerateSamlProviderCertificateRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/RegenerateSAMLProviderCertificate", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "RegenerateSAMLProviderCertificate", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_provider( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeleteProvider", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeleteProvider", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_actions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListActions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListActions", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "GetAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/CreateAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "CreateAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/UpdateAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "UpdateAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeactivateAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeactivateAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ReactivateAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ReactivateAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_action( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/DeleteAction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "DeleteAction", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_flow_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListFlowTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListFlowTypes", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_flow_trigger_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ListFlowTriggerTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ListFlowTriggerTypes", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_flow( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/GetFlow", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.management.v1.ManagementService", "GetFlow"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn clear_flow( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/ClearFlow", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "ClearFlow", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_trigger_actions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.management.v1.ManagementService/SetTriggerActions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.management.v1.ManagementService", + "SetTriggerActions", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.member.v1.rs b/crates/zitadel-gen/src/api/zitadel.member.v1.rs new file mode 100644 index 0000000..f5cd63d --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.member.v1.rs @@ -0,0 +1,81 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Member { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="4")] + pub preferred_login_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub email: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub avatar_url: ::prost::alloc::string::String, + #[prost(enumeration="super::super::user::v1::Type", tag="10")] + pub user_type: i32, + /// The organization the user belong to. + #[prost(string, tag="11")] + pub user_resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + FirstNameQuery(super::FirstNameQuery), + #[prost(message, tag="2")] + LastNameQuery(super::LastNameQuery), + #[prost(message, tag="3")] + EmailQuery(super::EmailQuery), + #[prost(message, tag="4")] + UserIdQuery(super::UserIdQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FirstNameQuery { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LastNameQuery { + #[prost(string, tag="1")] + pub last_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailQuery { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserIdQuery { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.metadata.v1.rs b/crates/zitadel-gen/src/api/zitadel.metadata.v1.rs new file mode 100644 index 0000000..d9ec954 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.metadata.v1.rs @@ -0,0 +1,36 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Metadata { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="3")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataQuery { + #[prost(oneof="metadata_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `MetadataQuery`. +pub mod metadata_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + KeyQuery(super::MetadataKeyQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataKeyQuery { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.milestone.v1.rs b/crates/zitadel-gen/src/api/zitadel.milestone.v1.rs new file mode 100644 index 0000000..4768104 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.milestone.v1.rs @@ -0,0 +1,102 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Milestone { + #[prost(enumeration="MilestoneType", tag="2")] + pub r#type: i32, + #[prost(message, optional, tag="3")] + pub reached_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct MilestoneQuery { + #[prost(oneof="milestone_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `MilestoneQuery`. +pub mod milestone_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IsReachedQuery(super::IsReachedQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IsReachedQuery { + #[prost(bool, tag="1")] + pub reached: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MilestoneType { + Unspecified = 0, + InstanceCreated = 1, + AuthenticationSucceededOnInstance = 2, + ProjectCreated = 3, + ApplicationCreated = 4, + AuthenticationSucceededOnApplication = 5, + InstanceDeleted = 6, +} +impl MilestoneType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MilestoneType::Unspecified => "MILESTONE_TYPE_UNSPECIFIED", + MilestoneType::InstanceCreated => "MILESTONE_TYPE_INSTANCE_CREATED", + MilestoneType::AuthenticationSucceededOnInstance => "MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_INSTANCE", + MilestoneType::ProjectCreated => "MILESTONE_TYPE_PROJECT_CREATED", + MilestoneType::ApplicationCreated => "MILESTONE_TYPE_APPLICATION_CREATED", + MilestoneType::AuthenticationSucceededOnApplication => "MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_APPLICATION", + MilestoneType::InstanceDeleted => "MILESTONE_TYPE_INSTANCE_DELETED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MILESTONE_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "MILESTONE_TYPE_INSTANCE_CREATED" => Some(Self::InstanceCreated), + "MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_INSTANCE" => Some(Self::AuthenticationSucceededOnInstance), + "MILESTONE_TYPE_PROJECT_CREATED" => Some(Self::ProjectCreated), + "MILESTONE_TYPE_APPLICATION_CREATED" => Some(Self::ApplicationCreated), + "MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_APPLICATION" => Some(Self::AuthenticationSucceededOnApplication), + "MILESTONE_TYPE_INSTANCE_DELETED" => Some(Self::InstanceDeleted), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MilestoneFieldName { + Unspecified = 0, + Type = 1, + ReachedDate = 2, +} +impl MilestoneFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MilestoneFieldName::Unspecified => "MILESTONE_FIELD_NAME_UNSPECIFIED", + MilestoneFieldName::Type => "MILESTONE_FIELD_NAME_TYPE", + MilestoneFieldName::ReachedDate => "MILESTONE_FIELD_NAME_REACHED_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MILESTONE_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "MILESTONE_FIELD_NAME_TYPE" => Some(Self::Type), + "MILESTONE_FIELD_NAME_REACHED_DATE" => Some(Self::ReachedDate), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.object.v2.rs b/crates/zitadel-gen/src/api/zitadel.object.v2.rs new file mode 100644 index 0000000..945e87b --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.object.v2.rs @@ -0,0 +1,198 @@ +// @generated +// This file is @generated by prost-build. +/// Deprecated: use Organization +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organisation { + #[prost(oneof="organisation::Org", tags="1, 2")] + pub org: ::core::option::Option, +} +/// Nested message and enum types in `Organisation`. +pub mod organisation { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Org { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="2")] + OrgDomain(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organization { + #[prost(oneof="organization::Org", tags="1, 2")] + pub org: ::core::option::Option, +} +/// Nested message and enum types in `Organization`. +pub mod organization { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Org { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="2")] + OrgDomain(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestContext { + #[prost(oneof="request_context::ResourceOwner", tags="1, 2")] + pub resource_owner: ::core::option::Option, +} +/// Nested message and enum types in `RequestContext`. +pub mod request_context { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ResourceOwner { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(bool, tag="2")] + Instance(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListQuery { + #[prost(uint64, tag="1")] + pub offset: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + #[prost(bool, tag="3")] + pub asc: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Details { + /// sequence represents the order of events. It's always counting + /// + /// on read: the sequence of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(uint64, tag="1")] + pub sequence: u64, + /// change_date is the timestamp when the object was changed + /// + /// on read: the timestamp of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(message, optional, tag="2")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + /// resource_owner is the organization or instance_id an object belongs to + #[prost(string, tag="3")] + pub resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListDetails { + #[prost(uint64, tag="1")] + pub total_result: u64, + #[prost(uint64, tag="2")] + pub processed_sequence: u64, + #[prost(message, optional, tag="3")] + pub timestamp: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TextQueryMethod { + Equals = 0, + EqualsIgnoreCase = 1, + StartsWith = 2, + StartsWithIgnoreCase = 3, + Contains = 4, + ContainsIgnoreCase = 5, + EndsWith = 6, + EndsWithIgnoreCase = 7, +} +impl TextQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TextQueryMethod::Equals => "TEXT_QUERY_METHOD_EQUALS", + TextQueryMethod::EqualsIgnoreCase => "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE", + TextQueryMethod::StartsWith => "TEXT_QUERY_METHOD_STARTS_WITH", + TextQueryMethod::StartsWithIgnoreCase => "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE", + TextQueryMethod::Contains => "TEXT_QUERY_METHOD_CONTAINS", + TextQueryMethod::ContainsIgnoreCase => "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE", + TextQueryMethod::EndsWith => "TEXT_QUERY_METHOD_ENDS_WITH", + TextQueryMethod::EndsWithIgnoreCase => "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TEXT_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE" => Some(Self::EqualsIgnoreCase), + "TEXT_QUERY_METHOD_STARTS_WITH" => Some(Self::StartsWith), + "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE" => Some(Self::StartsWithIgnoreCase), + "TEXT_QUERY_METHOD_CONTAINS" => Some(Self::Contains), + "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE" => Some(Self::ContainsIgnoreCase), + "TEXT_QUERY_METHOD_ENDS_WITH" => Some(Self::EndsWith), + "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE" => Some(Self::EndsWithIgnoreCase), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ListQueryMethod { + In = 0, +} +impl ListQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListQueryMethod::In => "LIST_QUERY_METHOD_IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LIST_QUERY_METHOD_IN" => Some(Self::In), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TimestampQueryMethod { + Equals = 0, + Greater = 1, + GreaterOrEquals = 2, + Less = 3, + LessOrEquals = 4, +} +impl TimestampQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TimestampQueryMethod::Equals => "TIMESTAMP_QUERY_METHOD_EQUALS", + TimestampQueryMethod::Greater => "TIMESTAMP_QUERY_METHOD_GREATER", + TimestampQueryMethod::GreaterOrEquals => "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS", + TimestampQueryMethod::Less => "TIMESTAMP_QUERY_METHOD_LESS", + TimestampQueryMethod::LessOrEquals => "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TIMESTAMP_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TIMESTAMP_QUERY_METHOD_GREATER" => Some(Self::Greater), + "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS" => Some(Self::GreaterOrEquals), + "TIMESTAMP_QUERY_METHOD_LESS" => Some(Self::Less), + "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS" => Some(Self::LessOrEquals), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.object.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.object.v2beta.rs new file mode 100644 index 0000000..945e87b --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.object.v2beta.rs @@ -0,0 +1,198 @@ +// @generated +// This file is @generated by prost-build. +/// Deprecated: use Organization +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organisation { + #[prost(oneof="organisation::Org", tags="1, 2")] + pub org: ::core::option::Option, +} +/// Nested message and enum types in `Organisation`. +pub mod organisation { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Org { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="2")] + OrgDomain(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organization { + #[prost(oneof="organization::Org", tags="1, 2")] + pub org: ::core::option::Option, +} +/// Nested message and enum types in `Organization`. +pub mod organization { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Org { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="2")] + OrgDomain(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestContext { + #[prost(oneof="request_context::ResourceOwner", tags="1, 2")] + pub resource_owner: ::core::option::Option, +} +/// Nested message and enum types in `RequestContext`. +pub mod request_context { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ResourceOwner { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(bool, tag="2")] + Instance(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListQuery { + #[prost(uint64, tag="1")] + pub offset: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + #[prost(bool, tag="3")] + pub asc: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Details { + /// sequence represents the order of events. It's always counting + /// + /// on read: the sequence of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(uint64, tag="1")] + pub sequence: u64, + /// change_date is the timestamp when the object was changed + /// + /// on read: the timestamp of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(message, optional, tag="2")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + /// resource_owner is the organization or instance_id an object belongs to + #[prost(string, tag="3")] + pub resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListDetails { + #[prost(uint64, tag="1")] + pub total_result: u64, + #[prost(uint64, tag="2")] + pub processed_sequence: u64, + #[prost(message, optional, tag="3")] + pub timestamp: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TextQueryMethod { + Equals = 0, + EqualsIgnoreCase = 1, + StartsWith = 2, + StartsWithIgnoreCase = 3, + Contains = 4, + ContainsIgnoreCase = 5, + EndsWith = 6, + EndsWithIgnoreCase = 7, +} +impl TextQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TextQueryMethod::Equals => "TEXT_QUERY_METHOD_EQUALS", + TextQueryMethod::EqualsIgnoreCase => "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE", + TextQueryMethod::StartsWith => "TEXT_QUERY_METHOD_STARTS_WITH", + TextQueryMethod::StartsWithIgnoreCase => "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE", + TextQueryMethod::Contains => "TEXT_QUERY_METHOD_CONTAINS", + TextQueryMethod::ContainsIgnoreCase => "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE", + TextQueryMethod::EndsWith => "TEXT_QUERY_METHOD_ENDS_WITH", + TextQueryMethod::EndsWithIgnoreCase => "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TEXT_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE" => Some(Self::EqualsIgnoreCase), + "TEXT_QUERY_METHOD_STARTS_WITH" => Some(Self::StartsWith), + "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE" => Some(Self::StartsWithIgnoreCase), + "TEXT_QUERY_METHOD_CONTAINS" => Some(Self::Contains), + "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE" => Some(Self::ContainsIgnoreCase), + "TEXT_QUERY_METHOD_ENDS_WITH" => Some(Self::EndsWith), + "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE" => Some(Self::EndsWithIgnoreCase), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ListQueryMethod { + In = 0, +} +impl ListQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListQueryMethod::In => "LIST_QUERY_METHOD_IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LIST_QUERY_METHOD_IN" => Some(Self::In), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TimestampQueryMethod { + Equals = 0, + Greater = 1, + GreaterOrEquals = 2, + Less = 3, + LessOrEquals = 4, +} +impl TimestampQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TimestampQueryMethod::Equals => "TIMESTAMP_QUERY_METHOD_EQUALS", + TimestampQueryMethod::Greater => "TIMESTAMP_QUERY_METHOD_GREATER", + TimestampQueryMethod::GreaterOrEquals => "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS", + TimestampQueryMethod::Less => "TIMESTAMP_QUERY_METHOD_LESS", + TimestampQueryMethod::LessOrEquals => "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TIMESTAMP_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TIMESTAMP_QUERY_METHOD_GREATER" => Some(Self::Greater), + "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS" => Some(Self::GreaterOrEquals), + "TIMESTAMP_QUERY_METHOD_LESS" => Some(Self::Less), + "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS" => Some(Self::LessOrEquals), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.object.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.object.v3alpha.rs new file mode 100644 index 0000000..8396213 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.object.v3alpha.rs @@ -0,0 +1,77 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Owner { + #[prost(enumeration="OwnerType", tag="1")] + pub r#type: i32, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Instance { + #[prost(oneof="instance::Property", tags="1, 2")] + pub property: ::core::option::Option, +} +/// Nested message and enum types in `Instance`. +pub mod instance { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Property { + #[prost(string, tag="1")] + Id(::prost::alloc::string::String), + #[prost(string, tag="2")] + Domain(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organization { + #[prost(oneof="organization::Property", tags="1, 2")] + pub property: ::core::option::Option, +} +/// Nested message and enum types in `Organization`. +pub mod organization { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Property { + #[prost(string, tag="1")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="2")] + OrgDomain(::prost::alloc::string::String), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OwnerType { + Unspecified = 0, + System = 1, + Instance = 2, + Org = 3, +} +impl OwnerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OwnerType::Unspecified => "OWNER_TYPE_UNSPECIFIED", + OwnerType::System => "OWNER_TYPE_SYSTEM", + OwnerType::Instance => "OWNER_TYPE_INSTANCE", + OwnerType::Org => "OWNER_TYPE_ORG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OWNER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "OWNER_TYPE_SYSTEM" => Some(Self::System), + "OWNER_TYPE_INSTANCE" => Some(Self::Instance), + "OWNER_TYPE_ORG" => Some(Self::Org), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.oidc.v2.rs b/crates/zitadel-gen/src/api/zitadel.oidc.v2.rs new file mode 100644 index 0000000..b2eeffe --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.oidc.v2.rs @@ -0,0 +1,196 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scope: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub redirect_uri: ::prost::alloc::string::String, + #[prost(enumeration="Prompt", repeated, packed="false", tag="6")] + pub prompt: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="7")] + pub ui_locales: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag="8")] + pub login_hint: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="9")] + pub max_age: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, optional, tag="10")] + pub hint_user_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthorizationError { + #[prost(enumeration="ErrorReason", tag="1")] + pub error: i32, + #[prost(string, optional, tag="2")] + pub error_description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub error_uri: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Prompt { + Unspecified = 0, + None = 1, + Login = 2, + Consent = 3, + SelectAccount = 4, + Create = 5, +} +impl Prompt { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Prompt::Unspecified => "PROMPT_UNSPECIFIED", + Prompt::None => "PROMPT_NONE", + Prompt::Login => "PROMPT_LOGIN", + Prompt::Consent => "PROMPT_CONSENT", + Prompt::SelectAccount => "PROMPT_SELECT_ACCOUNT", + Prompt::Create => "PROMPT_CREATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROMPT_UNSPECIFIED" => Some(Self::Unspecified), + "PROMPT_NONE" => Some(Self::None), + "PROMPT_LOGIN" => Some(Self::Login), + "PROMPT_CONSENT" => Some(Self::Consent), + "PROMPT_SELECT_ACCOUNT" => Some(Self::SelectAccount), + "PROMPT_CREATE" => Some(Self::Create), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ErrorReason { + Unspecified = 0, + /// Error states from + InvalidRequest = 1, + UnauthorizedClient = 2, + AccessDenied = 3, + UnsupportedResponseType = 4, + InvalidScope = 5, + ServerError = 6, + TemporaryUnavailable = 7, + /// Error states from + InteractionRequired = 8, + LoginRequired = 9, + AccountSelectionRequired = 10, + ConsentRequired = 11, + InvalidRequestUri = 12, + InvalidRequestObject = 13, + RequestNotSupported = 14, + RequestUriNotSupported = 15, + RegistrationNotSupported = 16, +} +impl ErrorReason { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ErrorReason::Unspecified => "ERROR_REASON_UNSPECIFIED", + ErrorReason::InvalidRequest => "ERROR_REASON_INVALID_REQUEST", + ErrorReason::UnauthorizedClient => "ERROR_REASON_UNAUTHORIZED_CLIENT", + ErrorReason::AccessDenied => "ERROR_REASON_ACCESS_DENIED", + ErrorReason::UnsupportedResponseType => "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE", + ErrorReason::InvalidScope => "ERROR_REASON_INVALID_SCOPE", + ErrorReason::ServerError => "ERROR_REASON_SERVER_ERROR", + ErrorReason::TemporaryUnavailable => "ERROR_REASON_TEMPORARY_UNAVAILABLE", + ErrorReason::InteractionRequired => "ERROR_REASON_INTERACTION_REQUIRED", + ErrorReason::LoginRequired => "ERROR_REASON_LOGIN_REQUIRED", + ErrorReason::AccountSelectionRequired => "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED", + ErrorReason::ConsentRequired => "ERROR_REASON_CONSENT_REQUIRED", + ErrorReason::InvalidRequestUri => "ERROR_REASON_INVALID_REQUEST_URI", + ErrorReason::InvalidRequestObject => "ERROR_REASON_INVALID_REQUEST_OBJECT", + ErrorReason::RequestNotSupported => "ERROR_REASON_REQUEST_NOT_SUPPORTED", + ErrorReason::RequestUriNotSupported => "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED", + ErrorReason::RegistrationNotSupported => "ERROR_REASON_REGISTRATION_NOT_SUPPORTED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ERROR_REASON_UNSPECIFIED" => Some(Self::Unspecified), + "ERROR_REASON_INVALID_REQUEST" => Some(Self::InvalidRequest), + "ERROR_REASON_UNAUTHORIZED_CLIENT" => Some(Self::UnauthorizedClient), + "ERROR_REASON_ACCESS_DENIED" => Some(Self::AccessDenied), + "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE" => Some(Self::UnsupportedResponseType), + "ERROR_REASON_INVALID_SCOPE" => Some(Self::InvalidScope), + "ERROR_REASON_SERVER_ERROR" => Some(Self::ServerError), + "ERROR_REASON_TEMPORARY_UNAVAILABLE" => Some(Self::TemporaryUnavailable), + "ERROR_REASON_INTERACTION_REQUIRED" => Some(Self::InteractionRequired), + "ERROR_REASON_LOGIN_REQUIRED" => Some(Self::LoginRequired), + "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED" => Some(Self::AccountSelectionRequired), + "ERROR_REASON_CONSENT_REQUIRED" => Some(Self::ConsentRequired), + "ERROR_REASON_INVALID_REQUEST_URI" => Some(Self::InvalidRequestUri), + "ERROR_REASON_INVALID_REQUEST_OBJECT" => Some(Self::InvalidRequestObject), + "ERROR_REASON_REQUEST_NOT_SUPPORTED" => Some(Self::RequestNotSupported), + "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED" => Some(Self::RequestUriNotSupported), + "ERROR_REASON_REGISTRATION_NOT_SUPPORTED" => Some(Self::RegistrationNotSupported), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAuthRequestRequest { + #[prost(string, tag="1")] + pub auth_request_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAuthRequestResponse { + #[prost(message, optional, tag="1")] + pub auth_request: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateCallbackRequest { + #[prost(string, tag="1")] + pub auth_request_id: ::prost::alloc::string::String, + #[prost(oneof="create_callback_request::CallbackKind", tags="2, 3")] + pub callback_kind: ::core::option::Option, +} +/// Nested message and enum types in `CreateCallbackRequest`. +pub mod create_callback_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum CallbackKind { + #[prost(message, tag="2")] + Session(super::Session), + #[prost(message, tag="3")] + Error(super::AuthorizationError), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateCallbackResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub callback_url: ::prost::alloc::string::String, +} +include!("zitadel.oidc.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.oidc.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.oidc.v2.tonic.rs new file mode 100644 index 0000000..03a2cf4 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.oidc.v2.tonic.rs @@ -0,0 +1,142 @@ +// @generated +/// Generated client implementations. +pub mod oidc_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 OidcServiceClient { + inner: tonic::client::Grpc, + } + impl OidcServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl OidcServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> OidcServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + OidcServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_auth_request( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.oidc.v2.OIDCService/GetAuthRequest", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.oidc.v2.OIDCService", "GetAuthRequest"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_callback( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.oidc.v2.OIDCService/CreateCallback", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.oidc.v2.OIDCService", "CreateCallback"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.rs new file mode 100644 index 0000000..fa12974 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.rs @@ -0,0 +1,196 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub scope: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub redirect_uri: ::prost::alloc::string::String, + #[prost(enumeration="Prompt", repeated, packed="false", tag="6")] + pub prompt: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="7")] + pub ui_locales: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag="8")] + pub login_hint: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="9")] + pub max_age: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, optional, tag="10")] + pub hint_user_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthorizationError { + #[prost(enumeration="ErrorReason", tag="1")] + pub error: i32, + #[prost(string, optional, tag="2")] + pub error_description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub error_uri: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Prompt { + Unspecified = 0, + None = 1, + Login = 2, + Consent = 3, + SelectAccount = 4, + Create = 5, +} +impl Prompt { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Prompt::Unspecified => "PROMPT_UNSPECIFIED", + Prompt::None => "PROMPT_NONE", + Prompt::Login => "PROMPT_LOGIN", + Prompt::Consent => "PROMPT_CONSENT", + Prompt::SelectAccount => "PROMPT_SELECT_ACCOUNT", + Prompt::Create => "PROMPT_CREATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROMPT_UNSPECIFIED" => Some(Self::Unspecified), + "PROMPT_NONE" => Some(Self::None), + "PROMPT_LOGIN" => Some(Self::Login), + "PROMPT_CONSENT" => Some(Self::Consent), + "PROMPT_SELECT_ACCOUNT" => Some(Self::SelectAccount), + "PROMPT_CREATE" => Some(Self::Create), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ErrorReason { + Unspecified = 0, + /// Error states from + InvalidRequest = 1, + UnauthorizedClient = 2, + AccessDenied = 3, + UnsupportedResponseType = 4, + InvalidScope = 5, + ServerError = 6, + TemporaryUnavailable = 7, + /// Error states from + InteractionRequired = 8, + LoginRequired = 9, + AccountSelectionRequired = 10, + ConsentRequired = 11, + InvalidRequestUri = 12, + InvalidRequestObject = 13, + RequestNotSupported = 14, + RequestUriNotSupported = 15, + RegistrationNotSupported = 16, +} +impl ErrorReason { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ErrorReason::Unspecified => "ERROR_REASON_UNSPECIFIED", + ErrorReason::InvalidRequest => "ERROR_REASON_INVALID_REQUEST", + ErrorReason::UnauthorizedClient => "ERROR_REASON_UNAUTHORIZED_CLIENT", + ErrorReason::AccessDenied => "ERROR_REASON_ACCESS_DENIED", + ErrorReason::UnsupportedResponseType => "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE", + ErrorReason::InvalidScope => "ERROR_REASON_INVALID_SCOPE", + ErrorReason::ServerError => "ERROR_REASON_SERVER_ERROR", + ErrorReason::TemporaryUnavailable => "ERROR_REASON_TEMPORARY_UNAVAILABLE", + ErrorReason::InteractionRequired => "ERROR_REASON_INTERACTION_REQUIRED", + ErrorReason::LoginRequired => "ERROR_REASON_LOGIN_REQUIRED", + ErrorReason::AccountSelectionRequired => "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED", + ErrorReason::ConsentRequired => "ERROR_REASON_CONSENT_REQUIRED", + ErrorReason::InvalidRequestUri => "ERROR_REASON_INVALID_REQUEST_URI", + ErrorReason::InvalidRequestObject => "ERROR_REASON_INVALID_REQUEST_OBJECT", + ErrorReason::RequestNotSupported => "ERROR_REASON_REQUEST_NOT_SUPPORTED", + ErrorReason::RequestUriNotSupported => "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED", + ErrorReason::RegistrationNotSupported => "ERROR_REASON_REGISTRATION_NOT_SUPPORTED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ERROR_REASON_UNSPECIFIED" => Some(Self::Unspecified), + "ERROR_REASON_INVALID_REQUEST" => Some(Self::InvalidRequest), + "ERROR_REASON_UNAUTHORIZED_CLIENT" => Some(Self::UnauthorizedClient), + "ERROR_REASON_ACCESS_DENIED" => Some(Self::AccessDenied), + "ERROR_REASON_UNSUPPORTED_RESPONSE_TYPE" => Some(Self::UnsupportedResponseType), + "ERROR_REASON_INVALID_SCOPE" => Some(Self::InvalidScope), + "ERROR_REASON_SERVER_ERROR" => Some(Self::ServerError), + "ERROR_REASON_TEMPORARY_UNAVAILABLE" => Some(Self::TemporaryUnavailable), + "ERROR_REASON_INTERACTION_REQUIRED" => Some(Self::InteractionRequired), + "ERROR_REASON_LOGIN_REQUIRED" => Some(Self::LoginRequired), + "ERROR_REASON_ACCOUNT_SELECTION_REQUIRED" => Some(Self::AccountSelectionRequired), + "ERROR_REASON_CONSENT_REQUIRED" => Some(Self::ConsentRequired), + "ERROR_REASON_INVALID_REQUEST_URI" => Some(Self::InvalidRequestUri), + "ERROR_REASON_INVALID_REQUEST_OBJECT" => Some(Self::InvalidRequestObject), + "ERROR_REASON_REQUEST_NOT_SUPPORTED" => Some(Self::RequestNotSupported), + "ERROR_REASON_REQUEST_URI_NOT_SUPPORTED" => Some(Self::RequestUriNotSupported), + "ERROR_REASON_REGISTRATION_NOT_SUPPORTED" => Some(Self::RegistrationNotSupported), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAuthRequestRequest { + #[prost(string, tag="1")] + pub auth_request_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAuthRequestResponse { + #[prost(message, optional, tag="1")] + pub auth_request: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateCallbackRequest { + #[prost(string, tag="1")] + pub auth_request_id: ::prost::alloc::string::String, + #[prost(oneof="create_callback_request::CallbackKind", tags="2, 3")] + pub callback_kind: ::core::option::Option, +} +/// Nested message and enum types in `CreateCallbackRequest`. +pub mod create_callback_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum CallbackKind { + #[prost(message, tag="2")] + Session(super::Session), + #[prost(message, tag="3")] + Error(super::AuthorizationError), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateCallbackResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub callback_url: ::prost::alloc::string::String, +} +include!("zitadel.oidc.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.tonic.rs new file mode 100644 index 0000000..eb808ef --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.oidc.v2beta.tonic.rs @@ -0,0 +1,142 @@ +// @generated +/// Generated client implementations. +pub mod oidc_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 OidcServiceClient { + inner: tonic::client::Grpc, + } + impl OidcServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl OidcServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> OidcServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + OidcServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_auth_request( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.oidc.v2beta.OIDCService/GetAuthRequest", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.oidc.v2beta.OIDCService", "GetAuthRequest"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_callback( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.oidc.v2beta.OIDCService/CreateCallback", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.oidc.v2beta.OIDCService", "CreateCallback"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.org.v1.rs b/crates/zitadel-gen/src/api/zitadel.org.v1.rs new file mode 100644 index 0000000..af7ca24 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.org.v1.rs @@ -0,0 +1,192 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Org { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="OrgState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub primary_domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Domain { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub domain_name: ::prost::alloc::string::String, + #[prost(bool, tag="4")] + pub is_verified: bool, + #[prost(bool, tag="5")] + pub is_primary: bool, + #[prost(enumeration="DomainValidationType", tag="6")] + pub validation_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrgQuery { + #[prost(oneof="org_query::Query", tags="1, 2, 3, 4")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `OrgQuery`. +pub mod org_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + NameQuery(super::OrgNameQuery), + #[prost(message, tag="2")] + DomainQuery(super::OrgDomainQuery), + #[prost(message, tag="3")] + StateQuery(super::OrgStateQuery), + #[prost(message, tag="4")] + IdQuery(super::OrgIdQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrgNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrgDomainQuery { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct OrgStateQuery { + #[prost(enumeration="OrgState", tag="1")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrgIdQuery { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainSearchQuery { + #[prost(oneof="domain_search_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `DomainSearchQuery`. +pub mod domain_search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + DomainNameQuery(super::DomainNameQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OrgState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Removed = 3, +} +impl OrgState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OrgState::Unspecified => "ORG_STATE_UNSPECIFIED", + OrgState::Active => "ORG_STATE_ACTIVE", + OrgState::Inactive => "ORG_STATE_INACTIVE", + OrgState::Removed => "ORG_STATE_REMOVED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORG_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "ORG_STATE_ACTIVE" => Some(Self::Active), + "ORG_STATE_INACTIVE" => Some(Self::Inactive), + "ORG_STATE_REMOVED" => Some(Self::Removed), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum DomainValidationType { + Unspecified = 0, + Http = 1, + Dns = 2, +} +impl DomainValidationType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + DomainValidationType::Unspecified => "DOMAIN_VALIDATION_TYPE_UNSPECIFIED", + DomainValidationType::Http => "DOMAIN_VALIDATION_TYPE_HTTP", + DomainValidationType::Dns => "DOMAIN_VALIDATION_TYPE_DNS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DOMAIN_VALIDATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "DOMAIN_VALIDATION_TYPE_HTTP" => Some(Self::Http), + "DOMAIN_VALIDATION_TYPE_DNS" => Some(Self::Dns), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OrgFieldName { + Unspecified = 0, + Name = 1, +} +impl OrgFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OrgFieldName::Unspecified => "ORG_FIELD_NAME_UNSPECIFIED", + OrgFieldName::Name => "ORG_FIELD_NAME_NAME", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORG_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "ORG_FIELD_NAME_NAME" => Some(Self::Name), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.org.v2.rs b/crates/zitadel-gen/src/api/zitadel.org.v2.rs new file mode 100644 index 0000000..dd68e8c --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.org.v2.rs @@ -0,0 +1,218 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Organization { + /// Unique identifier of the organization. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + /// Current state of the organization, for example active, inactive and deleted. + #[prost(enumeration="OrganizationState", tag="3")] + pub state: i32, + /// Name of the organization. + #[prost(string, tag="4")] + pub name: ::prost::alloc::string::String, + /// Primary domain used in the organization. + #[prost(string, tag="5")] + pub primary_domain: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OrganizationState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Removed = 3, +} +impl OrganizationState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OrganizationState::Unspecified => "ORGANIZATION_STATE_UNSPECIFIED", + OrganizationState::Active => "ORGANIZATION_STATE_ACTIVE", + OrganizationState::Inactive => "ORGANIZATION_STATE_INACTIVE", + OrganizationState::Removed => "ORGANIZATION_STATE_REMOVED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORGANIZATION_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "ORGANIZATION_STATE_ACTIVE" => Some(Self::Active), + "ORGANIZATION_STATE_INACTIVE" => Some(Self::Inactive), + "ORGANIZATION_STATE_REMOVED" => Some(Self::Removed), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4, 5")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + NameQuery(super::OrganizationNameQuery), + #[prost(message, tag="2")] + DomainQuery(super::OrganizationDomainQuery), + #[prost(message, tag="3")] + StateQuery(super::OrganizationStateQuery), + #[prost(message, tag="4")] + IdQuery(super::OrganizationIdQuery), + #[prost(message, tag="5")] + DefaultQuery(super::DefaultOrganizationQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationNameQuery { + /// Name of the organization. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Defines which text equality method is used. + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationDomainQuery { + /// Domain used in organization, not necessary primary domain. + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + /// Defines which text equality method is used. + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct OrganizationStateQuery { + /// Current state of the organization. + #[prost(enumeration="OrganizationState", tag="1")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationIdQuery { + /// Unique identifier of the organization. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DefaultOrganizationQuery { +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum OrganizationFieldName { + Unspecified = 0, + Name = 1, +} +impl OrganizationFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OrganizationFieldName::Unspecified => "ORGANIZATION_FIELD_NAME_UNSPECIFIED", + OrganizationFieldName::Name => "ORGANIZATION_FIELD_NAME_NAME", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ORGANIZATION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "ORGANIZATION_FIELD_NAME_NAME" => Some(Self::Name), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrganizationRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub admins: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `AddOrganizationRequest`. +pub mod add_organization_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Admin { + /// specify Org Member Roles for the provided user (default is ORG_OWNER if roles are empty) + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof="admin::UserType", tags="1, 2")] + pub user_type: ::core::option::Option, + } + /// Nested message and enum types in `Admin`. + pub mod admin { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum UserType { + #[prost(string, tag="1")] + UserId(::prost::alloc::string::String), + #[prost(message, tag="2")] + Human(super::super::super::super::user::v2::AddHumanUserRequest), + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrganizationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub organization_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="3")] + pub created_admins: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `AddOrganizationResponse`. +pub mod add_organization_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct CreatedAdmin { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrganizationsRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="OrganizationFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOrganizationsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="OrganizationFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +include!("zitadel.org.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.org.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.org.v2.tonic.rs new file mode 100644 index 0000000..88ede33 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.org.v2.tonic.rs @@ -0,0 +1,148 @@ +// @generated +/// Generated client implementations. +pub mod organization_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 OrganizationServiceClient { + inner: tonic::client::Grpc, + } + impl OrganizationServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl OrganizationServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> OrganizationServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + OrganizationServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_organization( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.org.v2.OrganizationService/AddOrganization", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.org.v2.OrganizationService", + "AddOrganization", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_organizations( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.org.v2.OrganizationService/ListOrganizations", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.org.v2.OrganizationService", + "ListOrganizations", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.org.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.org.v2beta.rs new file mode 100644 index 0000000..8ab50f8 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.org.v2beta.rs @@ -0,0 +1,58 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrganizationRequest { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub admins: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `AddOrganizationRequest`. +pub mod add_organization_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Admin { + /// specify Org Member Roles for the provided user (default is ORG_OWNER if roles are empty) + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(oneof="admin::UserType", tags="1, 2")] + pub user_type: ::core::option::Option, + } + /// Nested message and enum types in `Admin`. + pub mod admin { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum UserType { + #[prost(string, tag="1")] + UserId(::prost::alloc::string::String), + #[prost(message, tag="2")] + Human(super::super::super::super::user::v2beta::AddHumanUserRequest), + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOrganizationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub organization_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="3")] + pub created_admins: ::prost::alloc::vec::Vec, +} +/// Nested message and enum types in `AddOrganizationResponse`. +pub mod add_organization_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct CreatedAdmin { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, + } +} +include!("zitadel.org.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.org.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.org.v2beta.tonic.rs new file mode 100644 index 0000000..46f5fa9 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.org.v2beta.tonic.rs @@ -0,0 +1,118 @@ +// @generated +/// Generated client implementations. +pub mod organization_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 OrganizationServiceClient { + inner: tonic::client::Grpc, + } + impl OrganizationServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl OrganizationServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> OrganizationServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + OrganizationServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_organization( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.org.v2beta.OrganizationService/AddOrganization", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.org.v2beta.OrganizationService", + "AddOrganization", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.policy.v1.rs b/crates/zitadel-gen/src/api/zitadel.policy.v1.rs new file mode 100644 index 0000000..9457e1f --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.policy.v1.rs @@ -0,0 +1,325 @@ +// @generated +// This file is @generated by prost-build. +/// deprecated: please use DomainPolicy instead +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrgIamPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, + #[prost(bool, tag="3")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, + #[prost(bool, tag="3")] + pub is_default: bool, + #[prost(bool, tag="4")] + pub validate_org_domains: bool, + #[prost(bool, tag="5")] + pub smtp_sender_address_matches_instance_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LabelPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// hex value for primary color + #[prost(string, tag="2")] + pub primary_color: ::prost::alloc::string::String, + /// defines if the organization's admin changed the policy + #[prost(bool, tag="4")] + pub is_default: bool, + /// hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set + #[prost(bool, tag="5")] + pub hide_login_name_suffix: bool, + /// hex value for secondary color + #[prost(string, tag="6")] + pub warn_color: ::prost::alloc::string::String, + /// hex value for background color + #[prost(string, tag="7")] + pub background_color: ::prost::alloc::string::String, + /// hex value for font color + #[prost(string, tag="8")] + pub font_color: ::prost::alloc::string::String, + /// hex value for primary color dark theme + #[prost(string, tag="9")] + pub primary_color_dark: ::prost::alloc::string::String, + /// hex value for background color dark theme + #[prost(string, tag="10")] + pub background_color_dark: ::prost::alloc::string::String, + /// hex value for warning color dark theme + #[prost(string, tag="11")] + pub warn_color_dark: ::prost::alloc::string::String, + /// hex value for font color dark theme + #[prost(string, tag="12")] + pub font_color_dark: ::prost::alloc::string::String, + #[prost(bool, tag="13")] + pub disable_watermark: bool, + #[prost(string, tag="14")] + pub logo_url: ::prost::alloc::string::String, + #[prost(string, tag="15")] + pub icon_url: ::prost::alloc::string::String, + #[prost(string, tag="16")] + pub logo_url_dark: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub icon_url_dark: ::prost::alloc::string::String, + #[prost(string, tag="18")] + pub font_url: ::prost::alloc::string::String, + #[prost(enumeration="ThemeMode", tag="19")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub allow_username_password: bool, + #[prost(bool, tag="3")] + pub allow_register: bool, + #[prost(bool, tag="4")] + pub allow_external_idp: bool, + #[prost(bool, tag="5")] + pub force_mfa: bool, + #[prost(enumeration="PasswordlessType", tag="6")] + pub passwordless_type: i32, + #[prost(bool, tag="7")] + pub is_default: bool, + #[prost(bool, tag="8")] + pub hide_password_reset: bool, + #[prost(bool, tag="9")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="10")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="11")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="14")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="15")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(enumeration="SecondFactorType", repeated, tag="16")] + pub second_factors: ::prost::alloc::vec::Vec, + #[prost(enumeration="MultiFactorType", repeated, tag="17")] + pub multi_factors: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="18")] + pub idps: ::prost::alloc::vec::Vec, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="19")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="20")] + pub disable_login_with_email: bool, + #[prost(bool, tag="21")] + pub disable_login_with_phone: bool, + #[prost(bool, tag="22")] + pub force_mfa_local_only: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordComplexityPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(uint64, tag="2")] + pub min_length: u64, + #[prost(bool, tag="3")] + pub has_uppercase: bool, + #[prost(bool, tag="4")] + pub has_lowercase: bool, + #[prost(bool, tag="5")] + pub has_number: bool, + #[prost(bool, tag="6")] + pub has_symbol: bool, + #[prost(bool, tag="7")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordAgePolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint64, tag="2")] + pub max_age_days: u64, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint64, tag="3")] + pub expire_warn_days: u64, + /// If true, the returned values represent the instance settings, e.g. by an organization without custom settings. + #[prost(bool, tag="4")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockoutPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(uint64, tag="2")] + pub max_password_attempts: u64, + #[prost(uint64, tag="3")] + pub max_otp_attempts: u64, + #[prost(bool, tag="4")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrivacyPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub privacy_link: ::prost::alloc::string::String, + #[prost(bool, tag="4")] + pub is_default: bool, + #[prost(string, tag="5")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub support_email: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotificationPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub is_default: bool, + #[prost(bool, tag="3")] + pub password_change: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ThemeMode { + Unspecified = 0, + Auto = 1, + Dark = 2, + Light = 3, +} +impl ThemeMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ThemeMode::Unspecified => "THEME_MODE_UNSPECIFIED", + ThemeMode::Auto => "THEME_MODE_AUTO", + ThemeMode::Dark => "THEME_MODE_DARK", + ThemeMode::Light => "THEME_MODE_LIGHT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "THEME_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "THEME_MODE_AUTO" => Some(Self::Auto), + "THEME_MODE_DARK" => Some(Self::Dark), + "THEME_MODE_LIGHT" => Some(Self::Light), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SecondFactorType { + Unspecified = 0, + /// SECOND_FACTOR_TYPE_OTP is the type for TOTP + Otp = 1, + U2f = 2, + OtpEmail = 3, + OtpSms = 4, +} +impl SecondFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SecondFactorType::Unspecified => "SECOND_FACTOR_TYPE_UNSPECIFIED", + SecondFactorType::Otp => "SECOND_FACTOR_TYPE_OTP", + SecondFactorType::U2f => "SECOND_FACTOR_TYPE_U2F", + SecondFactorType::OtpEmail => "SECOND_FACTOR_TYPE_OTP_EMAIL", + SecondFactorType::OtpSms => "SECOND_FACTOR_TYPE_OTP_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SECOND_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SECOND_FACTOR_TYPE_OTP" => Some(Self::Otp), + "SECOND_FACTOR_TYPE_U2F" => Some(Self::U2f), + "SECOND_FACTOR_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + "SECOND_FACTOR_TYPE_OTP_SMS" => Some(Self::OtpSms), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MultiFactorType { + Unspecified = 0, + U2fWithVerification = 1, +} +impl MultiFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MultiFactorType::Unspecified => "MULTI_FACTOR_TYPE_UNSPECIFIED", + MultiFactorType::U2fWithVerification => "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MULTI_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION" => Some(Self::U2fWithVerification), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PasswordlessType { + NotAllowed = 0, + /// PLANNED: PASSWORDLESS_TYPE_WITH_CERT + Allowed = 1, +} +impl PasswordlessType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PasswordlessType::NotAllowed => "PASSWORDLESS_TYPE_NOT_ALLOWED", + PasswordlessType::Allowed => "PASSWORDLESS_TYPE_ALLOWED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PASSWORDLESS_TYPE_NOT_ALLOWED" => Some(Self::NotAllowed), + "PASSWORDLESS_TYPE_ALLOWED" => Some(Self::Allowed), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.project.v1.rs b/crates/zitadel-gen/src/api/zitadel.project.v1.rs new file mode 100644 index 0000000..8d18981 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.project.v1.rs @@ -0,0 +1,280 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Project { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="ProjectState", tag="4")] + pub state: i32, + /// describes if the roles of the user should be added to the token + #[prost(bool, tag="5")] + pub project_role_assertion: bool, + /// ZITADEL checks if the user has at least one on this project + #[prost(bool, tag="6")] + pub project_role_check: bool, + /// ZITADEL checks if the org of the user has permission for this project + #[prost(bool, tag="7")] + pub has_project_check: bool, + /// Defines from where the private labeling should be triggered + #[prost(enumeration="PrivateLabelingSetting", tag="8")] + pub private_labeling_setting: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GrantedProject { + #[prost(string, tag="1")] + pub grant_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub granted_org_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub granted_org_name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub granted_role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="ProjectGrantState", tag="5")] + pub state: i32, + #[prost(string, tag="6")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub project_name: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub project_owner_id: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub project_owner_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="10")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectQuery { + #[prost(oneof="project_query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `ProjectQuery`. +pub mod project_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + NameQuery(super::ProjectNameQuery), + #[prost(message, tag="2")] + ProjectResourceOwnerQuery(super::ProjectResourceOwnerQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectResourceOwnerQuery { + #[prost(string, tag="1")] + pub resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Role { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub group: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RoleQuery { + #[prost(oneof="role_query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `RoleQuery`. +pub mod role_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + KeyQuery(super::RoleKeyQuery), + #[prost(message, tag="2")] + DisplayNameQuery(super::RoleDisplayNameQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RoleKeyQuery { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RoleDisplayNameQuery { + #[prost(string, tag="1")] + pub display_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectGrantQuery { + #[prost(oneof="project_grant_query::Query", tags="1, 2")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `ProjectGrantQuery`. +pub mod project_grant_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + ProjectNameQuery(super::GrantProjectNameQuery), + #[prost(message, tag="2")] + RoleKeyQuery(super::GrantRoleKeyQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AllProjectGrantQuery { + #[prost(oneof="all_project_grant_query::Query", tags="1, 2, 3, 4")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `AllProjectGrantQuery`. +pub mod all_project_grant_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + ProjectNameQuery(super::GrantProjectNameQuery), + #[prost(message, tag="2")] + RoleKeyQuery(super::GrantRoleKeyQuery), + #[prost(message, tag="3")] + ProjectIdQuery(super::ProjectIdQuery), + #[prost(message, tag="4")] + GrantedOrgIdQuery(super::GrantedOrgIdQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GrantProjectNameQuery { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GrantRoleKeyQuery { + #[prost(string, tag="1")] + pub role_key: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProjectIdQuery { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GrantedOrgIdQuery { + #[prost(string, tag="1")] + pub granted_org_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ProjectState { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl ProjectState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ProjectState::Unspecified => "PROJECT_STATE_UNSPECIFIED", + ProjectState::Active => "PROJECT_STATE_ACTIVE", + ProjectState::Inactive => "PROJECT_STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROJECT_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "PROJECT_STATE_ACTIVE" => Some(Self::Active), + "PROJECT_STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PrivateLabelingSetting { + Unspecified = 0, + EnforceProjectResourceOwnerPolicy = 1, + AllowLoginUserResourceOwnerPolicy = 2, +} +impl PrivateLabelingSetting { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PrivateLabelingSetting::Unspecified => "PRIVATE_LABELING_SETTING_UNSPECIFIED", + PrivateLabelingSetting::EnforceProjectResourceOwnerPolicy => "PRIVATE_LABELING_SETTING_ENFORCE_PROJECT_RESOURCE_OWNER_POLICY", + PrivateLabelingSetting::AllowLoginUserResourceOwnerPolicy => "PRIVATE_LABELING_SETTING_ALLOW_LOGIN_USER_RESOURCE_OWNER_POLICY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PRIVATE_LABELING_SETTING_UNSPECIFIED" => Some(Self::Unspecified), + "PRIVATE_LABELING_SETTING_ENFORCE_PROJECT_RESOURCE_OWNER_POLICY" => Some(Self::EnforceProjectResourceOwnerPolicy), + "PRIVATE_LABELING_SETTING_ALLOW_LOGIN_USER_RESOURCE_OWNER_POLICY" => Some(Self::AllowLoginUserResourceOwnerPolicy), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ProjectGrantState { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl ProjectGrantState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ProjectGrantState::Unspecified => "PROJECT_GRANT_STATE_UNSPECIFIED", + ProjectGrantState::Active => "PROJECT_GRANT_STATE_ACTIVE", + ProjectGrantState::Inactive => "PROJECT_GRANT_STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROJECT_GRANT_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "PROJECT_GRANT_STATE_ACTIVE" => Some(Self::Active), + "PROJECT_GRANT_STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.protoc_gen_zitadel.v2.rs b/crates/zitadel-gen/src/api/zitadel.protoc_gen_zitadel.v2.rs new file mode 100644 index 0000000..2f36d6f --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.protoc_gen_zitadel.v2.rs @@ -0,0 +1,25 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Options { + #[prost(message, optional, tag="1")] + pub auth_option: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub http_response: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthOption { + #[prost(string, tag="1")] + pub permission: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub org_field: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct CustomHttpResponse { + #[prost(int32, tag="1")] + pub success_code: i32, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.quota.v1.rs b/crates/zitadel-gen/src/api/zitadel.quota.v1.rs new file mode 100644 index 0000000..b667894 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.quota.v1.rs @@ -0,0 +1,52 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Notification { + /// The percentage relative to the quotas amount on which the call_url should be called. + #[prost(uint32, tag="1")] + pub percent: u32, + /// If true, the call_url is called each time a factor of percentage is reached. + #[prost(bool, tag="2")] + pub repeat: bool, + /// The URL, which is called with HTTP method POST and a JSON payload with the properties "unit", "id" (notification id), "callURL", "periodStart", "threshold" and "usage". + #[prost(string, tag="3")] + pub call_url: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Unit { + Unimplemented = 0, + /// The sum of all requests to the ZITADEL API with an authorization header, + /// excluding the following exceptions + /// - Calls to the System API + /// - Calls that cause internal server errors + /// - Failed authorizations + /// - Requests after the quota already exceeded + RequestsAllAuthenticated = 1, + /// The sum of all actions run durations in seconds + ActionsAllRunSeconds = 2, +} +impl Unit { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Unit::Unimplemented => "UNIT_UNIMPLEMENTED", + Unit::RequestsAllAuthenticated => "UNIT_REQUESTS_ALL_AUTHENTICATED", + Unit::ActionsAllRunSeconds => "UNIT_ACTIONS_ALL_RUN_SECONDS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNIT_UNIMPLEMENTED" => Some(Self::Unimplemented), + "UNIT_REQUESTS_ALL_AUTHENTICATED" => Some(Self::RequestsAllAuthenticated), + "UNIT_ACTIONS_ALL_RUN_SECONDS" => Some(Self::ActionsAllRunSeconds), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.rs new file mode 100644 index 0000000..ccfa4d2 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.rs @@ -0,0 +1,598 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Target { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// Timeout defines the duration until ZITADEL cancels the execution. + #[prost(message, optional, tag="5")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, tag="6")] + pub endpoint: ::prost::alloc::string::String, + /// Defines the target type and how the response of the target is treated. + #[prost(oneof="target::TargetType", tags="2, 3, 4")] + pub target_type: ::core::option::Option, +} +/// Nested message and enum types in `Target`. +pub mod target { + /// Defines the target type and how the response of the target is treated. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum TargetType { + #[prost(message, tag="2")] + RestWebhook(super::SetRestWebhook), + #[prost(message, tag="3")] + RestCall(super::SetRestCall), + #[prost(message, tag="4")] + RestAsync(super::SetRestAsync), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTarget { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub config: ::core::option::Option, + #[prost(string, tag="3")] + pub signing_key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchTarget { + #[prost(string, optional, tag="1")] + pub name: ::core::option::Option<::prost::alloc::string::String>, + /// Timeout defines the duration until ZITADEL cancels the execution. + #[prost(message, optional, tag="5")] + pub timeout: ::core::option::Option<::pbjson_types::Duration>, + #[prost(string, optional, tag="6")] + pub endpoint: ::core::option::Option<::prost::alloc::string::String>, + /// Regenerate the key used for signing and checking the payload sent to the target. + /// Set the graceful period for the existing key. During that time, the previous + /// signing key and the new one will be used to sign the request to allow you a smooth + /// transition onf your API. + /// + /// Note that we currently only allow an immediate rotation ("0s") and will support + /// longer expirations in the future. + #[prost(message, optional, tag="7")] + pub expiration_signing_key: ::core::option::Option<::pbjson_types::Duration>, + /// Defines the target type and how the response of the target is treated. + #[prost(oneof="patch_target::TargetType", tags="2, 3, 4")] + pub target_type: ::core::option::Option, +} +/// Nested message and enum types in `PatchTarget`. +pub mod patch_target { + /// Defines the target type and how the response of the target is treated. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum TargetType { + #[prost(message, tag="2")] + RestWebhook(super::SetRestWebhook), + #[prost(message, tag="3")] + RestCall(super::SetRestCall), + #[prost(message, tag="4")] + RestAsync(super::SetRestAsync), + } +} +/// Wait for response but response body is ignored, status is checked, call is sent as post. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SetRestWebhook { + /// Define if any error stops the whole execution. By default the process continues as normal. + #[prost(bool, tag="1")] + pub interrupt_on_error: bool, +} +/// Wait for response and response body is used, status is checked, call is sent as post. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SetRestCall { + /// Define if any error stops the whole execution. By default the process continues as normal. + #[prost(bool, tag="1")] + pub interrupt_on_error: bool, +} +/// Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SetRestAsync { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Execution { + /// Ordered list of targets/includes called during the execution. + #[prost(message, repeated, tag="1")] + pub targets: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetExecution { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub condition: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub execution: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionTargetType { + #[prost(oneof="execution_target_type::Type", tags="1, 2")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `ExecutionTargetType`. +pub mod execution_target_type { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + /// Unique identifier of existing target to call. + #[prost(string, tag="1")] + Target(::prost::alloc::string::String), + /// Unique identifier of existing execution to include targets of. + #[prost(message, tag="2")] + Include(super::Condition), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Condition { + /// Condition-types under which conditions the execution should happen, only one possible. + #[prost(oneof="condition::ConditionType", tags="1, 2, 3, 4")] + pub condition_type: ::core::option::Option, +} +/// Nested message and enum types in `Condition`. +pub mod condition { + /// Condition-types under which conditions the execution should happen, only one possible. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ConditionType { + /// Condition-type to execute if a request on the defined API point happens. + #[prost(message, tag="1")] + Request(super::RequestExecution), + /// Condition-type to execute on response if a request on the defined API point happens. + #[prost(message, tag="2")] + Response(super::ResponseExecution), + /// Condition-type to execute if function is used, replaces actions v1. + #[prost(message, tag="3")] + Function(super::FunctionExecution), + /// Condition-type to execute if an event is created in the system. + #[prost(message, tag="4")] + Event(super::EventExecution), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestExecution { + /// Condition for the request execution. Only one is possible. + #[prost(oneof="request_execution::Condition", tags="1, 2, 3")] + pub condition: ::core::option::Option, +} +/// Nested message and enum types in `RequestExecution`. +pub mod request_execution { + /// Condition for the request execution. Only one is possible. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Condition { + /// GRPC-method as condition. + #[prost(string, tag="1")] + Method(::prost::alloc::string::String), + /// GRPC-service as condition. + #[prost(string, tag="2")] + Service(::prost::alloc::string::String), + /// All calls to any available services and methods as condition. + #[prost(bool, tag="3")] + All(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResponseExecution { + /// Condition for the response execution. Only one is possible. + #[prost(oneof="response_execution::Condition", tags="1, 2, 3")] + pub condition: ::core::option::Option, +} +/// Nested message and enum types in `ResponseExecution`. +pub mod response_execution { + /// Condition for the response execution. Only one is possible. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Condition { + /// GRPC-method as condition. + #[prost(string, tag="1")] + Method(::prost::alloc::string::String), + /// GRPC-service as condition. + #[prost(string, tag="2")] + Service(::prost::alloc::string::String), + /// All calls to any available services and methods as condition. + #[prost(bool, tag="3")] + All(bool), + } +} +/// Executed on the specified function +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FunctionExecution { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventExecution { + /// Condition for the event execution. Only one is possible. + #[prost(oneof="event_execution::Condition", tags="1, 2, 3")] + pub condition: ::core::option::Option, +} +/// Nested message and enum types in `EventExecution`. +pub mod event_execution { + /// Condition for the event execution. Only one is possible. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Condition { + /// Event name as condition. + #[prost(string, tag="1")] + Event(::prost::alloc::string::String), + /// Event group as condition, all events under this group. + #[prost(string, tag="2")] + Group(::prost::alloc::string::String), + /// all events as condition. + #[prost(bool, tag="3")] + All(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExecutionSearchFilter { + #[prost(oneof="execution_search_filter::Filter", tags="1, 2, 3, 4")] + pub filter: ::core::option::Option, +} +/// Nested message and enum types in `ExecutionSearchFilter`. +pub mod execution_search_filter { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Filter { + #[prost(message, tag="1")] + InConditionsFilter(super::InConditionsFilter), + #[prost(message, tag="2")] + ExecutionTypeFilter(super::ExecutionTypeFilter), + #[prost(message, tag="3")] + TargetFilter(super::TargetFilter), + #[prost(message, tag="4")] + IncludeFilter(super::IncludeFilter), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InConditionsFilter { + /// Defines the conditions to query for. + #[prost(message, repeated, tag="1")] + pub conditions: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ExecutionTypeFilter { + /// Defines the type to query for. + #[prost(enumeration="ExecutionType", tag="1")] + pub execution_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TargetFilter { + /// Defines the id to query for. + #[prost(string, tag="1")] + pub target_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IncludeFilter { + /// Defines the include to query for. + #[prost(message, optional, tag="1")] + pub include: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TargetSearchFilter { + #[prost(oneof="target_search_filter::Filter", tags="1, 2")] + pub filter: ::core::option::Option, +} +/// Nested message and enum types in `TargetSearchFilter`. +pub mod target_search_filter { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Filter { + #[prost(message, tag="1")] + TargetNameFilter(super::TargetNameFilter), + #[prost(message, tag="2")] + InTargetIdsFilter(super::InTargetIDsFilter), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TargetNameFilter { + /// Defines the name of the target to query for. + #[prost(string, tag="1")] + pub target_name: ::prost::alloc::string::String, + /// Defines which text comparison method used for the name query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InTargetIDsFilter { + /// Defines the ids to query for. + #[prost(string, repeated, tag="1")] + pub target_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ExecutionType { + Unspecified = 0, + Request = 1, + Response = 2, + Event = 3, + Function = 4, +} +impl ExecutionType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ExecutionType::Unspecified => "EXECUTION_TYPE_UNSPECIFIED", + ExecutionType::Request => "EXECUTION_TYPE_REQUEST", + ExecutionType::Response => "EXECUTION_TYPE_RESPONSE", + ExecutionType::Event => "EXECUTION_TYPE_EVENT", + ExecutionType::Function => "EXECUTION_TYPE_FUNCTION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXECUTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "EXECUTION_TYPE_REQUEST" => Some(Self::Request), + "EXECUTION_TYPE_RESPONSE" => Some(Self::Response), + "EXECUTION_TYPE_EVENT" => Some(Self::Event), + "EXECUTION_TYPE_FUNCTION" => Some(Self::Function), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TargetFieldName { + Unspecified = 0, + Id = 1, + CreatedDate = 2, + ChangedDate = 3, + Name = 4, + TargetType = 5, + Url = 6, + Timeout = 7, + InterruptOnError = 8, +} +impl TargetFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TargetFieldName::Unspecified => "TARGET_FIELD_NAME_UNSPECIFIED", + TargetFieldName::Id => "TARGET_FIELD_NAME_ID", + TargetFieldName::CreatedDate => "TARGET_FIELD_NAME_CREATED_DATE", + TargetFieldName::ChangedDate => "TARGET_FIELD_NAME_CHANGED_DATE", + TargetFieldName::Name => "TARGET_FIELD_NAME_NAME", + TargetFieldName::TargetType => "TARGET_FIELD_NAME_TARGET_TYPE", + TargetFieldName::Url => "TARGET_FIELD_NAME_URL", + TargetFieldName::Timeout => "TARGET_FIELD_NAME_TIMEOUT", + TargetFieldName::InterruptOnError => "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TARGET_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "TARGET_FIELD_NAME_ID" => Some(Self::Id), + "TARGET_FIELD_NAME_CREATED_DATE" => Some(Self::CreatedDate), + "TARGET_FIELD_NAME_CHANGED_DATE" => Some(Self::ChangedDate), + "TARGET_FIELD_NAME_NAME" => Some(Self::Name), + "TARGET_FIELD_NAME_TARGET_TYPE" => Some(Self::TargetType), + "TARGET_FIELD_NAME_URL" => Some(Self::Url), + "TARGET_FIELD_NAME_TIMEOUT" => Some(Self::Timeout), + "TARGET_FIELD_NAME_INTERRUPT_ON_ERROR" => Some(Self::InterruptOnError), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ExecutionFieldName { + Unspecified = 0, + Id = 1, + CreatedDate = 2, + ChangedDate = 3, +} +impl ExecutionFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ExecutionFieldName::Unspecified => "EXECUTION_FIELD_NAME_UNSPECIFIED", + ExecutionFieldName::Id => "EXECUTION_FIELD_NAME_ID", + ExecutionFieldName::CreatedDate => "EXECUTION_FIELD_NAME_CREATED_DATE", + ExecutionFieldName::ChangedDate => "EXECUTION_FIELD_NAME_CHANGED_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXECUTION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "EXECUTION_FIELD_NAME_ID" => Some(Self::Id), + "EXECUTION_FIELD_NAME_CREATED_DATE" => Some(Self::CreatedDate), + "EXECUTION_FIELD_NAME_CHANGED_DATE" => Some(Self::ChangedDate), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateTargetRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub target: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateTargetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// Key used to sign and check payload sent to the target. + #[prost(string, tag="2")] + pub signing_key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchTargetRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub target: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchTargetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// Key used to sign and check payload sent to the target. + #[prost(string, optional, tag="2")] + pub signing_key: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteTargetRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteTargetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTargetRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTargetResponse { + #[prost(message, optional, tag="1")] + pub target: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchTargetsRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// list limitations and ordering. + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + #[prost(enumeration="TargetFieldName", optional, tag="3")] + pub sorting_column: ::core::option::Option, + /// Define the criteria to query for. + #[prost(message, repeated, tag="4")] + pub filters: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchTargetsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetExecutionRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub condition: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub execution: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetExecutionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchExecutionsRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// list limitations and ordering. + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + #[prost(enumeration="ExecutionFieldName", optional, tag="3")] + pub sorting_column: ::core::option::Option, + /// Define the criteria to query for. + #[prost(message, repeated, tag="4")] + pub filters: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchExecutionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListExecutionFunctionsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListExecutionFunctionsResponse { + /// All available methods + #[prost(string, repeated, tag="1")] + pub functions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListExecutionMethodsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListExecutionMethodsResponse { + /// All available methods + #[prost(string, repeated, tag="1")] + pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListExecutionServicesRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListExecutionServicesResponse { + /// All available methods + #[prost(string, repeated, tag="1")] + pub services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +include!("zitadel.resources.action.v3alpha.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.tonic.rs b/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.tonic.rs new file mode 100644 index 0000000..f4ee8a8 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.action.v3alpha.tonic.rs @@ -0,0 +1,418 @@ +// @generated +/// Generated client implementations. +pub mod zitadel_actions_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 ZitadelActionsClient { + inner: tonic::client::Grpc, + } + impl ZitadelActionsClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ZitadelActionsClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ZitadelActionsClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ZitadelActionsClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 create_target( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/CreateTarget", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "CreateTarget", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn patch_target( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/PatchTarget", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "PatchTarget", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_target( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/DeleteTarget", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "DeleteTarget", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Target by ID + + Returns the target identified by the requested ID. +*/ + pub async fn get_target( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/GetTarget", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "GetTarget", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Search targets + + Search all matching targets. By default all targets of the instance are returned. + Make sure to include a limit and sorting for pagination. +*/ + pub async fn search_targets( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/SearchTargets", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "SearchTargets", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Sets an execution to call a target or include the targets of another execution. + + Setting an empty list of targets will remove all targets from the execution, making it a noop. +*/ + pub async fn set_execution( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/SetExecution", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "SetExecution", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Search executions + + Search all matching executions. By default all executions of the instance are returned that have at least one execution target. + Make sure to include a limit and sorting for pagination. +*/ + pub async fn search_executions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/SearchExecutions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "SearchExecutions", + ), + ); + self.inner.unary(req, path, codec).await + } + /** List all available functions + + List all available functions which can be used as condition for executions. +*/ + pub async fn list_execution_functions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/ListExecutionFunctions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "ListExecutionFunctions", + ), + ); + self.inner.unary(req, path, codec).await + } + /** List all available methods + + List all available methods which can be used as condition for executions. +*/ + pub async fn list_execution_methods( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/ListExecutionMethods", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "ListExecutionMethods", + ), + ); + self.inner.unary(req, path, codec).await + } + /** List all available service + + List all available services which can be used as condition for executions. +*/ + pub async fn list_execution_services( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.action.v3alpha.ZITADELActions/ListExecutionServices", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.action.v3alpha.ZITADELActions", + "ListExecutionServices", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.rs new file mode 100644 index 0000000..3081f66 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.rs @@ -0,0 +1,103 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Event { + #[prost(oneof="event::Event", tags="1, 2, 3")] + pub event: ::core::option::Option, +} +/// Nested message and enum types in `Event`. +pub mod event { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Event { + #[prost(message, tag="1")] + Add(super::AddedEvent), + #[prost(message, tag="2")] + Change(super::ChangedEvent), + #[prost(message, tag="3")] + Remove(super::RemovedEvent), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddedEvent { + /// issues a pg_sleep command in the projection reducer, simulating a slow query. + #[prost(message, optional, tag="1")] + pub projection_sleep: ::core::option::Option<::pbjson_types::Duration>, + /// optional text that can be set as a state. + #[prost(string, optional, tag="2")] + pub blob: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChangedEvent { + /// issues a pg_sleep command in the projection reducer, simulating a slow query. + #[prost(message, optional, tag="1")] + pub projection_sleep: ::core::option::Option<::pbjson_types::Duration>, + /// optional text that can be set as a state. + #[prost(string, optional, tag="2")] + pub blob: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemovedEvent { + /// issues a pg_sleep command in the projection reducer, simulating a slow query. + #[prost(message, optional, tag="1")] + pub projection_sleep: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct State { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub blob: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDebugEventsRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// unique identifier for the aggregate we want to push events to. + #[prost(string, tag="2")] + pub aggregate_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="3")] + pub events: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateDebugEventsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDebugEventsStateByIdRequest { + /// unique identifier of the aggregate. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub trigger_bulk: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDebugEventsStateByIdResponse { + #[prost(message, optional, tag="1")] + pub state: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListDebugEventsStatesRequest { + #[prost(bool, tag="1")] + pub trigger_bulk: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDebugEventsStatesResponse { + #[prost(message, repeated, tag="1")] + pub states: ::prost::alloc::vec::Vec, +} +include!("zitadel.resources.debug_events.v3alpha.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.tonic.rs b/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.tonic.rs new file mode 100644 index 0000000..777924e --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.debug_events.v3alpha.tonic.rs @@ -0,0 +1,178 @@ +// @generated +/// Generated client implementations. +pub mod zitadel_debug_events_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 ZitadelDebugEventsClient { + inner: tonic::client::Grpc, + } + impl ZitadelDebugEventsClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ZitadelDebugEventsClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ZitadelDebugEventsClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ZitadelDebugEventsClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 create_debug_events( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.debug_events.v3alpha.ZITADELDebugEvents/CreateDebugEvents", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.debug_events.v3alpha.ZITADELDebugEvents", + "CreateDebugEvents", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_debug_events_state_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.debug_events.v3alpha.ZITADELDebugEvents/GetDebugEventsStateById", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.debug_events.v3alpha.ZITADELDebugEvents", + "GetDebugEventsStateById", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_debug_events_states( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.debug_events.v3alpha.ZITADELDebugEvents/ListDebugEventsStates", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.debug_events.v3alpha.ZITADELDebugEvents", + "ListDebugEventsStates", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.resources.object.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.object.v3alpha.rs new file mode 100644 index 0000000..f04a551 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.object.v3alpha.rs @@ -0,0 +1,74 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Details { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// the timestamp of the first event applied to the object. + #[prost(message, optional, tag="3")] + pub created: ::core::option::Option<::pbjson_types::Timestamp>, + /// the timestamp of the last event applied to the object. + #[prost(message, optional, tag="4")] + pub changed: ::core::option::Option<::pbjson_types::Timestamp>, + /// the parent object representing the returned objects context. + #[prost(message, optional, tag="5")] + pub owner: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(uint64, tag="1")] + pub offset: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + /// If desc is true, the result is sorted by in descending order. Beware that if desc is true or the sorting column is not the creation date, the pagination results might be inconsistent. + #[prost(bool, tag="3")] + pub desc: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListDetails { + #[prost(uint64, tag="1")] + pub applied_limit: u64, + #[prost(uint64, tag="2")] + pub total_result: u64, + #[prost(message, optional, tag="3")] + pub timestamp: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TextFilterMethod { + Equals = 0, + EqualsIgnoreCase = 1, + StartsWith = 2, + StartsWithIgnoreCase = 3, + Contains = 4, +} +impl TextFilterMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TextFilterMethod::Equals => "TEXT_FILTER_METHOD_EQUALS", + TextFilterMethod::EqualsIgnoreCase => "TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE", + TextFilterMethod::StartsWith => "TEXT_FILTER_METHOD_STARTS_WITH", + TextFilterMethod::StartsWithIgnoreCase => "TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE", + TextFilterMethod::Contains => "TEXT_FILTER_METHOD_CONTAINS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TEXT_FILTER_METHOD_EQUALS" => Some(Self::Equals), + "TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE" => Some(Self::EqualsIgnoreCase), + "TEXT_FILTER_METHOD_STARTS_WITH" => Some(Self::StartsWith), + "TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE" => Some(Self::StartsWithIgnoreCase), + "TEXT_FILTER_METHOD_CONTAINS" => Some(Self::Contains), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.rs new file mode 100644 index 0000000..470dbd8 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.rs @@ -0,0 +1,1750 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Authenticators { + /// All of the user's usernames, which will be used for identification during authentication. + #[prost(message, repeated, tag="1")] + pub usernames: ::prost::alloc::vec::Vec, + /// If the user has set a password, the time it was last changed will be returned. + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, + /// Meta information about the user's WebAuthN authenticators. + #[prost(message, repeated, tag="3")] + pub web_auth_n: ::prost::alloc::vec::Vec, + /// A list of the user's time-based one-time password (TOTP) authenticators, + /// incl. the name for identification. + #[prost(message, repeated, tag="4")] + pub totps: ::prost::alloc::vec::Vec, + /// A list of the user's one-time password (OTP) SMS authenticators. + #[prost(message, repeated, tag="5")] + pub otp_sms: ::prost::alloc::vec::Vec, + /// A list of the user's one-time password (OTP) Email authenticators. + #[prost(message, repeated, tag="6")] + pub otp_email: ::prost::alloc::vec::Vec, + /// A list of the user's authentication keys. They can be used to authenticate e.g. by JWT Profile. + #[prost(message, repeated, tag="7")] + pub authentication_keys: ::prost::alloc::vec::Vec, + /// A list of the user's linked identity providers (IDPs). + #[prost(message, repeated, tag="8")] + pub identity_providers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Username { + /// unique identifier of the username. + #[prost(string, tag="1")] + pub username_id: ::prost::alloc::string::String, + /// The user's unique username. It is used for identification during authentication. + #[prost(string, tag="2")] + pub username: ::prost::alloc::string::String, + /// By default usernames must be unique across all organizations in an instance. + /// This option allow to restrict the uniqueness to the user's own organization. + /// As a result, this username can only be used if the authentication is limited + /// to the corresponding organization. + /// + /// This can be useful if you provide multiple usernames for a single user, where one + /// if specific to your organization, e.g.: + /// - gigi-giraffe@zitadel.com (unique across organizations) + /// - gigi-giraffe (unique only inside the ZITADEL organization) + #[prost(bool, tag="3")] + pub is_organization_specific: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetUsername { + /// Set the user's username. This will be used for identification during authentication. + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + /// By default username must be unique across all organizations in an instance. + /// This option allow to restrict the uniqueness to the user's own organization. + /// As a result, this username can only be used if the authentication is limited + /// to the corresponding organization. + /// + /// This can be useful if you provide multiple usernames for a single user, where one + /// if specific to your organization, e.g.: + /// - gigi-giraffe@zitadel.com (unique across organizations) + /// - gigi-giraffe (unique only inside the ZITADEL organization) + #[prost(bool, tag="2")] + pub is_organization_specific: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct Password { + /// States the time the password was last changed. + #[prost(message, optional, tag="1")] + pub last_changed: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebAuthN { + /// unique identifier of the WebAuthN authenticator. + #[prost(string, tag="1")] + pub web_auth_n_id: ::prost::alloc::string::String, + /// Name of the WebAuthN authenticator. This is used for easier identification. + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + /// State whether the WebAuthN registration has been completed. + #[prost(bool, tag="3")] + pub is_verified: bool, + /// States if the user has been verified during the registration. Authentication with this device + /// will be considered as multi-factor authentication (MFA) without the need to check a password + /// (typically known as Passkeys). + /// Without user verification it will be a second factor authentication (2FA), typically done + /// after a password check. + /// + /// More on WebAuthN User Verification: + #[prost(bool, tag="4")] + pub user_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartWebAuthNRegistration { + /// Domain on which the user currently is or will be authenticated. + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + /// Optionally specify the authenticator type of the passkey device (platform or cross-platform). + /// If none is provided, both values are allowed. + #[prost(enumeration="WebAuthNAuthenticatorType", tag="2")] + pub authenticator_type: i32, + /// Optionally provide a one time code generated by ZITADEL. + /// This is required to start the passkey registration without user authentication. + #[prost(message, optional, tag="3")] + pub code: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyWebAuthNRegistration { + /// PublicKeyCredential Interface. + /// Generated helper methods populate the field from JSON created by a WebAuthN client. + /// See also: + #[prost(message, optional, tag="1")] + pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>, + /// Provide a name for the WebAuthN device. This will help identify it in the future. + #[prost(string, tag="2")] + pub web_auth_n_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Otpsms { + /// unique identifier of the one-time password (OTP) SMS authenticator. + #[prost(string, tag="1")] + pub otp_sms_id: ::prost::alloc::string::String, + /// The phone number used for the OTP SMS authenticator. + #[prost(string, tag="2")] + pub phone: ::prost::alloc::string::String, + /// State whether the OTP SMS registration has been completed. + #[prost(bool, tag="3")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OtpEmail { + /// unique identifier of the one-time password (OTP) Email authenticator. + #[prost(string, tag="1")] + pub otp_email_id: ::prost::alloc::string::String, + /// The email address used for the OTP Email authenticator. + #[prost(string, tag="2")] + pub address: ::prost::alloc::string::String, + /// State whether the OTP Email registration has been completed. + #[prost(bool, tag="3")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Totp { + /// unique identifier of the time-based one-time password (TOTP) authenticator. + #[prost(string, tag="1")] + pub totp_id: ::prost::alloc::string::String, + /// The name provided during registration. This is used for easier identification. + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + /// State whether the TOTP registration has been completed. + #[prost(bool, tag="3")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthenticationKey { + /// ID is the read-only unique identifier of the authentication key. + #[prost(string, tag="1")] + pub authentication_key_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + /// the file type of the key + #[prost(enumeration="AuthNKeyType", tag="3")] + pub r#type: i32, + /// After the expiration date, the key will no longer be usable for authentication. + #[prost(message, optional, tag="4")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdentityProvider { + /// IDP ID is the read-only unique identifier of the identity provider in ZITADEL. + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + /// IDP name is the name of the identity provider in ZITADEL. + #[prost(string, tag="3")] + pub idp_name: ::prost::alloc::string::String, + /// The user ID represents the ID provided by the identity provider. + /// This ID is used to link the user in ZITADEL with the identity provider. + #[prost(string, tag="4")] + pub user_id: ::prost::alloc::string::String, + /// The username represents the username provided by the identity provider. + #[prost(string, tag="5")] + pub username: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetAuthenticators { + #[prost(message, repeated, tag="1")] + pub usernames: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPassword { + /// Provide if the user needs to change the password on the next use. + #[prost(bool, tag="3")] + pub change_required: bool, + #[prost(oneof="set_password::Type", tags="1, 2")] + pub r#type: ::core::option::Option, + /// If neither, the current password nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password. + #[prost(oneof="set_password::Verification", tags="4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPassword`. +pub mod set_password { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + /// Provide the plain text password. ZITADEL will take care to store it in a secure way (hash). + #[prost(string, tag="1")] + Password(::prost::alloc::string::String), + /// Encoded hash of a password in Modular Crypt Format: + /// + #[prost(string, tag="2")] + Hash(::prost::alloc::string::String), + } + /// If neither, the current password nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + /// Provide the current password to verify you're allowed to change the password. + #[prost(string, tag="4")] + CurrentPassword(::prost::alloc::string::String), + /// Or provider the verification code generated during password reset request. + #[prost(string, tag="5")] + VerificationCode(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasswordResetEmail { + /// Optionally set a url_template, which will be used in the password reset mail + /// sent by ZITADEL to guide the user to your password change page. + /// If no template is set, the default ZITADEL url will be used. + #[prost(string, optional, tag="2")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SendPasswordResetSms { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPasswordResetCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthenticatorRegistrationCode { + /// ID to the one time code generated by ZITADEL. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// one time code generated by ZITADEL. + #[prost(string, tag="2")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendWebAuthNRegistrationLink { + /// Optionally set a url_template, which will be used in the mail sent by ZITADEL + /// to guide the user to your passkey registration page. + /// If no template is set, the default ZITADEL url will be used. + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnWebAuthNRegistrationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RedirectUrLs { + /// URL to which the user will be redirected after a successful login. + #[prost(string, tag="1")] + pub success_url: ::prost::alloc::string::String, + /// URL to which the user will be redirected after a failed login. + #[prost(string, tag="2")] + pub failure_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapCredentials { + /// Username used to login through LDAP. + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + /// Password used to login through LDAP. + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdentityProviderIntent { + /// ID of the identity provider (IDP) intent. + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + /// Token of the identity provider (IDP) intent. + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, + /// If the user was already federated and linked to a ZITADEL user, it's id will be returned. + #[prost(string, optional, tag="3")] + pub user_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpInformation { + /// ID of the identity provider. + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + /// ID of the user provided by the identity provider. + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + /// Username of the user provided by the identity provider. + #[prost(string, tag="3")] + pub user_name: ::prost::alloc::string::String, + /// Complete information returned by the identity provider. + #[prost(message, optional, tag="4")] + pub raw_information: ::core::option::Option<::pbjson_types::Struct>, + /// additional access information returned by the identity provider. + #[prost(oneof="idp_information::Access", tags="5, 6, 7")] + pub access: ::core::option::Option, +} +/// Nested message and enum types in `IDPInformation`. +pub mod idp_information { + /// additional access information returned by the identity provider. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Access { + /// OAuth/OIDC access (and id_token) returned by the identity provider. + #[prost(message, tag="5")] + Oauth(super::IdpoAuthAccessInformation), + /// LDAP entity attributes returned by the identity provider + #[prost(message, tag="6")] + Ldap(super::IdpldapAccessInformation), + /// SAMLResponse returned by the identity provider + #[prost(message, tag="7")] + Saml(super::IdpsamlAccessInformation), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpoAuthAccessInformation { + /// The access_token returned by the identity provider. + #[prost(string, tag="1")] + pub access_token: ::prost::alloc::string::String, + /// In case the provider returned an id_token. + #[prost(string, optional, tag="2")] + pub id_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpldapAccessInformation { + /// The attributes of the user returned by the identity provider. + #[prost(message, optional, tag="1")] + pub attributes: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpsamlAccessInformation { + /// The SAML assertion returned by the identity provider. + #[prost(bytes="vec", tag="1")] + pub assertion: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpAuthenticator { + /// ID of the identity provider + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + /// ID of the user provided by the identity provider + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + /// Username of the user provided by the identity provider. + #[prost(string, tag="3")] + pub user_name: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthNKeyType { + AuthnKeyTypeUnspecified = 0, + AuthnKeyTypeJson = 1, +} +impl AuthNKeyType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthNKeyType::AuthnKeyTypeUnspecified => "AUTHN_KEY_TYPE_UNSPECIFIED", + AuthNKeyType::AuthnKeyTypeJson => "AUTHN_KEY_TYPE_JSON", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHN_KEY_TYPE_UNSPECIFIED" => Some(Self::AuthnKeyTypeUnspecified), + "AUTHN_KEY_TYPE_JSON" => Some(Self::AuthnKeyTypeJson), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum WebAuthNAuthenticatorType { + WebAuthNAuthenticatorUnspecified = 0, + WebAuthNAuthenticatorPlatform = 1, + WebAuthNAuthenticatorCrossPlatform = 2, +} +impl WebAuthNAuthenticatorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WebAuthNAuthenticatorType::WebAuthNAuthenticatorUnspecified => "WEB_AUTH_N_AUTHENTICATOR_UNSPECIFIED", + WebAuthNAuthenticatorType::WebAuthNAuthenticatorPlatform => "WEB_AUTH_N_AUTHENTICATOR_PLATFORM", + WebAuthNAuthenticatorType::WebAuthNAuthenticatorCrossPlatform => "WEB_AUTH_N_AUTHENTICATOR_CROSS_PLATFORM", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "WEB_AUTH_N_AUTHENTICATOR_UNSPECIFIED" => Some(Self::WebAuthNAuthenticatorUnspecified), + "WEB_AUTH_N_AUTHENTICATOR_PLATFORM" => Some(Self::WebAuthNAuthenticatorPlatform), + "WEB_AUTH_N_AUTHENTICATOR_CROSS_PLATFORM" => Some(Self::WebAuthNAuthenticatorCrossPlatform), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Contact { + /// Email contact information of the user. + #[prost(message, optional, tag="1")] + pub email: ::core::option::Option, + /// Phone contact information of the user. + #[prost(message, optional, tag="2")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Email { + /// Email address of the user. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// IsVerified states if the email address has been verified to belong to the user. + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Phone { + /// Phone number of the user. + #[prost(string, tag="1")] + pub number: ::prost::alloc::string::String, + /// IsVerified states if the phone number has been verified to belong to the user. + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetContact { + #[prost(message, optional, tag="1")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetEmail { + /// Set the email address. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="set_email::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetEmail`. +pub mod set_email { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + /// Let ZITADEL send the link to the user via email. + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + /// Set the email as already verified. + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendEmailVerificationCode { + /// Optionally set a url_template, which will be used in the verification mail sent by ZITADEL + /// to guide the user to your verification page. + /// If no template is set, the default ZITADEL url will be used. + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnEmailVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPhone { + /// Set the user's phone number. + #[prost(string, tag="1")] + pub number: ::prost::alloc::string::String, + /// if no verification is specified, a SMS is sent + #[prost(oneof="set_phone::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPhone`. +pub mod set_phone { + /// if no verification is specified, a SMS is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + /// Let ZITADEL send the link to the user via SMS. + #[prost(message, tag="2")] + SendCode(super::SendPhoneVerificationCode), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="3")] + ReturnCode(super::ReturnPhoneVerificationCode), + /// Set the phone as already verified. + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SendPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateUser { + /// Define the schema the user's data schema by providing it's ID. + #[prost(string, tag="1")] + pub schema_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub data: ::core::option::Option<::pbjson_types::Struct>, + /// Set the contact information (email, phone) for the user. + #[prost(message, optional, tag="3")] + pub contact: ::core::option::Option, + /// Set the initial authenticators of the user. + #[prost(message, optional, tag="4")] + pub authenticators: ::core::option::Option, + /// Optionally set a unique identifier of the user. If unset, ZITADEL will take care of it. + #[prost(string, optional, tag="5")] + pub user_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUser { + #[prost(string, optional, tag="1")] + pub schema_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="2")] + pub data: ::core::option::Option<::pbjson_types::Struct>, + /// Set the contact information (email, phone) for the user. + /// + /// TODO: No SetAuthenticators? + #[prost(message, optional, tag="3")] + pub contact: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUser { + /// Details provide some base information (such as the last change date) of the user. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The schema the user and it's data is based on. + #[prost(message, optional, tag="2")] + pub schema: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub data: ::core::option::Option<::pbjson_types::Struct>, + /// Contact information for the user. ZITADEL will use this in case of internal notifications. + #[prost(message, optional, tag="4")] + pub contact: ::core::option::Option, + /// The user's authenticators. They are used to identify and authenticate the user + /// during the authentication process. + #[prost(message, optional, tag="5")] + pub authenticators: ::core::option::Option, + /// State of the user. + #[prost(enumeration="State", tag="6")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSchema { + /// The unique identifier of the user schema. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// The human readable name of the user schema. + #[prost(string, tag="2")] + pub r#type: ::prost::alloc::string::String, + /// The revision the user's data is based on of the revision. + #[prost(uint32, tag="3")] + pub revision: u32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum State { + UserStateUnspecified = 0, + UserStateActive = 1, + UserStateInactive = 2, + UserStateDeleted = 3, + UserStateLocked = 4, +} +impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::UserStateUnspecified => "USER_STATE_UNSPECIFIED", + State::UserStateActive => "USER_STATE_ACTIVE", + State::UserStateInactive => "USER_STATE_INACTIVE", + State::UserStateDeleted => "USER_STATE_DELETED", + State::UserStateLocked => "USER_STATE_LOCKED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_STATE_UNSPECIFIED" => Some(Self::UserStateUnspecified), + "USER_STATE_ACTIVE" => Some(Self::UserStateActive), + "USER_STATE_INACTIVE" => Some(Self::UserStateInactive), + "USER_STATE_DELETED" => Some(Self::UserStateDeleted), + "USER_STATE_LOCKED" => Some(Self::UserStateLocked), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchFilter { + #[prost(oneof="search_filter::Filter", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")] + pub filter: ::core::option::Option, +} +/// Nested message and enum types in `SearchFilter`. +pub mod search_filter { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Filter { + /// Union the results of each sub filter ('OR'). + #[prost(message, tag="1")] + OrFilter(super::OrFilter), + /// Limit the result to match all sub queries ('AND'). + /// Note that if you specify multiple queries, they will be implicitly used as andQueries. + /// Use the andFilter in combination with orFilter and notFilter. + #[prost(message, tag="2")] + AndFilter(super::AndFilter), + /// Exclude / Negate the result of the sub query ('NOT'). + #[prost(message, tag="3")] + NotFilter(::prost::alloc::boxed::Box), + /// Limit the result to a specific user ID. + #[prost(message, tag="4")] + UserIdFilter(super::UserIdFilter), + /// Limit the result to a specific organization. + #[prost(message, tag="5")] + OrganizationIdFilter(super::OrganizationIdFilter), + /// Limit the result to a specific username. + #[prost(message, tag="6")] + UsernameFilter(super::UsernameFilter), + /// Limit the result to a specific contact email. + #[prost(message, tag="7")] + EmailFilter(super::EmailFilter), + /// Limit the result to a specific contact phone. + #[prost(message, tag="8")] + PhoneFilter(super::PhoneFilter), + /// Limit the result to a specific state of the user. + #[prost(message, tag="9")] + StateFilter(super::StateFilter), + /// Limit the result to a specific schema ID. + #[prost(message, tag="10")] + SchemaIdFilter(super::SchemaIdFilter), + /// Limit the result to a specific schema type. + #[prost(message, tag="11")] + SchemaTypeFilter(super::SchemaTypeFilter), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrFilter { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndFilter { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotFilter { + #[prost(message, optional, boxed, tag="1")] + pub query: ::core::option::Option<::prost::alloc::boxed::Box>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserIdFilter { + /// Defines the ID of the user to query for. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// Defines which text comparison method used for the id query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationIdFilter { + /// Defines the ID of the organization to query for. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// Defines which text comparison method used for the id query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UsernameFilter { + /// Defines the username to query for. + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + /// Defines which text comparison method used for the username query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, + /// Defines that the username must only be unique in the organisation. + #[prost(bool, tag="3")] + pub is_organization_specific: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailFilter { + /// Defines the email of the user to query for. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// Defines which text comparison method used for the email query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PhoneFilter { + /// Defines the phone of the user to query for. + #[prost(string, tag="1")] + pub number: ::prost::alloc::string::String, + /// Defines which text comparison method used for the phone query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StateFilter { + /// Defines the state to query for. + #[prost(enumeration="State", tag="1")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SchemaIdFilter { + /// Defines the ID of the schema to query for. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SchemaTypeFilter { + /// Defines which type to query for. + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + /// Defines which text comparison method used for the type query. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FieldName { + Unspecified = 0, + Id = 1, + CreationDate = 2, + ChangeDate = 3, + Email = 4, + Phone = 5, + State = 6, + SchemaId = 7, + SchemaType = 8, +} +impl FieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FieldName::Unspecified => "FIELD_NAME_UNSPECIFIED", + FieldName::Id => "FIELD_NAME_ID", + FieldName::CreationDate => "FIELD_NAME_CREATION_DATE", + FieldName::ChangeDate => "FIELD_NAME_CHANGE_DATE", + FieldName::Email => "FIELD_NAME_EMAIL", + FieldName::Phone => "FIELD_NAME_PHONE", + FieldName::State => "FIELD_NAME_STATE", + FieldName::SchemaId => "FIELD_NAME_SCHEMA_ID", + FieldName::SchemaType => "FIELD_NAME_SCHEMA_TYPE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "FIELD_NAME_ID" => Some(Self::Id), + "FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + "FIELD_NAME_CHANGE_DATE" => Some(Self::ChangeDate), + "FIELD_NAME_EMAIL" => Some(Self::Email), + "FIELD_NAME_PHONE" => Some(Self::Phone), + "FIELD_NAME_STATE" => Some(Self::State), + "FIELD_NAME_SCHEMA_ID" => Some(Self::SchemaId), + "FIELD_NAME_SCHEMA_TYPE" => Some(Self::SchemaType), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchUsersRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Search limitations and ordering. + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// the field the result is sorted. + #[prost(enumeration="FieldName", tag="3")] + pub sorting_column: i32, + /// Define the criteria to query for. + #[prost(message, repeated, tag="4")] + pub filters: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchUsersResponse { + /// Details provides information about the returned result including total amount found. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The result contains the user schemas, which matched the queries. + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserResponse { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Set the organization the user belongs to. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The email code will be set if a contact email was set with a return_code verification option. + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + /// The phone code will be set if a contact phone was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The email code will be set if a contact email was set with a return_code verification option. + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + /// The phone code will be set if a contact phone was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetContactEmailRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the user's contact email and it's verification state. + #[prost(message, optional, tag="4")] + pub email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetContactEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The verification code will be set if a contact email was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyContactEmailRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the verification code generated during the set contact email request. + #[prost(string, tag="4")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyContactEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendContactEmailCodeRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent + #[prost(oneof="resend_contact_email_code_request::Verification", tags="4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendContactEmailCodeRequest`. +pub mod resend_contact_email_code_request { + /// if no verification is specified, an email is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + /// Let ZITADEL send the link to the user via email. + #[prost(message, tag="4")] + SendCode(super::SendEmailVerificationCode), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="5")] + ReturnCode(super::ReturnEmailVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendContactEmailCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned. + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetContactPhoneRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the user's contact phone and it's verification state. + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetContactPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The phone verification code will be set if a contact phone was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyContactPhoneRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the verification code generated during the set contact phone request. + #[prost(string, tag="4")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyContactPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendContactPhoneCodeRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// if no verification is specified, a SMS is sent + #[prost(oneof="resend_contact_phone_code_request::Verification", tags="4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendContactPhoneCodeRequest`. +pub mod resend_contact_phone_code_request { + /// if no verification is specified, a SMS is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + /// Let ZITADEL send the link to the user via SMS. + #[prost(message, tag="4")] + SendCode(super::SendPhoneVerificationCode), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="5")] + ReturnCode(super::ReturnPhoneVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendContactPhoneCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned. + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddUsernameRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the user's new username. + #[prost(message, optional, tag="4")] + pub username: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddUsernameResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// unique identifier of the username. + #[prost(string, tag="2")] + pub username_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUsernameRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the username. + #[prost(string, tag="4")] + pub username_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveUsernameResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Provide the new password (in plain text or as hash). + #[prost(message, optional, tag="4")] + pub new_password: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestPasswordResetRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// If no medium is specified, an email is sent with the default url. + #[prost(oneof="request_password_reset_request::Medium", tags="4, 5, 6")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `RequestPasswordResetRequest`. +pub mod request_password_reset_request { + /// If no medium is specified, an email is sent with the default url. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + /// Let ZITADEL send the link to the user via email. + #[prost(message, tag="4")] + SendEmail(super::SendPasswordResetEmail), + /// Let ZITADEL send the link to the user via SMS. + #[prost(message, tag="5")] + SendSms(super::SendPasswordResetSms), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="6")] + ReturnCode(super::ReturnPasswordResetCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestPasswordResetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// In case the medium was set to return_code, the code will be returned. + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartWebAuthNRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub registration: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartWebAuthNRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// unique identifier of the WebAuthN registration. + #[prost(string, tag="2")] + pub web_auth_n_id: ::prost::alloc::string::String, + /// Options for Credential Creation (dictionary PublicKeyCredentialCreationOptions). + /// Generated helper methods transform the field to JSON, for use in a WebauthN client. + /// See also: + #[prost(message, optional, tag="3")] + pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyWebAuthNRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the WebAuthN registration, which was returned in the start webauthn registration. + #[prost(string, tag="4")] + pub web_auth_n_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="5")] + pub verify: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyWebAuthNRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWebAuthNRegistrationLinkRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// if no medium is specified, an email is sent with the default url. + #[prost(oneof="create_web_auth_n_registration_link_request::Medium", tags="4, 5")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `CreateWebAuthNRegistrationLinkRequest`. +pub mod create_web_auth_n_registration_link_request { + /// if no medium is specified, an email is sent with the default url. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + /// Let ZITADEL send the link to the user via email. + #[prost(message, tag="4")] + SendLink(super::SendWebAuthNRegistrationLink), + /// Get the code back to provide it to the user in your preferred mechanism. + #[prost(message, tag="5")] + ReturnCode(super::ReturnWebAuthNRegistrationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWebAuthNRegistrationLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// In case the medium was set to return_code, the code will be returned. + #[prost(message, optional, tag="2")] + pub code: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveWebAuthNAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the WebAuthN authenticator. + #[prost(string, tag="4")] + pub web_auth_n_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveWebAuthNAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartTotpRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartTotpRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// unique identifier of the TOTP registration. + #[prost(string, tag="2")] + pub totp_id: ::prost::alloc::string::String, + /// The TOTP URI, which can be used to create a QR Code for scanning with an authenticator app. + #[prost(string, tag="3")] + pub uri: ::prost::alloc::string::String, + /// The TOTP secret, which can be used for manually adding in an authenticator app. + #[prost(string, tag="4")] + pub secret: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the TOTP registration, which was returned in the start TOTP registration. + #[prost(string, tag="4")] + pub totp_id: ::prost::alloc::string::String, + /// Code generated by TOTP app or device. + #[prost(string, tag="5")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the TOTP authenticator. + #[prost(string, tag="4")] + pub totp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the user's phone for the OTP SMS authenticator and it's verification state. + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// unique identifier of the OTP SMS registration. + #[prost(string, tag="2")] + pub otp_sms_id: ::prost::alloc::string::String, + /// The OTP verification code will be set if a phone was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyOtpsmsRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the OTP SMS registration, which was returned in the add OTP SMS. + #[prost(string, tag="4")] + pub otp_sms_id: ::prost::alloc::string::String, + /// Set the verification code generated during the add OTP SMS request. + #[prost(string, tag="5")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyOtpsmsRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the OTP SMS authenticator. + #[prost(string, tag="4")] + pub otp_sms_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// Set the user's email for the OTP Email authenticator and it's verification state. + #[prost(message, optional, tag="4")] + pub email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// unique identifier of the OTP Email registration. + #[prost(string, tag="2")] + pub otp_email_id: ::prost::alloc::string::String, + /// The OTP verification code will be set if a email was set with a return_code verification option. + #[prost(string, optional, tag="3")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyOtpEmailRegistrationRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the OTP Email registration, which was returned in the add OTP Email. + #[prost(string, tag="4")] + pub otp_email_id: ::prost::alloc::string::String, + /// Set the verification code generated during the add OTP Email request. + #[prost(string, tag="5")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyOtpEmailRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the OTP Email authenticator. + #[prost(string, tag="4")] + pub otp_email_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// ID of an existing identity provider (IDP). + #[prost(string, tag="3")] + pub idp_id: ::prost::alloc::string::String, + #[prost(oneof="start_identity_provider_intent_request::Content", tags="4, 5")] + pub content: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentRequest`. +pub mod start_identity_provider_intent_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Content { + #[prost(message, tag="4")] + Urls(super::RedirectUrLs), + #[prost(message, tag="5")] + Ldap(super::LdapCredentials), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// the next step to take in the idp intent flow. + #[prost(oneof="start_identity_provider_intent_response::NextStep", tags="2, 3, 4")] + pub next_step: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentResponse`. +pub mod start_identity_provider_intent_response { + /// the next step to take in the idp intent flow. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum NextStep { + /// The authentication URL to which the client should redirect. + #[prost(string, tag="2")] + AuthUrl(::prost::alloc::string::String), + /// The Start Intent directly succeeded and returned the IDP Intent. + /// Further information can be retrieved by using the retrieve identity provider intent request. + #[prost(message, tag="3")] + IdpIntent(super::IdentityProviderIntent), + /// The HTML form with the embedded POST call information to render and execute. + #[prost(bytes, tag="4")] + PostForm(::prost::alloc::vec::Vec), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdentityProviderIntentRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// ID of the identity provider (IDP) intent, previously returned on the success response of the start identity provider intent. + #[prost(string, tag="3")] + pub idp_intent_id: ::prost::alloc::string::String, + /// Token of the identity provider (IDP) intent, previously returned on the success response of the start identity provider intent. + #[prost(string, tag="4")] + pub idp_intent_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// Information returned by the identity provider (IDP) such as the identification of the user + /// and detailed / profile information. + #[prost(message, optional, tag="2")] + pub idp_information: ::core::option::Option, + /// If the user was already federated and linked to a ZITADEL user, it's id will be returned. + #[prost(string, optional, tag="3")] + pub id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub authenticator: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpAuthenticatorRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// Optionally expect the user to be in this organization. + #[prost(message, optional, tag="2")] + pub organization: ::core::option::Option, + /// unique identifier of the user. + #[prost(string, tag="3")] + pub id: ::prost::alloc::string::String, + /// unique identifier of the identity provider (IDP) authenticator. + #[prost(string, tag="4")] + pub idp_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpAuthenticatorResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.resources.user.v3alpha.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.tonic.rs b/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.tonic.rs new file mode 100644 index 0000000..dba63a3 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.user.v3alpha.tonic.rs @@ -0,0 +1,1170 @@ +// @generated +/// Generated client implementations. +pub mod zitadel_users_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 ZitadelUsersClient { + inner: tonic::client::Grpc, + } + impl ZitadelUsersClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ZitadelUsersClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ZitadelUsersClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ZitadelUsersClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 search_users( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/SearchUsers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "SearchUsers", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/GetUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "GetUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/CreateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "CreateUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn patch_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/PatchUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "PatchUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/DeactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "DeactivateUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/ActivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "ActivateUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn lock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/LockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "LockUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn unlock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/UnlockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "UnlockUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/DeleteUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "DeleteUser", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_contact_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/SetContactEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "SetContactEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_contact_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyContactEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyContactEmail", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_contact_email_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/ResendContactEmailCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "ResendContactEmailCode", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_contact_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/SetContactPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "SetContactPhone", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_contact_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyContactPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyContactPhone", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_contact_phone_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/ResendContactPhoneCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "ResendContactPhoneCode", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_username( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/AddUsername", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "AddUsername", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_username( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveUsername", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveUsername", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/SetPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "SetPassword", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn request_password_reset( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RequestPasswordReset", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RequestPasswordReset", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn start_web_auth_n_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/StartWebAuthNRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "StartWebAuthNRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_web_auth_n_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyWebAuthNRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyWebAuthNRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_web_auth_n_registration_link( + &mut self, + request: impl tonic::IntoRequest< + super::CreateWebAuthNRegistrationLinkRequest, + >, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/CreateWebAuthNRegistrationLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "CreateWebAuthNRegistrationLink", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_web_auth_n_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveWebAuthNAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveWebAuthNAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn start_totp_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/StartTOTPRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "StartTOTPRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_totp_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyTOTPRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyTOTPRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_totp_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveTOTPAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveTOTPAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_otpsms_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/AddOTPSMSAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "AddOTPSMSAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_otpsms_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyOTPSMSRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyOTPSMSRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otpsms_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveOTPSMSAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveOTPSMSAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_otp_email_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/AddOTPEmailAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "AddOTPEmailAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_otp_email_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/VerifyOTPEmailRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "VerifyOTPEmailRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otp_email_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveOTPEmailAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveOTPEmailAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn start_identity_provider_intent( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/StartIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "StartIdentityProviderIntent", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_identity_provider_intent( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/GetIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "GetIdentityProviderIntent", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_idp_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/AddIDPAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "AddIDPAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_idp_authenticator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.user.v3alpha.ZITADELUsers/RemoveIDPAuthenticator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.user.v3alpha.ZITADELUsers", + "RemoveIDPAuthenticator", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.rs new file mode 100644 index 0000000..e84796f --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.rs @@ -0,0 +1,379 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserSchema { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub config: ::core::option::Option, + /// Current state of the schema. + #[prost(enumeration="State", tag="3")] + pub state: i32, + /// Revision is a read only version of the schema, each update of the `schema`-field increases the revision. + #[prost(uint32, tag="4")] + pub revision: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserSchema { + /// Type is a human readable word describing the schema. + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + /// Defines the possible types of authenticators. + #[prost(enumeration="AuthenticatorType", repeated, packed="false", tag="3")] + pub possible_authenticators: ::prost::alloc::vec::Vec, + #[prost(oneof="user_schema::DataType", tags="2")] + pub data_type: ::core::option::Option, +} +/// Nested message and enum types in `UserSchema`. +pub mod user_schema { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DataType { + /// JSON schema representation defining the user. + #[prost(message, tag="2")] + Schema(::pbjson_types::Struct), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUserSchema { + /// Type is a human readable word describing the schema. + #[prost(string, optional, tag="2")] + pub r#type: ::core::option::Option<::prost::alloc::string::String>, + /// Defines the possible types of authenticators. + /// + /// Removal of an authenticator does not remove the authenticator on a user. + #[prost(enumeration="AuthenticatorType", repeated, packed="false", tag="4")] + pub possible_authenticators: ::prost::alloc::vec::Vec, + #[prost(oneof="patch_user_schema::DataType", tags="3")] + pub data_type: ::core::option::Option, +} +/// Nested message and enum types in `PatchUserSchema`. +pub mod patch_user_schema { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DataType { + /// JSON schema representation defining the user. + #[prost(message, tag="3")] + Schema(::pbjson_types::Struct), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchFilter { + #[prost(oneof="search_filter::Filter", tags="1, 2, 3, 5, 6, 7")] + pub filter: ::core::option::Option, +} +/// Nested message and enum types in `SearchFilter`. +pub mod search_filter { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Filter { + /// Union the results of each sub filter ('OR'). + #[prost(message, tag="1")] + OrFilter(super::OrFilter), + /// Limit the result to match all sub queries ('AND'). + /// Note that if you specify multiple queries, they will be implicitly used as andQueries. + /// Use the andFilter in combination with orFilter and notFilter. + #[prost(message, tag="2")] + AndFilter(super::AndFilter), + /// Exclude / Negate the result of the sub filter ('NOT'). + #[prost(message, tag="3")] + NotFilter(::prost::alloc::boxed::Box), + /// Limit the result to a specific schema type. + #[prost(message, tag="5")] + TypeFilter(super::TypeFilter), + /// Limit the result to a specific state of the schema. + #[prost(message, tag="6")] + StateFilter(super::StateFilter), + /// Limit the result to a specific schema ID. + #[prost(message, tag="7")] + IdFilter(super::IdFilter), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrFilter { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndFilter { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotFilter { + #[prost(message, optional, boxed, tag="1")] + pub filter: ::core::option::Option<::prost::alloc::boxed::Box>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdFilter { + /// Defines the ID of the user schema to filter for. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// Defines which text comparison method used for the id filter. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TypeFilter { + /// Defines which type to filter for. + #[prost(string, tag="1")] + pub r#type: ::prost::alloc::string::String, + /// Defines which text comparison method used for the type filter. + #[prost(enumeration="super::super::object::v3alpha::TextFilterMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StateFilter { + /// Defines the state to filter for. + #[prost(enumeration="State", tag="1")] + pub state: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FieldName { + Unspecified = 0, + Type = 1, + State = 2, + Revision = 3, + ChangeDate = 4, + CreationDate = 5, +} +impl FieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FieldName::Unspecified => "FIELD_NAME_UNSPECIFIED", + FieldName::Type => "FIELD_NAME_TYPE", + FieldName::State => "FIELD_NAME_STATE", + FieldName::Revision => "FIELD_NAME_REVISION", + FieldName::ChangeDate => "FIELD_NAME_CHANGE_DATE", + FieldName::CreationDate => "FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "FIELD_NAME_TYPE" => Some(Self::Type), + "FIELD_NAME_STATE" => Some(Self::State), + "FIELD_NAME_REVISION" => Some(Self::Revision), + "FIELD_NAME_CHANGE_DATE" => Some(Self::ChangeDate), + "FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum State { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl State { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + State::Unspecified => "STATE_UNSPECIFIED", + State::Active => "STATE_ACTIVE", + State::Inactive => "STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STATE_UNSPECIFIED" => Some(Self::Unspecified), + "STATE_ACTIVE" => Some(Self::Active), + "STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthenticatorType { + Unspecified = 0, + Username = 1, + Password = 2, + Webauthn = 3, + Totp = 4, + OtpEmail = 5, + OtpSms = 6, + AuthenticationKey = 7, + IdentityProvider = 8, +} +impl AuthenticatorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthenticatorType::Unspecified => "AUTHENTICATOR_TYPE_UNSPECIFIED", + AuthenticatorType::Username => "AUTHENTICATOR_TYPE_USERNAME", + AuthenticatorType::Password => "AUTHENTICATOR_TYPE_PASSWORD", + AuthenticatorType::Webauthn => "AUTHENTICATOR_TYPE_WEBAUTHN", + AuthenticatorType::Totp => "AUTHENTICATOR_TYPE_TOTP", + AuthenticatorType::OtpEmail => "AUTHENTICATOR_TYPE_OTP_EMAIL", + AuthenticatorType::OtpSms => "AUTHENTICATOR_TYPE_OTP_SMS", + AuthenticatorType::AuthenticationKey => "AUTHENTICATOR_TYPE_AUTHENTICATION_KEY", + AuthenticatorType::IdentityProvider => "AUTHENTICATOR_TYPE_IDENTITY_PROVIDER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHENTICATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHENTICATOR_TYPE_USERNAME" => Some(Self::Username), + "AUTHENTICATOR_TYPE_PASSWORD" => Some(Self::Password), + "AUTHENTICATOR_TYPE_WEBAUTHN" => Some(Self::Webauthn), + "AUTHENTICATOR_TYPE_TOTP" => Some(Self::Totp), + "AUTHENTICATOR_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + "AUTHENTICATOR_TYPE_OTP_SMS" => Some(Self::OtpSms), + "AUTHENTICATOR_TYPE_AUTHENTICATION_KEY" => Some(Self::AuthenticationKey), + "AUTHENTICATOR_TYPE_IDENTITY_PROVIDER" => Some(Self::IdentityProvider), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchUserSchemasRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// list limitations and ordering. + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + #[prost(enumeration="FieldName", optional, tag="3")] + pub sorting_column: ::core::option::Option, + /// Define the criteria to filter for. + #[prost(message, repeated, tag="4")] + pub filters: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchUserSchemasResponse { + /// Details provides information about the returned result including total amount found. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// States by which field the results are sorted. + #[prost(enumeration="FieldName", tag="2")] + pub sorting_column: i32, + /// The result contains the user schemas, which matched the queries. + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserSchemaRequest { + /// unique identifier of the schema. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserSchemaResponse { + #[prost(message, optional, tag="2")] + pub user_schema: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateUserSchemaRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub user_schema: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateUserSchemaResponse { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUserSchemaRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + /// unique identifier of the schema. + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub user_schema: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PatchUserSchemaResponse { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserSchemaRequest { + #[prost(message, optional, tag="2")] + pub instance: ::core::option::Option, + /// unique identifier of the schema. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserSchemaResponse { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserSchemaRequest { + #[prost(message, optional, tag="2")] + pub instance: ::core::option::Option, + /// unique identifier of the schema. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserSchemaResponse { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserSchemaRequest { + #[prost(message, optional, tag="2")] + pub instance: ::core::option::Option, + /// unique identifier of the schema. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserSchemaResponse { + /// Details provide some base information (such as the last change date) of the schema. + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.resources.userschema.v3alpha.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.tonic.rs b/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.tonic.rs new file mode 100644 index 0000000..0f8f8cb --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.userschema.v3alpha.tonic.rs @@ -0,0 +1,318 @@ +// @generated +/// Generated client implementations. +pub mod zitadel_user_schemas_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 ZitadelUserSchemasClient { + inner: tonic::client::Grpc, + } + impl ZitadelUserSchemasClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ZitadelUserSchemasClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ZitadelUserSchemasClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ZitadelUserSchemasClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 search_user_schemas( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/SearchUserSchemas", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "SearchUserSchemas", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/GetUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "GetUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Create a user schema + + Create the first revision of a new user schema. The schema can then be used on users to store and validate their data. +*/ + pub async fn create_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/CreateUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "CreateUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Patch a user schema + + Patch an existing user schema to a new revision. Users based on the current revision will not be affected until they are updated. +*/ + pub async fn patch_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/PatchUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "PatchUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Deactivate a user schema + + Deactivate an existing user schema and change it into a read-only state. Users based on this schema cannot be updated anymore, but are still able to authenticate. +*/ + pub async fn deactivate_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/DeactivateUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "DeactivateUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Reactivate a user schema + + Reactivate an previously deactivated user schema and change it into an active state again. +*/ + pub async fn reactivate_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/ReactivateUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "ReactivateUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Delete a user schema + + Delete an existing user schema. This operation is only allowed if there are no associated users to it. +*/ + pub async fn delete_user_schema( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.userschema.v3alpha.ZITADELUserSchemas/DeleteUserSchema", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", + "DeleteUserSchema", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.rs new file mode 100644 index 0000000..f4516c3 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.rs @@ -0,0 +1,244 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebKeyRsaConfig { + /// bit size of the RSA key + #[prost(enumeration="web_key_rsa_config::RsaBits", tag="1")] + pub bits: i32, + /// signing algrithm used + #[prost(enumeration="web_key_rsa_config::RsaHasher", tag="2")] + pub hasher: i32, +} +/// Nested message and enum types in `WebKeyRSAConfig`. +pub mod web_key_rsa_config { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum RsaBits { + Unspecified = 0, + RsaBits2048 = 1, + RsaBits3072 = 2, + RsaBits4096 = 3, + } + impl RsaBits { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RsaBits::Unspecified => "RSA_BITS_UNSPECIFIED", + RsaBits::RsaBits2048 => "RSA_BITS_2048", + RsaBits::RsaBits3072 => "RSA_BITS_3072", + RsaBits::RsaBits4096 => "RSA_BITS_4096", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RSA_BITS_UNSPECIFIED" => Some(Self::Unspecified), + "RSA_BITS_2048" => Some(Self::RsaBits2048), + "RSA_BITS_3072" => Some(Self::RsaBits3072), + "RSA_BITS_4096" => Some(Self::RsaBits4096), + _ => None, + } + } + } + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum RsaHasher { + Unspecified = 0, + Sha256 = 1, + Sha384 = 2, + Sha512 = 3, + } + impl RsaHasher { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RsaHasher::Unspecified => "RSA_HASHER_UNSPECIFIED", + RsaHasher::Sha256 => "RSA_HASHER_SHA256", + RsaHasher::Sha384 => "RSA_HASHER_SHA384", + RsaHasher::Sha512 => "RSA_HASHER_SHA512", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RSA_HASHER_UNSPECIFIED" => Some(Self::Unspecified), + "RSA_HASHER_SHA256" => Some(Self::Sha256), + "RSA_HASHER_SHA384" => Some(Self::Sha384), + "RSA_HASHER_SHA512" => Some(Self::Sha512), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebKeyEcdsaConfig { + #[prost(enumeration="web_key_ecdsa_config::EcdsaCurve", tag="1")] + pub curve: i32, +} +/// Nested message and enum types in `WebKeyECDSAConfig`. +pub mod web_key_ecdsa_config { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum EcdsaCurve { + Unspecified = 0, + P256 = 1, + P384 = 2, + P512 = 3, + } + impl EcdsaCurve { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + EcdsaCurve::Unspecified => "ECDSA_CURVE_UNSPECIFIED", + EcdsaCurve::P256 => "ECDSA_CURVE_P256", + EcdsaCurve::P384 => "ECDSA_CURVE_P384", + EcdsaCurve::P512 => "ECDSA_CURVE_P512", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ECDSA_CURVE_UNSPECIFIED" => Some(Self::Unspecified), + "ECDSA_CURVE_P256" => Some(Self::P256), + "ECDSA_CURVE_P384" => Some(Self::P384), + "ECDSA_CURVE_P512" => Some(Self::P512), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebKeyEd25519Config { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetWebKey { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub config: ::core::option::Option, + #[prost(enumeration="WebKeyState", tag="3")] + pub state: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebKey { + #[prost(oneof="web_key::Config", tags="6, 7, 8")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `WebKey`. +pub mod web_key { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="6")] + Rsa(super::WebKeyRsaConfig), + #[prost(message, tag="7")] + Ecdsa(super::WebKeyEcdsaConfig), + #[prost(message, tag="8")] + Ed25519(super::WebKeyEd25519Config), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum WebKeyState { + StateUnspecified = 0, + StateInitial = 1, + StateActive = 2, + StateInactive = 3, + StateRemoved = 4, +} +impl WebKeyState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + WebKeyState::StateUnspecified => "STATE_UNSPECIFIED", + WebKeyState::StateInitial => "STATE_INITIAL", + WebKeyState::StateActive => "STATE_ACTIVE", + WebKeyState::StateInactive => "STATE_INACTIVE", + WebKeyState::StateRemoved => "STATE_REMOVED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "STATE_UNSPECIFIED" => Some(Self::StateUnspecified), + "STATE_INITIAL" => Some(Self::StateInitial), + "STATE_ACTIVE" => Some(Self::StateActive), + "STATE_INACTIVE" => Some(Self::StateInactive), + "STATE_REMOVED" => Some(Self::StateRemoved), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWebKeyRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub key: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWebKeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateWebKeyRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ActivateWebKeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteWebKeyRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteWebKeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListWebKeysRequest { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListWebKeysResponse { + #[prost(message, repeated, tag="1")] + pub web_keys: ::prost::alloc::vec::Vec, +} +include!("zitadel.resources.webkey.v3alpha.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.tonic.rs b/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.tonic.rs new file mode 100644 index 0000000..f49f531 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.resources.webkey.v3alpha.tonic.rs @@ -0,0 +1,208 @@ +// @generated +/// Generated client implementations. +pub mod zitadel_web_keys_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 ZitadelWebKeysClient { + inner: tonic::client::Grpc, + } + impl ZitadelWebKeysClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl ZitadelWebKeysClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> ZitadelWebKeysClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + ZitadelWebKeysClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 create_web_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.webkey.v3alpha.ZITADELWebKeys/CreateWebKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.webkey.v3alpha.ZITADELWebKeys", + "CreateWebKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn activate_web_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.webkey.v3alpha.ZITADELWebKeys/ActivateWebKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.webkey.v3alpha.ZITADELWebKeys", + "ActivateWebKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_web_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.webkey.v3alpha.ZITADELWebKeys/DeleteWebKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.webkey.v3alpha.ZITADELWebKeys", + "DeleteWebKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_web_keys( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.resources.webkey.v3alpha.ZITADELWebKeys/ListWebKeys", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.resources.webkey.v3alpha.ZITADELWebKeys", + "ListWebKeys", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.saml.v2.rs b/crates/zitadel-gen/src/api/zitadel.saml.v2.rs new file mode 100644 index 0000000..5bafacc --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.saml.v2.rs @@ -0,0 +1,154 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SamlRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="3")] + pub issuer: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub assertion_consumer_service: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub relay_state: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub binding: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthorizationError { + #[prost(enumeration="ErrorReason", tag="1")] + pub error: i32, + #[prost(string, optional, tag="2")] + pub error_description: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ErrorReason { + Unspecified = 0, + VersionMissmatch = 1, + AuthNFailed = 2, + InvalidAttrNameOrValue = 3, + InvalidNameidPolicy = 4, + RequestDenied = 5, + RequestUnsupported = 6, + UnsupportedBinding = 7, +} +impl ErrorReason { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ErrorReason::Unspecified => "ERROR_REASON_UNSPECIFIED", + ErrorReason::VersionMissmatch => "ERROR_REASON_VERSION_MISSMATCH", + ErrorReason::AuthNFailed => "ERROR_REASON_AUTH_N_FAILED", + ErrorReason::InvalidAttrNameOrValue => "ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE", + ErrorReason::InvalidNameidPolicy => "ERROR_REASON_INVALID_NAMEID_POLICY", + ErrorReason::RequestDenied => "ERROR_REASON_REQUEST_DENIED", + ErrorReason::RequestUnsupported => "ERROR_REASON_REQUEST_UNSUPPORTED", + ErrorReason::UnsupportedBinding => "ERROR_REASON_UNSUPPORTED_BINDING", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ERROR_REASON_UNSPECIFIED" => Some(Self::Unspecified), + "ERROR_REASON_VERSION_MISSMATCH" => Some(Self::VersionMissmatch), + "ERROR_REASON_AUTH_N_FAILED" => Some(Self::AuthNFailed), + "ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE" => Some(Self::InvalidAttrNameOrValue), + "ERROR_REASON_INVALID_NAMEID_POLICY" => Some(Self::InvalidNameidPolicy), + "ERROR_REASON_REQUEST_DENIED" => Some(Self::RequestDenied), + "ERROR_REASON_REQUEST_UNSUPPORTED" => Some(Self::RequestUnsupported), + "ERROR_REASON_UNSUPPORTED_BINDING" => Some(Self::UnsupportedBinding), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSamlRequestRequest { + /// ID of the SAML Request, as obtained from the redirect URL. + #[prost(string, tag="1")] + pub saml_request_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSamlRequestResponse { + #[prost(message, optional, tag="1")] + pub saml_request: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateResponseRequest { + /// ID of the SAML Request. + #[prost(string, tag="1")] + pub saml_request_id: ::prost::alloc::string::String, + #[prost(oneof="create_response_request::ResponseKind", tags="2, 3")] + pub response_kind: ::core::option::Option, +} +/// Nested message and enum types in `CreateResponseRequest`. +pub mod create_response_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum ResponseKind { + #[prost(message, tag="2")] + Session(super::Session), + /// Set this field when the authorization flow failed. It creates a response depending on the SP, with the error details set. + #[prost(message, tag="3")] + Error(super::AuthorizationError), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + /// ID of the session, used to login the user. Connects the session to the SAML Request. + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + /// Token to verify the session is valid. + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateResponseResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// URL including the Assertion Consumer Service where the user should be redirected or has to call per POST, depending on the binding. Contains details for the application to obtain the response on success, or error details on failure. Note that this field must be treated as credentials, as the contained SAMLResponse or code can be used on behalve of the user. + #[prost(string, tag="2")] + pub url: ::prost::alloc::string::String, + /// Binding is defined through the request, what the IDP is able to use and what bindings are available for the SP. + #[prost(oneof="create_response_response::Binding", tags="3, 4")] + pub binding: ::core::option::Option, +} +/// Nested message and enum types in `CreateResponseResponse`. +pub mod create_response_response { + /// Binding is defined through the request, what the IDP is able to use and what bindings are available for the SP. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Binding { + /// Set if the binding is Redirect-Binding, where the user can directly be redirected to the application, using a \"302 FOUND\" status to the URL. + #[prost(message, tag="3")] + Redirect(super::RedirectResponse), + /// Set if the binding is POST-Binding, where the application expects to be called per HTTP POST with the SAMLResponse and RelayState in the form body. + #[prost(message, tag="4")] + Post(super::PostResponse), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RedirectResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PostResponse { + #[prost(string, tag="1")] + pub relay_state: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub saml_response: ::prost::alloc::string::String, +} +include!("zitadel.saml.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.saml.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.saml.v2.tonic.rs new file mode 100644 index 0000000..5089fa1 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.saml.v2.tonic.rs @@ -0,0 +1,142 @@ +// @generated +/// Generated client implementations. +pub mod saml_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 SamlServiceClient { + inner: tonic::client::Grpc, + } + impl SamlServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SamlServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SamlServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SamlServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_saml_request( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.saml.v2.SAMLService/GetSAMLRequest", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.saml.v2.SAMLService", "GetSAMLRequest"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_response( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.saml.v2.SAMLService/CreateResponse", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.saml.v2.SAMLService", "CreateResponse"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.session.v2.rs b/crates/zitadel-gen/src/api/zitadel.session.v2.rs new file mode 100644 index 0000000..f498871 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.session.v2.rs @@ -0,0 +1,474 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestChallenges { + #[prost(message, optional, tag="1")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub otp_email: ::core::option::Option, +} +/// Nested message and enum types in `RequestChallenges`. +pub mod request_challenges { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct WebAuthN { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(enumeration="super::UserVerificationRequirement", tag="2")] + pub user_verification_requirement: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Otpsms { + #[prost(bool, tag="1")] + pub return_code: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct OtpEmail { + /// if no delivery_type is specified, an email is sent with the default url + #[prost(oneof="otp_email::DeliveryType", tags="2, 3")] + pub delivery_type: ::core::option::Option, + } + /// Nested message and enum types in `OTPEmail`. + pub mod otp_email { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct SendCode { + /// Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. + /// If no template is set, the default ZITADEL url will be used. + /// + /// The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct ReturnCode { + } + /// if no delivery_type is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DeliveryType { + #[prost(message, tag="2")] + SendCode(SendCode), + #[prost(message, tag="3")] + ReturnCode(ReturnCode), + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Challenges { + #[prost(message, optional, tag="1")] + pub web_auth_n: ::core::option::Option, + #[prost(string, optional, tag="2")] + pub otp_sms: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub otp_email: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `Challenges`. +pub mod challenges { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct WebAuthN { + #[prost(message, optional, tag="1")] + pub public_key_credential_request_options: ::core::option::Option<::pbjson_types::Struct>, + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserVerificationRequirement { + Unspecified = 0, + Required = 1, + Preferred = 2, + Discouraged = 3, +} +impl UserVerificationRequirement { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserVerificationRequirement::Unspecified => "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED", + UserVerificationRequirement::Required => "USER_VERIFICATION_REQUIREMENT_REQUIRED", + UserVerificationRequirement::Preferred => "USER_VERIFICATION_REQUIREMENT_PREFERRED", + UserVerificationRequirement::Discouraged => "USER_VERIFICATION_REQUIREMENT_DISCOURAGED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED" => Some(Self::Unspecified), + "USER_VERIFICATION_REQUIREMENT_REQUIRED" => Some(Self::Required), + "USER_VERIFICATION_REQUIREMENT_PREFERRED" => Some(Self::Preferred), + "USER_VERIFICATION_REQUIREMENT_DISCOURAGED" => Some(Self::Discouraged), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="3")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(uint64, tag="4")] + pub sequence: u64, + #[prost(message, optional, tag="5")] + pub factors: ::core::option::Option, + #[prost(map="string, bytes", tag="6")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="7")] + pub user_agent: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Factors { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub intent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub totp: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub otp_email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub login_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IntentFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebAuthNFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bool, tag="2")] + pub user_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TotpFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct OtpFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4, 5")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdsQuery(super::IDsQuery), + #[prost(message, tag="2")] + UserIdQuery(super::UserIdQuery), + #[prost(message, tag="3")] + CreationDateQuery(super::CreationDateQuery), + #[prost(message, tag="4")] + CreatorQuery(super::CreatorQuery), + #[prost(message, tag="5")] + UserAgentQuery(super::UserAgentQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IDsQuery { + #[prost(string, repeated, tag="1")] + pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserIdQuery { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct CreationDateQuery { + #[prost(message, optional, tag="1")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(enumeration="super::super::v1::TimestampQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatorQuery { + /// ID of the user who created the session. If empty, the calling user's ID is used. + #[prost(string, optional, tag="1")] + pub id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserAgentQuery { + /// Finger print id of the user agent used for the session. + /// Set an empty fingerprint_id to use the user agent from the call. + /// If the user agent is not available from the current token, an error will be returned. + #[prost(string, optional, tag="1")] + pub fingerprint_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserAgent { + #[prost(string, optional, tag="1")] + pub fingerprint_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub ip: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(map="string, message", tag="4")] + pub header: ::std::collections::HashMap<::prost::alloc::string::String, user_agent::HeaderValues>, +} +/// Nested message and enum types in `UserAgent`. +pub mod user_agent { + /// A header may have multiple values. + /// In Go, headers are defined + /// as map[string][]string, but protobuf + /// doesn't allow this scheme. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct HeaderValues { + #[prost(string, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SessionFieldName { + Unspecified = 0, + CreationDate = 1, +} +impl SessionFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SessionFieldName::Unspecified => "SESSION_FIELD_NAME_UNSPECIFIED", + SessionFieldName::CreationDate => "SESSION_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SESSION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "SESSION_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSessionsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, + #[prost(enumeration="SessionFieldName", tag="3")] + pub sorting_column: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSessionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sessions: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub session_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSessionResponse { + #[prost(message, optional, tag="1")] + pub session: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSessionRequest { + #[prost(message, optional, tag="1")] + pub checks: ::core::option::Option, + #[prost(map="string, bytes", tag="2")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="3")] + pub challenges: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub user_agent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub lifetime: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub challenges: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub checks: ::core::option::Option, + #[prost(map="string, bytes", tag="4")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="5")] + pub challenges: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub lifetime: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub challenges: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub session_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Checks { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub idp_intent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub totp: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub otp_email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUser { + #[prost(oneof="check_user::Search", tags="1, 2")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `CheckUser`. +pub mod check_user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Search { + #[prost(string, tag="1")] + UserId(::prost::alloc::string::String), + #[prost(string, tag="2")] + LoginName(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckPassword { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckWebAuthN { + #[prost(message, optional, tag="1")] + pub credential_assertion_data: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckIdpIntent { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckTotp { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckOtp { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +include!("zitadel.session.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.session.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.session.v2.tonic.rs new file mode 100644 index 0000000..3e5b350 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.session.v2.tonic.rs @@ -0,0 +1,223 @@ +// @generated +/// Generated client implementations. +pub mod session_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 SessionServiceClient { + inner: tonic::client::Grpc, + } + impl SessionServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SessionServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SessionServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SessionServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 list_sessions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2.SessionService/ListSessions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.session.v2.SessionService", "ListSessions"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2.SessionService/GetSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.session.v2.SessionService", "GetSession"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2.SessionService/CreateSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.session.v2.SessionService", "CreateSession"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2.SessionService/SetSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.session.v2.SessionService", "SetSession"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2.SessionService/DeleteSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.session.v2.SessionService", "DeleteSession"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.session.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.session.v2beta.rs new file mode 100644 index 0000000..693c608 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.session.v2beta.rs @@ -0,0 +1,450 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RequestChallenges { + #[prost(message, optional, tag="1")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub otp_email: ::core::option::Option, +} +/// Nested message and enum types in `RequestChallenges`. +pub mod request_challenges { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct WebAuthN { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(enumeration="super::UserVerificationRequirement", tag="2")] + pub user_verification_requirement: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct Otpsms { + #[prost(bool, tag="1")] + pub return_code: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct OtpEmail { + /// if no delivery_type is specified, an email is sent with the default url + #[prost(oneof="otp_email::DeliveryType", tags="2, 3")] + pub delivery_type: ::core::option::Option, + } + /// Nested message and enum types in `OTPEmail`. + pub mod otp_email { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct SendCode { + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct ReturnCode { + } + /// if no delivery_type is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum DeliveryType { + #[prost(message, tag="2")] + SendCode(SendCode), + #[prost(message, tag="3")] + ReturnCode(ReturnCode), + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Challenges { + #[prost(message, optional, tag="1")] + pub web_auth_n: ::core::option::Option, + #[prost(string, optional, tag="2")] + pub otp_sms: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub otp_email: ::core::option::Option<::prost::alloc::string::String>, +} +/// Nested message and enum types in `Challenges`. +pub mod challenges { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct WebAuthN { + #[prost(message, optional, tag="1")] + pub public_key_credential_request_options: ::core::option::Option<::pbjson_types::Struct>, + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserVerificationRequirement { + Unspecified = 0, + Required = 1, + Preferred = 2, + Discouraged = 3, +} +impl UserVerificationRequirement { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserVerificationRequirement::Unspecified => "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED", + UserVerificationRequirement::Required => "USER_VERIFICATION_REQUIREMENT_REQUIRED", + UserVerificationRequirement::Preferred => "USER_VERIFICATION_REQUIREMENT_PREFERRED", + UserVerificationRequirement::Discouraged => "USER_VERIFICATION_REQUIREMENT_DISCOURAGED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_VERIFICATION_REQUIREMENT_UNSPECIFIED" => Some(Self::Unspecified), + "USER_VERIFICATION_REQUIREMENT_REQUIRED" => Some(Self::Required), + "USER_VERIFICATION_REQUIREMENT_PREFERRED" => Some(Self::Preferred), + "USER_VERIFICATION_REQUIREMENT_DISCOURAGED" => Some(Self::Discouraged), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="3")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(uint64, tag="4")] + pub sequence: u64, + #[prost(message, optional, tag="5")] + pub factors: ::core::option::Option, + #[prost(map="string, bytes", tag="6")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="7")] + pub user_agent: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Factors { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub intent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub totp: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub otp_email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub login_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub organization_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct IntentFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct WebAuthNFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bool, tag="2")] + pub user_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TotpFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct OtpFactor { + #[prost(message, optional, tag="1")] + pub verified_at: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + IdsQuery(super::IDsQuery), + #[prost(message, tag="2")] + UserIdQuery(super::UserIdQuery), + #[prost(message, tag="3")] + CreationDateQuery(super::CreationDateQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IDsQuery { + #[prost(string, repeated, tag="1")] + pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserIdQuery { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct CreationDateQuery { + #[prost(message, optional, tag="1")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(enumeration="super::super::v1::TimestampQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserAgent { + #[prost(string, optional, tag="1")] + pub fingerprint_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="2")] + pub ip: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub description: ::core::option::Option<::prost::alloc::string::String>, + #[prost(map="string, message", tag="4")] + pub header: ::std::collections::HashMap<::prost::alloc::string::String, user_agent::HeaderValues>, +} +/// Nested message and enum types in `UserAgent`. +pub mod user_agent { + /// A header may have multiple values. + /// In Go, headers are defined + /// as map[string][]string, but protobuf + /// doesn't allow this scheme. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct HeaderValues { + #[prost(string, repeated, tag="1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SessionFieldName { + Unspecified = 0, + CreationDate = 1, +} +impl SessionFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SessionFieldName::Unspecified => "SESSION_FIELD_NAME_UNSPECIFIED", + SessionFieldName::CreationDate => "SESSION_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SESSION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "SESSION_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSessionsRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub queries: ::prost::alloc::vec::Vec, + #[prost(enumeration="SessionFieldName", tag="3")] + pub sorting_column: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListSessionsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub sessions: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub session_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSessionResponse { + #[prost(message, optional, tag="1")] + pub session: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSessionRequest { + #[prost(message, optional, tag="1")] + pub checks: ::core::option::Option, + #[prost(map="string, bytes", tag="2")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="3")] + pub challenges: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub user_agent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub lifetime: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub challenges: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub checks: ::core::option::Option, + #[prost(map="string, bytes", tag="4")] + pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>, + #[prost(message, optional, tag="5")] + pub challenges: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub lifetime: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub session_token: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub challenges: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSessionRequest { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub session_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteSessionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Checks { + #[prost(message, optional, tag="1")] + pub user: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub password: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub web_auth_n: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub idp_intent: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub totp: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub otp_sms: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub otp_email: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckUser { + #[prost(oneof="check_user::Search", tags="1, 2")] + pub search: ::core::option::Option, +} +/// Nested message and enum types in `CheckUser`. +pub mod check_user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Search { + #[prost(string, tag="1")] + UserId(::prost::alloc::string::String), + #[prost(string, tag="2")] + LoginName(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckPassword { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckWebAuthN { + #[prost(message, optional, tag="1")] + pub credential_assertion_data: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckIdpIntent { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckTotp { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CheckOtp { + #[prost(string, tag="1")] + pub code: ::prost::alloc::string::String, +} +include!("zitadel.session.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.session.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.session.v2beta.tonic.rs new file mode 100644 index 0000000..dba8d9c --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.session.v2beta.tonic.rs @@ -0,0 +1,238 @@ +// @generated +/// Generated client implementations. +pub mod session_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 SessionServiceClient { + inner: tonic::client::Grpc, + } + impl SessionServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SessionServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SessionServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SessionServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 list_sessions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2beta.SessionService/ListSessions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.session.v2beta.SessionService", + "ListSessions", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2beta.SessionService/GetSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.session.v2beta.SessionService", + "GetSession", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2beta.SessionService/CreateSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.session.v2beta.SessionService", + "CreateSession", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2beta.SessionService/SetSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.session.v2beta.SessionService", + "SetSession", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_session( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.session.v2beta.SessionService/DeleteSession", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.session.v2beta.SessionService", + "DeleteSession", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.settings.object.v3alpha.rs b/crates/zitadel-gen/src/api/zitadel.settings.object.v3alpha.rs new file mode 100644 index 0000000..85e1440 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.object.v3alpha.rs @@ -0,0 +1,24 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Details { + /// sequence represents the order of events. It's always counting + /// + /// on read: the sequence of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(uint64, tag="1")] + pub sequence: u64, + /// change_date is the timestamp when the object was changed + /// + /// on read: the timestamp of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(message, optional, tag="2")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + /// resource_owner represents the context an object belongs to + #[prost(message, optional, tag="3")] + pub owner: ::core::option::Option, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.settings.v1.rs b/crates/zitadel-gen/src/api/zitadel.settings.v1.rs new file mode 100644 index 0000000..a359540 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.v1.rs @@ -0,0 +1,327 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecretGenerator { + #[prost(enumeration="SecretGeneratorType", tag="1")] + pub generator_type: i32, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(uint32, tag="3")] + pub length: u32, + #[prost(message, optional, tag="4")] + pub expiry: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, tag="5")] + pub include_lower_letters: bool, + #[prost(bool, tag="6")] + pub include_upper_letters: bool, + #[prost(bool, tag="7")] + pub include_digits: bool, + #[prost(bool, tag="8")] + pub include_symbols: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SecretGeneratorQuery { + #[prost(oneof="secret_generator_query::Query", tags="1")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SecretGeneratorQuery`. +pub mod secret_generator_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + TypeQuery(super::SecretGeneratorTypeQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SecretGeneratorTypeQuery { + #[prost(enumeration="SecretGeneratorType", tag="1")] + pub generator_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SmtpConfig { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="4")] + pub tls: bool, + #[prost(string, tag="5")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub reply_to_address: ::prost::alloc::string::String, + #[prost(enumeration="SmtpConfigState", tag="8")] + pub state: i32, + #[prost(string, tag="9")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailProvider { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="EmailProviderState", tag="3")] + pub state: i32, + #[prost(string, tag="6")] + pub description: ::prost::alloc::string::String, + #[prost(oneof="email_provider::Config", tags="4, 5")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `EmailProvider`. +pub mod email_provider { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="4")] + Smtp(super::EmailProviderSmtp), + #[prost(message, tag="5")] + Http(super::EmailProviderHttp), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailProviderSmtp { + #[prost(string, tag="1")] + pub sender_address: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_name: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub tls: bool, + #[prost(string, tag="4")] + pub host: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub reply_to_address: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailProviderHttp { + #[prost(string, tag="1")] + pub endpoint: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SmsProvider { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="SmsProviderConfigState", tag="3")] + pub state: i32, + #[prost(string, tag="6")] + pub description: ::prost::alloc::string::String, + #[prost(oneof="sms_provider::Config", tags="4, 5")] + pub config: ::core::option::Option, +} +/// Nested message and enum types in `SMSProvider`. +pub mod sms_provider { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Config { + #[prost(message, tag="4")] + Twilio(super::TwilioConfig), + #[prost(message, tag="5")] + Http(super::HttpConfig), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TwilioConfig { + #[prost(string, tag="1")] + pub sid: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub sender_number: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub verify_service_sid: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HttpConfig { + #[prost(string, tag="1")] + pub endpoint: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DebugNotificationProvider { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(bool, tag="2")] + pub compact: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OidcSettings { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub access_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="3")] + pub id_token_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="4")] + pub refresh_token_idle_expiration: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="5")] + pub refresh_token_expiration: ::core::option::Option<::pbjson_types::Duration>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecurityPolicy { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// states if iframe embedding is enabled or disabled + #[prost(bool, tag="2")] + pub enable_iframe_embedding: bool, + /// origins allowed loading ZITADEL in an iframe if enable_iframe_embedding is true + #[prost(string, repeated, tag="3")] + pub allowed_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well" + #[prost(bool, tag="4")] + pub enable_impersonation: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SmtpConfigState { + Unspecified = 0, + SmtpConfigActive = 1, + SmtpConfigInactive = 2, +} +impl SmtpConfigState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SmtpConfigState::Unspecified => "SMTP_CONFIG_STATE_UNSPECIFIED", + SmtpConfigState::SmtpConfigActive => "SMTP_CONFIG_ACTIVE", + SmtpConfigState::SmtpConfigInactive => "SMTP_CONFIG_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SMTP_CONFIG_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "SMTP_CONFIG_ACTIVE" => Some(Self::SmtpConfigActive), + "SMTP_CONFIG_INACTIVE" => Some(Self::SmtpConfigInactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SecretGeneratorType { + Unspecified = 0, + InitCode = 1, + VerifyEmailCode = 2, + VerifyPhoneCode = 3, + PasswordResetCode = 4, + PasswordlessInitCode = 5, + AppSecret = 6, + OtpSms = 7, + OtpEmail = 8, +} +impl SecretGeneratorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SecretGeneratorType::Unspecified => "SECRET_GENERATOR_TYPE_UNSPECIFIED", + SecretGeneratorType::InitCode => "SECRET_GENERATOR_TYPE_INIT_CODE", + SecretGeneratorType::VerifyEmailCode => "SECRET_GENERATOR_TYPE_VERIFY_EMAIL_CODE", + SecretGeneratorType::VerifyPhoneCode => "SECRET_GENERATOR_TYPE_VERIFY_PHONE_CODE", + SecretGeneratorType::PasswordResetCode => "SECRET_GENERATOR_TYPE_PASSWORD_RESET_CODE", + SecretGeneratorType::PasswordlessInitCode => "SECRET_GENERATOR_TYPE_PASSWORDLESS_INIT_CODE", + SecretGeneratorType::AppSecret => "SECRET_GENERATOR_TYPE_APP_SECRET", + SecretGeneratorType::OtpSms => "SECRET_GENERATOR_TYPE_OTP_SMS", + SecretGeneratorType::OtpEmail => "SECRET_GENERATOR_TYPE_OTP_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SECRET_GENERATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SECRET_GENERATOR_TYPE_INIT_CODE" => Some(Self::InitCode), + "SECRET_GENERATOR_TYPE_VERIFY_EMAIL_CODE" => Some(Self::VerifyEmailCode), + "SECRET_GENERATOR_TYPE_VERIFY_PHONE_CODE" => Some(Self::VerifyPhoneCode), + "SECRET_GENERATOR_TYPE_PASSWORD_RESET_CODE" => Some(Self::PasswordResetCode), + "SECRET_GENERATOR_TYPE_PASSWORDLESS_INIT_CODE" => Some(Self::PasswordlessInitCode), + "SECRET_GENERATOR_TYPE_APP_SECRET" => Some(Self::AppSecret), + "SECRET_GENERATOR_TYPE_OTP_SMS" => Some(Self::OtpSms), + "SECRET_GENERATOR_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum EmailProviderState { + Unspecified = 0, + EmailProviderActive = 1, + EmailProviderInactive = 2, +} +impl EmailProviderState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + EmailProviderState::Unspecified => "EMAIL_PROVIDER_STATE_UNSPECIFIED", + EmailProviderState::EmailProviderActive => "EMAIL_PROVIDER_ACTIVE", + EmailProviderState::EmailProviderInactive => "EMAIL_PROVIDER_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EMAIL_PROVIDER_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "EMAIL_PROVIDER_ACTIVE" => Some(Self::EmailProviderActive), + "EMAIL_PROVIDER_INACTIVE" => Some(Self::EmailProviderInactive), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SmsProviderConfigState { + Unspecified = 0, + SmsProviderConfigActive = 1, + SmsProviderConfigInactive = 2, +} +impl SmsProviderConfigState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SmsProviderConfigState::Unspecified => "SMS_PROVIDER_CONFIG_STATE_UNSPECIFIED", + SmsProviderConfigState::SmsProviderConfigActive => "SMS_PROVIDER_CONFIG_ACTIVE", + SmsProviderConfigState::SmsProviderConfigInactive => "SMS_PROVIDER_CONFIG_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SMS_PROVIDER_CONFIG_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "SMS_PROVIDER_CONFIG_ACTIVE" => Some(Self::SmsProviderConfigActive), + "SMS_PROVIDER_CONFIG_INACTIVE" => Some(Self::SmsProviderConfigInactive), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.settings.v2.rs b/crates/zitadel-gen/src/api/zitadel.settings.v2.rs new file mode 100644 index 0000000..6f13439 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.v2.rs @@ -0,0 +1,564 @@ +// @generated +// This file is @generated by prost-build. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ResourceOwnerType { + Unspecified = 0, + Instance = 1, + Org = 2, +} +impl ResourceOwnerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ResourceOwnerType::Unspecified => "RESOURCE_OWNER_TYPE_UNSPECIFIED", + ResourceOwnerType::Instance => "RESOURCE_OWNER_TYPE_INSTANCE", + ResourceOwnerType::Org => "RESOURCE_OWNER_TYPE_ORG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESOURCE_OWNER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "RESOURCE_OWNER_TYPE_INSTANCE" => Some(Self::Instance), + "RESOURCE_OWNER_TYPE_ORG" => Some(Self::Org), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BrandingSettings { + #[prost(message, optional, tag="1")] + pub light_theme: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub dark_theme: ::core::option::Option, + #[prost(string, tag="3")] + pub font_url: ::prost::alloc::string::String, + /// hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set + #[prost(bool, tag="4")] + pub hide_login_name_suffix: bool, + #[prost(bool, tag="5")] + pub disable_watermark: bool, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, + #[prost(enumeration="ThemeMode", tag="7")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Theme { + /// hex value for primary color + #[prost(string, tag="1")] + pub primary_color: ::prost::alloc::string::String, + /// hex value for background color + #[prost(string, tag="2")] + pub background_color: ::prost::alloc::string::String, + /// hex value for warning color + #[prost(string, tag="3")] + pub warn_color: ::prost::alloc::string::String, + /// hex value for font color + #[prost(string, tag="4")] + pub font_color: ::prost::alloc::string::String, + /// url where the logo is served + #[prost(string, tag="5")] + pub logo_url: ::prost::alloc::string::String, + /// url where the icon is served + #[prost(string, tag="6")] + pub icon_url: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ThemeMode { + Unspecified = 0, + Auto = 1, + Light = 2, + Dark = 3, +} +impl ThemeMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ThemeMode::Unspecified => "THEME_MODE_UNSPECIFIED", + ThemeMode::Auto => "THEME_MODE_AUTO", + ThemeMode::Light => "THEME_MODE_LIGHT", + ThemeMode::Dark => "THEME_MODE_DARK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "THEME_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "THEME_MODE_AUTO" => Some(Self::Auto), + "THEME_MODE_LIGHT" => Some(Self::Light), + "THEME_MODE_DARK" => Some(Self::Dark), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DomainSettings { + #[prost(bool, tag="1")] + pub login_name_includes_domain: bool, + #[prost(bool, tag="2")] + pub require_org_domain_verification: bool, + #[prost(bool, tag="3")] + pub smtp_sender_address_matches_instance_domain: bool, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LegalAndSupportSettings { + #[prost(string, tag="1")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub privacy_policy_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub support_email: ::prost::alloc::string::String, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="5")] + pub resource_owner_type: i32, + #[prost(string, tag="6")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct LockoutSettings { + #[prost(uint64, tag="1")] + pub max_password_attempts: u64, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="2")] + pub resource_owner_type: i32, + #[prost(uint64, tag="3")] + pub max_otp_attempts: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginSettings { + #[prost(bool, tag="1")] + pub allow_username_password: bool, + #[prost(bool, tag="2")] + pub allow_register: bool, + #[prost(bool, tag="3")] + pub allow_external_idp: bool, + #[prost(bool, tag="4")] + pub force_mfa: bool, + #[prost(enumeration="PasskeysType", tag="5")] + pub passkeys_type: i32, + #[prost(bool, tag="6")] + pub hide_password_reset: bool, + #[prost(bool, tag="7")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="8")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="10")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(enumeration="SecondFactorType", repeated, tag="14")] + pub second_factors: ::prost::alloc::vec::Vec, + #[prost(enumeration="MultiFactorType", repeated, tag="15")] + pub multi_factors: ::prost::alloc::vec::Vec, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="16")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="17")] + pub disable_login_with_email: bool, + #[prost(bool, tag="18")] + pub disable_login_with_phone: bool, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="19")] + pub resource_owner_type: i32, + #[prost(bool, tag="22")] + pub force_mfa_local_only: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdentityProvider { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="IdentityProviderType", tag="3")] + pub r#type: i32, + #[prost(message, optional, tag="4")] + pub options: ::core::option::Option, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SecondFactorType { + Unspecified = 0, + /// This is the type for TOTP + Otp = 1, + U2f = 2, + OtpEmail = 3, + OtpSms = 4, +} +impl SecondFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SecondFactorType::Unspecified => "SECOND_FACTOR_TYPE_UNSPECIFIED", + SecondFactorType::Otp => "SECOND_FACTOR_TYPE_OTP", + SecondFactorType::U2f => "SECOND_FACTOR_TYPE_U2F", + SecondFactorType::OtpEmail => "SECOND_FACTOR_TYPE_OTP_EMAIL", + SecondFactorType::OtpSms => "SECOND_FACTOR_TYPE_OTP_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SECOND_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SECOND_FACTOR_TYPE_OTP" => Some(Self::Otp), + "SECOND_FACTOR_TYPE_U2F" => Some(Self::U2f), + "SECOND_FACTOR_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + "SECOND_FACTOR_TYPE_OTP_SMS" => Some(Self::OtpSms), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MultiFactorType { + Unspecified = 0, + U2fWithVerification = 1, +} +impl MultiFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MultiFactorType::Unspecified => "MULTI_FACTOR_TYPE_UNSPECIFIED", + MultiFactorType::U2fWithVerification => "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MULTI_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION" => Some(Self::U2fWithVerification), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PasskeysType { + NotAllowed = 0, + Allowed = 1, +} +impl PasskeysType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PasskeysType::NotAllowed => "PASSKEYS_TYPE_NOT_ALLOWED", + PasskeysType::Allowed => "PASSKEYS_TYPE_ALLOWED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PASSKEYS_TYPE_NOT_ALLOWED" => Some(Self::NotAllowed), + "PASSKEYS_TYPE_ALLOWED" => Some(Self::Allowed), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdentityProviderType { + Unspecified = 0, + Oidc = 1, + Jwt = 2, + Ldap = 3, + Oauth = 4, + AzureAd = 5, + Github = 6, + GithubEs = 7, + Gitlab = 8, + GitlabSelfHosted = 9, + Google = 10, + Saml = 11, + Apple = 12, +} +impl IdentityProviderType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdentityProviderType::Unspecified => "IDENTITY_PROVIDER_TYPE_UNSPECIFIED", + IdentityProviderType::Oidc => "IDENTITY_PROVIDER_TYPE_OIDC", + IdentityProviderType::Jwt => "IDENTITY_PROVIDER_TYPE_JWT", + IdentityProviderType::Ldap => "IDENTITY_PROVIDER_TYPE_LDAP", + IdentityProviderType::Oauth => "IDENTITY_PROVIDER_TYPE_OAUTH", + IdentityProviderType::AzureAd => "IDENTITY_PROVIDER_TYPE_AZURE_AD", + IdentityProviderType::Github => "IDENTITY_PROVIDER_TYPE_GITHUB", + IdentityProviderType::GithubEs => "IDENTITY_PROVIDER_TYPE_GITHUB_ES", + IdentityProviderType::Gitlab => "IDENTITY_PROVIDER_TYPE_GITLAB", + IdentityProviderType::GitlabSelfHosted => "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED", + IdentityProviderType::Google => "IDENTITY_PROVIDER_TYPE_GOOGLE", + IdentityProviderType::Saml => "IDENTITY_PROVIDER_TYPE_SAML", + IdentityProviderType::Apple => "IDENTITY_PROVIDER_TYPE_APPLE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDENTITY_PROVIDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "IDENTITY_PROVIDER_TYPE_OIDC" => Some(Self::Oidc), + "IDENTITY_PROVIDER_TYPE_JWT" => Some(Self::Jwt), + "IDENTITY_PROVIDER_TYPE_LDAP" => Some(Self::Ldap), + "IDENTITY_PROVIDER_TYPE_OAUTH" => Some(Self::Oauth), + "IDENTITY_PROVIDER_TYPE_AZURE_AD" => Some(Self::AzureAd), + "IDENTITY_PROVIDER_TYPE_GITHUB" => Some(Self::Github), + "IDENTITY_PROVIDER_TYPE_GITHUB_ES" => Some(Self::GithubEs), + "IDENTITY_PROVIDER_TYPE_GITLAB" => Some(Self::Gitlab), + "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED" => Some(Self::GitlabSelfHosted), + "IDENTITY_PROVIDER_TYPE_GOOGLE" => Some(Self::Google), + "IDENTITY_PROVIDER_TYPE_SAML" => Some(Self::Saml), + "IDENTITY_PROVIDER_TYPE_APPLE" => Some(Self::Apple), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordComplexitySettings { + #[prost(uint64, tag="1")] + pub min_length: u64, + #[prost(bool, tag="2")] + pub requires_uppercase: bool, + #[prost(bool, tag="3")] + pub requires_lowercase: bool, + #[prost(bool, tag="4")] + pub requires_number: bool, + #[prost(bool, tag="5")] + pub requires_symbol: bool, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordExpirySettings { + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint64, tag="1")] + pub max_age_days: u64, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint64, tag="2")] + pub expire_warn_days: u64, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="3")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecuritySettings { + #[prost(message, optional, tag="1")] + pub embedded_iframe: ::core::option::Option, + #[prost(bool, tag="2")] + pub enable_impersonation: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmbeddedIframeSettings { + #[prost(bool, tag="1")] + pub enabled: bool, + #[prost(string, repeated, tag="2")] + pub allowed_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexitySettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexitySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordExpirySettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordExpirySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBrandingSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBrandingSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLegalAndSupportSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLegalAndSupportSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActiveIdentityProvidersRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, + #[prost(bool, optional, tag="2")] + pub creation_allowed: ::core::option::Option, + #[prost(bool, optional, tag="3")] + pub linking_allowed: ::core::option::Option, + #[prost(bool, optional, tag="4")] + pub auto_creation: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub auto_linking: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActiveIdentityProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub identity_providers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetGeneralSettingsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetGeneralSettingsResponse { + #[prost(string, tag="1")] + pub default_org_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub default_language: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub supported_languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSecuritySettingsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSecuritySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecuritySettingsRequest { + #[prost(message, optional, tag="1")] + pub embedded_iframe: ::core::option::Option, + #[prost(bool, tag="2")] + pub enable_impersonation: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecuritySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.settings.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.settings.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.settings.v2.tonic.rs new file mode 100644 index 0000000..889d200 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.v2.tonic.rs @@ -0,0 +1,430 @@ +// @generated +/// Generated client implementations. +pub mod settings_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 SettingsServiceClient { + inner: tonic::client::Grpc, + } + impl SettingsServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SettingsServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SettingsServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_general_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetGeneralSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetGeneralSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_login_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetLoginSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetLoginSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_active_identity_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetActiveIdentityProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetActiveIdentityProviders", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the password complexity settings +*/ + pub async fn get_password_complexity_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetPasswordComplexitySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetPasswordComplexitySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the password expiry settings +*/ + pub async fn get_password_expiry_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetPasswordExpirySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetPasswordExpirySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the current active branding settings +*/ + pub async fn get_branding_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetBrandingSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetBrandingSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the domain settings +*/ + pub async fn get_domain_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetDomainSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetDomainSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the legal and support settings +*/ + pub async fn get_legal_and_support_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetLegalAndSupportSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetLegalAndSupportSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the lockout settings +*/ + pub async fn get_lockout_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetLockoutSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetLockoutSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_security_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/GetSecuritySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "GetSecuritySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_security_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2.SettingsService/SetSecuritySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2.SettingsService", + "SetSecuritySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.settings.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.settings.v2beta.rs new file mode 100644 index 0000000..c3fefcf --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.v2beta.rs @@ -0,0 +1,551 @@ +// @generated +// This file is @generated by prost-build. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ResourceOwnerType { + Unspecified = 0, + Instance = 1, + Org = 2, +} +impl ResourceOwnerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ResourceOwnerType::Unspecified => "RESOURCE_OWNER_TYPE_UNSPECIFIED", + ResourceOwnerType::Instance => "RESOURCE_OWNER_TYPE_INSTANCE", + ResourceOwnerType::Org => "RESOURCE_OWNER_TYPE_ORG", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESOURCE_OWNER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "RESOURCE_OWNER_TYPE_INSTANCE" => Some(Self::Instance), + "RESOURCE_OWNER_TYPE_ORG" => Some(Self::Org), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BrandingSettings { + #[prost(message, optional, tag="1")] + pub light_theme: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub dark_theme: ::core::option::Option, + #[prost(string, tag="3")] + pub font_url: ::prost::alloc::string::String, + /// hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set + #[prost(bool, tag="4")] + pub hide_login_name_suffix: bool, + #[prost(bool, tag="5")] + pub disable_watermark: bool, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, + #[prost(enumeration="ThemeMode", tag="7")] + pub theme_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Theme { + /// hex value for primary color + #[prost(string, tag="1")] + pub primary_color: ::prost::alloc::string::String, + /// hex value for background color + #[prost(string, tag="2")] + pub background_color: ::prost::alloc::string::String, + /// hex value for warning color + #[prost(string, tag="3")] + pub warn_color: ::prost::alloc::string::String, + /// hex value for font color + #[prost(string, tag="4")] + pub font_color: ::prost::alloc::string::String, + /// url where the logo is served + #[prost(string, tag="5")] + pub logo_url: ::prost::alloc::string::String, + /// url where the icon is served + #[prost(string, tag="6")] + pub icon_url: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ThemeMode { + Unspecified = 0, + Auto = 1, + Light = 2, + Dark = 3, +} +impl ThemeMode { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ThemeMode::Unspecified => "THEME_MODE_UNSPECIFIED", + ThemeMode::Auto => "THEME_MODE_AUTO", + ThemeMode::Light => "THEME_MODE_LIGHT", + ThemeMode::Dark => "THEME_MODE_DARK", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "THEME_MODE_UNSPECIFIED" => Some(Self::Unspecified), + "THEME_MODE_AUTO" => Some(Self::Auto), + "THEME_MODE_LIGHT" => Some(Self::Light), + "THEME_MODE_DARK" => Some(Self::Dark), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct DomainSettings { + #[prost(bool, tag="1")] + pub login_name_includes_domain: bool, + #[prost(bool, tag="2")] + pub require_org_domain_verification: bool, + #[prost(bool, tag="3")] + pub smtp_sender_address_matches_instance_domain: bool, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LegalAndSupportSettings { + #[prost(string, tag="1")] + pub tos_link: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub privacy_policy_link: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub help_link: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub support_email: ::prost::alloc::string::String, + /// resource_owner_type returns if the setting is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="5")] + pub resource_owner_type: i32, + #[prost(string, tag="6")] + pub docs_link: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub custom_link: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub custom_link_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct LockoutSettings { + #[prost(uint64, tag="1")] + pub max_password_attempts: u64, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="2")] + pub resource_owner_type: i32, + #[prost(uint64, tag="3")] + pub max_otp_attempts: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginSettings { + #[prost(bool, tag="1")] + pub allow_username_password: bool, + #[prost(bool, tag="2")] + pub allow_register: bool, + #[prost(bool, tag="3")] + pub allow_external_idp: bool, + #[prost(bool, tag="4")] + pub force_mfa: bool, + #[prost(enumeration="PasskeysType", tag="5")] + pub passkeys_type: i32, + #[prost(bool, tag="6")] + pub hide_password_reset: bool, + #[prost(bool, tag="7")] + pub ignore_unknown_usernames: bool, + #[prost(string, tag="8")] + pub default_redirect_uri: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub password_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="10")] + pub external_login_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="11")] + pub mfa_init_skip_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="12")] + pub second_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(message, optional, tag="13")] + pub multi_factor_check_lifetime: ::core::option::Option<::pbjson_types::Duration>, + #[prost(enumeration="SecondFactorType", repeated, tag="14")] + pub second_factors: ::prost::alloc::vec::Vec, + #[prost(enumeration="MultiFactorType", repeated, tag="15")] + pub multi_factors: ::prost::alloc::vec::Vec, + /// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success. + #[prost(bool, tag="16")] + pub allow_domain_discovery: bool, + #[prost(bool, tag="17")] + pub disable_login_with_email: bool, + #[prost(bool, tag="18")] + pub disable_login_with_phone: bool, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="19")] + pub resource_owner_type: i32, + #[prost(bool, tag="22")] + pub force_mfa_local_only: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdentityProvider { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="IdentityProviderType", tag="3")] + pub r#type: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SecondFactorType { + Unspecified = 0, + /// This is the type for TOTP + Otp = 1, + U2f = 2, + OtpEmail = 3, + OtpSms = 4, +} +impl SecondFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SecondFactorType::Unspecified => "SECOND_FACTOR_TYPE_UNSPECIFIED", + SecondFactorType::Otp => "SECOND_FACTOR_TYPE_OTP", + SecondFactorType::U2f => "SECOND_FACTOR_TYPE_U2F", + SecondFactorType::OtpEmail => "SECOND_FACTOR_TYPE_OTP_EMAIL", + SecondFactorType::OtpSms => "SECOND_FACTOR_TYPE_OTP_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SECOND_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "SECOND_FACTOR_TYPE_OTP" => Some(Self::Otp), + "SECOND_FACTOR_TYPE_U2F" => Some(Self::U2f), + "SECOND_FACTOR_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + "SECOND_FACTOR_TYPE_OTP_SMS" => Some(Self::OtpSms), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MultiFactorType { + Unspecified = 0, + U2fWithVerification = 1, +} +impl MultiFactorType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MultiFactorType::Unspecified => "MULTI_FACTOR_TYPE_UNSPECIFIED", + MultiFactorType::U2fWithVerification => "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MULTI_FACTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION" => Some(Self::U2fWithVerification), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PasskeysType { + NotAllowed = 0, + Allowed = 1, +} +impl PasskeysType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PasskeysType::NotAllowed => "PASSKEYS_TYPE_NOT_ALLOWED", + PasskeysType::Allowed => "PASSKEYS_TYPE_ALLOWED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PASSKEYS_TYPE_NOT_ALLOWED" => Some(Self::NotAllowed), + "PASSKEYS_TYPE_ALLOWED" => Some(Self::Allowed), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum IdentityProviderType { + Unspecified = 0, + Oidc = 1, + Jwt = 2, + Ldap = 3, + Oauth = 4, + AzureAd = 5, + Github = 6, + GithubEs = 7, + Gitlab = 8, + GitlabSelfHosted = 9, + Google = 10, + Saml = 11, +} +impl IdentityProviderType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + IdentityProviderType::Unspecified => "IDENTITY_PROVIDER_TYPE_UNSPECIFIED", + IdentityProviderType::Oidc => "IDENTITY_PROVIDER_TYPE_OIDC", + IdentityProviderType::Jwt => "IDENTITY_PROVIDER_TYPE_JWT", + IdentityProviderType::Ldap => "IDENTITY_PROVIDER_TYPE_LDAP", + IdentityProviderType::Oauth => "IDENTITY_PROVIDER_TYPE_OAUTH", + IdentityProviderType::AzureAd => "IDENTITY_PROVIDER_TYPE_AZURE_AD", + IdentityProviderType::Github => "IDENTITY_PROVIDER_TYPE_GITHUB", + IdentityProviderType::GithubEs => "IDENTITY_PROVIDER_TYPE_GITHUB_ES", + IdentityProviderType::Gitlab => "IDENTITY_PROVIDER_TYPE_GITLAB", + IdentityProviderType::GitlabSelfHosted => "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED", + IdentityProviderType::Google => "IDENTITY_PROVIDER_TYPE_GOOGLE", + IdentityProviderType::Saml => "IDENTITY_PROVIDER_TYPE_SAML", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "IDENTITY_PROVIDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "IDENTITY_PROVIDER_TYPE_OIDC" => Some(Self::Oidc), + "IDENTITY_PROVIDER_TYPE_JWT" => Some(Self::Jwt), + "IDENTITY_PROVIDER_TYPE_LDAP" => Some(Self::Ldap), + "IDENTITY_PROVIDER_TYPE_OAUTH" => Some(Self::Oauth), + "IDENTITY_PROVIDER_TYPE_AZURE_AD" => Some(Self::AzureAd), + "IDENTITY_PROVIDER_TYPE_GITHUB" => Some(Self::Github), + "IDENTITY_PROVIDER_TYPE_GITHUB_ES" => Some(Self::GithubEs), + "IDENTITY_PROVIDER_TYPE_GITLAB" => Some(Self::Gitlab), + "IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED" => Some(Self::GitlabSelfHosted), + "IDENTITY_PROVIDER_TYPE_GOOGLE" => Some(Self::Google), + "IDENTITY_PROVIDER_TYPE_SAML" => Some(Self::Saml), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordComplexitySettings { + #[prost(uint64, tag="1")] + pub min_length: u64, + #[prost(bool, tag="2")] + pub requires_uppercase: bool, + #[prost(bool, tag="3")] + pub requires_lowercase: bool, + #[prost(bool, tag="4")] + pub requires_number: bool, + #[prost(bool, tag="5")] + pub requires_symbol: bool, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="6")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct PasswordExpirySettings { + /// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication. + #[prost(uint64, tag="1")] + pub max_age_days: u64, + /// Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user. + #[prost(uint64, tag="2")] + pub expire_warn_days: u64, + /// resource_owner_type returns if the settings is managed on the organization or on the instance + #[prost(enumeration="ResourceOwnerType", tag="3")] + pub resource_owner_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SecuritySettings { + #[prost(message, optional, tag="1")] + pub embedded_iframe: ::core::option::Option, + #[prost(bool, tag="2")] + pub enable_impersonation: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmbeddedIframeSettings { + #[prost(bool, tag="1")] + pub enabled: bool, + #[prost(string, repeated, tag="2")] + pub allowed_origins: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLoginSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexitySettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordComplexitySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordExpirySettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPasswordExpirySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBrandingSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBrandingSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetDomainSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLegalAndSupportSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLegalAndSupportSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutSettingsRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLockoutSettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActiveIdentityProvidersRequest { + #[prost(message, optional, tag="1")] + pub ctx: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetActiveIdentityProvidersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub identity_providers: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetGeneralSettingsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetGeneralSettingsResponse { + #[prost(string, tag="1")] + pub default_org_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub default_language: ::prost::alloc::string::String, + #[prost(string, repeated, tag="3")] + pub supported_languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct GetSecuritySettingsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSecuritySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub settings: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecuritySettingsRequest { + #[prost(message, optional, tag="1")] + pub embedded_iframe: ::core::option::Option, + #[prost(bool, tag="2")] + pub enable_impersonation: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetSecuritySettingsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.settings.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.settings.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.settings.v2beta.tonic.rs new file mode 100644 index 0000000..09bde6e --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.settings.v2beta.tonic.rs @@ -0,0 +1,432 @@ +// @generated +/// Generated client implementations. +pub mod settings_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 SettingsServiceClient { + inner: tonic::client::Grpc, + } + impl SettingsServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SettingsServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SettingsServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SettingsServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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_general_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetGeneralSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetGeneralSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_login_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetLoginSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetLoginSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the current active identity providers +*/ + pub async fn get_active_identity_providers( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetActiveIdentityProviders", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetActiveIdentityProviders", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the password complexity settings +*/ + pub async fn get_password_complexity_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetPasswordComplexitySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetPasswordComplexitySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the password expiry settings +*/ + pub async fn get_password_expiry_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetPasswordExpirySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetPasswordExpirySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the current active branding settings +*/ + pub async fn get_branding_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetBrandingSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetBrandingSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the domain settings +*/ + pub async fn get_domain_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetDomainSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetDomainSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the legal and support settings +*/ + pub async fn get_legal_and_support_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetLegalAndSupportSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetLegalAndSupportSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + /** Get the lockout settings +*/ + pub async fn get_lockout_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetLockoutSettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetLockoutSettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_security_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/GetSecuritySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "GetSecuritySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_security_settings( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.settings.v2beta.SettingsService/SetSecuritySettings", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.settings.v2beta.SettingsService", + "SetSecuritySettings", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.system.v1.rs b/crates/zitadel-gen/src/api/zitadel.system.v1.rs new file mode 100644 index 0000000..782edee --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.system.v1.rs @@ -0,0 +1,585 @@ +// @generated +// This file is @generated by prost-build. +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzRequest { +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct HealthzResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstancesRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::instance::v1::FieldName", tag="2")] + pub sorting_column: i32, + /// criterias the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListInstancesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::instance::v1::FieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetInstanceRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetInstanceResponse { + #[prost(message, optional, tag="1")] + pub instance: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddInstanceRequest { + #[prost(string, tag="1")] + pub instance_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub first_org_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub custom_domain: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub owner_user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="5")] + pub owner_email: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub owner_profile: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub owner_password: ::core::option::Option, + #[prost(string, tag="8")] + pub default_language: ::prost::alloc::string::String, +} +/// Nested message and enum types in `AddInstanceRequest`. +pub mod add_instance_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Password { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub password_change_required: bool, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddInstanceResponse { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInstanceRequest { + #[prost(string, tag="1")] + pub instance_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub first_org_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub custom_domain: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub default_language: ::prost::alloc::string::String, + #[prost(oneof="create_instance_request::Owner", tags="4, 5")] + pub owner: ::core::option::Option, +} +/// Nested message and enum types in `CreateInstanceRequest`. +pub mod create_instance_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub preferred_language: ::prost::alloc::string::String, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Password { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub password_change_required: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Human { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub password: ::core::option::Option, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct PersonalAccessToken { + #[prost(message, optional, tag="1")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] + pub struct MachineKey { + #[prost(enumeration="super::super::super::authn::v1::KeyType", tag="1")] + pub r#type: i32, + #[prost(message, optional, tag="2")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Machine { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub personal_access_token: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub machine_key: ::core::option::Option, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Owner { + /// oneof field for the user managing the instance + #[prost(message, tag="4")] + Human(Human), + #[prost(message, tag="5")] + Machine(Machine), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInstanceResponse { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub pat: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="4")] + pub machine_key: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateInstanceRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub instance_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateInstanceResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveInstanceRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveInstanceResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIamMembersRequest { + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + #[prost(string, tag="2")] + pub instance_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIamMembersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUsageRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddQuotaRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + /// the unit a quota should be imposed on + #[prost(enumeration="super::super::quota::v1::Unit", tag="2")] + pub unit: i32, + /// the starting time from which the current quota period is calculated from. This is relevant for querying the current usage. + #[prost(message, optional, tag="3")] + pub from: ::core::option::Option<::pbjson_types::Timestamp>, + /// the quota periods duration + #[prost(message, optional, tag="4")] + pub reset_interval: ::core::option::Option<::pbjson_types::Duration>, + /// the quota amount of units + #[prost(uint64, tag="5")] + pub amount: u64, + /// whether ZITADEL should block further usage when the configured amount is used + #[prost(bool, tag="6")] + pub limit: bool, + /// the handlers, ZITADEL executes when certain quota percentages are reached + #[prost(message, repeated, tag="7")] + pub notifications: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddQuotaResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetQuotaRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + /// the unit a quota should be imposed on + #[prost(enumeration="super::super::quota::v1::Unit", tag="2")] + pub unit: i32, + /// the starting time from which the current quota period is calculated from. This is relevant for querying the current usage. + #[prost(message, optional, tag="3")] + pub from: ::core::option::Option<::pbjson_types::Timestamp>, + /// the quota periods duration + #[prost(message, optional, tag="4")] + pub reset_interval: ::core::option::Option<::pbjson_types::Duration>, + /// the quota amount of units + #[prost(uint64, tag="5")] + pub amount: u64, + /// whether ZITADEL should block further usage when the configured amount is used + #[prost(bool, tag="6")] + pub limit: bool, + /// the handlers, ZITADEL executes when certain quota percentages are reached + #[prost(message, repeated, tag="7")] + pub notifications: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetQuotaResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveQuotaRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::quota::v1::Unit", tag="2")] + pub unit: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveQuotaResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLimitsRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub audit_log_retention: ::core::option::Option<::pbjson_types::Duration>, + #[prost(bool, optional, tag="3")] + pub block: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetLimitsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetLimitsRequest { + #[prost(message, repeated, tag="1")] + pub limits: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BulkSetLimitsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub target_details: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetLimitsRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResetLimitsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExistsDomainRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ExistsDomainResponse { + #[prost(bool, tag="1")] + pub exists: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDomainsRequest { + /// list limitations and ordering + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="3")] + pub sorting_column: i32, + /// criterias the client is looking for + #[prost(message, repeated, tag="4")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDomainsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="super::super::instance::v1::DomainFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddDomainRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveDomainRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPrimaryDomainRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPrimaryDomainResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChangeSubscriptionRequest { + #[prost(string, tag="1")] + pub domain: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub subscription_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub request_limit: u64, + #[prost(uint64, tag="4")] + pub action_mins_limit: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChangeSubscriptionResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListViewsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListViewsResponse { + /// TODO: list details + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClearViewRequest { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ClearViewResponse { +} +/// This is an empty request +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListFailedEventsRequest { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListFailedEventsResponse { + /// TODO: list details + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveFailedEventRequest { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub failed_sequence: u64, + #[prost(string, tag="4")] + pub instance_id: ::prost::alloc::string::String, +} +/// This is an empty response +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RemoveFailedEventResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct View { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub processed_sequence: u64, + /// The timestamp the event occured + #[prost(message, optional, tag="4")] + pub event_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="5")] + pub last_successful_spooler_run: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="6")] + pub instance: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FailedEvent { + #[prost(string, tag="1")] + pub database: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub view_name: ::prost::alloc::string::String, + #[prost(uint64, tag="3")] + pub failed_sequence: u64, + #[prost(uint64, tag="4")] + pub failure_count: u64, + #[prost(string, tag="5")] + pub error_message: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub last_failed: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeatureRequest { + #[prost(string, tag="1")] + pub instance_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::feature::v1::InstanceFeature", tag="2")] + pub feature_id: i32, + /// value based on the feature type + #[prost(oneof="set_instance_feature_request::Value", tags="3")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `SetInstanceFeatureRequest`. +pub mod set_instance_feature_request { + /// value based on the feature type + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(bool, tag="3")] + Bool(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetInstanceFeatureResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +include!("zitadel.system.v1.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.system.v1.tonic.rs b/crates/zitadel-gen/src/api/zitadel.system.v1.tonic.rs new file mode 100644 index 0000000..c72b882 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.system.v1.tonic.rs @@ -0,0 +1,734 @@ +// @generated +/// Generated client implementations. +pub mod system_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 SystemServiceClient { + inner: tonic::client::Grpc, + } + impl SystemServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl SystemServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> SystemServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + SystemServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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 healthz( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/Healthz", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "Healthz")); + self.inner.unary(req, path, codec).await + } + pub async fn list_instances( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ListInstances", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "ListInstances"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/GetInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "GetInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/AddInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "AddInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/UpdateInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "UpdateInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/CreateInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "CreateInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_instance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/RemoveInstance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "RemoveInstance"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_iam_members( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ListIAMMembers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "ListIAMMembers"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn exists_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ExistsDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "ExistsDomain"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_domains( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ListDomains", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "ListDomains"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/AddDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "AddDomain")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/RemoveDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "RemoveDomain"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_primary_domain( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/SetPrimaryDomain", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.system.v1.SystemService", + "SetPrimaryDomain", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_views( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ListViews", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "ListViews")); + self.inner.unary(req, path, codec).await + } + pub async fn clear_view( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ClearView", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "ClearView")); + self.inner.unary(req, path, codec).await + } + pub async fn list_failed_events( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ListFailedEvents", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.system.v1.SystemService", + "ListFailedEvents", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_failed_event( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/RemoveFailedEvent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.system.v1.SystemService", + "RemoveFailedEvent", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_quota( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/AddQuota", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "AddQuota")); + self.inner.unary(req, path, codec).await + } + pub async fn set_quota( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/SetQuota", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "SetQuota")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_quota( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/RemoveQuota", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "RemoveQuota"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_instance_feature( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/SetInstanceFeature", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.system.v1.SystemService", + "SetInstanceFeature", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_limits( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/SetLimits", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.system.v1.SystemService", "SetLimits")); + self.inner.unary(req, path, codec).await + } + pub async fn bulk_set_limits( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/BulkSetLimits", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "BulkSetLimits"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reset_limits( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.system.v1.SystemService/ResetLimits", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.system.v1.SystemService", "ResetLimits"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.text.v1.rs b/crates/zitadel-gen/src/api/zitadel.text.v1.rs new file mode 100644 index 0000000..1a9c5f7 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.text.v1.rs @@ -0,0 +1,697 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MessageCustomText { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub pre_header: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub subject: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub greeting: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub footer_text: ::prost::alloc::string::String, + #[prost(bool, tag="9")] + pub is_default: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginCustomText { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub select_account_text: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub login_text: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub password_text: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub username_change_text: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub username_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub init_password_text: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub init_password_done_text: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub email_verification_text: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub email_verification_done_text: ::core::option::Option, + #[prost(message, optional, tag="11")] + pub initialize_user_text: ::core::option::Option, + #[prost(message, optional, tag="12")] + pub initialize_done_text: ::core::option::Option, + #[prost(message, optional, tag="13")] + pub init_mfa_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="14")] + pub init_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="15")] + pub init_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="16")] + pub init_mfa_done_text: ::core::option::Option, + #[prost(message, optional, tag="17")] + pub mfa_providers_text: ::core::option::Option, + #[prost(message, optional, tag="18")] + pub verify_mfa_otp_text: ::core::option::Option, + #[prost(message, optional, tag="19")] + pub verify_mfa_u2f_text: ::core::option::Option, + #[prost(message, optional, tag="20")] + pub passwordless_text: ::core::option::Option, + #[prost(message, optional, tag="21")] + pub password_change_text: ::core::option::Option, + #[prost(message, optional, tag="22")] + pub password_change_done_text: ::core::option::Option, + #[prost(message, optional, tag="23")] + pub password_reset_done_text: ::core::option::Option, + #[prost(message, optional, tag="24")] + pub registration_option_text: ::core::option::Option, + #[prost(message, optional, tag="25")] + pub registration_user_text: ::core::option::Option, + #[prost(message, optional, tag="26")] + pub registration_org_text: ::core::option::Option, + #[prost(message, optional, tag="27")] + pub linking_user_done_text: ::core::option::Option, + #[prost(message, optional, tag="28")] + pub external_user_not_found_text: ::core::option::Option, + #[prost(message, optional, tag="29")] + pub success_login_text: ::core::option::Option, + #[prost(message, optional, tag="30")] + pub logout_text: ::core::option::Option, + #[prost(message, optional, tag="31")] + pub footer_text: ::core::option::Option, + #[prost(message, optional, tag="32")] + pub passwordless_prompt_text: ::core::option::Option, + #[prost(message, optional, tag="33")] + pub passwordless_registration_text: ::core::option::Option, + #[prost(message, optional, tag="34")] + pub passwordless_registration_done_text: ::core::option::Option, + #[prost(message, optional, tag="35")] + pub external_registration_user_overview_text: ::core::option::Option, + #[prost(bool, tag="36")] + pub is_default: bool, + /// Deprecated: the linking user prompt screen no longer exists + #[deprecated] + #[prost(message, optional, tag="37")] + pub linking_user_prompt_text: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SelectAccountScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub title_linking_process: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub description_linking_process: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub other_user: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub session_state_active: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub session_state_inactive: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub user_must_be_member_of_org: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub title_linking_process: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub description_linking_process: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user_must_be_member_of_org: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub login_name_label: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub register_button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub external_user_description: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub user_name_placeholder: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub login_name_placeholder: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub password_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub reset_link_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub back_button_text: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub min_length: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub has_uppercase: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub has_lowercase: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub has_number: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub has_symbol: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub confirmation: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UsernameChangeScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub username_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UsernameChangeDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitPasswordScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub code_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub new_password_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub new_password_confirm_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub resend_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitPasswordDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub cancel_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailVerificationScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub code_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub resend_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailVerificationDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub login_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitializeUserScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub code_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub new_password_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub new_password_confirm_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub resend_button_text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitializeUserDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitMfaPromptScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub otp_option: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub u2f_option: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub skip_button_text: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitMfaotpScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description_otp: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub secret_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub code_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub cancel_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitMfau2fScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub token_name_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub not_supported: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub register_token_button_text: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub error_retry: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitMfaDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MfaProvidersText { + #[prost(string, tag="1")] + pub choose_other: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub otp: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub u2f: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMfaotpScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub code_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMfau2fScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub validate_token_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub not_supported: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub error_retry: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordlessScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub login_with_pw_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub validate_token_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub not_supported: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub error_retry: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordChangeScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub old_password_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub new_password_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub new_password_confirm_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub expired_description: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordChangeDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordResetDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegistrationOptionScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_name_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub external_login_description: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub login_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegistrationUserScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description_org_register: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub firstname_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub lastname_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub email_label: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub username_label: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub language_label: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub gender_label: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub password_label: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub password_confirm_label: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub tos_and_privacy_label: ::prost::alloc::string::String, + #[prost(string, tag="13")] + pub tos_confirm: ::prost::alloc::string::String, + #[prost(string, tag="15")] + pub tos_link_text: ::prost::alloc::string::String, + #[prost(string, tag="16")] + pub privacy_confirm: ::prost::alloc::string::String, + #[prost(string, tag="18")] + pub privacy_link_text: ::prost::alloc::string::String, + #[prost(string, tag="20")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="21")] + pub back_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExternalRegistrationUserOverviewScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub email_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub username_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub firstname_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub lastname_label: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub nickname_label: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub language_label: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub phone_label: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub tos_and_privacy_label: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub tos_confirm: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub tos_link_text: ::prost::alloc::string::String, + #[prost(string, tag="14")] + pub privacy_link_text: ::prost::alloc::string::String, + #[prost(string, tag="15")] + pub back_button_text: ::prost::alloc::string::String, + #[prost(string, tag="16")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub privacy_confirm: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegistrationOrgScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub orgname_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub firstname_label: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub lastname_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub username_label: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub email_label: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub password_label: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub password_confirm_label: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub tos_and_privacy_label: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub tos_confirm: ::prost::alloc::string::String, + #[prost(string, tag="14")] + pub tos_link_text: ::prost::alloc::string::String, + #[prost(string, tag="15")] + pub privacy_confirm: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub privacy_link_text: ::prost::alloc::string::String, + #[prost(string, tag="19")] + pub save_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LinkingUserPromptScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub link_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub other_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LinkingUserDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExternalUserNotFoundScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub link_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub auto_register_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub tos_and_privacy_label: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub tos_confirm: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub tos_link_text: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub privacy_link_text: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub privacy_confirm: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SuccessLoginScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + /// Text to describe that auto-redirect should happen after successful login + #[prost(string, tag="2")] + pub auto_redirect_description: ::prost::alloc::string::String, + /// Text to describe that the window can be closed after redirect + #[prost(string, tag="3")] + pub redirected_description: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub next_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LogoutDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub login_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FooterText { + #[prost(string, tag="1")] + pub tos: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub privacy_policy: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub help: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub support_email: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordlessPromptScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub description_init: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub passwordless_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub skip_button_text: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordlessRegistrationScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub token_name_label: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub not_supported: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub register_token_button_text: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub error_retry: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordlessRegistrationDoneScreenText { + #[prost(string, tag="1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub next_button_text: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub cancel_button_text: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub description_close: ::prost::alloc::string::String, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.user.v1.rs b/crates/zitadel-gen/src/api/zitadel.user.v1.rs new file mode 100644 index 0000000..859b645 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.user.v1.rs @@ -0,0 +1,890 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct User { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(enumeration="UserState", tag="3")] + pub state: i32, + #[prost(string, tag="4")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, repeated, tag="5")] + pub login_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="6")] + pub preferred_login_name: ::prost::alloc::string::String, + #[prost(oneof="user::Type", tags="7, 8")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `User`. +pub mod user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag="7")] + Human(super::Human), + #[prost(message, tag="8")] + Machine(super::Machine), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Human { + #[prost(message, optional, tag="1")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub phone: ::core::option::Option, + /// The time the user last changed their password. + #[prost(message, optional, tag="4")] + pub password_changed: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Machine { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub has_secret: bool, + #[prost(enumeration="AccessTokenType", tag="4")] + pub access_token_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="Gender", tag="6")] + pub gender: i32, + #[prost(string, tag="7")] + pub avatar_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Email { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Phone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_phone_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + UserNameQuery(super::UserNameQuery), + #[prost(message, tag="2")] + FirstNameQuery(super::FirstNameQuery), + #[prost(message, tag="3")] + LastNameQuery(super::LastNameQuery), + #[prost(message, tag="4")] + NickNameQuery(super::NickNameQuery), + #[prost(message, tag="5")] + DisplayNameQuery(super::DisplayNameQuery), + #[prost(message, tag="6")] + EmailQuery(super::EmailQuery), + #[prost(message, tag="7")] + StateQuery(super::StateQuery), + #[prost(message, tag="8")] + TypeQuery(super::TypeQuery), + #[prost(message, tag="9")] + LoginNameQuery(super::LoginNameQuery), + #[prost(message, tag="10")] + InUserIdsQuery(super::InUserIdQuery), + #[prost(message, tag="11")] + OrQuery(super::OrQuery), + #[prost(message, tag="12")] + AndQuery(super::AndQuery), + #[prost(message, tag="13")] + NotQuery(::prost::alloc::boxed::Box), + #[prost(message, tag="14")] + InUserEmailsQuery(super::InUserEmailsQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotQuery { + #[prost(message, optional, boxed, tag="1")] + pub query: ::core::option::Option<::prost::alloc::boxed::Box>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserIdQuery { + #[prost(string, repeated, tag="1")] + pub user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserEmailsQuery { + #[prost(string, repeated, tag="1")] + pub user_emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserNameQuery { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FirstNameQuery { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LastNameQuery { + #[prost(string, tag="1")] + pub last_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NickNameQuery { + #[prost(string, tag="1")] + pub nick_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisplayNameQuery { + #[prost(string, tag="1")] + pub display_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailQuery { + #[prost(string, tag="1")] + pub email_address: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginNameQuery { + #[prost(string, tag="1")] + pub login_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +/// UserStateQuery always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StateQuery { + #[prost(enumeration="UserState", tag="1")] + pub state: i32, +} +/// UserTypeQuery always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TypeQuery { + #[prost(enumeration="Type", tag="1")] + pub r#type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthFactor { + #[prost(enumeration="AuthFactorState", tag="1")] + pub state: i32, + #[prost(oneof="auth_factor::Type", tags="2, 3, 4, 5")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `AuthFactor`. +pub mod auth_factor { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag="2")] + Otp(super::AuthFactorOtp), + #[prost(message, tag="3")] + U2f(super::AuthFactorU2f), + #[prost(message, tag="4")] + OtpSms(super::AuthFactorOtpsms), + #[prost(message, tag="5")] + OtpEmail(super::AuthFactorOtpEmail), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtp { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtpsms { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtpEmail { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthFactorU2f { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebAuthNKey { + #[prost(bytes="vec", tag="1")] + pub public_key: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebAuthNVerification { + #[prost(bytes="vec", tag="1")] + pub public_key_credential: ::prost::alloc::vec::Vec, + #[prost(string, tag="2")] + pub token_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WebAuthNToken { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="AuthFactorState", tag="2")] + pub state: i32, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Membership { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="3")] + pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(oneof="membership::Type", tags="5, 6, 7, 8")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `Membership`. +pub mod membership { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(bool, tag="5")] + Iam(bool), + #[prost(string, tag="6")] + OrgId(::prost::alloc::string::String), + #[prost(string, tag="7")] + ProjectId(::prost::alloc::string::String), + #[prost(string, tag="8")] + ProjectGrantId(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MembershipQuery { + #[prost(oneof="membership_query::Query", tags="1, 2, 3, 4")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `MembershipQuery`. +pub mod membership_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + OrgQuery(super::MembershipOrgQuery), + #[prost(message, tag="2")] + ProjectQuery(super::MembershipProjectQuery), + #[prost(message, tag="3")] + ProjectGrantQuery(super::MembershipProjectGrantQuery), + #[prost(message, tag="4")] + IamQuery(super::MembershipIamQuery), + } +} +/// this query always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MembershipOrgQuery { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, +} +/// this query always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MembershipProjectQuery { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, +} +/// this query always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MembershipProjectGrantQuery { + #[prost(string, tag="1")] + pub project_grant_id: ::prost::alloc::string::String, +} +/// this query always equals +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct MembershipIamQuery { + #[prost(bool, tag="1")] + pub iam: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Session { + #[prost(string, tag="1")] + pub session_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub agent_id: ::prost::alloc::string::String, + #[prost(enumeration="SessionState", tag="3")] + pub auth_state: i32, + #[prost(string, tag="4")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub login_name: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub display_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="9")] + pub details: ::core::option::Option, + #[prost(string, tag="10")] + pub avatar_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RefreshToken { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, tag="3")] + pub client_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="4")] + pub auth_time: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="5")] + pub idle_expiration: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="6")] + pub expiration: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, repeated, tag="7")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="8")] + pub audience: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PersonalAccessToken { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, repeated, tag="4")] + pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrant { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, repeated, tag="3")] + pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="UserGrantState", tag="4")] + pub state: i32, + #[prost(string, tag="5")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="6")] + pub user_name: ::prost::alloc::string::String, + #[prost(string, tag="7")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="8")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="9")] + pub email: ::prost::alloc::string::String, + #[prost(string, tag="10")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="11")] + pub org_id: ::prost::alloc::string::String, + #[prost(string, tag="12")] + pub org_name: ::prost::alloc::string::String, + #[prost(string, tag="13")] + pub org_domain: ::prost::alloc::string::String, + #[prost(string, tag="14")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="15")] + pub project_name: ::prost::alloc::string::String, + #[prost(string, tag="16")] + pub project_grant_id: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub avatar_url: ::prost::alloc::string::String, + #[prost(string, tag="18")] + pub preferred_login_name: ::prost::alloc::string::String, + #[prost(enumeration="Type", tag="19")] + pub user_type: i32, + #[prost(string, tag="20")] + pub granted_org_id: ::prost::alloc::string::String, + #[prost(string, tag="21")] + pub granted_org_name: ::prost::alloc::string::String, + #[prost(string, tag="22")] + pub granted_org_domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantQuery { + #[prost(oneof="user_grant_query::Query", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `UserGrantQuery`. +pub mod user_grant_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + ProjectIdQuery(super::UserGrantProjectIdQuery), + #[prost(message, tag="2")] + UserIdQuery(super::UserGrantUserIdQuery), + #[prost(message, tag="3")] + WithGrantedQuery(super::UserGrantWithGrantedQuery), + #[prost(message, tag="4")] + RoleKeyQuery(super::UserGrantRoleKeyQuery), + #[prost(message, tag="5")] + ProjectGrantIdQuery(super::UserGrantProjectGrantIdQuery), + #[prost(message, tag="6")] + UserNameQuery(super::UserGrantUserNameQuery), + #[prost(message, tag="7")] + FirstNameQuery(super::UserGrantFirstNameQuery), + #[prost(message, tag="8")] + LastNameQuery(super::UserGrantLastNameQuery), + #[prost(message, tag="9")] + EmailQuery(super::UserGrantEmailQuery), + #[prost(message, tag="10")] + OrgNameQuery(super::UserGrantOrgNameQuery), + #[prost(message, tag="11")] + OrgDomainQuery(super::UserGrantOrgDomainQuery), + #[prost(message, tag="12")] + ProjectNameQuery(super::UserGrantProjectNameQuery), + #[prost(message, tag="13")] + DisplayNameQuery(super::UserGrantDisplayNameQuery), + #[prost(message, tag="14")] + UserTypeQuery(super::UserGrantUserTypeQuery), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantProjectIdQuery { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantUserIdQuery { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UserGrantWithGrantedQuery { + #[prost(bool, tag="1")] + pub with_granted: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantRoleKeyQuery { + #[prost(string, tag="1")] + pub role_key: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantProjectGrantIdQuery { + #[prost(string, tag="1")] + pub project_grant_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantUserNameQuery { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantFirstNameQuery { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantLastNameQuery { + #[prost(string, tag="1")] + pub last_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantEmailQuery { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantOrgNameQuery { + #[prost(string, tag="1")] + pub org_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantOrgDomainQuery { + #[prost(string, tag="1")] + pub org_domain: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantProjectNameQuery { + #[prost(string, tag="1")] + pub project_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserGrantDisplayNameQuery { + #[prost(string, tag="1")] + pub display_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::v1::TextQueryMethod", tag="2")] + pub method: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct UserGrantUserTypeQuery { + #[prost(enumeration="Type", tag="1")] + pub r#type: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Deleted = 3, + Locked = 4, + Suspend = 5, + Initial = 6, +} +impl UserState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserState::Unspecified => "USER_STATE_UNSPECIFIED", + UserState::Active => "USER_STATE_ACTIVE", + UserState::Inactive => "USER_STATE_INACTIVE", + UserState::Deleted => "USER_STATE_DELETED", + UserState::Locked => "USER_STATE_LOCKED", + UserState::Suspend => "USER_STATE_SUSPEND", + UserState::Initial => "USER_STATE_INITIAL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "USER_STATE_ACTIVE" => Some(Self::Active), + "USER_STATE_INACTIVE" => Some(Self::Inactive), + "USER_STATE_DELETED" => Some(Self::Deleted), + "USER_STATE_LOCKED" => Some(Self::Locked), + "USER_STATE_SUSPEND" => Some(Self::Suspend), + "USER_STATE_INITIAL" => Some(Self::Initial), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Gender { + Unspecified = 0, + Female = 1, + Male = 2, + Diverse = 3, +} +impl Gender { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Gender::Unspecified => "GENDER_UNSPECIFIED", + Gender::Female => "GENDER_FEMALE", + Gender::Male => "GENDER_MALE", + Gender::Diverse => "GENDER_DIVERSE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "GENDER_UNSPECIFIED" => Some(Self::Unspecified), + "GENDER_FEMALE" => Some(Self::Female), + "GENDER_MALE" => Some(Self::Male), + "GENDER_DIVERSE" => Some(Self::Diverse), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AccessTokenType { + Bearer = 0, + Jwt = 1, +} +impl AccessTokenType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AccessTokenType::Bearer => "ACCESS_TOKEN_TYPE_BEARER", + AccessTokenType::Jwt => "ACCESS_TOKEN_TYPE_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TOKEN_TYPE_BEARER" => Some(Self::Bearer), + "ACCESS_TOKEN_TYPE_JWT" => Some(Self::Jwt), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Type { + Unspecified = 0, + Human = 1, + Machine = 2, +} +impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Human => "TYPE_HUMAN", + Type::Machine => "TYPE_MACHINE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TYPE_HUMAN" => Some(Self::Human), + "TYPE_MACHINE" => Some(Self::Machine), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserFieldName { + Unspecified = 0, + UserName = 1, + FirstName = 2, + LastName = 3, + NickName = 4, + DisplayName = 5, + Email = 6, + State = 7, + Type = 8, + CreationDate = 9, +} +impl UserFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserFieldName::Unspecified => "USER_FIELD_NAME_UNSPECIFIED", + UserFieldName::UserName => "USER_FIELD_NAME_USER_NAME", + UserFieldName::FirstName => "USER_FIELD_NAME_FIRST_NAME", + UserFieldName::LastName => "USER_FIELD_NAME_LAST_NAME", + UserFieldName::NickName => "USER_FIELD_NAME_NICK_NAME", + UserFieldName::DisplayName => "USER_FIELD_NAME_DISPLAY_NAME", + UserFieldName::Email => "USER_FIELD_NAME_EMAIL", + UserFieldName::State => "USER_FIELD_NAME_STATE", + UserFieldName::Type => "USER_FIELD_NAME_TYPE", + UserFieldName::CreationDate => "USER_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "USER_FIELD_NAME_USER_NAME" => Some(Self::UserName), + "USER_FIELD_NAME_FIRST_NAME" => Some(Self::FirstName), + "USER_FIELD_NAME_LAST_NAME" => Some(Self::LastName), + "USER_FIELD_NAME_NICK_NAME" => Some(Self::NickName), + "USER_FIELD_NAME_DISPLAY_NAME" => Some(Self::DisplayName), + "USER_FIELD_NAME_EMAIL" => Some(Self::Email), + "USER_FIELD_NAME_STATE" => Some(Self::State), + "USER_FIELD_NAME_TYPE" => Some(Self::Type), + "USER_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthFactorState { + Unspecified = 0, + NotReady = 1, + Ready = 2, + Removed = 3, +} +impl AuthFactorState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthFactorState::Unspecified => "AUTH_FACTOR_STATE_UNSPECIFIED", + AuthFactorState::NotReady => "AUTH_FACTOR_STATE_NOT_READY", + AuthFactorState::Ready => "AUTH_FACTOR_STATE_READY", + AuthFactorState::Removed => "AUTH_FACTOR_STATE_REMOVED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTH_FACTOR_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTH_FACTOR_STATE_NOT_READY" => Some(Self::NotReady), + "AUTH_FACTOR_STATE_READY" => Some(Self::Ready), + "AUTH_FACTOR_STATE_REMOVED" => Some(Self::Removed), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum SessionState { + Unspecified = 0, + Active = 1, + Terminated = 2, +} +impl SessionState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + SessionState::Unspecified => "SESSION_STATE_UNSPECIFIED", + SessionState::Active => "SESSION_STATE_ACTIVE", + SessionState::Terminated => "SESSION_STATE_TERMINATED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "SESSION_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "SESSION_STATE_ACTIVE" => Some(Self::Active), + "SESSION_STATE_TERMINATED" => Some(Self::Terminated), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserGrantState { + Unspecified = 0, + Active = 1, + Inactive = 2, +} +impl UserGrantState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserGrantState::Unspecified => "USER_GRANT_STATE_UNSPECIFIED", + UserGrantState::Active => "USER_GRANT_STATE_ACTIVE", + UserGrantState::Inactive => "USER_GRANT_STATE_INACTIVE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_GRANT_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "USER_GRANT_STATE_ACTIVE" => Some(Self::Active), + "USER_GRANT_STATE_INACTIVE" => Some(Self::Inactive), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.user.v2.rs b/crates/zitadel-gen/src/api/zitadel.user.v2.rs new file mode 100644 index 0000000..07af2af --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.user.v2.rs @@ -0,0 +1,1842 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasskeyRegistrationLink { + /// Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your passkey registration page. + /// If no template is set, the default ZITADEL url will be used. + /// + /// The following placeholders can be used: UserID, OrgID, CodeID, Code + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPasskeyRegistrationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasskeyRegistrationCode { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub code: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PasskeyAuthenticator { + Unspecified = 0, + Platform = 1, + CrossPlatform = 2, +} +impl PasskeyAuthenticator { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PasskeyAuthenticator::Unspecified => "PASSKEY_AUTHENTICATOR_UNSPECIFIED", + PasskeyAuthenticator::Platform => "PASSKEY_AUTHENTICATOR_PLATFORM", + PasskeyAuthenticator::CrossPlatform => "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PASSKEY_AUTHENTICATOR_UNSPECIFIED" => Some(Self::Unspecified), + "PASSKEY_AUTHENTICATOR_PLATFORM" => Some(Self::Platform), + "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM" => Some(Self::CrossPlatform), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanEmail { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="set_human_email::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetHumanEmail`. +pub mod set_human_email { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanEmail { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendEmailVerificationCode { + /// Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. + /// If no template is set, the default ZITADEL url will be used. + /// + /// The following placeholders can be used: UserID, OrgID, Code + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnEmailVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapCredentials { + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RedirectUrLs { + #[prost(string, tag="1")] + pub success_url: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub failure_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpIntent { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpInformation { + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="5")] + pub raw_information: ::core::option::Option<::pbjson_types::Struct>, + #[prost(oneof="idp_information::Access", tags="1, 6, 7")] + pub access: ::core::option::Option, +} +/// Nested message and enum types in `IDPInformation`. +pub mod idp_information { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Access { + #[prost(message, tag="1")] + Oauth(super::IdpoAuthAccessInformation), + #[prost(message, tag="6")] + Ldap(super::IdpldapAccessInformation), + #[prost(message, tag="7")] + Saml(super::IdpsamlAccessInformation), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpoAuthAccessInformation { + #[prost(string, tag="1")] + pub access_token: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub id_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpldapAccessInformation { + #[prost(message, optional, tag="1")] + pub attributes: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpsamlAccessInformation { + #[prost(bytes="vec", tag="1")] + pub assertion: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpLink { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Password { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub change_required: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedPassword { + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub change_required: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasswordResetLink { + #[prost(enumeration="NotificationType", tag="1")] + pub notification_type: i32, + /// Optionally set a url_template, which will be used in the password reset mail sent by ZITADEL to guide the user to your password change page. + /// If no template is set, the default ZITADEL url will be used. + /// + /// The following placeholders can be used: UserID, OrgID, Code + #[prost(string, optional, tag="2")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPasswordResetCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPassword { + #[prost(oneof="set_password::PasswordType", tags="1, 2")] + pub password_type: ::core::option::Option, + #[prost(oneof="set_password::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPassword`. +pub mod set_password { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum PasswordType { + #[prost(message, tag="1")] + Password(super::Password), + #[prost(message, tag="2")] + HashedPassword(super::HashedPassword), + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(string, tag="3")] + CurrentPassword(::prost::alloc::string::String), + #[prost(string, tag="4")] + VerificationCode(::prost::alloc::string::String), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NotificationType { + Unspecified = 0, + Email = 1, + Sms = 2, +} +impl NotificationType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NotificationType::Unspecified => "NOTIFICATION_TYPE_Unspecified", + NotificationType::Email => "NOTIFICATION_TYPE_Email", + NotificationType::Sms => "NOTIFICATION_TYPE_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NOTIFICATION_TYPE_Unspecified" => Some(Self::Unspecified), + "NOTIFICATION_TYPE_Email" => Some(Self::Email), + "NOTIFICATION_TYPE_SMS" => Some(Self::Sms), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanPhone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(oneof="set_human_phone::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetHumanPhone`. +pub mod set_human_phone { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPhoneVerificationCode), + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanPhone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SendPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanProfile { + #[prost(string, tag="1")] + pub given_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub family_name: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub nick_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub display_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub preferred_language: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="Gender", optional, tag="6")] + pub gender: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanProfile { + #[prost(string, tag="1")] + pub given_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub family_name: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub nick_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub display_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub preferred_language: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="Gender", optional, tag="6")] + pub gender: ::core::option::Option, + #[prost(string, tag="7")] + pub avatar_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMetadataEntry { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanUser { + /// Unique identifier of the user. + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// State of the user, for example active, inactive, locked, deleted, initial. + #[prost(enumeration="UserState", tag="2")] + pub state: i32, + /// Username of the user, which can be globally unique or unique on organization level. + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + /// Possible usable login names for the user. + #[prost(string, repeated, tag="4")] + pub login_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Preferred login name of the user. + #[prost(string, tag="5")] + pub preferred_login_name: ::prost::alloc::string::String, + /// Profile information of the user. + #[prost(message, optional, tag="6")] + pub profile: ::core::option::Option, + /// Email of the user, if defined. + #[prost(message, optional, tag="7")] + pub email: ::core::option::Option, + /// Phone of the user, if defined. + #[prost(message, optional, tag="8")] + pub phone: ::core::option::Option, + /// User is required to change the used password on the next login. + #[prost(bool, tag="9")] + pub password_change_required: bool, + /// The time the user last changed their password. + #[prost(message, optional, tag="10")] + pub password_changed: ::core::option::Option<::pbjson_types::Timestamp>, + /// The time the user last skipped MFA initialization. + #[prost(message, optional, tag="11")] + pub mfa_init_skipped: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct User { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="8")] + pub details: ::core::option::Option, + #[prost(enumeration="UserState", tag="2")] + pub state: i32, + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub login_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub preferred_login_name: ::prost::alloc::string::String, + #[prost(oneof="user::Type", tags="6, 7")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `User`. +pub mod user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag="6")] + Human(super::HumanUser), + #[prost(message, tag="7")] + Machine(super::MachineUser), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MachineUser { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub has_secret: bool, + #[prost(enumeration="AccessTokenType", tag="4")] + pub access_token_type: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Passkey { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(enumeration="AuthFactorState", tag="2")] + pub state: i32, + #[prost(string, tag="3")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthFactor { + #[prost(enumeration="AuthFactorState", tag="1")] + pub state: i32, + #[prost(oneof="auth_factor::Type", tags="2, 3, 4, 5")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `AuthFactor`. +pub mod auth_factor { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag="2")] + Otp(super::AuthFactorOtp), + #[prost(message, tag="3")] + U2f(super::AuthFactorU2f), + #[prost(message, tag="4")] + OtpSms(super::AuthFactorOtpsms), + #[prost(message, tag="5")] + OtpEmail(super::AuthFactorOtpEmail), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtp { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtpsms { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct AuthFactorOtpEmail { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthFactorU2f { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendInviteCode { + /// Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. + /// If no template is set, the default ZITADEL url will be used. + /// + /// The following placeholders can be used: UserID, OrgID, Code + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, + /// Optionally set an application name, which will be used in the invite mail sent by ZITADEL. + /// If no application name is set, ZITADEL will be used as default. + #[prost(string, optional, tag="2")] + pub application_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnInviteCode { +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Gender { + Unspecified = 0, + Female = 1, + Male = 2, + Diverse = 3, +} +impl Gender { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Gender::Unspecified => "GENDER_UNSPECIFIED", + Gender::Female => "GENDER_FEMALE", + Gender::Male => "GENDER_MALE", + Gender::Diverse => "GENDER_DIVERSE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "GENDER_UNSPECIFIED" => Some(Self::Unspecified), + "GENDER_FEMALE" => Some(Self::Female), + "GENDER_MALE" => Some(Self::Male), + "GENDER_DIVERSE" => Some(Self::Diverse), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AccessTokenType { + Bearer = 0, + Jwt = 1, +} +impl AccessTokenType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AccessTokenType::Bearer => "ACCESS_TOKEN_TYPE_BEARER", + AccessTokenType::Jwt => "ACCESS_TOKEN_TYPE_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TOKEN_TYPE_BEARER" => Some(Self::Bearer), + "ACCESS_TOKEN_TYPE_JWT" => Some(Self::Jwt), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Deleted = 3, + Locked = 4, + Initial = 5, +} +impl UserState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserState::Unspecified => "USER_STATE_UNSPECIFIED", + UserState::Active => "USER_STATE_ACTIVE", + UserState::Inactive => "USER_STATE_INACTIVE", + UserState::Deleted => "USER_STATE_DELETED", + UserState::Locked => "USER_STATE_LOCKED", + UserState::Initial => "USER_STATE_INITIAL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "USER_STATE_ACTIVE" => Some(Self::Active), + "USER_STATE_INACTIVE" => Some(Self::Inactive), + "USER_STATE_DELETED" => Some(Self::Deleted), + "USER_STATE_LOCKED" => Some(Self::Locked), + "USER_STATE_INITIAL" => Some(Self::Initial), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthFactorState { + Unspecified = 0, + NotReady = 1, + Ready = 2, + Removed = 3, +} +impl AuthFactorState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthFactorState::Unspecified => "AUTH_FACTOR_STATE_UNSPECIFIED", + AuthFactorState::NotReady => "AUTH_FACTOR_STATE_NOT_READY", + AuthFactorState::Ready => "AUTH_FACTOR_STATE_READY", + AuthFactorState::Removed => "AUTH_FACTOR_STATE_REMOVED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTH_FACTOR_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTH_FACTOR_STATE_NOT_READY" => Some(Self::NotReady), + "AUTH_FACTOR_STATE_READY" => Some(Self::Ready), + "AUTH_FACTOR_STATE_REMOVED" => Some(Self::Removed), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + UserNameQuery(super::UserNameQuery), + #[prost(message, tag="2")] + FirstNameQuery(super::FirstNameQuery), + #[prost(message, tag="3")] + LastNameQuery(super::LastNameQuery), + #[prost(message, tag="4")] + NickNameQuery(super::NickNameQuery), + #[prost(message, tag="5")] + DisplayNameQuery(super::DisplayNameQuery), + #[prost(message, tag="6")] + EmailQuery(super::EmailQuery), + #[prost(message, tag="7")] + StateQuery(super::StateQuery), + #[prost(message, tag="8")] + TypeQuery(super::TypeQuery), + #[prost(message, tag="9")] + LoginNameQuery(super::LoginNameQuery), + #[prost(message, tag="10")] + InUserIdsQuery(super::InUserIdQuery), + #[prost(message, tag="11")] + OrQuery(super::OrQuery), + #[prost(message, tag="12")] + AndQuery(super::AndQuery), + #[prost(message, tag="13")] + NotQuery(::prost::alloc::boxed::Box), + #[prost(message, tag="14")] + InUserEmailsQuery(super::InUserEmailsQuery), + #[prost(message, tag="15")] + OrganizationIdQuery(super::OrganizationIdQuery), + #[prost(message, tag="16")] + PhoneQuery(super::PhoneQuery), + } +} +/// Connect multiple sub-condition with and OR operator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +/// Connect multiple sub-condition with and AND operator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +/// Negate the sub-condition. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotQuery { + #[prost(message, optional, boxed, tag="1")] + pub query: ::core::option::Option<::prost::alloc::boxed::Box>, +} +/// Query for users with ID in list of IDs. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserIdQuery { + #[prost(string, repeated, tag="1")] + pub user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Query for users with a specific user name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserNameQuery { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific first name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FirstNameQuery { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific last name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LastNameQuery { + #[prost(string, tag="1")] + pub last_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific nickname. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NickNameQuery { + #[prost(string, tag="1")] + pub nick_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific display name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisplayNameQuery { + #[prost(string, tag="1")] + pub display_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific email. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailQuery { + #[prost(string, tag="1")] + pub email_address: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific phone. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PhoneQuery { + #[prost(string, tag="1")] + pub number: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginNameQuery { + #[prost(string, tag="1")] + pub login_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StateQuery { + #[prost(enumeration="UserState", tag="1")] + pub state: i32, +} +/// Query for users with a specific type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TypeQuery { + #[prost(enumeration="Type", tag="1")] + pub r#type: i32, +} +/// Query for users with email in list of emails. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserEmailsQuery { + #[prost(string, repeated, tag="1")] + pub user_emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Query for users under a specific organization as resource owner. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationIdQuery { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Type { + Unspecified = 0, + Human = 1, + Machine = 2, +} +impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Human => "TYPE_HUMAN", + Type::Machine => "TYPE_MACHINE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TYPE_HUMAN" => Some(Self::Human), + "TYPE_MACHINE" => Some(Self::Machine), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserFieldName { + Unspecified = 0, + UserName = 1, + FirstName = 2, + LastName = 3, + NickName = 4, + DisplayName = 5, + Email = 6, + State = 7, + Type = 8, + CreationDate = 9, +} +impl UserFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserFieldName::Unspecified => "USER_FIELD_NAME_UNSPECIFIED", + UserFieldName::UserName => "USER_FIELD_NAME_USER_NAME", + UserFieldName::FirstName => "USER_FIELD_NAME_FIRST_NAME", + UserFieldName::LastName => "USER_FIELD_NAME_LAST_NAME", + UserFieldName::NickName => "USER_FIELD_NAME_NICK_NAME", + UserFieldName::DisplayName => "USER_FIELD_NAME_DISPLAY_NAME", + UserFieldName::Email => "USER_FIELD_NAME_EMAIL", + UserFieldName::State => "USER_FIELD_NAME_STATE", + UserFieldName::Type => "USER_FIELD_NAME_TYPE", + UserFieldName::CreationDate => "USER_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "USER_FIELD_NAME_USER_NAME" => Some(Self::UserName), + "USER_FIELD_NAME_FIRST_NAME" => Some(Self::FirstName), + "USER_FIELD_NAME_LAST_NAME" => Some(Self::LastName), + "USER_FIELD_NAME_NICK_NAME" => Some(Self::NickName), + "USER_FIELD_NAME_DISPLAY_NAME" => Some(Self::DisplayName), + "USER_FIELD_NAME_EMAIL" => Some(Self::Email), + "USER_FIELD_NAME_STATE" => Some(Self::State), + "USER_FIELD_NAME_TYPE" => Some(Self::Type), + "USER_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserRequest { + /// optionally set your own id unique for the user. + #[prost(string, optional, tag="1")] + pub user_id: ::core::option::Option<::prost::alloc::string::String>, + /// optionally set a unique username, if none is provided the email will be used. + #[prost(string, optional, tag="2")] + pub username: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="11")] + pub organization: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub phone: ::core::option::Option, + #[prost(message, repeated, tag="6")] + pub metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="9")] + pub idp_links: ::prost::alloc::vec::Vec, + /// An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. + /// Currently no other options are supported, and if anything different is used the validation will fail. + #[prost(string, optional, tag="12")] + pub totp_secret: ::core::option::Option<::prost::alloc::string::String>, + #[prost(oneof="add_human_user_request::PasswordType", tags="7, 8")] + pub password_type: ::core::option::Option, +} +/// Nested message and enum types in `AddHumanUserRequest`. +pub mod add_human_user_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum PasswordType { + #[prost(message, tag="7")] + Password(super::Password), + #[prost(message, tag="8")] + HashedPassword(super::HashedPassword), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserResponse { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, optional, tag="3")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdResponse { + /// deprecated: details is moved into user + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="UserFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="UserFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub email: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="set_email_request::Verification", tags="3, 4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetEmailRequest`. +pub mod set_email_request { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnEmailVerificationCode), + #[prost(bool, tag="5")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendEmailCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="resend_email_code_request::Verification", tags="2, 3")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendEmailCodeRequest`. +pub mod resend_email_code_request { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendEmailCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendEmailCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="send_email_code_request::Verification", tags="2, 3")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SendEmailCodeRequest`. +pub mod send_email_code_request { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendEmailCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub phone: ::prost::alloc::string::String, + /// if no verification is specified, an sms is sent + #[prost(oneof="set_phone_request::Verification", tags="3, 4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPhoneRequest`. +pub mod set_phone_request { + /// if no verification is specified, an sms is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnPhoneVerificationCode), + #[prost(bool, tag="5")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendPhoneCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an sms is sent + #[prost(oneof="resend_phone_code_request::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendPhoneCodeRequest`. +pub mod resend_phone_code_request { + /// if no verification is specified, an sms is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnPhoneVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendPhoneCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub username: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="3")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub phone: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub password: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterPasskeyRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub code: ::core::option::Option, + #[prost(enumeration="PasskeyAuthenticator", tag="3")] + pub authenticator: i32, + #[prost(string, tag="4")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterPasskeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub passkey_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPasskeyRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub passkey_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>, + #[prost(string, tag="4")] + pub passkey_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPasskeyRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterU2fRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub u2f_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyU2fRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub u2f_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>, + #[prost(string, tag="4")] + pub token_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyU2fRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveU2fRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub u2f_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterTotpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterTotpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub uri: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub secret: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePasskeyRegistrationLinkRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no medium is specified, an email is sent with the default url + #[prost(oneof="create_passkey_registration_link_request::Medium", tags="2, 3")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `CreatePasskeyRegistrationLinkRequest`. +pub mod create_passkey_registration_link_request { + /// if no medium is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + #[prost(message, tag="2")] + SendLink(super::SendPasskeyRegistrationLink), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPasskeyRegistrationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePasskeyRegistrationLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the medium was set to return_code, the code will be returned + #[prost(message, optional, tag="2")] + pub code: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPasskeysRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPasskeysResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePasskeyRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub passkey_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePasskeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(oneof="start_identity_provider_intent_request::Content", tags="2, 3")] + pub content: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentRequest`. +pub mod start_identity_provider_intent_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Content { + #[prost(message, tag="2")] + Urls(super::RedirectUrLs), + #[prost(message, tag="3")] + Ldap(super::LdapCredentials), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(oneof="start_identity_provider_intent_response::NextStep", tags="2, 3, 4")] + pub next_step: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentResponse`. +pub mod start_identity_provider_intent_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum NextStep { + #[prost(string, tag="2")] + AuthUrl(::prost::alloc::string::String), + #[prost(message, tag="3")] + IdpIntent(super::IdpIntent), + #[prost(bytes, tag="4")] + PostForm(::prost::alloc::vec::Vec), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetrieveIdentityProviderIntentRequest { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetrieveIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub idp_information: ::core::option::Option, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpLinkRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub idp_link: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIdpLinksRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// list limitations and ordering + #[prost(message, optional, tag="2")] + pub query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListIdpLinksResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, repeated, tag="2")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpLinkRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub linked_user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveIdpLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordResetRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no medium is specified, an email is sent with the default url + #[prost(oneof="password_reset_request::Medium", tags="2, 3")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `PasswordResetRequest`. +pub mod password_reset_request { + /// if no medium is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + #[prost(message, tag="2")] + SendLink(super::SendPasswordResetLink), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPasswordResetCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordResetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the medium was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub new_password: ::core::option::Option, + /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password + #[prost(oneof="set_password_request::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPasswordRequest`. +pub mod set_password_request { + /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(string, tag="3")] + CurrentPassword(::prost::alloc::string::String), + #[prost(string, tag="4")] + VerificationCode(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationMethodTypesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub domain_query: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DomainQuery { + /// List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. + #[prost(bool, tag="1")] + pub include_without_domain: bool, + /// List only auth methods with specific domain. + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationMethodTypesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="AuthenticationMethodType", repeated, tag="2")] + pub auth_method_types: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationFactorsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(enumeration="AuthFactors", repeated, packed="false", tag="2")] + pub auth_factors: ::prost::alloc::vec::Vec, + #[prost(enumeration="AuthFactorState", repeated, packed="false", tag="3")] + pub states: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationFactorsResponse { + #[prost(message, repeated, tag="1")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInviteCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url and application name (ZITADEL) + #[prost(oneof="create_invite_code_request::Verification", tags="2, 3")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `CreateInviteCodeRequest`. +pub mod create_invite_code_request { + /// if no verification is specified, an email is sent with the default url and application name (ZITADEL) + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendInviteCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnInviteCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateInviteCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// The invite code is returned if the verification was set to return_code. + #[prost(string, optional, tag="2")] + pub invite_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendInviteCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendInviteCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyInviteCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyInviteCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanMfaInitSkippedRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanMfaInitSkippedResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthenticationMethodType { + Unspecified = 0, + Password = 1, + Passkey = 2, + Idp = 3, + Totp = 4, + U2f = 5, + OtpSms = 6, + OtpEmail = 7, +} +impl AuthenticationMethodType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthenticationMethodType::Unspecified => "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED", + AuthenticationMethodType::Password => "AUTHENTICATION_METHOD_TYPE_PASSWORD", + AuthenticationMethodType::Passkey => "AUTHENTICATION_METHOD_TYPE_PASSKEY", + AuthenticationMethodType::Idp => "AUTHENTICATION_METHOD_TYPE_IDP", + AuthenticationMethodType::Totp => "AUTHENTICATION_METHOD_TYPE_TOTP", + AuthenticationMethodType::U2f => "AUTHENTICATION_METHOD_TYPE_U2F", + AuthenticationMethodType::OtpSms => "AUTHENTICATION_METHOD_TYPE_OTP_SMS", + AuthenticationMethodType::OtpEmail => "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHENTICATION_METHOD_TYPE_PASSWORD" => Some(Self::Password), + "AUTHENTICATION_METHOD_TYPE_PASSKEY" => Some(Self::Passkey), + "AUTHENTICATION_METHOD_TYPE_IDP" => Some(Self::Idp), + "AUTHENTICATION_METHOD_TYPE_TOTP" => Some(Self::Totp), + "AUTHENTICATION_METHOD_TYPE_U2F" => Some(Self::U2f), + "AUTHENTICATION_METHOD_TYPE_OTP_SMS" => Some(Self::OtpSms), + "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthFactors { + Otp = 0, + OtpSms = 1, + OtpEmail = 2, + U2f = 3, +} +impl AuthFactors { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthFactors::Otp => "OTP", + AuthFactors::OtpSms => "OTP_SMS", + AuthFactors::OtpEmail => "OTP_EMAIL", + AuthFactors::U2f => "U2F", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "OTP" => Some(Self::Otp), + "OTP_SMS" => Some(Self::OtpSms), + "OTP_EMAIL" => Some(Self::OtpEmail), + "U2F" => Some(Self::U2f), + _ => None, + } + } +} +include!("zitadel.user.v2.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.user.v2.tonic.rs b/crates/zitadel-gen/src/api/zitadel.user.v2.tonic.rs new file mode 100644 index 0000000..d0f9139 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.user.v2.tonic.rs @@ -0,0 +1,1277 @@ +// @generated +/// Generated client implementations. +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 { + inner: tonic::client::Grpc, + } + impl UserServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl UserServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> UserServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + UserServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/AddHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "AddHumanUser")); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/GetUserByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "GetUserByID")); + self.inner.unary(req, path, codec).await + } + pub async fn list_users( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ListUsers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "ListUsers")); + self.inner.unary(req, path, codec).await + } + pub async fn set_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/SetEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "SetEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn resend_email_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ResendEmailCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "ResendEmailCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn send_email_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/SendEmailCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "SendEmailCode")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "VerifyEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn set_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/SetPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "SetPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemovePhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemovePhone")); + self.inner.unary(req, path, codec).await + } + pub async fn resend_phone_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ResendPhoneCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "ResendPhoneCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "VerifyPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn update_human_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/UpdateHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "UpdateHumanUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/DeactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "DeactivateUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ReactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "ReactivateUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn lock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/LockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "LockUser")); + self.inner.unary(req, path, codec).await + } + pub async fn unlock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/UnlockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "UnlockUser")); + self.inner.unary(req, path, codec).await + } + pub async fn delete_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/DeleteUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "DeleteUser")); + self.inner.unary(req, path, codec).await + } + pub async fn register_passkey( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RegisterPasskey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "RegisterPasskey"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_passkey_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyPasskeyRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "VerifyPasskeyRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_passkey_registration_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/CreatePasskeyRegistrationLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "CreatePasskeyRegistrationLink", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_passkeys( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ListPasskeys", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "ListPasskeys")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_passkey( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemovePasskey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemovePasskey")); + self.inner.unary(req, path, codec).await + } + pub async fn register_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RegisterU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RegisterU2F")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_u2f_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyU2FRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "VerifyU2FRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemoveU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemoveU2F")); + self.inner.unary(req, path, codec).await + } + pub async fn register_totp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RegisterTOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RegisterTOTP")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_totp_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyTOTPRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "VerifyTOTPRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_totp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemoveTOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemoveTOTP")); + self.inner.unary(req, path, codec).await + } + pub async fn add_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/AddOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "AddOTPSMS")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemoveOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemoveOTPSMS")); + self.inner.unary(req, path, codec).await + } + pub async fn add_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/AddOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "AddOTPEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemoveOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "RemoveOTPEmail"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn start_identity_provider_intent( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/StartIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.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, + 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.v2.UserService/RetrieveIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "RetrieveIdentityProviderIntent", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_idp_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/AddIDPLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "AddIDPLink")); + self.inner.unary(req, path, codec).await + } + pub async fn list_idp_links( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ListIDPLinks", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "ListIDPLinks")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_idp_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/RemoveIDPLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "RemoveIDPLink")); + self.inner.unary(req, path, codec).await + } + pub async fn password_reset( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/PasswordReset", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "PasswordReset")); + self.inner.unary(req, path, codec).await + } + pub async fn set_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/SetPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2.UserService", "SetPassword")); + self.inner.unary(req, path, codec).await + } + pub async fn list_authentication_method_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ListAuthenticationMethodTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "ListAuthenticationMethodTypes", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_authentication_factors( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ListAuthenticationFactors", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2.UserService", + "ListAuthenticationFactors", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_invite_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/CreateInviteCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "CreateInviteCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_invite_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/ResendInviteCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "ResendInviteCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_invite_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/VerifyInviteCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "VerifyInviteCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn human_mfa_init_skipped( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2.UserService/HumanMFAInitSkipped", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2.UserService", "HumanMFAInitSkipped"), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.user.v2beta.rs b/crates/zitadel-gen/src/api/zitadel.user.v2beta.rs new file mode 100644 index 0000000..85b4bf7 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.user.v2beta.rs @@ -0,0 +1,1491 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasskeyRegistrationLink { + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPasskeyRegistrationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasskeyRegistrationCode { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub code: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PasskeyAuthenticator { + Unspecified = 0, + Platform = 1, + CrossPlatform = 2, +} +impl PasskeyAuthenticator { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PasskeyAuthenticator::Unspecified => "PASSKEY_AUTHENTICATOR_UNSPECIFIED", + PasskeyAuthenticator::Platform => "PASSKEY_AUTHENTICATOR_PLATFORM", + PasskeyAuthenticator::CrossPlatform => "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PASSKEY_AUTHENTICATOR_UNSPECIFIED" => Some(Self::Unspecified), + "PASSKEY_AUTHENTICATOR_PLATFORM" => Some(Self::Platform), + "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM" => Some(Self::CrossPlatform), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanEmail { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="set_human_email::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetHumanEmail`. +pub mod set_human_email { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanEmail { + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendEmailVerificationCode { + #[prost(string, optional, tag="1")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnEmailVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LdapCredentials { + #[prost(string, tag="1")] + pub username: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RedirectUrLs { + #[prost(string, tag="1")] + pub success_url: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub failure_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpIntent { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpInformation { + #[prost(string, tag="2")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="5")] + pub raw_information: ::core::option::Option<::pbjson_types::Struct>, + #[prost(oneof="idp_information::Access", tags="1, 6, 7")] + pub access: ::core::option::Option, +} +/// Nested message and enum types in `IDPInformation`. +pub mod idp_information { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Access { + #[prost(message, tag="1")] + Oauth(super::IdpoAuthAccessInformation), + #[prost(message, tag="6")] + Ldap(super::IdpldapAccessInformation), + #[prost(message, tag="7")] + Saml(super::IdpsamlAccessInformation), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpoAuthAccessInformation { + #[prost(string, tag="1")] + pub access_token: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub id_token: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpldapAccessInformation { + #[prost(message, optional, tag="1")] + pub attributes: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpsamlAccessInformation { + #[prost(bytes="vec", tag="1")] + pub assertion: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IdpLink { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub user_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Password { + #[prost(string, tag="1")] + pub password: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub change_required: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HashedPassword { + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub change_required: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendPasswordResetLink { + #[prost(enumeration="NotificationType", tag="1")] + pub notification_type: i32, + #[prost(string, optional, tag="2")] + pub url_template: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPasswordResetCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPassword { + #[prost(oneof="set_password::PasswordType", tags="1, 2")] + pub password_type: ::core::option::Option, + #[prost(oneof="set_password::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPassword`. +pub mod set_password { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum PasswordType { + #[prost(message, tag="1")] + Password(super::Password), + #[prost(message, tag="2")] + HashedPassword(super::HashedPassword), + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(string, tag="3")] + CurrentPassword(::prost::alloc::string::String), + #[prost(string, tag="4")] + VerificationCode(::prost::alloc::string::String), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NotificationType { + Unspecified = 0, + Email = 1, + Sms = 2, +} +impl NotificationType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NotificationType::Unspecified => "NOTIFICATION_TYPE_Unspecified", + NotificationType::Email => "NOTIFICATION_TYPE_Email", + NotificationType::Sms => "NOTIFICATION_TYPE_SMS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NOTIFICATION_TYPE_Unspecified" => Some(Self::Unspecified), + "NOTIFICATION_TYPE_Email" => Some(Self::Email), + "NOTIFICATION_TYPE_SMS" => Some(Self::Sms), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanPhone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(oneof="set_human_phone::Verification", tags="2, 3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetHumanPhone`. +pub mod set_human_phone { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPhoneVerificationCode), + #[prost(bool, tag="4")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanPhone { + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_verified: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct SendPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ReturnPhoneVerificationCode { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetHumanProfile { + #[prost(string, tag="1")] + pub given_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub family_name: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub nick_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub display_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub preferred_language: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="Gender", optional, tag="6")] + pub gender: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanProfile { + #[prost(string, tag="1")] + pub given_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub family_name: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub nick_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub display_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub preferred_language: ::core::option::Option<::prost::alloc::string::String>, + #[prost(enumeration="Gender", optional, tag="6")] + pub gender: ::core::option::Option, + #[prost(string, tag="7")] + pub avatar_url: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetMetadataEntry { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(bytes="vec", tag="2")] + pub value: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HumanUser { + /// Unique identifier of the user. + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// State of the user, for example active, inactive, locked, deleted, initial. + #[prost(enumeration="UserState", tag="2")] + pub state: i32, + /// Username of the user, which can be globally unique or unique on organization level. + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + /// Possible usable login names for the user. + #[prost(string, repeated, tag="4")] + pub login_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Preferred login name of the user. + #[prost(string, tag="5")] + pub preferred_login_name: ::prost::alloc::string::String, + /// Profile information of the user. + #[prost(message, optional, tag="6")] + pub profile: ::core::option::Option, + /// Email of the user, if defined. + #[prost(message, optional, tag="7")] + pub email: ::core::option::Option, + /// Phone of the user, if defined. + #[prost(message, optional, tag="8")] + pub phone: ::core::option::Option, + /// User is required to change the used password on the next login. + #[prost(bool, tag="9")] + pub password_change_required: bool, + /// The time the user last changed their password. + #[prost(message, optional, tag="10")] + pub password_changed: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct User { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="8")] + pub details: ::core::option::Option, + #[prost(enumeration="UserState", tag="2")] + pub state: i32, + #[prost(string, tag="3")] + pub username: ::prost::alloc::string::String, + #[prost(string, repeated, tag="4")] + pub login_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="5")] + pub preferred_login_name: ::prost::alloc::string::String, + #[prost(oneof="user::Type", tags="6, 7")] + pub r#type: ::core::option::Option, +} +/// Nested message and enum types in `User`. +pub mod user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Type { + #[prost(message, tag="6")] + Human(super::HumanUser), + #[prost(message, tag="7")] + Machine(super::MachineUser), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MachineUser { + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub description: ::prost::alloc::string::String, + #[prost(bool, tag="3")] + pub has_secret: bool, + #[prost(enumeration="AccessTokenType", tag="4")] + pub access_token_type: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Gender { + Unspecified = 0, + Female = 1, + Male = 2, + Diverse = 3, +} +impl Gender { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Gender::Unspecified => "GENDER_UNSPECIFIED", + Gender::Female => "GENDER_FEMALE", + Gender::Male => "GENDER_MALE", + Gender::Diverse => "GENDER_DIVERSE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "GENDER_UNSPECIFIED" => Some(Self::Unspecified), + "GENDER_FEMALE" => Some(Self::Female), + "GENDER_MALE" => Some(Self::Male), + "GENDER_DIVERSE" => Some(Self::Diverse), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AccessTokenType { + Bearer = 0, + Jwt = 1, +} +impl AccessTokenType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AccessTokenType::Bearer => "ACCESS_TOKEN_TYPE_BEARER", + AccessTokenType::Jwt => "ACCESS_TOKEN_TYPE_JWT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TOKEN_TYPE_BEARER" => Some(Self::Bearer), + "ACCESS_TOKEN_TYPE_JWT" => Some(Self::Jwt), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserState { + Unspecified = 0, + Active = 1, + Inactive = 2, + Deleted = 3, + Locked = 4, + Initial = 5, +} +impl UserState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserState::Unspecified => "USER_STATE_UNSPECIFIED", + UserState::Active => "USER_STATE_ACTIVE", + UserState::Inactive => "USER_STATE_INACTIVE", + UserState::Deleted => "USER_STATE_DELETED", + UserState::Locked => "USER_STATE_LOCKED", + UserState::Initial => "USER_STATE_INITIAL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_STATE_UNSPECIFIED" => Some(Self::Unspecified), + "USER_STATE_ACTIVE" => Some(Self::Active), + "USER_STATE_INACTIVE" => Some(Self::Inactive), + "USER_STATE_DELETED" => Some(Self::Deleted), + "USER_STATE_LOCKED" => Some(Self::Locked), + "USER_STATE_INITIAL" => Some(Self::Initial), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchQuery { + #[prost(oneof="search_query::Query", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16")] + pub query: ::core::option::Option, +} +/// Nested message and enum types in `SearchQuery`. +pub mod search_query { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Query { + #[prost(message, tag="1")] + UserNameQuery(super::UserNameQuery), + #[prost(message, tag="2")] + FirstNameQuery(super::FirstNameQuery), + #[prost(message, tag="3")] + LastNameQuery(super::LastNameQuery), + #[prost(message, tag="4")] + NickNameQuery(super::NickNameQuery), + #[prost(message, tag="5")] + DisplayNameQuery(super::DisplayNameQuery), + #[prost(message, tag="6")] + EmailQuery(super::EmailQuery), + #[prost(message, tag="7")] + StateQuery(super::StateQuery), + #[prost(message, tag="8")] + TypeQuery(super::TypeQuery), + #[prost(message, tag="9")] + LoginNameQuery(super::LoginNameQuery), + #[prost(message, tag="10")] + InUserIdsQuery(super::InUserIdQuery), + #[prost(message, tag="11")] + OrQuery(super::OrQuery), + #[prost(message, tag="12")] + AndQuery(super::AndQuery), + #[prost(message, tag="13")] + NotQuery(::prost::alloc::boxed::Box), + #[prost(message, tag="14")] + InUserEmailsQuery(super::InUserEmailsQuery), + #[prost(message, tag="15")] + OrganizationIdQuery(super::OrganizationIdQuery), + #[prost(message, tag="16")] + PhoneQuery(super::PhoneQuery), + } +} +/// Connect multiple sub-condition with and OR operator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +/// Connect multiple sub-condition with and AND operator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AndQuery { + #[prost(message, repeated, tag="1")] + pub queries: ::prost::alloc::vec::Vec, +} +/// Negate the sub-condition. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotQuery { + #[prost(message, optional, boxed, tag="1")] + pub query: ::core::option::Option<::prost::alloc::boxed::Box>, +} +/// Query for users with ID in list of IDs. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserIdQuery { + #[prost(string, repeated, tag="1")] + pub user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Query for users with a specific user name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UserNameQuery { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific first name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FirstNameQuery { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific last name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LastNameQuery { + #[prost(string, tag="1")] + pub last_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific nickname. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NickNameQuery { + #[prost(string, tag="1")] + pub nick_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific display name. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisplayNameQuery { + #[prost(string, tag="1")] + pub display_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific email. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmailQuery { + #[prost(string, tag="1")] + pub email_address: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific phone. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PhoneQuery { + #[prost(string, tag="1")] + pub number: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoginNameQuery { + #[prost(string, tag="1")] + pub login_name: ::prost::alloc::string::String, + #[prost(enumeration="super::super::object::v2beta::TextQueryMethod", tag="2")] + pub method: i32, +} +/// Query for users with a specific state. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct StateQuery { + #[prost(enumeration="UserState", tag="1")] + pub state: i32, +} +/// Query for users with a specific type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct TypeQuery { + #[prost(enumeration="Type", tag="1")] + pub r#type: i32, +} +/// Query for users with email in list of emails. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InUserEmailsQuery { + #[prost(string, repeated, tag="1")] + pub user_emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Query for users under a specific organization as resource owner. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct OrganizationIdQuery { + #[prost(string, tag="1")] + pub organization_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Type { + Unspecified = 0, + Human = 1, + Machine = 2, +} +impl Type { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Type::Unspecified => "TYPE_UNSPECIFIED", + Type::Human => "TYPE_HUMAN", + Type::Machine => "TYPE_MACHINE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TYPE_HUMAN" => Some(Self::Human), + "TYPE_MACHINE" => Some(Self::Machine), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum UserFieldName { + Unspecified = 0, + UserName = 1, + FirstName = 2, + LastName = 3, + NickName = 4, + DisplayName = 5, + Email = 6, + State = 7, + Type = 8, + CreationDate = 9, +} +impl UserFieldName { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + UserFieldName::Unspecified => "USER_FIELD_NAME_UNSPECIFIED", + UserFieldName::UserName => "USER_FIELD_NAME_USER_NAME", + UserFieldName::FirstName => "USER_FIELD_NAME_FIRST_NAME", + UserFieldName::LastName => "USER_FIELD_NAME_LAST_NAME", + UserFieldName::NickName => "USER_FIELD_NAME_NICK_NAME", + UserFieldName::DisplayName => "USER_FIELD_NAME_DISPLAY_NAME", + UserFieldName::Email => "USER_FIELD_NAME_EMAIL", + UserFieldName::State => "USER_FIELD_NAME_STATE", + UserFieldName::Type => "USER_FIELD_NAME_TYPE", + UserFieldName::CreationDate => "USER_FIELD_NAME_CREATION_DATE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "USER_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified), + "USER_FIELD_NAME_USER_NAME" => Some(Self::UserName), + "USER_FIELD_NAME_FIRST_NAME" => Some(Self::FirstName), + "USER_FIELD_NAME_LAST_NAME" => Some(Self::LastName), + "USER_FIELD_NAME_NICK_NAME" => Some(Self::NickName), + "USER_FIELD_NAME_DISPLAY_NAME" => Some(Self::DisplayName), + "USER_FIELD_NAME_EMAIL" => Some(Self::Email), + "USER_FIELD_NAME_STATE" => Some(Self::State), + "USER_FIELD_NAME_TYPE" => Some(Self::Type), + "USER_FIELD_NAME_CREATION_DATE" => Some(Self::CreationDate), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserRequest { + /// optionally set your own id unique for the user. + #[prost(string, optional, tag="1")] + pub user_id: ::core::option::Option<::prost::alloc::string::String>, + /// optionally set a unique username, if none is provided the email will be used. + #[prost(string, optional, tag="2")] + pub username: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="11")] + pub organization: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="10")] + pub phone: ::core::option::Option, + #[prost(message, repeated, tag="6")] + pub metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="9")] + pub idp_links: ::prost::alloc::vec::Vec, + /// An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. + /// Currently no other options are supported, and if anything different is used the validation will fail. + #[prost(string, optional, tag="12")] + pub totp_secret: ::core::option::Option<::prost::alloc::string::String>, + #[prost(oneof="add_human_user_request::PasswordType", tags="7, 8")] + pub password_type: ::core::option::Option, +} +/// Nested message and enum types in `AddHumanUserRequest`. +pub mod add_human_user_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum PasswordType { + #[prost(message, tag="7")] + Password(super::Password), + #[prost(message, tag="8")] + HashedPassword(super::HashedPassword), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddHumanUserResponse { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub details: ::core::option::Option, + #[prost(string, optional, tag="3")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetUserByIdResponse { + /// deprecated: details is moved into user + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersRequest { + /// list limitations and ordering + #[prost(message, optional, tag="1")] + pub query: ::core::option::Option, + /// the field the result is sorted + #[prost(enumeration="UserFieldName", tag="2")] + pub sorting_column: i32, + /// criteria the client is looking for + #[prost(message, repeated, tag="3")] + pub queries: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListUsersResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="UserFieldName", tag="2")] + pub sorting_column: i32, + #[prost(message, repeated, tag="3")] + pub result: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub email: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="set_email_request::Verification", tags="3, 4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetEmailRequest`. +pub mod set_email_request { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnEmailVerificationCode), + #[prost(bool, tag="5")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendEmailCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an email is sent with the default url + #[prost(oneof="resend_email_code_request::Verification", tags="2, 3")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendEmailCodeRequest`. +pub mod resend_email_code_request { + /// if no verification is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="2")] + SendCode(super::SendEmailVerificationCode), + #[prost(message, tag="3")] + ReturnCode(super::ReturnEmailVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendEmailCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub phone: ::prost::alloc::string::String, + /// if no verification is specified, an sms is sent + #[prost(oneof="set_phone_request::Verification", tags="3, 4, 5")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPhoneRequest`. +pub mod set_phone_request { + /// if no verification is specified, an sms is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnPhoneVerificationCode), + #[prost(bool, tag="5")] + IsVerified(bool), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemovePhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendPhoneCodeRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no verification is specified, an sms is sent + #[prost(oneof="resend_phone_code_request::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ResendPhoneCodeRequest`. +pub mod resend_phone_code_request { + /// if no verification is specified, an sms is sent + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(message, tag="3")] + SendCode(super::SendPhoneVerificationCode), + #[prost(message, tag="4")] + ReturnCode(super::ReturnPhoneVerificationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ResendPhoneCodeResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the verification was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPhoneRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub verification_code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPhoneResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, optional, tag="2")] + pub username: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="3")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub phone: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub password: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateHumanUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, optional, tag="2")] + pub email_code: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag="3")] + pub phone_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReactivateUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnlockUserResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterPasskeyRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub code: ::core::option::Option, + #[prost(enumeration="PasskeyAuthenticator", tag="3")] + pub authenticator: i32, + #[prost(string, tag="4")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterPasskeyResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub passkey_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPasskeyRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub passkey_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>, + #[prost(string, tag="4")] + pub passkey_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyPasskeyRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterU2fRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub domain: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterU2fResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub u2f_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyU2fRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub u2f_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>, + #[prost(string, tag="4")] + pub token_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyU2fRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterTotpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterTotpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(string, tag="2")] + pub uri: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub secret: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub code: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyTotpRegistrationResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveTotpResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpsmsResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RemoveOtpEmailResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePasskeyRegistrationLinkRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no medium is specified, an email is sent with the default url + #[prost(oneof="create_passkey_registration_link_request::Medium", tags="2, 3")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `CreatePasskeyRegistrationLinkRequest`. +pub mod create_passkey_registration_link_request { + /// if no medium is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + #[prost(message, tag="2")] + SendLink(super::SendPasskeyRegistrationLink), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPasskeyRegistrationCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePasskeyRegistrationLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the medium was set to return_code, the code will be returned + #[prost(message, optional, tag="2")] + pub code: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentRequest { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(oneof="start_identity_provider_intent_request::Content", tags="2, 3")] + pub content: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentRequest`. +pub mod start_identity_provider_intent_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Content { + #[prost(message, tag="2")] + Urls(super::RedirectUrLs), + #[prost(message, tag="3")] + Ldap(super::LdapCredentials), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StartIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(oneof="start_identity_provider_intent_response::NextStep", tags="2, 3, 4")] + pub next_step: ::core::option::Option, +} +/// Nested message and enum types in `StartIdentityProviderIntentResponse`. +pub mod start_identity_provider_intent_response { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum NextStep { + #[prost(string, tag="2")] + AuthUrl(::prost::alloc::string::String), + #[prost(message, tag="3")] + IdpIntent(super::IdpIntent), + #[prost(bytes, tag="4")] + PostForm(::prost::alloc::vec::Vec), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetrieveIdentityProviderIntentRequest { + #[prost(string, tag="1")] + pub idp_intent_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub idp_intent_token: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RetrieveIdentityProviderIntentResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(message, optional, tag="2")] + pub idp_information: ::core::option::Option, + #[prost(string, tag="3")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpLinkRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub idp_link: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddIdpLinkResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordResetRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + /// if no medium is specified, an email is sent with the default url + #[prost(oneof="password_reset_request::Medium", tags="2, 3")] + pub medium: ::core::option::Option, +} +/// Nested message and enum types in `PasswordResetRequest`. +pub mod password_reset_request { + /// if no medium is specified, an email is sent with the default url + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Medium { + #[prost(message, tag="2")] + SendLink(super::SendPasswordResetLink), + #[prost(message, tag="3")] + ReturnCode(super::ReturnPasswordResetCode), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PasswordResetResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + /// in case the medium was set to return_code, the code will be returned + #[prost(string, optional, tag="2")] + pub verification_code: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub new_password: ::core::option::Option, + /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password + #[prost(oneof="set_password_request::Verification", tags="3, 4")] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `SetPasswordRequest`. +pub mod set_password_request { + /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided, + /// the user must be granted permission to set a password + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Verification { + #[prost(string, tag="3")] + CurrentPassword(::prost::alloc::string::String), + #[prost(string, tag="4")] + VerificationCode(::prost::alloc::string::String), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPasswordResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationMethodTypesRequest { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAuthenticationMethodTypesResponse { + #[prost(message, optional, tag="1")] + pub details: ::core::option::Option, + #[prost(enumeration="AuthenticationMethodType", repeated, tag="2")] + pub auth_method_types: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthenticationMethodType { + Unspecified = 0, + Password = 1, + Passkey = 2, + Idp = 3, + Totp = 4, + U2f = 5, + OtpSms = 6, + OtpEmail = 7, +} +impl AuthenticationMethodType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AuthenticationMethodType::Unspecified => "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED", + AuthenticationMethodType::Password => "AUTHENTICATION_METHOD_TYPE_PASSWORD", + AuthenticationMethodType::Passkey => "AUTHENTICATION_METHOD_TYPE_PASSKEY", + AuthenticationMethodType::Idp => "AUTHENTICATION_METHOD_TYPE_IDP", + AuthenticationMethodType::Totp => "AUTHENTICATION_METHOD_TYPE_TOTP", + AuthenticationMethodType::U2f => "AUTHENTICATION_METHOD_TYPE_U2F", + AuthenticationMethodType::OtpSms => "AUTHENTICATION_METHOD_TYPE_OTP_SMS", + AuthenticationMethodType::OtpEmail => "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHENTICATION_METHOD_TYPE_PASSWORD" => Some(Self::Password), + "AUTHENTICATION_METHOD_TYPE_PASSKEY" => Some(Self::Passkey), + "AUTHENTICATION_METHOD_TYPE_IDP" => Some(Self::Idp), + "AUTHENTICATION_METHOD_TYPE_TOTP" => Some(Self::Totp), + "AUTHENTICATION_METHOD_TYPE_U2F" => Some(Self::U2f), + "AUTHENTICATION_METHOD_TYPE_OTP_SMS" => Some(Self::OtpSms), + "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL" => Some(Self::OtpEmail), + _ => None, + } + } +} +include!("zitadel.user.v2beta.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/crates/zitadel-gen/src/api/zitadel.user.v2beta.tonic.rs b/crates/zitadel-gen/src/api/zitadel.user.v2beta.tonic.rs new file mode 100644 index 0000000..5882d91 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.user.v2beta.tonic.rs @@ -0,0 +1,1019 @@ +// @generated +/// Generated client implementations. +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 { + inner: tonic::client::Grpc, + } + impl UserServiceClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl UserServiceClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + 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( + inner: T, + interceptor: F, + ) -> UserServiceClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + UserServiceClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[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, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/AddHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "AddHumanUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_user_by_id( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/GetUserByID", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "GetUserByID"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_users( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/ListUsers", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2beta.UserService", "ListUsers")); + self.inner.unary(req, path, codec).await + } + pub async fn set_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/SetEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2beta.UserService", "SetEmail")); + self.inner.unary(req, path, codec).await + } + pub async fn resend_email_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/ResendEmailCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "ResendEmailCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/VerifyEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "VerifyEmail"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/SetPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2beta.UserService", "SetPhone")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RemovePhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RemovePhone"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn resend_phone_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/ResendPhoneCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "ResendPhoneCode"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_phone( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/VerifyPhone", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "VerifyPhone"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn update_human_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/UpdateHumanUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "UpdateHumanUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn deactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/DeactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "DeactivateUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn reactivate_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/ReactivateUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "ReactivateUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn lock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/LockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2beta.UserService", "LockUser")); + self.inner.unary(req, path, codec).await + } + pub async fn unlock_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/UnlockUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "UnlockUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn delete_user( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/DeleteUser", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "DeleteUser"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn register_passkey( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RegisterPasskey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RegisterPasskey"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_passkey_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/VerifyPasskeyRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "VerifyPasskeyRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn create_passkey_registration_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/CreatePasskeyRegistrationLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "CreatePasskeyRegistrationLink", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn register_u2f( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RegisterU2F", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RegisterU2F"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_u2f_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/VerifyU2FRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "VerifyU2FRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn register_totp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RegisterTOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RegisterTOTP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn verify_totp_registration( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/VerifyTOTPRegistration", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "VerifyTOTPRegistration", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_totp( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RemoveTOTP", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RemoveTOTP"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/AddOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("zitadel.user.v2beta.UserService", "AddOTPSMS")); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otpsms( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RemoveOTPSMS", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RemoveOTPSMS"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/AddOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "AddOTPEmail"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn remove_otp_email( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/RemoveOTPEmail", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "RemoveOTPEmail"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn start_identity_provider_intent( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/StartIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.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, + 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.v2beta.UserService/RetrieveIdentityProviderIntent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "RetrieveIdentityProviderIntent", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn add_idp_link( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/AddIDPLink", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "AddIDPLink"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn password_reset( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/PasswordReset", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "PasswordReset"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn set_password( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/SetPassword", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("zitadel.user.v2beta.UserService", "SetPassword"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn list_authentication_method_types( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.v2beta.UserService/ListAuthenticationMethodTypes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "zitadel.user.v2beta.UserService", + "ListAuthenticationMethodTypes", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} diff --git a/crates/zitadel-gen/src/api/zitadel.v1.rs b/crates/zitadel-gen/src/api/zitadel.v1.rs new file mode 100644 index 0000000..1a5a15f --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.v1.rs @@ -0,0 +1,187 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ObjectDetails { + /// sequence represents the order of events. It's always counting + /// + /// on read: the sequence of the last event reduced by the projection + /// + /// on manipulation: the timestamp of the event(s) added by the manipulation + #[prost(uint64, tag="1")] + pub sequence: u64, + /// creation_date is the timestamp where the first operation on the object was made + /// + /// on read: the timestamp of the first event of the object + /// + /// on create: the timestamp of the event(s) added by the manipulation + #[prost(message, optional, tag="2")] + pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>, + /// change_date is the timestamp when the object was changed + /// + /// on read: the timestamp of the last event reduced by the projection + /// + /// on manipulation: the + #[prost(message, optional, tag="3")] + pub change_date: ::core::option::Option<::pbjson_types::Timestamp>, + /// resource_owner is the organization an object belongs to + #[prost(string, tag="4")] + pub resource_owner: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListQuery { + #[prost(uint64, tag="1")] + pub offset: u64, + #[prost(uint32, tag="2")] + pub limit: u32, + #[prost(bool, tag="3")] + pub asc: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct ListDetails { + #[prost(uint64, tag="1")] + pub total_result: u64, + #[prost(uint64, tag="2")] + pub processed_sequence: u64, + #[prost(message, optional, tag="3")] + pub view_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TextQueryMethod { + Equals = 0, + EqualsIgnoreCase = 1, + StartsWith = 2, + StartsWithIgnoreCase = 3, + Contains = 4, + ContainsIgnoreCase = 5, + EndsWith = 6, + EndsWithIgnoreCase = 7, +} +impl TextQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TextQueryMethod::Equals => "TEXT_QUERY_METHOD_EQUALS", + TextQueryMethod::EqualsIgnoreCase => "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE", + TextQueryMethod::StartsWith => "TEXT_QUERY_METHOD_STARTS_WITH", + TextQueryMethod::StartsWithIgnoreCase => "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE", + TextQueryMethod::Contains => "TEXT_QUERY_METHOD_CONTAINS", + TextQueryMethod::ContainsIgnoreCase => "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE", + TextQueryMethod::EndsWith => "TEXT_QUERY_METHOD_ENDS_WITH", + TextQueryMethod::EndsWithIgnoreCase => "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TEXT_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TEXT_QUERY_METHOD_EQUALS_IGNORE_CASE" => Some(Self::EqualsIgnoreCase), + "TEXT_QUERY_METHOD_STARTS_WITH" => Some(Self::StartsWith), + "TEXT_QUERY_METHOD_STARTS_WITH_IGNORE_CASE" => Some(Self::StartsWithIgnoreCase), + "TEXT_QUERY_METHOD_CONTAINS" => Some(Self::Contains), + "TEXT_QUERY_METHOD_CONTAINS_IGNORE_CASE" => Some(Self::ContainsIgnoreCase), + "TEXT_QUERY_METHOD_ENDS_WITH" => Some(Self::EndsWith), + "TEXT_QUERY_METHOD_ENDS_WITH_IGNORE_CASE" => Some(Self::EndsWithIgnoreCase), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ListQueryMethod { + In = 0, +} +impl ListQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ListQueryMethod::In => "LIST_QUERY_METHOD_IN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "LIST_QUERY_METHOD_IN" => Some(Self::In), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TimestampQueryMethod { + Equals = 0, + Greater = 1, + GreaterOrEquals = 2, + Less = 3, + LessOrEquals = 4, +} +impl TimestampQueryMethod { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TimestampQueryMethod::Equals => "TIMESTAMP_QUERY_METHOD_EQUALS", + TimestampQueryMethod::Greater => "TIMESTAMP_QUERY_METHOD_GREATER", + TimestampQueryMethod::GreaterOrEquals => "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS", + TimestampQueryMethod::Less => "TIMESTAMP_QUERY_METHOD_LESS", + TimestampQueryMethod::LessOrEquals => "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TIMESTAMP_QUERY_METHOD_EQUALS" => Some(Self::Equals), + "TIMESTAMP_QUERY_METHOD_GREATER" => Some(Self::Greater), + "TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS" => Some(Self::GreaterOrEquals), + "TIMESTAMP_QUERY_METHOD_LESS" => Some(Self::Less), + "TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS" => Some(Self::LessOrEquals), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ErrorDetail { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CredentialsCheckError { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, + #[prost(int32, tag="3")] + pub failed_attempts: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LocalizedMessage { + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub localized_message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AuthOption { + #[prost(string, tag="1")] + pub permission: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub check_field_name: ::prost::alloc::string::String, +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel-gen/src/api/zitadel.v1.v1.rs b/crates/zitadel-gen/src/api/zitadel.v1.v1.rs new file mode 100644 index 0000000..a2ae890 --- /dev/null +++ b/crates/zitadel-gen/src/api/zitadel.v1.v1.rs @@ -0,0 +1,339 @@ +// @generated +// This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddCustomOrgIamPolicyRequest { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + /// the username has to end with the domain of its organization (uniqueness is organization based) + #[prost(bool, tag="2")] + pub user_login_must_be_domain: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ImportDataOrg { + #[prost(message, repeated, tag="1")] + pub orgs: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataOrg { + #[prost(string, tag="1")] + pub org_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub org: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub iam_policy: ::core::option::Option, + #[prost(message, optional, tag="5")] + pub label_policy: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub lockout_policy: ::core::option::Option, + #[prost(message, optional, tag="7")] + pub login_policy: ::core::option::Option, + #[prost(message, optional, tag="8")] + pub password_complexity_policy: ::core::option::Option, + #[prost(message, optional, tag="9")] + pub privacy_policy: ::core::option::Option, + #[prost(message, repeated, tag="10")] + pub projects: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="11")] + pub project_roles: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="12")] + pub api_apps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="13")] + pub oidc_apps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="14")] + pub human_users: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="15")] + pub machine_users: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="16")] + pub trigger_actions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="17")] + pub actions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="18")] + pub project_grants: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="19")] + pub user_grants: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="20")] + pub org_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="21")] + pub project_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="22")] + pub project_grant_members: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="23")] + pub user_metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="24")] + pub login_texts: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="25")] + pub init_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="26")] + pub password_reset_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="27")] + pub verify_email_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="28")] + pub verify_phone_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="29")] + pub domain_claimed_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="30")] + pub passwordless_registration_messages: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="31")] + pub oidc_idps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="32")] + pub jwt_idps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="33")] + pub second_factors: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="34")] + pub multi_factors: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="35")] + pub idps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="36")] + pub user_links: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="37")] + pub domains: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="38")] + pub app_keys: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="39")] + pub machine_keys: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="40")] + pub invite_user_messages: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataOidcidp { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataJwtidp { + #[prost(string, tag="1")] + pub idp_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="32")] + pub idp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ExportHumanUser { + #[prost(string, tag="1")] + pub user_name: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub profile: ::core::option::Option, + #[prost(message, optional, tag="3")] + pub email: ::core::option::Option, + #[prost(message, optional, tag="4")] + pub phone: ::core::option::Option, + #[prost(string, tag="5")] + pub password: ::prost::alloc::string::String, + #[prost(message, optional, tag="6")] + pub hashed_password: ::core::option::Option, + #[prost(bool, tag="7")] + pub password_change_required: bool, + #[prost(bool, tag="8")] + pub request_passwordless_registration: bool, + #[prost(string, tag="9")] + pub otp_code: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ExportHumanUser`. +pub mod export_human_user { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Profile { + #[prost(string, tag="1")] + pub first_name: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub last_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub nick_name: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub display_name: ::prost::alloc::string::String, + #[prost(string, tag="5")] + pub preferred_language: ::prost::alloc::string::String, + #[prost(enumeration="super::super::super::user::v1::Gender", tag="6")] + pub gender: i32, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Email { + /// TODO: check if no value is allowed + #[prost(string, tag="1")] + pub email: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_email_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Phone { + /// has to be a global number + #[prost(string, tag="1")] + pub phone: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub is_phone_verified: bool, + } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct HashedPassword { + #[prost(string, tag="1")] + pub value: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub algorithm: ::prost::alloc::string::String, + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataAppKey { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub project_id: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub app_id: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub client_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::authn::v1::KeyType", tag="5")] + pub r#type: i32, + #[prost(message, optional, tag="6")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bytes="vec", tag="7")] + pub public_key: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataMachineKey { + #[prost(string, tag="1")] + pub key_id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub user_id: ::prost::alloc::string::String, + #[prost(enumeration="super::super::authn::v1::KeyType", tag="3")] + pub r#type: i32, + #[prost(message, optional, tag="4")] + pub expiration_date: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(bytes="vec", tag="5")] + pub public_key: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataProject { + #[prost(string, tag="1")] + pub project_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub project: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataApiApplication { + #[prost(string, tag="1")] + pub app_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub app: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataOidcApplication { + #[prost(string, tag="1")] + pub app_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub app: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataHumanUser { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataMachineUser { + #[prost(string, tag="1")] + pub user_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub user: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataAction { + #[prost(string, tag="1")] + pub action_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub action: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DataProjectGrant { + #[prost(string, tag="1")] + pub grant_id: ::prost::alloc::string::String, + #[prost(message, optional, tag="2")] + pub project_grant: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetTriggerActionsRequest { + #[prost(enumeration="FlowType", tag="1")] + pub flow_type: i32, + #[prost(enumeration="TriggerType", tag="2")] + pub trigger_type: i32, + #[prost(string, repeated, tag="3")] + pub action_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum FlowType { + Unspecified = 0, + ExternalAuthentication = 1, +} +impl FlowType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FlowType::Unspecified => "FLOW_TYPE_UNSPECIFIED", + FlowType::ExternalAuthentication => "FLOW_TYPE_EXTERNAL_AUTHENTICATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FLOW_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "FLOW_TYPE_EXTERNAL_AUTHENTICATION" => Some(Self::ExternalAuthentication), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TriggerType { + Unspecified = 0, + PostAuthentication = 1, + PreCreation = 2, + PostCreation = 3, +} +impl TriggerType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TriggerType::Unspecified => "TRIGGER_TYPE_UNSPECIFIED", + TriggerType::PostAuthentication => "TRIGGER_TYPE_POST_AUTHENTICATION", + TriggerType::PreCreation => "TRIGGER_TYPE_PRE_CREATION", + TriggerType::PostCreation => "TRIGGER_TYPE_POST_CREATION", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRIGGER_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "TRIGGER_TYPE_POST_AUTHENTICATION" => Some(Self::PostAuthentication), + "TRIGGER_TYPE_PRE_CREATION" => Some(Self::PreCreation), + "TRIGGER_TYPE_POST_CREATION" => Some(Self::PostCreation), + _ => None, + } + } +} +// @@protoc_insertion_point(module) diff --git a/crates/zitadel/Cargo.toml b/crates/zitadel/Cargo.toml index 7e9e3e8..ef439a1 100644 --- a/crates/zitadel/Cargo.toml +++ b/crates/zitadel/Cargo.toml @@ -97,7 +97,7 @@ rocket_okapi = ["rocket", "dep:rocket_okapi", "dep:schemars"] [dependencies] actix-web = { version = "4.5.1", optional = true } async-trait = { version = "0.1.80", optional = true } -axum = { version = "0.8.0", optional = true, features = ["macros"] } +axum = { version = "0.8.4", optional = true, features = ["macros"] } axum-extra = { version = "0.10.0", optional = true, features = ["typed-header"] } #0.11.0 is yanked base64-compat = { version = "1", optional = true } custom_error = "1.9.2" @@ -176,3 +176,4 @@ path = "examples/rocket_webapi_oauth_interception_jwtprofile.rs" name = "service_account_authentication" required-features = ["credentials"] path = "examples/service_account_authentication.rs" + diff --git a/crates/zitadel/src/actix/introspection/extractor.rs b/crates/zitadel/src/actix/introspection/extractor.rs index 4089a91..81d7a70 100644 --- a/crates/zitadel/src/actix/introspection/extractor.rs +++ b/crates/zitadel/src/actix/introspection/extractor.rs @@ -4,11 +4,9 @@ use actix_web::dev::Payload; use actix_web::error::{ErrorInternalServerError, ErrorUnauthorized}; use actix_web::{Error, FromRequest, HttpRequest}; use custom_error::custom_error; -use openidconnect::TokenIntrospectionResponse; -use std::collections::HashMap; use crate::actix::introspection::config::IntrospectionConfig; -use crate::oidc::introspection::{introspect, IntrospectionError, ZitadelIntrospectionResponse}; +use crate::oidc::introspection::{claims::ZitadelClaims, introspect, IntrospectionError}; custom_error! { /// Error type for extractor related errors. @@ -22,43 +20,31 @@ custom_error! { NoUserId = "introspection result contained no user id", } -/// Struct for the handler function that requires an authenticated user. -/// Contains various information about the given token. The fields are optional -/// since a machine user does not have a profile or (varying by scope) not all -/// fields are returned from the introspection endpoint. -#[derive(Debug)] -pub struct IntrospectedUser { - /// UserID of the introspected user (OIDC Field "sub"). - pub user_id: String, - pub username: Option, - pub name: Option, - pub given_name: Option, - pub family_name: Option, - pub preferred_username: Option, - pub email: Option, - pub email_verified: Option, - pub locale: Option, - pub project_roles: Option>>, - pub metadata: Option>, -} - -impl From for IntrospectedUser { - fn from(response: ZitadelIntrospectionResponse) -> Self { - Self { - user_id: response.sub().unwrap().to_string(), - username: response.username().map(|s| s.to_string()), - name: response.extra_fields().name.clone(), - given_name: response.extra_fields().given_name.clone(), - family_name: response.extra_fields().family_name.clone(), - preferred_username: response.extra_fields().preferred_username.clone(), - email: response.extra_fields().email.clone(), - email_verified: response.extra_fields().email_verified, - locale: response.extra_fields().locale.clone(), - project_roles: response.extra_fields().project_roles.clone(), - metadata: response.extra_fields().metadata.clone(), - } - } -} +/// Type alias for the extracted user. +/// +/// The extracted user will always be valid when fetched in request function arguments. +/// If not, the API will return with an appropriate error. +/// +/// # Example +/// +/// ``` +/// use actix_web::{get, HttpResponse, Responder}; +/// use zitadel::actix::introspection::IntrospectedUser; +/// +/// #[get("/protected")] +/// async fn protected_route(user: IntrospectedUser) -> impl Responder { +/// if !user.has_role("admin") { +/// return HttpResponse::Forbidden().body("Admin access required"); +/// } +/// +/// if user.has_role_in_project("project123", "editor") { +/// return HttpResponse::Ok().body("Hello Editor"); +/// } +/// +/// HttpResponse::Ok().body("Hello Admin") +/// } +/// ``` +pub type IntrospectedUser = ZitadelClaims; impl FromRequest for IntrospectedUser { type Error = Error; @@ -115,12 +101,17 @@ impl FromRequest for IntrospectedUser { )); } - let result = result.unwrap(); - match result.active() { - true if result.sub().is_some() => Ok(result.into()), - false => Err(ErrorUnauthorized(IntrospectionExtractorError::Inactive)), - _ => Err(ErrorUnauthorized(IntrospectionExtractorError::NoUserId)), + let claims = result.unwrap(); + + if !claims.active { + return Err(ErrorUnauthorized(IntrospectionExtractorError::Inactive)); + } + + if claims.sub.is_empty() { + return Err(ErrorUnauthorized(IntrospectionExtractorError::NoUserId)); } + + Ok(claims) }) } } diff --git a/crates/zitadel/src/axum/introspection/user.rs b/crates/zitadel/src/axum/introspection/user.rs index d6a622d..79d5b42 100644 --- a/crates/zitadel/src/axum/introspection/user.rs +++ b/crates/zitadel/src/axum/introspection/user.rs @@ -1,5 +1,4 @@ use std::collections::HashMap; -use std::fmt::Debug; use crate::axum::introspection::IntrospectionState; use axum::http::StatusCode; @@ -13,10 +12,9 @@ use axum_extra::headers::authorization::Bearer; use axum_extra::headers::Authorization; use axum_extra::TypedHeader; use custom_error::custom_error; -use openidconnect::TokenIntrospectionResponse; use serde_json::json; -use crate::oidc::introspection::{introspect, IntrospectionError, ZitadelIntrospectionResponse}; +use crate::oidc::introspection::{claims::ZitadelClaims, introspect, IntrospectionError}; custom_error! { /// Error type for guard related errors. @@ -54,61 +52,31 @@ impl IntoResponse for IntrospectionGuardError { } } -/// Struct for the extracted user. The extracted user will always be valid, when fetched in a -/// request function arguments. If not the api will return with an appropriate error. +/// Type alias for the extracted user. +/// +/// The extracted user will always be valid when fetched in request function arguments. +/// If not, the API will return with an appropriate error. /// -/// It can be used as a basis for further customized authorization checks with a custom extractor -/// or an extension trait. +/// # Example /// /// ``` /// use axum::http::StatusCode; /// use axum::response::IntoResponse; /// use zitadel::axum::introspection::IntrospectedUser; /// -/// enum Role { -/// Admin, -/// Client -/// } -/// /// async fn my_handler(user: IntrospectedUser) -> impl IntoResponse { -/// if !user.has_role(Role::Admin, "MY-ORG-ID") { +/// if !user.has_role("admin") { /// return StatusCode::FORBIDDEN.into_response(); /// } -/// "Hello Admin".into_response() -/// } -/// -/// trait MyAuthorizationChecks { -/// fn has_role(&self, role: Role, org_id: &str) -> bool; -/// } -/// -/// impl MyAuthorizationChecks for IntrospectedUser { -/// fn has_role(&self, role: Role, org_id: &str) -> bool { -/// let role = match role { -/// Role::Admin => "Admin", -/// Role::Client => "Client", -/// }; -/// self.project_roles.as_ref() -/// .and_then(|roles| roles.get(role)) -/// .map(|org_ids| org_ids.contains_key(org_id)) -/// .unwrap_or(false) +/// +/// if user.has_role_in_project("project123", "editor") { +/// return "Hello Editor".into_response(); /// } +/// +/// "Hello Admin".into_response() /// } /// ``` -#[derive(Debug)] -pub struct IntrospectedUser { - /// UserID of the introspected user (OIDC Field "sub"). - pub user_id: String, - pub username: Option, - pub name: Option, - pub given_name: Option, - pub family_name: Option, - pub preferred_username: Option, - pub email: Option, - pub email_verified: Option, - pub locale: Option, - pub project_roles: Option>>, - pub metadata: Option>, -} +pub type IntrospectedUser = ZitadelClaims; impl FromRequestParts for IntrospectedUser where @@ -166,37 +134,17 @@ where ) .await; - let user: Result = match res { - Ok(res) => match res.active() { - true if res.sub().is_some() => Ok(res.into()), - false => Err(IntrospectionGuardError::Inactive), - _ => Err(IntrospectionGuardError::NoUserId), - }, - Err(source) => return Err(IntrospectionGuardError::Introspection { source }), - }; - - user - } -} + let claims = res.map_err(|source| IntrospectionGuardError::Introspection { source })?; -impl From for IntrospectedUser { - fn from(response: ZitadelIntrospectionResponse) -> Self { - Self { - user_id: response.sub().unwrap().to_string(), - username: response.username().map(|s| s.to_string()), - name: response.extra_fields().name.clone(), - given_name: response.extra_fields().given_name.clone(), - family_name: response.extra_fields().family_name.clone(), - preferred_username: response.extra_fields().preferred_username.clone(), - email: response.extra_fields().email.clone(), - email_verified: response.extra_fields().email_verified, - locale: response.extra_fields().locale.clone(), - project_roles: response.extra_fields().project_roles.clone(), - metadata: response.extra_fields().metadata.clone(), + if claims.sub.is_empty() { + return Err(IntrospectionGuardError::NoUserId); } + + Ok(claims) } } + #[cfg(test)] mod tests { #![allow(clippy::all)] @@ -229,7 +177,7 @@ mod tests { async fn authed(user: IntrospectedUser) -> impl IntoResponse { format!( "Hello authorized user: {:?} with id {}", - user.username, user.user_id + user.username, user.sub ) } @@ -362,7 +310,6 @@ mod tests { use super::*; use crate::oidc::introspection::cache::in_memory::InMemoryIntrospectionCache; use crate::oidc::introspection::cache::IntrospectionCache; - use crate::oidc::introspection::ZitadelIntrospectionExtraTokenFields; use chrono::{TimeDelta, Utc}; use http_body_util::BodyExt; use std::ops::Add; @@ -393,12 +340,17 @@ mod tests { let cache = Arc::new(InMemoryIntrospectionCache::default()); let app = app_witch_cache(cache.clone()).await; - let mut res = ZitadelIntrospectionResponse::new( - true, - ZitadelIntrospectionExtraTokenFields::default(), - ); - res.set_sub(Some("cached_sub".to_string())); - res.set_exp(Some(Utc::now().add(TimeDelta::days(1)))); + use crate::oidc::introspection::claims::ZitadelClaims; + let res = ZitadelClaims { + sub: "cached_sub".to_string(), + iss: "https://test.zitadel.cloud".to_string(), + aud: vec!["test".to_string()], + username: Some("cached_user".to_string()), + exp: Utc::now().add(TimeDelta::days(1)).timestamp(), + iat: Utc::now().timestamp(), + active: true, + ..Default::default() + }; cache.set(PERSONAL_ACCESS_TOKEN, res).await; let response = app @@ -454,7 +406,7 @@ mod tests { let cached_response = cache.get(PERSONAL_ACCESS_TOKEN).await.unwrap(); - assert!(text.contains(cached_response.sub().unwrap())); + assert!(text.contains(&cached_response.username.unwrap())); } } } diff --git a/crates/zitadel/src/credentials/service_account.rs b/crates/zitadel/src/credentials/service_account.rs index ea81840..54ab215 100644 --- a/crates/zitadel/src/credentials/service_account.rs +++ b/crates/zitadel/src/credentials/service_account.rs @@ -3,7 +3,7 @@ use jsonwebtoken::{encode, Algorithm, EncodingKey, Header}; use openidconnect::{ core::{CoreProviderMetadata, CoreTokenType}, http::HeaderMap, - EmptyExtraTokenFields, IssuerUrl, OAuth2TokenResponse, StandardTokenResponse, + EmptyExtraTokenFields, HttpClientError, IssuerUrl, OAuth2TokenResponse, StandardTokenResponse, }; use reqwest::{ header::{ACCEPT, CONTENT_TYPE}, @@ -70,7 +70,7 @@ custom_error! { Json{source: serde_json::Error} = "could not parse json: {source}", Key{source: jsonwebtoken::errors::Error} = "could not parse RSA key: {source}", AudienceUrl{source: openidconnect::url::ParseError} = "audience url could not be parsed: {source}", - DiscoveryError{source: Box} = "could not discover OIDC document: {source}", + DiscoveryError{source: openidconnect::DiscoveryError>} = "could not discover OIDC document: {source}", TokenEndpointMissing = "OIDC document does not contain token endpoint", HttpError{source: openidconnect::reqwest::Error} = "http error: {source}", UrlEncodeError = "could not encode url params for token request", @@ -241,7 +241,7 @@ impl ServiceAccount { let metadata = CoreProviderMetadata::discover_async(issuer, &async_http_client) .await .map_err(|e| ServiceAccountError::DiscoveryError { - source: Box::new(e), + source: e, })?; let jwt = self.create_signed_jwt(audience)?; diff --git a/crates/zitadel/src/oidc/introspection/cache/in_memory.rs b/crates/zitadel/src/oidc/introspection/cache/in_memory.rs index 0d1eee7..d258452 100644 --- a/crates/zitadel/src/oidc/introspection/cache/in_memory.rs +++ b/crates/zitadel/src/oidc/introspection/cache/in_memory.rs @@ -1,9 +1,7 @@ pub use moka::future::{Cache, CacheBuilder}; use std::time::Duration; -use openidconnect::TokenIntrospectionResponse; - -type Response = super::super::ZitadelIntrospectionResponse; +type Response = crate::oidc::introspection::claims::ZitadelClaims; #[derive(Debug)] pub struct InMemoryIntrospectionCache { @@ -66,10 +64,10 @@ impl super::IntrospectionCache for InMemoryIntrospectionCache { } async fn set(&self, token: &str, response: Response) { - if !response.active() || response.exp().is_none() { + if !response.active || response.exp == 0 { return; } - let expires_at = response.exp().unwrap().timestamp(); + let expires_at = response.exp; self.cache .insert(token.to_string(), (response, expires_at)) .await; @@ -86,16 +84,34 @@ mod tests { use crate::oidc::introspection::cache::IntrospectionCache; use chrono::{TimeDelta, Utc}; + use std::collections::HashMap; use super::*; + fn create_test_claims() -> Response { + use crate::oidc::introspection::claims::ZitadelClaims; + ZitadelClaims { + sub: "test".to_string(), + iss: "https://test.zitadel.cloud".to_string(), + active: false, + ..Default::default() + } + } + #[tokio::test] async fn test_get_set() { let c = InMemoryIntrospectionCache::new(); let t = &c as &dyn IntrospectionCache; - let mut response = Response::new(true, Default::default()); - response.set_exp(Some(Utc::now())); + let response = Response { + sub: "test".to_string(), + iss: "https://test.zitadel.cloud".to_string(), + aud: vec![], + exp: Utc::now().timestamp() + 3600, + iat: Utc::now().timestamp(), + active: true, + ..create_test_claims() + }; t.set("token1", response.clone()).await; t.set("token2", response.clone()).await; @@ -110,7 +126,11 @@ mod tests { let c = InMemoryIntrospectionCache::new(); let t = &c as &dyn IntrospectionCache; - let response = Response::new(true, Default::default()); + let response = Response { + exp: 0, // No expiration + active: true, + ..create_test_claims() + }; t.set("token1", response.clone()).await; t.set("token2", response.clone()).await; @@ -124,8 +144,11 @@ mod tests { let c = InMemoryIntrospectionCache::new(); let t = &c as &dyn IntrospectionCache; - let mut response = Response::new(true, Default::default()); - response.set_exp(Some(Utc::now())); + let response = Response { + exp: Utc::now().timestamp() + 3600, + active: true, + ..create_test_claims() + }; t.set("token1", response.clone()).await; t.set("token2", response.clone()).await; @@ -141,8 +164,11 @@ mod tests { let c = InMemoryIntrospectionCache::new(); let t = &c as &dyn IntrospectionCache; - let mut response = Response::new(true, Default::default()); - response.set_exp(Some(Utc::now() - TimeDelta::try_seconds(10).unwrap())); + let response = Response { + exp: (Utc::now() - TimeDelta::try_seconds(10).unwrap()).timestamp(), + active: true, + ..create_test_claims() + }; t.set("token1", response.clone()).await; t.set("token2", response.clone()).await; diff --git a/crates/zitadel/src/oidc/introspection/cache/mod.rs b/crates/zitadel/src/oidc/introspection/cache/mod.rs index 10139f4..5b92ac8 100644 --- a/crates/zitadel/src/oidc/introspection/cache/mod.rs +++ b/crates/zitadel/src/oidc/introspection/cache/mod.rs @@ -9,7 +9,7 @@ use std::ops::Deref; pub mod in_memory; -type Response = super::ZitadelIntrospectionResponse; +type Response = crate::oidc::introspection::claims::ZitadelClaims; /// Implementation of an introspection cache. /// Enables caching the introspection results done by diff --git a/crates/zitadel/src/oidc/introspection/claims.rs b/crates/zitadel/src/oidc/introspection/claims.rs new file mode 100644 index 0000000..0fb3890 --- /dev/null +++ b/crates/zitadel/src/oidc/introspection/claims.rs @@ -0,0 +1,493 @@ +//! Simplified token claims structures for ZITADEL. +//! +//! This module provides user-friendly claim structures that flatten the complex +//! nested responses from ZITADEL into easy-to-use types. + +use std::collections::HashMap; + +use serde::{Deserialize, Serialize}; +use openidconnect::TokenIntrospectionResponse; + +use crate::oidc::introspection::ZitadelIntrospectionResponse; + +/// Simplified ZITADEL token claims structure. +/// +/// This structure provides a flattened view of ZITADEL token claims, making it +/// easier to work with than the raw introspection response. It includes standard +/// OIDC claims as well as ZITADEL-specific extensions. +/// +/// # Example +/// +/// ```no_run +/// use zitadel::oidc::introspection::claims::ZitadelClaims; +/// +/// # fn example(claims: ZitadelClaims) { +/// // Access standard claims +/// println!("User ID: {}", claims.sub); +/// println!("Email: {:?}", claims.email); +/// +/// // Check roles using built-in methods +/// if claims.has_role("admin") { +/// println!("User is an admin"); +/// } +/// +/// // Check project-specific roles +/// if claims.has_role_in_project("project123", "editor") { +/// println!("User can edit project123"); +/// } +/// # } +/// ``` +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +pub struct ZitadelClaims { + // Standard OIDC claims + /// Subject (user ID) + pub sub: String, + /// Issuer + pub iss: String, + /// Audiences + pub aud: Vec, + /// Expiration time (Unix timestamp) + pub exp: i64, + /// Issued at time (Unix timestamp) + pub iat: i64, + /// Not before time (Unix timestamp) + #[serde(skip_serializing_if = "Option::is_none")] + pub nbf: Option, + /// JWT ID + #[serde(skip_serializing_if = "Option::is_none")] + pub jti: Option, + + // User information + /// Username + #[serde(skip_serializing_if = "Option::is_none")] + pub username: Option, + /// Email address + #[serde(skip_serializing_if = "Option::is_none")] + pub email: Option, + /// Whether email is verified + #[serde(default)] + pub email_verified: bool, + /// Full name + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Given name + #[serde(skip_serializing_if = "Option::is_none")] + pub given_name: Option, + /// Family name + #[serde(skip_serializing_if = "Option::is_none")] + pub family_name: Option, + /// Preferred username + #[serde(skip_serializing_if = "Option::is_none")] + pub preferred_username: Option, + /// Locale + #[serde(skip_serializing_if = "Option::is_none")] + pub locale: Option, + + // Organization/resource owner info + /// Organization ID + #[serde(skip_serializing_if = "Option::is_none")] + pub org_id: Option, + /// Organization name + #[serde(skip_serializing_if = "Option::is_none")] + pub org_name: Option, + /// Primary organization domain + #[serde(skip_serializing_if = "Option::is_none")] + pub org_domain: Option, + /// Resource owner ID + #[serde(skip_serializing_if = "Option::is_none")] + pub resource_owner: Option, + /// Resource owner name + #[serde(skip_serializing_if = "Option::is_none")] + pub resource_owner_name: Option, + + // Roles and permissions + /// All roles (flattened list) + #[serde(default)] + pub roles: Vec, + /// Project-specific roles (Project ID -> roles) + #[serde(default)] + pub project_roles: HashMap>, + /// Organization-specific roles (Org ID -> roles) + #[serde(default)] + pub org_roles: HashMap>, + + // Token metadata + /// OAuth scopes + #[serde(default)] + pub scopes: Vec, + /// Client ID that requested the token + #[serde(skip_serializing_if = "Option::is_none")] + pub client_id: Option, + /// Whether the token is active + #[serde(default = "default_true")] + pub active: bool, + + // User metadata + /// User metadata key-value pairs + #[serde(default)] + pub metadata: HashMap, + + // Additional custom claims + /// Any additional claims not captured above + #[serde(flatten)] + pub custom_claims: HashMap, +} + +fn default_true() -> bool { + true +} + +impl ZitadelClaims { + + + /// Checks if the token has a specific audience. + pub fn has_audience(&self, audience: &str) -> bool { + self.aud.iter().any(|a| a == audience) + } + + /// Checks if the token has a specific scope. + pub fn has_scope(&self, scope: &str) -> bool { + self.scopes.iter().any(|s| s == scope) + } + + + /// Checks if the token has expired. + /// + /// Takes an optional leeway in seconds for clock skew. + pub fn is_expired(&self, leeway: Option) -> bool { + let now = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() as i64; + + let leeway = leeway.unwrap_or(0) as i64; + self.exp < now - leeway + } + + /// Checks if the token is valid for use now. + /// + /// This checks both expiration and not-before times with optional leeway. + pub fn is_valid_now(&self, leeway: Option) -> bool { + if self.is_expired(leeway) { + return false; + } + + if let Some(nbf) = self.nbf { + let now = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() as i64; + + let leeway = leeway.unwrap_or(0) as i64; + if nbf > now + leeway { + return false; + } + } + + true + } + + // RBAC methods + + /// Checks if the user has a specific role (in any context). + pub fn has_role(&self, role: &str) -> bool { + // Check global roles + if self.roles.iter().any(|r| r == role) { + return true; + } + + // Check project roles + for roles in self.project_roles.values() { + if roles.iter().any(|r| r == role) { + return true; + } + } + + // Check org roles + for roles in self.org_roles.values() { + if roles.iter().any(|r| r == role) { + return true; + } + } + + false + } + + + /// Checks if the user has a specific role in a project. + pub fn has_role_in_project(&self, project_id: &str, role: &str) -> bool { + self.project_roles + .get(project_id) + .map(|roles| roles.iter().any(|r| r == role)) + .unwrap_or(false) + } + + + /// Checks if the user has a specific role in an organization. + pub fn has_role_in_org(&self, org_id: &str, role: &str) -> bool { + self.org_roles + .get(org_id) + .map(|roles| roles.iter().any(|r| r == role)) + .unwrap_or(false) + } + + + + +} + +impl From for ZitadelClaims { + fn from(response: ZitadelIntrospectionResponse) -> Self { + let extra = response.extra_fields(); + + // Extract audiences + let aud = response + .aud() + .map(|a| a.iter().map(|s| s.to_string()).collect()) + .unwrap_or_default(); + + // Extract user info + let user_id = response.sub().unwrap_or_default().to_string(); + let username = response.username().map(|s| s.to_string()); + let email = extra.email.clone(); + let email_verified = extra.email_verified.unwrap_or(false); + let name = extra.name.clone(); + let given_name = extra.given_name.clone(); + let family_name = extra.family_name.clone(); + let preferred_username = extra.preferred_username.clone() + .or_else(|| username.clone()); + let locale = extra.locale.clone(); + + // Extract organization info from custom claims if available + let org_id = extra.custom_claims.as_ref() + .and_then(|claims| claims.get("org_id")) + .and_then(|v| v.as_str()) + .map(|s| s.to_string()); + let org_domain = extra.custom_claims.as_ref() + .and_then(|claims| claims.get("org_domain")) + .and_then(|v| v.as_str()) + .map(|s| s.to_string()); + let resource_owner = extra.resource_owner_id.clone(); + let resource_owner_name = extra.resource_owner_name.clone(); + + // Extract and flatten roles + let mut all_roles = Vec::new(); + let mut project_roles = HashMap::new(); + let mut org_roles = HashMap::new(); + + // Process project roles + if let Some(roles_claim) = &extra.project_roles { + for (context, context_roles) in roles_claim { + let roles_list: Vec = context_roles + .iter() + .map(|(_, role_value)| role_value.clone()) + .collect(); + + all_roles.extend(roles_list.clone()); + + // Try to determine if this is a project or org + if context.contains("project") || context.chars().all(|c| c.is_numeric()) { + project_roles.insert(context.clone(), roles_list); + } else { + org_roles.insert(context.clone(), roles_list); + } + } + } + + // Remove duplicates from all_roles + all_roles.sort(); + all_roles.dedup(); + + // Extract scopes from custom claims if available + let scopes = extra.custom_claims.as_ref() + .and_then(|claims| claims.get("scope")) + .and_then(|v| v.as_str()) + .map(|s| s.split_whitespace().map(|s| s.to_string()).collect()) + .unwrap_or_default(); + + // Extract metadata + let metadata = extra.metadata.clone().unwrap_or_default(); + + // Build custom claims from remaining fields + let mut custom_claims = HashMap::new(); + if let Ok(value) = serde_json::to_value(&response) { + if let Some(obj) = value.as_object() { + // Add any fields we haven't explicitly handled + for (key, val) in obj { + match key.as_str() { + // Skip fields we've already processed + "sub" | "iss" | "aud" | "exp" | "iat" | "nbf" | "jti" | + "active" | "scope" | "client_id" | "username" | + "urn:zitadel:iam:user:metadata" | + "urn:zitadel:iam:org:project:roles" | + "urn:zitadel:iam:org:domain:primary" | + "urn:zitadel:iam:org:id" | + "urn:zitadel:iam:user:resourceowner:id" | + "urn:zitadel:iam:user:resourceowner:name" => continue, + _ => { + custom_claims.insert(key.clone(), val.clone()); + } + } + } + } + } + + Self { + sub: user_id, + iss: response.iss().unwrap_or_default().to_string(), + aud, + exp: response.exp().map(|dt| dt.timestamp()).unwrap_or(0), + iat: response.iat().map(|dt| dt.timestamp()).unwrap_or(0), + nbf: response.nbf().map(|dt| dt.timestamp()), + jti: response.jti().map(|s| s.to_string()), + username, + email, + email_verified, + name, + given_name, + family_name, + preferred_username, + locale, + org_id, + org_name: None, // Not available in introspection response + org_domain, + resource_owner, + resource_owner_name, + roles: all_roles, + project_roles, + org_roles, + scopes, + client_id: response.client_id().map(|s| s.to_string()), + active: response.active(), + metadata, + custom_claims, + } + } +} + +impl TryFrom for ZitadelClaims { + type Error = serde_json::Error; + + fn try_from(value: serde_json::Value) -> Result { + // First try to deserialize as ZitadelIntrospectionResponse + if let Ok(introspection) = serde_json::from_value::(value.clone()) { + return Ok(introspection.into()); + } + + // Otherwise try direct deserialization + serde_json::from_value(value) + } +} + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_audience_and_scope_helpers() { + let mut claims = create_test_claims(); + claims.aud = vec!["aud1".to_string(), "aud2".to_string()]; + claims.scopes = vec!["read".to_string(), "write".to_string()]; + + assert!(claims.has_audience("aud1")); + assert!(claims.has_audience("aud2")); + assert!(!claims.has_audience("aud3")); + assert!(claims.has_scope("read")); + assert!(!claims.has_scope("admin")); + } + + #[test] + fn test_role_checks() { + let mut claims = create_test_claims(); + claims.roles = vec!["global_role".to_string()]; + claims.project_roles.insert("project1".to_string(), + vec!["editor".to_string(), "viewer".to_string()]); + claims.org_roles.insert("org1".to_string(), + vec!["admin".to_string()]); + + // Test has_role + assert!(claims.has_role("global_role")); + assert!(claims.has_role("editor")); + assert!(claims.has_role("admin")); + assert!(!claims.has_role("nonexistent")); + + // Test project-specific roles + assert!(claims.has_role_in_project("project1", "editor")); + assert!(!claims.has_role_in_project("project1", "admin")); + + // Test org-specific roles + assert!(claims.has_role_in_org("org1", "admin")); + assert!(!claims.has_role_in_org("org1", "editor")); + } + + #[test] + fn test_expiration_check() { + let now = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() as i64; + + // Expired token + let expired_claims = ZitadelClaims { + exp: now - 100, + ..create_test_claims() + }; + assert!(expired_claims.is_expired(None)); + assert!(expired_claims.is_expired(Some(50))); + assert!(!expired_claims.is_expired(Some(200))); // With large leeway + + // Valid token + let valid_claims = ZitadelClaims { + exp: now + 100, + ..create_test_claims() + }; + assert!(!valid_claims.is_expired(None)); + assert!(!valid_claims.is_expired(Some(50))); + } + + #[test] + fn test_validity_check() { + let now = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() as i64; + + // Valid token + let valid_claims = ZitadelClaims { + exp: now + 100, + nbf: Some(now - 100), + ..create_test_claims() + }; + assert!(valid_claims.is_valid_now(None)); + + // Not yet valid + let not_yet_valid = ZitadelClaims { + exp: now + 100, + nbf: Some(now + 100), + ..create_test_claims() + }; + assert!(!not_yet_valid.is_valid_now(None)); + assert!(not_yet_valid.is_valid_now(Some(200))); // With leeway + + // Expired + let expired = ZitadelClaims { + exp: now - 100, + nbf: Some(now - 200), + ..create_test_claims() + }; + assert!(!expired.is_valid_now(None)); + } + + fn create_test_claims() -> ZitadelClaims { + ZitadelClaims { + sub: "user123".to_string(), + iss: "https://example.zitadel.cloud".to_string(), + aud: vec!["test".to_string()], + exp: 0, + iat: 0, + active: true, + ..Default::default() + } + } +} \ No newline at end of file diff --git a/crates/zitadel/src/oidc/introspection/mod.rs b/crates/zitadel/src/oidc/introspection/mod.rs index 50a4e81..c549a53 100644 --- a/crates/zitadel/src/oidc/introspection/mod.rs +++ b/crates/zitadel/src/oidc/introspection/mod.rs @@ -2,6 +2,7 @@ use custom_error::custom_error; use openidconnect::url::{ParseError, Url}; use openidconnect::{ core::CoreTokenType, ExtraTokenFields, StandardTokenIntrospectionResponse, + TokenIntrospectionResponse, }; use reqwest::header::{HeaderMap, ACCEPT, AUTHORIZATION, CONTENT_TYPE}; use serde::{Deserialize, Serialize}; @@ -19,6 +20,9 @@ use crate::oidc::discovery::{discover, DiscoveryError}; #[cfg(feature = "introspection_cache")] pub mod cache; +pub mod claims; + +use self::claims::ZitadelClaims; custom_error! { /// Error type for introspection related errors. @@ -39,7 +43,7 @@ custom_error! { jsonwebtoken::errors::ErrorKind::InvalidAlgorithmName => "Invalid Algorithm in JWKS", _ => "Other JWT error" }}, - + TokenNotActive = "token is not active", } /// Introspection response information that is returned by the ZITADEL @@ -226,14 +230,14 @@ fn payload( } /// Perform an [OAuth 2.0 Token Introspection](https://www.rfc-editor.org/rfc/rfc7662) -/// against a given ZITADEL authority (instance). The function does not interpret the result -/// of the call but only returns the introspection result. +/// against a given ZITADEL authority (instance) and return simplified token claims. /// /// ### Errors /// /// The introspection may fail if: /// - The introspection call fails (bad request, unauthorized, other http errors) /// - The response of the introspection could not be parsed +/// - The token is not active /// /// ### Example /// @@ -252,22 +256,47 @@ fn payload( /// let token = "dEnGhIFs3VnqcQU5D2zRSeiarB1nwH6goIKY0J8MWZbsnWcTuu1C59lW9DgCq1y096GYdXA"; /// let metadata = discover(authority).await?; /// -/// let result = introspect( +/// let claims = introspect( /// metadata.additional_metadata().introspection_endpoint.as_ref().unwrap(), /// authority, /// &auth, /// token, /// ).await?; /// -/// println!("{:?}", result); +/// println!("User ID: {}", claims.sub); +/// if claims.has_role("admin") { +/// println!("User is an admin"); +/// } /// # Ok(()) /// # } /// ``` +#[cfg(feature = "oidc")] pub async fn introspect( introspection_uri: &str, authority: &str, authentication: &AuthorityAuthentication, token: &str, +) -> Result { + let response = introspect_raw(introspection_uri, authority, authentication, token).await?; + + // Check if token is active + if !response.active() { + return Err(IntrospectionError::TokenNotActive); + } + + Ok(response.into()) +} + +/// Perform an [OAuth 2.0 Token Introspection](https://www.rfc-editor.org/rfc/rfc7662) +/// and return the raw introspection response. +/// +/// This function is for advanced use cases where you need access to the full response. +/// For most use cases, use [`introspect`] which returns simplified token claims. +pub async fn introspect_raw( + introspection_uri: &str, + authority: &str, + authentication: &AuthorityAuthentication, + token: &str, ) -> Result { let async_http_client = reqwest::ClientBuilder::new().redirect(reqwest::redirect::Policy::none()).build()?; @@ -336,6 +365,30 @@ fn decode_metadata(response: &mut ZitadelIntrospectionResponse) -> Result<(), In } +/// Fetch the JSON Web Key Set (JWKS) from a ZITADEL instance. +/// +/// This function retrieves the public keys used by ZITADEL to sign JWT tokens. +/// These keys can be used for local validation of tokens without making introspection calls. +/// +/// # Arguments +/// +/// * `idm_url` - The base URL of the ZITADEL instance (e.g., "https://my-instance.zitadel.cloud") +/// +/// # Returns +/// +/// Returns a `JwkSet` containing the public keys. +/// +/// # Example +/// +/// ```no_run +/// # use zitadel::oidc::introspection::fetch_jwks; +/// # #[tokio::main] +/// # async fn main() -> Result<(), Box> { +/// let jwks = fetch_jwks("https://my-instance.zitadel.cloud").await?; +/// println!("Fetched {} keys", jwks.keys.len()); +/// # Ok(()) +/// # } +/// ``` pub async fn fetch_jwks(idm_url: &str) -> Result { let client: Client = Client::new(); let openid_config = discover(idm_url).await.map_err(|err| { @@ -351,6 +404,40 @@ pub async fn fetch_jwks(idm_url: &str) -> Result { } +/// Validate a JWT token locally using JWKS keys. +/// +/// This function validates a JWT token without making a network call to the introspection endpoint. +/// It uses the provided JWKS keys to verify the token signature and validates the token claims. +/// +/// # Arguments +/// +/// * `issuers` - List of valid issuers to check against the token's "iss" claim +/// * `audiences` - List of valid audiences to check against the token's "aud" claim +/// * `jwks_keys` - The JWKS keys to use for signature validation +/// * `token` - The JWT token to validate +/// +/// # Returns +/// +/// Returns the deserialized token claims if validation succeeds. +/// +/// # Example +/// +/// ```no_run +/// # use zitadel::oidc::introspection::{fetch_jwks, local_jwt_validation}; +/// # use zitadel::oidc::introspection::claims::ZitadelClaims; +/// # #[tokio::main] +/// # async fn main() -> Result<(), Box> { +/// let jwks = fetch_jwks("https://my-instance.zitadel.cloud").await?; +/// let claims: ZitadelClaims = local_jwt_validation( +/// &["https://my-instance.zitadel.cloud"], +/// &["my-client-id"], +/// jwks, +/// "eyJ..." +/// ).await?; +/// println!("User ID: {}", claims.sub); +/// # Ok(()) +/// # } +/// ``` pub async fn local_jwt_validation(issuers: &[&str], audiences: &[&str], jwks_keys: JwkSet, diff --git a/crates/zitadel/src/rocket/introspection/guard.rs b/crates/zitadel/src/rocket/introspection/guard.rs index 42f23c5..759e2ab 100644 --- a/crates/zitadel/src/rocket/introspection/guard.rs +++ b/crates/zitadel/src/rocket/introspection/guard.rs @@ -1,11 +1,9 @@ use custom_error::custom_error; -use openidconnect::TokenIntrospectionResponse; use rocket::figment::Figment; use rocket::http::Status; use rocket::request::{FromRequest, Outcome}; use rocket::{async_trait, Request}; use std::collections::BTreeSet; -use std::collections::HashMap; #[cfg(feature = "rocket_okapi")] use rocket_okapi::{ @@ -21,7 +19,7 @@ use rocket_okapi::{ use schemars::schema::{InstanceType, ObjectValidation, Schema, SchemaObject}; #[cfg(feature = "rocket_okapi")] -use crate::oidc::introspection::{introspect, IntrospectionError, ZitadelIntrospectionResponse}; +use crate::oidc::introspection::{claims::ZitadelClaims, introspect, IntrospectionError}; use crate::rocket::introspection::IntrospectionConfig; use super::config::IntrospectionRocketConfig; @@ -38,43 +36,31 @@ custom_error! { NoUserId = "introspection result contained no user id", } -/// Struct for the injected route guard that requires an authenticated user. -/// Contains various information about the given token. The fields are optional -/// since a machine user does not have a profile or (varying by scope) not all -/// fields are returned from the introspection endpoint. -#[derive(Debug)] -pub struct IntrospectedUser { - /// UserID of the introspected user (OIDC Field "sub"). - pub user_id: String, - pub username: Option, - pub name: Option, - pub given_name: Option, - pub family_name: Option, - pub preferred_username: Option, - pub email: Option, - pub email_verified: Option, - pub locale: Option, - pub project_roles: Option>>, - pub metadata: Option>, -} - -impl From for IntrospectedUser { - fn from(response: ZitadelIntrospectionResponse) -> Self { - Self { - user_id: response.sub().unwrap().to_string(), - username: response.username().map(|s| s.to_string()), - name: response.extra_fields().name.clone(), - given_name: response.extra_fields().given_name.clone(), - family_name: response.extra_fields().family_name.clone(), - preferred_username: response.extra_fields().preferred_username.clone(), - email: response.extra_fields().email.clone(), - email_verified: response.extra_fields().email_verified, - locale: response.extra_fields().locale.clone(), - project_roles: response.extra_fields().project_roles.clone(), - metadata: response.extra_fields().metadata.clone(), - } - } -} +/// Type alias for the extracted user. +/// +/// The extracted user will always be valid when fetched in request function arguments. +/// If not, the API will return with an appropriate error. +/// +/// # Example +/// +/// ``` +/// use rocket::{get, State}; +/// use zitadel::rocket::introspection::IntrospectedUser; +/// +/// #[get("/protected")] +/// async fn protected_route(user: &IntrospectedUser) -> &'static str { +/// if !user.has_role("admin") { +/// return "Admin access required"; +/// } +/// +/// if user.has_role_in_project("project123", "editor") { +/// return "Hello Editor"; +/// } +/// +/// "Hello Admin" +/// } +/// ``` +pub type IntrospectedUser = ZitadelClaims; #[async_trait] impl<'request> FromRequest<'request> for &'request IntrospectedUser { @@ -149,12 +135,17 @@ impl<'request> FromRequest<'request> for &'request IntrospectedUser { )); } - let result = result.unwrap(); - match result.active() { - true if result.sub().is_some() => Ok(result.into()), - false => Err((Status::Unauthorized, IntrospectionGuardError::Inactive)), - _ => Err((Status::Unauthorized, IntrospectionGuardError::NoUserId)), + let claims = result.unwrap(); + + if !claims.active { + return Err((Status::Unauthorized, IntrospectionGuardError::Inactive)); + } + + if claims.sub.is_empty() { + return Err((Status::Unauthorized, IntrospectionGuardError::NoUserId)); } + + Ok(claims) }) .await;