#[async_trait::async_trait]
pub trait CloudShellService: std::fmt::Debug + Send + Sync {
async fn get_environment(
&self,
req: crate::model::GetEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Environment>>;
async fn start_environment(
&self,
req: crate::model::StartEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn authorize_environment(
&self,
req: crate::model::AuthorizeEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn add_public_key(
&self,
req: crate::model::AddPublicKeyRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn remove_public_key(
&self,
req: crate::model::RemovePublicKeyRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy>;
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy>;
}
#[async_trait::async_trait]
impl<T: super::CloudShellService> CloudShellService for T {
async fn get_environment(
&self,
req: crate::model::GetEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Environment>> {
T::get_environment(self, req, options).await
}
async fn start_environment(
&self,
req: crate::model::StartEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::start_environment(self, req, options).await
}
async fn authorize_environment(
&self,
req: crate::model::AuthorizeEnvironmentRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::authorize_environment(self, req, options).await
}
async fn add_public_key(
&self,
req: crate::model::AddPublicKeyRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::add_public_key(self, req, options).await
}
async fn remove_public_key(
&self,
req: crate::model::RemovePublicKeyRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::remove_public_key(self, req, options).await
}
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::get_operation(self, req, options).await
}
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
T::get_polling_error_policy(self, options)
}
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
T::get_polling_backoff_policy(self, options)
}
}