#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Team {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<TeamId>,
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(float, optional, tag = "3")]
pub quota: ::core::option::Option<f32>,
#[prost(int32, optional, tag = "4")]
pub retention: ::core::option::Option<i32>,
#[prost(enumeration = "PlanType", optional, tag = "5")]
pub plan_type: ::core::option::Option<i32>,
#[prost(bool, tag = "6")]
pub is_auditing_team: bool,
#[prost(string, tag = "7")]
pub name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TeamInfo {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<TeamId>,
#[prost(message, optional, tag = "2")]
pub organisation_id: ::core::option::Option<OrganisationId>,
#[prost(string, tag = "3")]
pub organisation_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TeamId {
#[prost(uint32, tag = "1")]
pub id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrganisationId {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserId {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UserAccountId {
#[prost(uint32, tag = "1")]
pub id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[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 username: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub user_account_id: ::core::option::Option<UserAccountId>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TeamCount {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
#[prost(uint32, tag = "2")]
pub team_member_count: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanType {
Unspecified = 0,
PostTrial = 1,
Plan = 2,
Trial = 3,
}
impl PlanType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PLAN_TYPE_UNSPECIFIED",
Self::PostTrial => "PLAN_TYPE_POST_TRIAL",
Self::Plan => "PLAN_TYPE_PLAN",
Self::Trial => "PLAN_TYPE_TRIAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLAN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PLAN_TYPE_POST_TRIAL" => Some(Self::PostTrial),
"PLAN_TYPE_PLAN" => Some(Self::Plan),
"PLAN_TYPE_TRIAL" => Some(Self::Trial),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListTeamsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTeamsResponse {
#[prost(message, optional, tag = "1")]
pub default_team: ::core::option::Option<list_teams_response::TeamInfo>,
#[prost(message, repeated, tag = "2")]
pub teams: ::prost::alloc::vec::Vec<list_teams_response::TeamInfo>,
}
pub mod list_teams_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TeamInfo {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<super::TeamId>,
#[prost(string, tag = "2")]
pub team_name: ::prost::alloc::string::String,
#[prost(double, tag = "3")]
pub daily_quota: f64,
#[prost(int32, tag = "4")]
pub retention: i32,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTeamRequest {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTeamResponse {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
#[prost(string, tag = "2")]
pub team_name: ::prost::alloc::string::String,
#[prost(double, tag = "3")]
pub daily_quota: f64,
#[prost(int32, tag = "4")]
pub retention: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteTeamRequest {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteTeamResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateTeamRequest {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
#[prost(string, optional, tag = "2")]
pub team_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "3")]
pub daily_quota: ::core::option::Option<f64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateTeamResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTeamInOrgRequest {
#[prost(string, tag = "1")]
pub team_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub team_admins_email: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(double, optional, tag = "6")]
pub daily_quota: ::core::option::Option<f64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateTeamInOrgResponse {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MoveQuotaRequest {
#[prost(message, optional, tag = "1")]
pub source_team: ::core::option::Option<TeamId>,
#[prost(message, optional, tag = "2")]
pub destination_team: ::core::option::Option<TeamId>,
#[prost(double, tag = "3")]
pub units_to_move: f64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MoveQuotaResponse {
#[prost(double, tag = "1")]
pub source_team_quota: f64,
#[prost(double, tag = "2")]
pub destination_team_quota: f64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTeamQuotaRequest {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTeamQuotaResponse {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
#[prost(float, tag = "2")]
pub quota: f32,
#[prost(int32, tag = "3")]
pub retention: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetDailyQuotaRequest {
#[prost(message, optional, tag = "1")]
pub team_id: ::core::option::Option<TeamId>,
#[prost(float, tag = "2")]
pub target_daily_quota: f32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetDailyQuotaResponse {}
pub mod team_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 TeamServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TeamServiceClient<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> TeamServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
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,
) -> TeamServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
TeamServiceClient::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 create_team_in_org(
&mut self,
request: impl tonic::IntoRequest<super::CreateTeamInOrgRequest>,
) -> std::result::Result<
tonic::Response<super::CreateTeamInOrgResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/CreateTeamInOrg",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"CreateTeamInOrg",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn move_quota(
&mut self,
request: impl tonic::IntoRequest<super::MoveQuotaRequest>,
) -> std::result::Result<
tonic::Response<super::MoveQuotaResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/MoveQuota",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"MoveQuota",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_team_quota(
&mut self,
request: impl tonic::IntoRequest<super::GetTeamQuotaRequest>,
) -> std::result::Result<
tonic::Response<super::GetTeamQuotaResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/GetTeamQuota",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"GetTeamQuota",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_daily_quota(
&mut self,
request: impl tonic::IntoRequest<super::SetDailyQuotaRequest>,
) -> std::result::Result<
tonic::Response<super::SetDailyQuotaResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/SetDailyQuota",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"SetDailyQuota",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_team(
&mut self,
request: impl tonic::IntoRequest<super::UpdateTeamRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateTeamResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/UpdateTeam",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"UpdateTeam",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_team(
&mut self,
request: impl tonic::IntoRequest<super::GetTeamRequest>,
) -> std::result::Result<
tonic::Response<super::GetTeamResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/GetTeam",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"GetTeam",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_team(
&mut self,
request: impl tonic::IntoRequest<super::DeleteTeamRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteTeamResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/DeleteTeam",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"DeleteTeam",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_teams(
&mut self,
request: impl tonic::IntoRequest<super::ListTeamsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTeamsResponse>,
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(
"/com.coralogixapis.aaa.organisations.v2.TeamService/ListTeams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.aaa.organisations.v2.TeamService",
"ListTeams",
),
);
self.inner.unary(req, path, codec).await
}
}
}