diff --git a/src/generated/cloud/secretmanager/v1/.sidekick.toml b/src/generated/cloud/secretmanager/v1/.sidekick.toml index 3162d71cd9..6ca9bd50d9 100644 --- a/src/generated/cloud/secretmanager/v1/.sidekick.toml +++ b/src/generated/cloud/secretmanager/v1/.sidekick.toml @@ -19,3 +19,4 @@ service-config = 'google/cloud/secretmanager/v1/secretmanager_v1.yaml' [codec] version = '1.2.0' copyright-year = '2024' +generate-rpc-samples = 'true' diff --git a/src/generated/cloud/secretmanager/v1/src/client.rs b/src/generated/cloud/secretmanager/v1/src/client.rs index c2f37acb96..ecf16e8de1 100644 --- a/src/generated/cloud/secretmanager/v1/src/client.rs +++ b/src/generated/cloud/secretmanager/v1/src/client.rs @@ -142,6 +142,22 @@ impl SecretManagerService { /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .create_secret() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn create_secret(&self) -> super::builder::secret_manager_service::CreateSecret { super::builder::secret_manager_service::CreateSecret::new(self.inner.clone()) } @@ -152,6 +168,22 @@ impl SecretManagerService { /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .add_secret_version() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn add_secret_version(&self) -> super::builder::secret_manager_service::AddSecretVersion { super::builder::secret_manager_service::AddSecretVersion::new(self.inner.clone()) } @@ -159,6 +191,23 @@ impl SecretManagerService { /// Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret]. /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_secret() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_secret(&self) -> super::builder::secret_manager_service::GetSecret { super::builder::secret_manager_service::GetSecret::new(self.inner.clone()) } @@ -167,6 +216,22 @@ impl SecretManagerService { /// [Secret][google.cloud.secretmanager.v1.Secret]. /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .update_secret() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn update_secret(&self) -> super::builder::secret_manager_service::UpdateSecret { super::builder::secret_manager_service::UpdateSecret::new(self.inner.clone()) } @@ -174,6 +239,22 @@ impl SecretManagerService { /// Deletes a [Secret][google.cloud.secretmanager.v1.Secret]. /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// client + /// .delete_secret() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn delete_secret(&self) -> super::builder::secret_manager_service::DeleteSecret { super::builder::secret_manager_service::DeleteSecret::new(self.inner.clone()) } @@ -195,6 +276,23 @@ impl SecretManagerService { /// created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. /// /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_secret_version() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_secret_version(&self) -> super::builder::secret_manager_service::GetSecretVersion { super::builder::secret_manager_service::GetSecretVersion::new(self.inner.clone()) } @@ -206,6 +304,22 @@ impl SecretManagerService { /// created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. /// /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .access_secret_version() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn access_secret_version( &self, ) -> super::builder::secret_manager_service::AccessSecretVersion { @@ -221,6 +335,22 @@ impl SecretManagerService { /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion /// [google.cloud.secretmanager.v1.SecretVersion.State.DISABLED]: crate::model::secret_version::State::Disabled /// [google.cloud.secretmanager.v1.SecretVersion.state]: crate::model::SecretVersion::state + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .disable_secret_version() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn disable_secret_version( &self, ) -> super::builder::secret_manager_service::DisableSecretVersion { @@ -236,6 +366,22 @@ impl SecretManagerService { /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion /// [google.cloud.secretmanager.v1.SecretVersion.State.ENABLED]: crate::model::secret_version::State::Enabled /// [google.cloud.secretmanager.v1.SecretVersion.state]: crate::model::SecretVersion::state + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .enable_secret_version() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn enable_secret_version( &self, ) -> super::builder::secret_manager_service::EnableSecretVersion { @@ -252,6 +398,22 @@ impl SecretManagerService { /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion /// [google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED]: crate::model::secret_version::State::Destroyed /// [google.cloud.secretmanager.v1.SecretVersion.state]: crate::model::SecretVersion::state + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .destroy_secret_version() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn destroy_secret_version( &self, ) -> super::builder::secret_manager_service::DestroySecretVersion { @@ -268,12 +430,44 @@ impl SecretManagerService { /// /// [google.cloud.secretmanager.v1.Secret]: crate::model::Secret /// [google.cloud.secretmanager.v1.SecretVersion]: crate::model::SecretVersion + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .set_iam_policy() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn set_iam_policy(&self) -> super::builder::secret_manager_service::SetIamPolicy { super::builder::secret_manager_service::SetIamPolicy::new(self.inner.clone()) } /// Gets the access control policy for a secret. /// Returns empty policy if the secret exists and does not have a policy set. + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .get_iam_policy() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_iam_policy(&self) -> super::builder::secret_manager_service::GetIamPolicy { super::builder::secret_manager_service::GetIamPolicy::new(self.inner.clone()) } @@ -285,6 +479,22 @@ impl SecretManagerService { /// Note: This operation is designed to be used for building permission-aware /// UIs and command-line tools, not for authorization checking. This operation /// may "fail open" without warning. + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .test_iam_permissions() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn test_iam_permissions( &self, ) -> super::builder::secret_manager_service::TestIamPermissions { @@ -297,6 +507,22 @@ impl SecretManagerService { } /// Gets information about a location. + /// + /// # Example + /// ``` + /// # use google_cloud_secretmanager_v1::client::SecretManagerService; + /// async fn sample( + /// client: &SecretManagerService + /// ) -> gax::Result<()> { + /// let response = client + /// .get_location() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_location(&self) -> super::builder::secret_manager_service::GetLocation { super::builder::secret_manager_service::GetLocation::new(self.inner.clone()) } diff --git a/src/generated/cloud/speech/v2/.sidekick.toml b/src/generated/cloud/speech/v2/.sidekick.toml index 6c316453d9..c1419a55dc 100644 --- a/src/generated/cloud/speech/v2/.sidekick.toml +++ b/src/generated/cloud/speech/v2/.sidekick.toml @@ -19,3 +19,4 @@ service-config = 'google/cloud/speech/v2/speech_v2.yaml' [codec] version = '1.3.0' copyright-year = '2025' +generate-rpc-samples = 'true' diff --git a/src/generated/cloud/speech/v2/src/client.rs b/src/generated/cloud/speech/v2/src/client.rs index c6c40ee026..34eb780a29 100644 --- a/src/generated/cloud/speech/v2/src/client.rs +++ b/src/generated/cloud/speech/v2/src/client.rs @@ -146,6 +146,23 @@ impl Speech { /// exist. /// /// [google.cloud.speech.v2.Recognizer]: crate::model::Recognizer + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_recognizer() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_recognizer(&self) -> super::builder::speech::GetRecognizer { super::builder::speech::GetRecognizer::new(self.inner.clone()) } @@ -203,6 +220,22 @@ impl Speech { /// Performs synchronous Speech recognition: receive results after all audio /// has been sent and processed. + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// let response = client + /// .recognize() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn recognize(&self) -> super::builder::speech::Recognize { super::builder::speech::Recognize::new(self.inner.clone()) } @@ -227,6 +260,23 @@ impl Speech { /// Returns the requested [Config][google.cloud.speech.v2.Config]. /// /// [google.cloud.speech.v2.Config]: crate::model::Config + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_config() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_config(&self) -> super::builder::speech::GetConfig { super::builder::speech::GetConfig::new(self.inner.clone()) } @@ -234,6 +284,22 @@ impl Speech { /// Updates the [Config][google.cloud.speech.v2.Config]. /// /// [google.cloud.speech.v2.Config]: crate::model::Config + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// let response = client + /// .update_config() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn update_config(&self) -> super::builder::speech::UpdateConfig { super::builder::speech::UpdateConfig::new(self.inner.clone()) } @@ -264,6 +330,23 @@ impl Speech { /// [CustomClass][google.cloud.speech.v2.CustomClass]. /// /// [google.cloud.speech.v2.CustomClass]: crate::model::CustomClass + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_custom_class() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_custom_class(&self) -> super::builder::speech::GetCustomClass { super::builder::speech::GetCustomClass::new(self.inner.clone()) } @@ -345,6 +428,23 @@ impl Speech { /// [PhraseSet][google.cloud.speech.v2.PhraseSet]. /// /// [google.cloud.speech.v2.PhraseSet]: crate::model::PhraseSet + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_phrase_set() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_phrase_set(&self) -> super::builder::speech::GetPhraseSet { super::builder::speech::GetPhraseSet::new(self.inner.clone()) } @@ -406,6 +506,22 @@ impl Speech { } /// Gets information about a location. + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// let response = client + /// .get_location() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_location(&self) -> super::builder::speech::GetLocation { super::builder::speech::GetLocation::new(self.inner.clone()) } @@ -420,6 +536,22 @@ impl Speech { /// Provides the [Operations][google.longrunning.Operations] service functionality in this service. /// /// [google.longrunning.Operations]: longrunning::client::Operations + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// let response = client + /// .get_operation() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_operation(&self) -> super::builder::speech::GetOperation { super::builder::speech::GetOperation::new(self.inner.clone()) } @@ -427,6 +559,21 @@ impl Speech { /// Provides the [Operations][google.longrunning.Operations] service functionality in this service. /// /// [google.longrunning.Operations]: longrunning::client::Operations + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// client + /// .delete_operation() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn delete_operation(&self) -> super::builder::speech::DeleteOperation { super::builder::speech::DeleteOperation::new(self.inner.clone()) } @@ -434,6 +581,21 @@ impl Speech { /// Provides the [Operations][google.longrunning.Operations] service functionality in this service. /// /// [google.longrunning.Operations]: longrunning::client::Operations + /// + /// # Example + /// ``` + /// # use google_cloud_speech_v2::client::Speech; + /// async fn sample( + /// client: &Speech + /// ) -> gax::Result<()> { + /// client + /// .cancel_operation() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn cancel_operation(&self) -> super::builder::speech::CancelOperation { super::builder::speech::CancelOperation::new(self.inner.clone()) } diff --git a/src/generated/iam/admin/v1/.sidekick.toml b/src/generated/iam/admin/v1/.sidekick.toml index b5d0250f68..4894d12662 100644 --- a/src/generated/iam/admin/v1/.sidekick.toml +++ b/src/generated/iam/admin/v1/.sidekick.toml @@ -19,3 +19,4 @@ service-config = 'google/iam/admin/v1/iam.yaml' [codec] version = '1.2.0' copyright-year = '2025' +generate-rpc-samples = 'true' diff --git a/src/generated/iam/admin/v1/src/client.rs b/src/generated/iam/admin/v1/src/client.rs index 99c7a99c19..c4e38d3a5a 100644 --- a/src/generated/iam/admin/v1/src/client.rs +++ b/src/generated/iam/admin/v1/src/client.rs @@ -156,6 +156,23 @@ impl Iam { /// Gets a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_service_account() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_service_account(&self) -> super::builder::iam::GetServiceAccount { super::builder::iam::GetServiceAccount::new(self.inner.clone()) } @@ -163,6 +180,22 @@ impl Iam { /// Creates a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .create_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn create_service_account(&self) -> super::builder::iam::CreateServiceAccount { super::builder::iam::CreateServiceAccount::new(self.inner.clone()) } @@ -176,6 +209,22 @@ impl Iam { /// /// [google.iam.admin.v1.IAM.PatchServiceAccount]: crate::client::Iam::patch_service_account /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .update_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn update_service_account(&self) -> super::builder::iam::UpdateServiceAccount { super::builder::iam::UpdateServiceAccount::new(self.inner.clone()) } @@ -183,6 +232,22 @@ impl Iam { /// Patches a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .patch_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn patch_service_account(&self) -> super::builder::iam::PatchServiceAccount { super::builder::iam::PatchServiceAccount::new(self.inner.clone()) } @@ -205,6 +270,21 @@ impl Iam { /// /// [google.iam.admin.v1.IAM.DisableServiceAccount]: crate::client::Iam::disable_service_account /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .delete_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn delete_service_account(&self) -> super::builder::iam::DeleteServiceAccount { super::builder::iam::DeleteServiceAccount::new(self.inner.clone()) } @@ -219,6 +299,22 @@ impl Iam { /// that has been permanently removed. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .undelete_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn undelete_service_account(&self) -> super::builder::iam::UndeleteServiceAccount { super::builder::iam::UndeleteServiceAccount::new(self.inner.clone()) } @@ -234,6 +330,21 @@ impl Iam { /// /// [google.iam.admin.v1.IAM.DisableServiceAccount]: crate::client::Iam::disable_service_account /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .enable_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn enable_service_account(&self) -> super::builder::iam::EnableServiceAccount { super::builder::iam::EnableServiceAccount::new(self.inner.clone()) } @@ -258,6 +369,21 @@ impl Iam { /// [google.iam.admin.v1.IAM.DeleteServiceAccount]: crate::client::Iam::delete_service_account /// [google.iam.admin.v1.IAM.EnableServiceAccount]: crate::client::Iam::enable_service_account /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .disable_service_account() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn disable_service_account(&self) -> super::builder::iam::DisableServiceAccount { super::builder::iam::DisableServiceAccount::new(self.inner.clone()) } @@ -265,6 +391,22 @@ impl Iam { /// Lists every [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey] for a service account. /// /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .list_service_account_keys() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn list_service_account_keys(&self) -> super::builder::iam::ListServiceAccountKeys { super::builder::iam::ListServiceAccountKeys::new(self.inner.clone()) } @@ -272,6 +414,23 @@ impl Iam { /// Gets a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. /// /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam, + /// resource_name: &str + /// ) -> gax::Result<()> { + /// let response = client + /// .get_service_account_key() + /// .set_name(resource_name) + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_service_account_key(&self) -> super::builder::iam::GetServiceAccountKey { super::builder::iam::GetServiceAccountKey::new(self.inner.clone()) } @@ -279,6 +438,22 @@ impl Iam { /// Creates a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. /// /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .create_service_account_key() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn create_service_account_key(&self) -> super::builder::iam::CreateServiceAccountKey { super::builder::iam::CreateServiceAccountKey::new(self.inner.clone()) } @@ -290,6 +465,22 @@ impl Iam { /// pair as a service account key. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .upload_service_account_key() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn upload_service_account_key(&self) -> super::builder::iam::UploadServiceAccountKey { super::builder::iam::UploadServiceAccountKey::new(self.inner.clone()) } @@ -299,6 +490,21 @@ impl Iam { /// account key. /// /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .delete_service_account_key() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn delete_service_account_key(&self) -> super::builder::iam::DeleteServiceAccountKey { super::builder::iam::DeleteServiceAccountKey::new(self.inner.clone()) } @@ -308,6 +514,21 @@ impl Iam { /// /// [google.iam.admin.v1.IAM.EnableServiceAccountKey]: crate::client::Iam::enable_service_account_key /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .disable_service_account_key() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn disable_service_account_key(&self) -> super::builder::iam::DisableServiceAccountKey { super::builder::iam::DisableServiceAccountKey::new(self.inner.clone()) } @@ -315,6 +536,21 @@ impl Iam { /// Enable a [ServiceAccountKey][google.iam.admin.v1.ServiceAccountKey]. /// /// [google.iam.admin.v1.ServiceAccountKey]: crate::model::ServiceAccountKey + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// client + /// .enable_service_account_key() + /// /* set fields */ + /// .send() + /// .await?; + /// Ok(()) + /// } + /// ``` pub fn enable_service_account_key(&self) -> super::builder::iam::EnableServiceAccountKey { super::builder::iam::EnableServiceAccountKey::new(self.inner.clone()) } @@ -329,6 +565,22 @@ impl Iam { /// Signs a blob using the system-managed private key for a [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .sign_blob() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` #[deprecated] pub fn sign_blob(&self) -> super::builder::iam::SignBlob { super::builder::iam::SignBlob::new(self.inner.clone()) @@ -345,6 +597,22 @@ impl Iam { /// [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .sign_jwt() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` #[deprecated] pub fn sign_jwt(&self) -> super::builder::iam::SignJwt { super::builder::iam::SignJwt::new(self.inner.clone()) @@ -362,6 +630,22 @@ impl Iam { /// method. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .get_iam_policy() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_iam_policy(&self) -> super::builder::iam::GetIamPolicy { super::builder::iam::GetIamPolicy::new(self.inner.clone()) } @@ -387,6 +671,22 @@ impl Iam { /// resources](https://cloud.google.com/iam/help/access/manage-other-resources). /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .set_iam_policy() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn set_iam_policy(&self) -> super::builder::iam::SetIamPolicy { super::builder::iam::SetIamPolicy::new(self.inner.clone()) } @@ -395,6 +695,22 @@ impl Iam { /// [ServiceAccount][google.iam.admin.v1.ServiceAccount]. /// /// [google.iam.admin.v1.ServiceAccount]: crate::model::ServiceAccount + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .test_iam_permissions() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn test_iam_permissions(&self) -> super::builder::iam::TestIamPermissions { super::builder::iam::TestIamPermissions::new(self.inner.clone()) } @@ -417,6 +733,22 @@ impl Iam { /// Gets the definition of a [Role][google.iam.admin.v1.Role]. /// /// [google.iam.admin.v1.Role]: crate::model::Role + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .get_role() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn get_role(&self) -> super::builder::iam::GetRole { super::builder::iam::GetRole::new(self.inner.clone()) } @@ -424,6 +756,22 @@ impl Iam { /// Creates a new custom [Role][google.iam.admin.v1.Role]. /// /// [google.iam.admin.v1.Role]: crate::model::Role + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .create_role() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn create_role(&self) -> super::builder::iam::CreateRole { super::builder::iam::CreateRole::new(self.inner.clone()) } @@ -431,6 +779,22 @@ impl Iam { /// Updates the definition of a custom [Role][google.iam.admin.v1.Role]. /// /// [google.iam.admin.v1.Role]: crate::model::Role + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .update_role() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn update_role(&self) -> super::builder::iam::UpdateRole { super::builder::iam::UpdateRole::new(self.inner.clone()) } @@ -456,6 +820,22 @@ impl Iam { /// [google.iam.admin.v1.IAM.ListRoles]: crate::client::Iam::list_roles /// [google.iam.admin.v1.Role]: crate::model::Role /// [google.iam.v1.Policy]: iam_v1::model::Policy + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .delete_role() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn delete_role(&self) -> super::builder::iam::DeleteRole { super::builder::iam::DeleteRole::new(self.inner.clone()) } @@ -463,6 +843,22 @@ impl Iam { /// Undeletes a custom [Role][google.iam.admin.v1.Role]. /// /// [google.iam.admin.v1.Role]: crate::model::Role + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .undelete_role() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn undelete_role(&self) -> super::builder::iam::UndeleteRole { super::builder::iam::UndeleteRole::new(self.inner.clone()) } @@ -479,6 +875,22 @@ impl Iam { /// /// To learn more about audit logs, see the [Logging /// documentation](https://cloud.google.com/logging/docs/audit). + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .query_auditable_services() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn query_auditable_services(&self) -> super::builder::iam::QueryAuditableServices { super::builder::iam::QueryAuditableServices::new(self.inner.clone()) } @@ -491,6 +903,22 @@ impl Iam { /// even if the linter detects an issue in the IAM policy. /// /// [google.iam.v1.Binding.condition]: iam_v1::model::Binding::condition + /// + /// # Example + /// ``` + /// # use google_cloud_iam_admin_v1::client::Iam; + /// async fn sample( + /// client: &Iam + /// ) -> gax::Result<()> { + /// let response = client + /// .lint_policy() + /// /* set fields */ + /// .send() + /// .await?; + /// println!("response {:?}", response); + /// Ok(()) + /// } + /// ``` pub fn lint_policy(&self) -> super::builder::iam::LintPolicy { super::builder::iam::LintPolicy::new(self.inner.clone()) }