#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
#[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 group_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "8")]
pub updated_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "9")]
pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGroupsQuery {
#[prost(oneof = "search_groups_query::Query", tags = "1, 2, 3")]
pub query: ::core::option::Option<search_groups_query::Query>,
}
pub mod search_groups_query {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Query {
#[prost(string, tag = "1")]
ExactSubstringText(::prost::alloc::string::String),
#[prost(message, tag = "2")]
And(super::SearchQueryAnd),
#[prost(message, tag = "3")]
Or(super::SearchQueryOr),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchQueryAnd {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<SearchGroupsQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchQueryOr {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<SearchGroupsQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGroupsRequest {
#[prost(int32, optional, tag = "1")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub query: ::core::option::Option<SearchGroupsQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGroupsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<Group>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupRequest {
#[prost(string, tag = "1")]
pub group_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupResponse {
#[prost(message, optional, tag = "1")]
pub group: ::core::option::Option<Group>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupByIdRequest {
#[prost(string, tag = "1")]
pub group_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupByIdResponse {
#[prost(message, optional, tag = "1")]
pub group: ::core::option::Option<Group>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupsRequest {
#[prost(string, repeated, tag = "1")]
pub group_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupsResponse {
#[prost(map = "string, message", tag = "1")]
pub groups: ::std::collections::HashMap<::prost::alloc::string::String, Group>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGroupMetadataRequest {
#[prost(string, optional, tag = "1")]
pub display_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub symbol: ::core::option::Option<
update_group_metadata_request::UpdateGroupSymbolWrapper,
>,
}
pub mod update_group_metadata_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGroupSymbolWrapper {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<
super::super::super::super::scout::elements::v1::Symbol,
>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGroupMetadataRequestWrapper {
#[prost(string, tag = "1")]
pub group_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub request: ::core::option::Option<UpdateGroupMetadataRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateGroupMetadataResponse {
#[prost(message, optional, tag = "1")]
pub group: ::core::option::Option<Group>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GroupErrors {
Unauthorized = 0,
NotFound = 1,
RequestedPageSizeTooLarge = 2,
}
impl GroupErrors {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unauthorized => "GROUP_ERRORS_UNAUTHORIZED",
Self::NotFound => "GROUP_ERRORS_NOT_FOUND",
Self::RequestedPageSizeTooLarge => {
"GROUP_ERRORS_REQUESTED_PAGE_SIZE_TOO_LARGE"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GROUP_ERRORS_UNAUTHORIZED" => Some(Self::Unauthorized),
"GROUP_ERRORS_NOT_FOUND" => Some(Self::NotFound),
"GROUP_ERRORS_REQUESTED_PAGE_SIZE_TOO_LARGE" => {
Some(Self::RequestedPageSizeTooLarge)
}
_ => None,
}
}
}
pub mod group_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 GroupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl GroupServiceClient<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> GroupServiceClient<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,
) -> GroupServiceClient<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,
{
GroupServiceClient::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_group(
&mut self,
request: impl tonic::IntoRequest<super::GetGroupRequest>,
) -> std::result::Result<
tonic::Response<super::GetGroupResponse>,
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.groups.v1.GroupService/GetGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.groups.v1.GroupService",
"GetGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_groups(
&mut self,
request: impl tonic::IntoRequest<super::GetGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::GetGroupsResponse>,
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.groups.v1.GroupService/GetGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.groups.v1.GroupService",
"GetGroups",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_group_by_id(
&mut self,
request: impl tonic::IntoRequest<super::GetGroupByIdRequest>,
) -> std::result::Result<
tonic::Response<super::GetGroupByIdResponse>,
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.groups.v1.GroupService/GetGroupById",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.groups.v1.GroupService",
"GetGroupById",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_group_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdateGroupMetadataRequestWrapper>,
) -> std::result::Result<
tonic::Response<super::UpdateGroupMetadataResponse>,
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.groups.v1.GroupService/UpdateGroupMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.groups.v1.GroupService",
"UpdateGroupMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_groups(
&mut self,
request: impl tonic::IntoRequest<super::SearchGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchGroupsResponse>,
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.groups.v1.GroupService/SearchGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.authentication.groups.v1.GroupService",
"SearchGroups",
),
);
self.inner.unary(req, path, codec).await
}
}
}