#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub org_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub avatar_url: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserRequest {
#[prost(string, tag = "1")]
pub user_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserResponse {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetUsersRequest {
#[prost(string, repeated, tag = "1")]
pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetUsersResponse {
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchUsersQuery {
#[prost(oneof = "search_users_query::Query", tags = "1, 2, 3, 4")]
pub query: ::core::option::Option<search_users_query::Query>,
}
pub mod search_users_query {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Query {
#[prost(message, tag = "1")]
And(super::SearchUsersQueries),
#[prost(message, tag = "2")]
Or(super::SearchUsersQueries),
#[prost(string, tag = "3")]
ExactEmail(::prost::alloc::string::String),
#[prost(string, tag = "4")]
SearchText(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchUsersQueries {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<SearchUsersQuery>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserSort {
#[prost(enumeration = "UserSortField", tag = "1")]
pub field: i32,
#[prost(bool, tag = "2")]
pub is_descending: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchUsersRequest {
#[prost(message, optional, tag = "1")]
pub query: ::core::option::Option<SearchUsersQuery>,
#[prost(message, optional, tag = "2")]
pub sort: ::core::option::Option<UserSort>,
#[prost(int32, optional, tag = "3")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchUsersResponse {
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCurrentUserRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCurrentUserResponse {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCurrentUserRequest {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCurrentUserResponse {
#[prost(message, optional, tag = "1")]
pub user: ::core::option::Option<User>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NumberFormat {
#[prost(int32, optional, tag = "1")]
pub significant_figures: ::core::option::Option<i32>,
#[prost(enumeration = "NumberDisplayOption", optional, tag = "2")]
pub display_option: ::core::option::Option<i32>,
#[deprecated]
#[prost(int32, optional, tag = "3")]
pub fixed_decimal_places: ::core::option::Option<i32>,
#[prost(message, optional, tag = "4")]
pub decimal_places: ::core::option::Option<DecimalPlaces>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DecimalPlaces {
#[prost(oneof = "decimal_places::Places", tags = "1, 2")]
pub places: ::core::option::Option<decimal_places::Places>,
}
pub mod decimal_places {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Places {
#[prost(int32, tag = "1")]
Fixed(i32),
#[prost(int32, tag = "2")]
Max(i32),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserSettings {
#[prost(enumeration = "DefaultTimeRangeType", tag = "1")]
pub default_time_range_type: i32,
#[prost(enumeration = "Appearance", tag = "2")]
pub appearance: i32,
#[prost(enumeration = "Timezone", tag = "3")]
pub timezone: i32,
#[deprecated]
#[prost(bool, tag = "4")]
pub time_series_hover_tooltip_concise: bool,
#[prost(enumeration = "ChartTooltipMode", tag = "5")]
pub chart_tooltip_mode: i32,
#[prost(message, optional, tag = "6")]
pub data_number_format: ::core::option::Option<NumberFormat>,
#[prost(enumeration = "RelativeTimestampFormat", tag = "7")]
pub relative_timestamp_format: i32,
#[prost(bool, tag = "8")]
pub vim_mode_enabled: bool,
#[prost(bool, optional, tag = "9")]
pub default_workbook_visible_in_search: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCurrentUserSettingsRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCurrentUserSettingsResponse {
#[prost(message, optional, tag = "1")]
pub settings: ::core::option::Option<UserSettings>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateCurrentUserSettingsRequest {
#[prost(message, optional, tag = "1")]
pub settings: ::core::option::Option<UserSettings>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateCurrentUserSettingsResponse {
#[prost(message, optional, tag = "1")]
pub settings: ::core::option::Option<UserSettings>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreregisterUsersRequest {
#[prost(string, repeated, tag = "1")]
pub emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreregisterUsersResponse {
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeactivateUserRequest {
#[prost(string, tag = "1")]
pub user_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeactivateUserResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReactivateUserRequest {
#[prost(string, tag = "1")]
pub user_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReactivateUserResponse {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserSortField {
Unspecified = 0,
Name = 1,
Email = 2,
CreateTime = 3,
UpdateTime = 4,
}
impl UserSortField {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "USER_SORT_FIELD_UNSPECIFIED",
Self::Name => "USER_SORT_FIELD_NAME",
Self::Email => "USER_SORT_FIELD_EMAIL",
Self::CreateTime => "USER_SORT_FIELD_CREATE_TIME",
Self::UpdateTime => "USER_SORT_FIELD_UPDATE_TIME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USER_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
"USER_SORT_FIELD_NAME" => Some(Self::Name),
"USER_SORT_FIELD_EMAIL" => Some(Self::Email),
"USER_SORT_FIELD_CREATE_TIME" => Some(Self::CreateTime),
"USER_SORT_FIELD_UPDATE_TIME" => Some(Self::UpdateTime),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DefaultTimeRangeType {
Unspecified = 0,
Default = 1,
Absolute = 2,
Relative = 3,
}
impl DefaultTimeRangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DEFAULT_TIME_RANGE_TYPE_UNSPECIFIED",
Self::Default => "DEFAULT_TIME_RANGE_TYPE_DEFAULT",
Self::Absolute => "DEFAULT_TIME_RANGE_TYPE_ABSOLUTE",
Self::Relative => "DEFAULT_TIME_RANGE_TYPE_RELATIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT_TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DEFAULT_TIME_RANGE_TYPE_DEFAULT" => Some(Self::Default),
"DEFAULT_TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
"DEFAULT_TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Appearance {
Unspecified = 0,
System = 1,
Light = 2,
Dark = 3,
}
impl Appearance {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "APPEARANCE_UNSPECIFIED",
Self::System => "APPEARANCE_SYSTEM",
Self::Light => "APPEARANCE_LIGHT",
Self::Dark => "APPEARANCE_DARK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"APPEARANCE_UNSPECIFIED" => Some(Self::Unspecified),
"APPEARANCE_SYSTEM" => Some(Self::System),
"APPEARANCE_LIGHT" => Some(Self::Light),
"APPEARANCE_DARK" => Some(Self::Dark),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Timezone {
Unspecified = 0,
Local = 1,
Utc = 2,
}
impl Timezone {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIMEZONE_UNSPECIFIED",
Self::Local => "TIMEZONE_LOCAL",
Self::Utc => "TIMEZONE_UTC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIMEZONE_UNSPECIFIED" => Some(Self::Unspecified),
"TIMEZONE_LOCAL" => Some(Self::Local),
"TIMEZONE_UTC" => Some(Self::Utc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ChartTooltipMode {
Unspecified = 0,
Verbose = 1,
Concise = 2,
MultiRowConcise = 3,
Single = 4,
None = 5,
}
impl ChartTooltipMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CHART_TOOLTIP_MODE_UNSPECIFIED",
Self::Verbose => "CHART_TOOLTIP_MODE_VERBOSE",
Self::Concise => "CHART_TOOLTIP_MODE_CONCISE",
Self::MultiRowConcise => "CHART_TOOLTIP_MODE_MULTI_ROW_CONCISE",
Self::Single => "CHART_TOOLTIP_MODE_SINGLE",
Self::None => "CHART_TOOLTIP_MODE_NONE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHART_TOOLTIP_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"CHART_TOOLTIP_MODE_VERBOSE" => Some(Self::Verbose),
"CHART_TOOLTIP_MODE_CONCISE" => Some(Self::Concise),
"CHART_TOOLTIP_MODE_MULTI_ROW_CONCISE" => Some(Self::MultiRowConcise),
"CHART_TOOLTIP_MODE_SINGLE" => Some(Self::Single),
"CHART_TOOLTIP_MODE_NONE" => Some(Self::None),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RelativeTimestampFormat {
Unspecified = 0,
TemporalSubunits = 1,
TotalSeconds = 2,
}
impl RelativeTimestampFormat {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RELATIVE_TIMESTAMP_FORMAT_UNSPECIFIED",
Self::TemporalSubunits => "RELATIVE_TIMESTAMP_FORMAT_TEMPORAL_SUBUNITS",
Self::TotalSeconds => "RELATIVE_TIMESTAMP_FORMAT_TOTAL_SECONDS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RELATIVE_TIMESTAMP_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"RELATIVE_TIMESTAMP_FORMAT_TEMPORAL_SUBUNITS" => Some(Self::TemporalSubunits),
"RELATIVE_TIMESTAMP_FORMAT_TOTAL_SECONDS" => Some(Self::TotalSeconds),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NumberDisplayOption {
Unspecified = 0,
Scientific = 1,
Succinct = 2,
Locale = 3,
Plain = 4,
}
impl NumberDisplayOption {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "NUMBER_DISPLAY_OPTION_UNSPECIFIED",
Self::Scientific => "NUMBER_DISPLAY_OPTION_SCIENTIFIC",
Self::Succinct => "NUMBER_DISPLAY_OPTION_SUCCINCT",
Self::Locale => "NUMBER_DISPLAY_OPTION_LOCALE",
Self::Plain => "NUMBER_DISPLAY_OPTION_PLAIN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NUMBER_DISPLAY_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
"NUMBER_DISPLAY_OPTION_SCIENTIFIC" => Some(Self::Scientific),
"NUMBER_DISPLAY_OPTION_SUCCINCT" => Some(Self::Succinct),
"NUMBER_DISPLAY_OPTION_LOCALE" => Some(Self::Locale),
"NUMBER_DISPLAY_OPTION_PLAIN" => Some(Self::Plain),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UserError {
Unspecified = 0,
InvalidUserRid = 1,
OneofNotSet = 2,
InvalidEnumValue = 3,
TooManyUserRids = 4,
QueryTooComplex = 5,
}
impl UserError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "USER_ERROR_UNSPECIFIED",
Self::InvalidUserRid => "USER_ERROR_INVALID_USER_RID",
Self::OneofNotSet => "USER_ERROR_ONEOF_NOT_SET",
Self::InvalidEnumValue => "USER_ERROR_INVALID_ENUM_VALUE",
Self::TooManyUserRids => "USER_ERROR_TOO_MANY_USER_RIDS",
Self::QueryTooComplex => "USER_ERROR_QUERY_TOO_COMPLEX",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"USER_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
"USER_ERROR_INVALID_USER_RID" => Some(Self::InvalidUserRid),
"USER_ERROR_ONEOF_NOT_SET" => Some(Self::OneofNotSet),
"USER_ERROR_INVALID_ENUM_VALUE" => Some(Self::InvalidEnumValue),
"USER_ERROR_TOO_MANY_USER_RIDS" => Some(Self::TooManyUserRids),
"USER_ERROR_QUERY_TOO_COMPLEX" => Some(Self::QueryTooComplex),
_ => None,
}
}
}
pub mod user_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct UserServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UserServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> UserServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
UserServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_user(
&mut self,
request: impl tonic::IntoRequest<super::GetUserRequest>,
) -> std::result::Result<
tonic::Response<super::GetUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/GetUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"GetUser",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_users(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetUsersRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetUsersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/BatchGetUsers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"BatchGetUsers",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_users(
&mut self,
request: impl tonic::IntoRequest<super::SearchUsersRequest>,
) -> std::result::Result<
tonic::Response<super::SearchUsersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/SearchUsers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"SearchUsers",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_current_user(
&mut self,
request: impl tonic::IntoRequest<super::GetCurrentUserRequest>,
) -> std::result::Result<
tonic::Response<super::GetCurrentUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/GetCurrentUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"GetCurrentUser",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_current_user(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCurrentUserRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateCurrentUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/UpdateCurrentUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"UpdateCurrentUser",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_current_user_settings(
&mut self,
request: impl tonic::IntoRequest<super::GetCurrentUserSettingsRequest>,
) -> std::result::Result<
tonic::Response<super::GetCurrentUserSettingsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/GetCurrentUserSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"GetCurrentUserSettings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_current_user_settings(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCurrentUserSettingsRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateCurrentUserSettingsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/UpdateCurrentUserSettings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"UpdateCurrentUserSettings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn preregister_users(
&mut self,
request: impl tonic::IntoRequest<super::PreregisterUsersRequest>,
) -> std::result::Result<
tonic::Response<super::PreregisterUsersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/PreregisterUsers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"PreregisterUsers",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn deactivate_user(
&mut self,
request: impl tonic::IntoRequest<super::DeactivateUserRequest>,
) -> std::result::Result<
tonic::Response<super::DeactivateUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/DeactivateUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"DeactivateUser",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn reactivate_user(
&mut self,
request: impl tonic::IntoRequest<super::ReactivateUserRequest>,
) -> std::result::Result<
tonic::Response<super::ReactivateUserResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.authentication.users.v1.UserService/ReactivateUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.users.v1.UserService",
"ReactivateUser",
),
);
self.inner.unary(req, path, codec).await
}
}
}