#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Authorization {
#[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 project_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub project_organization_id: ::prost::alloc::string::String,
#[prost(string, optional, tag="5")]
pub project_grant_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="6")]
pub granted_organization_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag="7")]
pub organization_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="8")]
pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(message, optional, tag="9")]
pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(enumeration="State", tag="10")]
pub state: i32,
#[prost(message, optional, tag="11")]
pub user: ::core::option::Option<User>,
#[prost(string, repeated, tag="12")]
pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub preferred_login_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub avatar_url: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub organization_id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationsSearchFilter {
#[prost(oneof="authorizations_search_filter::Filter", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
pub filter: ::core::option::Option<authorizations_search_filter::Filter>,
}
pub mod authorizations_search_filter {
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Filter {
#[prost(message, tag="1")]
AuthorizationIds(super::super::super::filter::v2beta::InIDsFilter),
#[prost(message, tag="2")]
OrganizationId(super::super::super::filter::v2beta::IdFilter),
#[prost(message, tag="3")]
State(super::StateQuery),
#[prost(message, tag="4")]
UserId(super::super::super::filter::v2beta::IdFilter),
#[prost(message, tag="5")]
UserOrganizationId(super::super::super::filter::v2beta::IdFilter),
#[prost(message, tag="6")]
UserPreferredLoginName(super::UserPreferredLoginNameQuery),
#[prost(message, tag="7")]
UserDisplayName(super::UserDisplayNameQuery),
#[prost(message, tag="8")]
ProjectId(super::super::super::filter::v2beta::IdFilter),
#[prost(message, tag="9")]
ProjectName(super::ProjectNameQuery),
#[prost(message, tag="10")]
RoleKey(super::RoleKeyQuery),
#[prost(message, tag="11")]
ProjectGrantId(super::super::super::filter::v2beta::IdFilter),
}
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StateQuery {
#[prost(enumeration="State", tag="1")]
pub state: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserPreferredLoginNameQuery {
#[prost(string, tag="1")]
pub login_name: ::prost::alloc::string::String,
#[prost(enumeration="super::super::filter::v2beta::TextFilterMethod", tag="2")]
pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserDisplayNameQuery {
#[prost(string, tag="1")]
pub display_name: ::prost::alloc::string::String,
#[prost(enumeration="super::super::filter::v2beta::TextFilterMethod", tag="2")]
pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProjectNameQuery {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="super::super::filter::v2beta::TextFilterMethod", tag="2")]
pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrganizationNameQuery {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration="super::super::filter::v2beta::TextFilterMethod", tag="2")]
pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoleKeyQuery {
#[prost(string, tag="1")]
pub key: ::prost::alloc::string::String,
#[prost(enumeration="super::super::filter::v2beta::TextFilterMethod", tag="2")]
pub method: i32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Active = 1,
Inactive = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Active => "STATE_ACTIVE",
Self::Inactive => "STATE_INACTIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STATE_ACTIVE" => Some(Self::Active),
"STATE_INACTIVE" => Some(Self::Inactive),
_ => None,
}
}
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AuthorizationFieldName {
Unspecified = 0,
CreatedDate = 1,
ChangedDate = 2,
Id = 3,
UserId = 4,
ProjectId = 5,
OrganizationId = 6,
UserOrganizationId = 7,
}
impl AuthorizationFieldName {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "AUTHORIZATION_FIELD_NAME_UNSPECIFIED",
Self::CreatedDate => "AUTHORIZATION_FIELD_NAME_CREATED_DATE",
Self::ChangedDate => "AUTHORIZATION_FIELD_NAME_CHANGED_DATE",
Self::Id => "AUTHORIZATION_FIELD_NAME_ID",
Self::UserId => "AUTHORIZATION_FIELD_NAME_USER_ID",
Self::ProjectId => "AUTHORIZATION_FIELD_NAME_PROJECT_ID",
Self::OrganizationId => "AUTHORIZATION_FIELD_NAME_ORGANIZATION_ID",
Self::UserOrganizationId => "AUTHORIZATION_FIELD_NAME_USER_ORGANIZATION_ID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTHORIZATION_FIELD_NAME_UNSPECIFIED" => Some(Self::Unspecified),
"AUTHORIZATION_FIELD_NAME_CREATED_DATE" => Some(Self::CreatedDate),
"AUTHORIZATION_FIELD_NAME_CHANGED_DATE" => Some(Self::ChangedDate),
"AUTHORIZATION_FIELD_NAME_ID" => Some(Self::Id),
"AUTHORIZATION_FIELD_NAME_USER_ID" => Some(Self::UserId),
"AUTHORIZATION_FIELD_NAME_PROJECT_ID" => Some(Self::ProjectId),
"AUTHORIZATION_FIELD_NAME_ORGANIZATION_ID" => Some(Self::OrganizationId),
"AUTHORIZATION_FIELD_NAME_USER_ORGANIZATION_ID" => Some(Self::UserOrganizationId),
_ => None,
}
}
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuthorizationsRequest {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::filter::v2beta::PaginationRequest>,
#[prost(enumeration="AuthorizationFieldName", optional, tag="2")]
pub sorting_column: ::core::option::Option<i32>,
#[prost(message, repeated, tag="3")]
pub filters: ::prost::alloc::vec::Vec<AuthorizationsSearchFilter>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuthorizationsResponse {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::filter::v2beta::PaginationResponse>,
#[prost(message, repeated, tag="2")]
pub authorizations: ::prost::alloc::vec::Vec<Authorization>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAuthorizationRequest {
#[prost(string, tag="1")]
pub user_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, optional, tag="3")]
pub organization_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag="4")]
pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAuthorizationResponse {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAuthorizationRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
pub role_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateAuthorizationResponse {
#[prost(message, optional, tag="1")]
pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAuthorizationRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteAuthorizationResponse {
#[prost(message, optional, tag="1")]
pub deletion_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateAuthorizationRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ActivateAuthorizationResponse {
#[prost(message, optional, tag="1")]
pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeactivateAuthorizationRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(crate = "serde", rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeactivateAuthorizationResponse {
#[prost(message, optional, tag="1")]
pub change_date: ::core::option::Option<::pbjson_types::Timestamp>,
}
include!("zitadel.authorization.v2beta.tonic.rs");