use crate::Result;
#[derive(Clone, Debug)]
pub struct LoggingServiceV2<T>
where
T: super::stub::LoggingServiceV2 + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> LoggingServiceV2<T>
where
T: super::stub::LoggingServiceV2 + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::LoggingServiceV2 for LoggingServiceV2<T>
where
T: super::stub::LoggingServiceV2 + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn delete_log(
&self,
req: crate::model::DeleteLogRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_log(req, options).await
}
#[tracing::instrument(ret)]
async fn write_log_entries(
&self,
req: crate::model::WriteLogEntriesRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::WriteLogEntriesResponse>> {
self.inner.write_log_entries(req, options).await
}
#[tracing::instrument(ret)]
async fn list_log_entries(
&self,
req: crate::model::ListLogEntriesRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListLogEntriesResponse>> {
self.inner.list_log_entries(req, options).await
}
#[tracing::instrument(ret)]
async fn list_monitored_resource_descriptors(
&self,
req: crate::model::ListMonitoredResourceDescriptorsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListMonitoredResourceDescriptorsResponse>> {
self.inner
.list_monitored_resource_descriptors(req, options)
.await
}
#[tracing::instrument(ret)]
async fn list_logs(
&self,
req: crate::model::ListLogsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListLogsResponse>> {
self.inner.list_logs(req, options).await
}
#[tracing::instrument(ret)]
async fn list_operations(
&self,
req: google_cloud_longrunning::model::ListOperationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::ListOperationsResponse>> {
self.inner.list_operations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.get_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn cancel_operation(
&self,
req: google_cloud_longrunning::model::CancelOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.cancel_operation(req, options).await
}
}
#[derive(Clone, Debug)]
pub struct ConfigServiceV2<T>
where
T: super::stub::ConfigServiceV2 + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> ConfigServiceV2<T>
where
T: super::stub::ConfigServiceV2 + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::ConfigServiceV2 for ConfigServiceV2<T>
where
T: super::stub::ConfigServiceV2 + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn list_buckets(
&self,
req: crate::model::ListBucketsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListBucketsResponse>> {
self.inner.list_buckets(req, options).await
}
#[tracing::instrument(ret)]
async fn get_bucket(
&self,
req: crate::model::GetBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogBucket>> {
self.inner.get_bucket(req, options).await
}
#[tracing::instrument(ret)]
async fn create_bucket_async(
&self,
req: crate::model::CreateBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.create_bucket_async(req, options).await
}
#[tracing::instrument(ret)]
async fn update_bucket_async(
&self,
req: crate::model::UpdateBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.update_bucket_async(req, options).await
}
#[tracing::instrument(ret)]
async fn create_bucket(
&self,
req: crate::model::CreateBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogBucket>> {
self.inner.create_bucket(req, options).await
}
#[tracing::instrument(ret)]
async fn update_bucket(
&self,
req: crate::model::UpdateBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogBucket>> {
self.inner.update_bucket(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_bucket(
&self,
req: crate::model::DeleteBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_bucket(req, options).await
}
#[tracing::instrument(ret)]
async fn undelete_bucket(
&self,
req: crate::model::UndeleteBucketRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.undelete_bucket(req, options).await
}
#[tracing::instrument(ret)]
async fn list_views(
&self,
req: crate::model::ListViewsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListViewsResponse>> {
self.inner.list_views(req, options).await
}
#[tracing::instrument(ret)]
async fn get_view(
&self,
req: crate::model::GetViewRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogView>> {
self.inner.get_view(req, options).await
}
#[tracing::instrument(ret)]
async fn create_view(
&self,
req: crate::model::CreateViewRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogView>> {
self.inner.create_view(req, options).await
}
#[tracing::instrument(ret)]
async fn update_view(
&self,
req: crate::model::UpdateViewRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogView>> {
self.inner.update_view(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_view(
&self,
req: crate::model::DeleteViewRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_view(req, options).await
}
#[tracing::instrument(ret)]
async fn list_sinks(
&self,
req: crate::model::ListSinksRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListSinksResponse>> {
self.inner.list_sinks(req, options).await
}
#[tracing::instrument(ret)]
async fn get_sink(
&self,
req: crate::model::GetSinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogSink>> {
self.inner.get_sink(req, options).await
}
#[tracing::instrument(ret)]
async fn create_sink(
&self,
req: crate::model::CreateSinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogSink>> {
self.inner.create_sink(req, options).await
}
#[tracing::instrument(ret)]
async fn update_sink(
&self,
req: crate::model::UpdateSinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogSink>> {
self.inner.update_sink(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_sink(
&self,
req: crate::model::DeleteSinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_sink(req, options).await
}
#[tracing::instrument(ret)]
async fn create_link(
&self,
req: crate::model::CreateLinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.create_link(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_link(
&self,
req: crate::model::DeleteLinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.delete_link(req, options).await
}
#[tracing::instrument(ret)]
async fn list_links(
&self,
req: crate::model::ListLinksRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListLinksResponse>> {
self.inner.list_links(req, options).await
}
#[tracing::instrument(ret)]
async fn get_link(
&self,
req: crate::model::GetLinkRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Link>> {
self.inner.get_link(req, options).await
}
#[tracing::instrument(ret)]
async fn list_exclusions(
&self,
req: crate::model::ListExclusionsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListExclusionsResponse>> {
self.inner.list_exclusions(req, options).await
}
#[tracing::instrument(ret)]
async fn get_exclusion(
&self,
req: crate::model::GetExclusionRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogExclusion>> {
self.inner.get_exclusion(req, options).await
}
#[tracing::instrument(ret)]
async fn create_exclusion(
&self,
req: crate::model::CreateExclusionRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogExclusion>> {
self.inner.create_exclusion(req, options).await
}
#[tracing::instrument(ret)]
async fn update_exclusion(
&self,
req: crate::model::UpdateExclusionRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogExclusion>> {
self.inner.update_exclusion(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_exclusion(
&self,
req: crate::model::DeleteExclusionRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_exclusion(req, options).await
}
#[tracing::instrument(ret)]
async fn get_cmek_settings(
&self,
req: crate::model::GetCmekSettingsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::CmekSettings>> {
self.inner.get_cmek_settings(req, options).await
}
#[tracing::instrument(ret)]
async fn update_cmek_settings(
&self,
req: crate::model::UpdateCmekSettingsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::CmekSettings>> {
self.inner.update_cmek_settings(req, options).await
}
#[tracing::instrument(ret)]
async fn get_settings(
&self,
req: crate::model::GetSettingsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Settings>> {
self.inner.get_settings(req, options).await
}
#[tracing::instrument(ret)]
async fn update_settings(
&self,
req: crate::model::UpdateSettingsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::Settings>> {
self.inner.update_settings(req, options).await
}
#[tracing::instrument(ret)]
async fn copy_log_entries(
&self,
req: crate::model::CopyLogEntriesRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.copy_log_entries(req, options).await
}
#[tracing::instrument(ret)]
async fn list_operations(
&self,
req: google_cloud_longrunning::model::ListOperationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::ListOperationsResponse>> {
self.inner.list_operations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.get_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn cancel_operation(
&self,
req: google_cloud_longrunning::model::CancelOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.cancel_operation(req, options).await
}
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
self.inner.get_polling_error_policy(options)
}
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
self.inner.get_polling_backoff_policy(options)
}
}
#[derive(Clone, Debug)]
pub struct MetricsServiceV2<T>
where
T: super::stub::MetricsServiceV2 + std::fmt::Debug + Send + Sync,
{
inner: T,
}
impl<T> MetricsServiceV2<T>
where
T: super::stub::MetricsServiceV2 + std::fmt::Debug + Send + Sync,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
impl<T> super::stub::MetricsServiceV2 for MetricsServiceV2<T>
where
T: super::stub::MetricsServiceV2 + std::fmt::Debug + Send + Sync,
{
#[tracing::instrument(ret)]
async fn list_log_metrics(
&self,
req: crate::model::ListLogMetricsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::ListLogMetricsResponse>> {
self.inner.list_log_metrics(req, options).await
}
#[tracing::instrument(ret)]
async fn get_log_metric(
&self,
req: crate::model::GetLogMetricRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogMetric>> {
self.inner.get_log_metric(req, options).await
}
#[tracing::instrument(ret)]
async fn create_log_metric(
&self,
req: crate::model::CreateLogMetricRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogMetric>> {
self.inner.create_log_metric(req, options).await
}
#[tracing::instrument(ret)]
async fn update_log_metric(
&self,
req: crate::model::UpdateLogMetricRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<crate::model::LogMetric>> {
self.inner.update_log_metric(req, options).await
}
#[tracing::instrument(ret)]
async fn delete_log_metric(
&self,
req: crate::model::DeleteLogMetricRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.delete_log_metric(req, options).await
}
#[tracing::instrument(ret)]
async fn list_operations(
&self,
req: google_cloud_longrunning::model::ListOperationsRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::ListOperationsResponse>> {
self.inner.list_operations(req, options).await
}
#[tracing::instrument(ret)]
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
self.inner.get_operation(req, options).await
}
#[tracing::instrument(ret)]
async fn cancel_operation(
&self,
req: google_cloud_longrunning::model::CancelOperationRequest,
options: crate::RequestOptions,
) -> Result<crate::Response<()>> {
self.inner.cancel_operation(req, options).await
}
}