#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetDashboardCatalogRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDashboardCatalogResponse {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<DashboardCatalogItem>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DashboardCatalogItem {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub is_default: ::core::option::Option<bool>,
#[prost(message, optional, tag = "5")]
pub is_pinned: ::core::option::Option<bool>,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub folder: ::core::option::Option<super::common::DashboardFolder>,
#[prost(message, optional, tag = "9")]
pub author_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "10")]
pub is_locked: ::core::option::Option<bool>,
#[prost(message, optional, tag = "11")]
pub locker_author_id: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod dashboard_catalog_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 DashboardCatalogServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DashboardCatalogServiceClient<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> DashboardCatalogServiceClient<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,
) -> DashboardCatalogServiceClient<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,
{
DashboardCatalogServiceClient::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_dashboard_catalog(
&mut self,
request: impl tonic::IntoRequest<super::GetDashboardCatalogRequest>,
) -> std::result::Result<
tonic::Response<super::GetDashboardCatalogResponse>,
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.dashboards.v1.services.DashboardCatalogService/GetDashboardCatalog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardCatalogService",
"GetDashboardCatalog",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDashboardFolderRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub folder: ::core::option::Option<super::common::DashboardFolder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateDashboardFolderResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceDashboardFolderRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub folder: ::core::option::Option<super::common::DashboardFolder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReplaceDashboardFolderResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDashboardFolderRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub folder_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteDashboardFolderResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListDashboardFoldersRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDashboardFoldersResponse {
#[prost(message, repeated, tag = "1")]
pub folder: ::prost::alloc::vec::Vec<super::common::DashboardFolder>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDashboardFolderRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub folder_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDashboardFolderResponse {
#[prost(message, optional, tag = "1")]
pub folder: ::core::option::Option<super::common::DashboardFolder>,
}
pub mod dashboard_folders_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 DashboardFoldersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DashboardFoldersServiceClient<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> DashboardFoldersServiceClient<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,
) -> DashboardFoldersServiceClient<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,
{
DashboardFoldersServiceClient::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 list_dashboard_folders(
&mut self,
request: impl tonic::IntoRequest<super::ListDashboardFoldersRequest>,
) -> std::result::Result<
tonic::Response<super::ListDashboardFoldersResponse>,
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.dashboards.v1.services.DashboardFoldersService/ListDashboardFolders",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardFoldersService",
"ListDashboardFolders",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_dashboard_folder(
&mut self,
request: impl tonic::IntoRequest<super::GetDashboardFolderRequest>,
) -> std::result::Result<
tonic::Response<super::GetDashboardFolderResponse>,
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.dashboards.v1.services.DashboardFoldersService/GetDashboardFolder",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardFoldersService",
"GetDashboardFolder",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_dashboard_folder(
&mut self,
request: impl tonic::IntoRequest<super::CreateDashboardFolderRequest>,
) -> std::result::Result<
tonic::Response<super::CreateDashboardFolderResponse>,
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.dashboards.v1.services.DashboardFoldersService/CreateDashboardFolder",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardFoldersService",
"CreateDashboardFolder",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_dashboard_folder(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceDashboardFolderRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceDashboardFolderResponse>,
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.dashboards.v1.services.DashboardFoldersService/ReplaceDashboardFolder",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardFoldersService",
"ReplaceDashboardFolder",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_dashboard_folder(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDashboardFolderRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteDashboardFolderResponse>,
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.dashboards.v1.services.DashboardFoldersService/DeleteDashboardFolder",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardFoldersService",
"DeleteDashboardFolder",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard: ::core::option::Option<super::ast::Dashboard>,
#[prost(message, optional, tag = "3")]
pub is_locked: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDashboardResponse {
#[prost(message, optional, tag = "1")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard: ::core::option::Option<super::ast::Dashboard>,
#[prost(message, optional, tag = "3")]
pub is_locked: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReplaceDashboardResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteDashboardResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDashboardRequest {
#[prost(message, optional, tag = "1")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDashboardResponse {
#[prost(message, optional, tag = "1")]
pub dashboard: ::core::option::Option<super::ast::Dashboard>,
#[prost(message, optional, tag = "2")]
pub updated_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub updater_author_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub updater_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub author_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
pub author_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "TokenOriginType", tag = "6")]
pub updated_origin_type: i32,
#[prost(enumeration = "TokenOriginType", tag = "7")]
pub created_origin_type: i32,
#[prost(message, optional, tag = "10")]
pub is_locked: ::core::option::Option<bool>,
#[prost(message, optional, tag = "11")]
pub locker_author_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "12")]
pub locker_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PinDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PinDashboardResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpinDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnpinDashboardResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceDefaultDashboardRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReplaceDefaultDashboardResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssignDashboardFolderRequest {
#[prost(message, optional, tag = "1")]
pub request_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub dashboard_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub folder_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AssignDashboardFolderResponse {}
#[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 TokenOriginType {
Unspecified = 0,
User = 1,
Api = 2,
}
impl TokenOriginType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TOKEN_ORIGIN_TYPE_UNSPECIFIED",
Self::User => "TOKEN_ORIGIN_TYPE_USER",
Self::Api => "TOKEN_ORIGIN_TYPE_API",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TOKEN_ORIGIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TOKEN_ORIGIN_TYPE_USER" => Some(Self::User),
"TOKEN_ORIGIN_TYPE_API" => Some(Self::Api),
_ => None,
}
}
}
pub mod dashboards_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 DashboardsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DashboardsServiceClient<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> DashboardsServiceClient<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,
) -> DashboardsServiceClient<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,
{
DashboardsServiceClient::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_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::CreateDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::CreateDashboardResponse>,
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.dashboards.v1.services.DashboardsService/CreateDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"CreateDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceDashboardResponse>,
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.dashboards.v1.services.DashboardsService/ReplaceDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"ReplaceDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteDashboardResponse>,
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.dashboards.v1.services.DashboardsService/DeleteDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"DeleteDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::GetDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::GetDashboardResponse>,
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.dashboards.v1.services.DashboardsService/GetDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"GetDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn pin_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::PinDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::PinDashboardResponse>,
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.dashboards.v1.services.DashboardsService/PinDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"PinDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn unpin_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::UnpinDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::UnpinDashboardResponse>,
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.dashboards.v1.services.DashboardsService/UnpinDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"UnpinDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_default_dashboard(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceDefaultDashboardRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceDefaultDashboardResponse>,
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.dashboards.v1.services.DashboardsService/ReplaceDefaultDashboard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"ReplaceDefaultDashboard",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn assign_dashboard_folder(
&mut self,
request: impl tonic::IntoRequest<super::AssignDashboardFolderRequest>,
) -> std::result::Result<
tonic::Response<super::AssignDashboardFolderResponse>,
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.dashboards.v1.services.DashboardsService/AssignDashboardFolder",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.dashboards.v1.services.DashboardsService",
"AssignDashboardFolder",
),
);
self.inner.unary(req, path, codec).await
}
}
}