#![allow(rustdoc::broken_intra_doc_links)]
use gax::error::Error;
use std::sync::Arc;
pub(crate) mod dynamic;
pub trait ServiceUsage: std::fmt::Debug + Send + Sync {
fn enable_service(
&self,
_req: crate::model::EnableServiceRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<longrunning::model::Operation>> + Send
{
std::future::ready::<crate::Result<longrunning::model::Operation>>(Err(Error::other(
"unimplemented",
)))
}
fn disable_service(
&self,
_req: crate::model::DisableServiceRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<longrunning::model::Operation>> + Send
{
std::future::ready::<crate::Result<longrunning::model::Operation>>(Err(Error::other(
"unimplemented",
)))
}
fn get_service(
&self,
_req: crate::model::GetServiceRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<crate::model::Service>> + Send {
std::future::ready::<crate::Result<crate::model::Service>>(Err(Error::other(
"unimplemented",
)))
}
fn list_services(
&self,
_req: crate::model::ListServicesRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<crate::model::ListServicesResponse>> + Send
{
std::future::ready::<crate::Result<crate::model::ListServicesResponse>>(Err(Error::other(
"unimplemented",
)))
}
fn batch_enable_services(
&self,
_req: crate::model::BatchEnableServicesRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<longrunning::model::Operation>> + Send
{
std::future::ready::<crate::Result<longrunning::model::Operation>>(Err(Error::other(
"unimplemented",
)))
}
fn batch_get_services(
&self,
_req: crate::model::BatchGetServicesRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<crate::model::BatchGetServicesResponse>> + Send
{
std::future::ready::<crate::Result<crate::model::BatchGetServicesResponse>>(Err(
Error::other("unimplemented"),
))
}
fn list_operations(
&self,
_req: longrunning::model::ListOperationsRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<longrunning::model::ListOperationsResponse>>
+ Send {
std::future::ready::<crate::Result<longrunning::model::ListOperationsResponse>>(Err(
Error::other("unimplemented"),
))
}
fn get_operation(
&self,
_req: longrunning::model::GetOperationRequest,
_options: gax::options::RequestOptions,
) -> impl std::future::Future<Output = crate::Result<longrunning::model::Operation>> + Send
{
std::future::ready::<crate::Result<longrunning::model::Operation>>(Err(Error::other(
"unimplemented",
)))
}
fn get_polling_policy(
&self,
_options: &gax::options::RequestOptions,
) -> Arc<dyn gax::polling_policy::PollingPolicy> {
Arc::new(gax::polling_policy::Aip194Strict)
}
fn get_polling_backoff_policy(
&self,
_options: &gax::options::RequestOptions,
) -> Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
}
}