From 4b92ba797cb9c073852997aca3d9683f25c04960 Mon Sep 17 00:00:00 2001 From: Sereana Seim Date: Wed, 29 Apr 2026 10:53:11 -0700 Subject: [PATCH 1/3] cleanup: remove line wrapping for region tags so they can be embedded in docs --- ...ge_bucket_encryption_enforcement_samples.cc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc index e98feb19269ab..5011ef62ff5c6 100644 --- a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc @@ -25,8 +25,7 @@ namespace { void GetBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [get bucket encryption enforcement config] [START - //! storage_get_bucket_encryption_enforcement_config] + //! [get bucket encryption enforcement config] [START storage_get_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& bucket_name) { @@ -65,16 +64,14 @@ void GetBucketEncryptionEnforcementConfig( encryption.customer_supplied_encryption_enforcement_config) << "\n"; } - //! [get bucket encryption enforcement config] [END - //! storage_get_bucket_encryption_enforcement_config] + //! [get bucket encryption enforcement config] [END storage_get_bucket_encryption_enforcement_config] (std::move(client), argv.at(0)); } void SetBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [set bucket encryption enforcement config] [START - //! storage_set_bucket_encryption_enforcement_config] + //! [set bucket encryption enforcement config] [START storage_set_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& project_id, @@ -127,16 +124,14 @@ void SetBucketEncryptionEnforcementConfig( << create_bucket("rc-" + bucket_name, csek_encryption)->name() << " created with a policy to restrict CSEK.\n"; } - //! [set bucket encryption enforcement config] [END - //! storage_set_bucket_encryption_enforcement_config] + //! [set bucket encryption enforcement config] [END storage_set_bucket_encryption_enforcement_config] (std::move(client), argv.at(0), argv.at(1)); } void UpdateBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [update bucket encryption enforcement config] [START - //! storage_update_bucket_encryption_enforcement_config] + //! [update bucket encryption enforcement config] [START storage_update_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& bucket_name) { @@ -171,8 +166,7 @@ void UpdateBucketEncryptionEnforcementConfig( << "GMEK is now fully restricted, and CMEK enforcement has been " "removed.\n"; } - //! [update bucket encryption enforcement config] [END - //! storage_update_bucket_encryption_enforcement_config] + //! [update bucket encryption enforcement config] [END storage_update_bucket_encryption_enforcement_config] (std::move(client), argv.at(0)); } From 8fc21da93283f85a5990996412041ab7b8b1d396 Mon Sep 17 00:00:00 2001 From: Sereana Seim Date: Wed, 6 May 2026 15:44:52 -0700 Subject: [PATCH 2/3] Split comments onto separate lines --- ...ge_bucket_encryption_enforcement_samples.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc index 5011ef62ff5c6..ffa9dd11aca68 100644 --- a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc @@ -25,7 +25,8 @@ namespace { void GetBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [get bucket encryption enforcement config] [START storage_get_bucket_encryption_enforcement_config] + //! [get bucket encryption enforcement config] + //! [START storage_get_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& bucket_name) { @@ -64,14 +65,16 @@ void GetBucketEncryptionEnforcementConfig( encryption.customer_supplied_encryption_enforcement_config) << "\n"; } - //! [get bucket encryption enforcement config] [END storage_get_bucket_encryption_enforcement_config] + //! [get bucket encryption enforcement config] + //! [END storage_get_bucket_encryption_enforcement_config] (std::move(client), argv.at(0)); } void SetBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [set bucket encryption enforcement config] [START storage_set_bucket_encryption_enforcement_config] + //! [set bucket encryption enforcement config] + //! [START storage_set_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& project_id, @@ -124,14 +127,16 @@ void SetBucketEncryptionEnforcementConfig( << create_bucket("rc-" + bucket_name, csek_encryption)->name() << " created with a policy to restrict CSEK.\n"; } - //! [set bucket encryption enforcement config] [END storage_set_bucket_encryption_enforcement_config] + //! [set bucket encryption enforcement config] + //! [END storage_set_bucket_encryption_enforcement_config] (std::move(client), argv.at(0), argv.at(1)); } void UpdateBucketEncryptionEnforcementConfig( google::cloud::storage::Client client, std::vector const& argv) { - //! [update bucket encryption enforcement config] [START storage_update_bucket_encryption_enforcement_config] + //! [update bucket encryption enforcement config] + //! [START storage_update_bucket_encryption_enforcement_config] namespace gcs = ::google::cloud::storage; using ::google::cloud::StatusOr; [](gcs::Client client, std::string const& bucket_name) { @@ -166,7 +171,8 @@ void UpdateBucketEncryptionEnforcementConfig( << "GMEK is now fully restricted, and CMEK enforcement has been " "removed.\n"; } - //! [update bucket encryption enforcement config] [END storage_update_bucket_encryption_enforcement_config] + //! [update bucket encryption enforcement config] + //! [END storage_update_bucket_encryption_enforcement_config] (std::move(client), argv.at(0)); } From 2f77c37b2c56170c24de129f45fa864524d45d85 Mon Sep 17 00:00:00 2001 From: Sereana Seim Date: Wed, 6 May 2026 15:50:49 -0700 Subject: [PATCH 3/3] Update storage_bucket_encryption_enforcement_samples.cc --- .../storage_bucket_encryption_enforcement_samples.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc index ffa9dd11aca68..274fd25f0aa25 100644 --- a/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_encryption_enforcement_samples.cc @@ -65,8 +65,8 @@ void GetBucketEncryptionEnforcementConfig( encryption.customer_supplied_encryption_enforcement_config) << "\n"; } - //! [get bucket encryption enforcement config] //! [END storage_get_bucket_encryption_enforcement_config] + //! [get bucket encryption enforcement config] (std::move(client), argv.at(0)); } @@ -127,8 +127,8 @@ void SetBucketEncryptionEnforcementConfig( << create_bucket("rc-" + bucket_name, csek_encryption)->name() << " created with a policy to restrict CSEK.\n"; } - //! [set bucket encryption enforcement config] //! [END storage_set_bucket_encryption_enforcement_config] + //! [set bucket encryption enforcement config] (std::move(client), argv.at(0), argv.at(1)); } @@ -171,8 +171,8 @@ void UpdateBucketEncryptionEnforcementConfig( << "GMEK is now fully restricted, and CMEK enforcement has been " "removed.\n"; } - //! [update bucket encryption enforcement config] //! [END storage_update_bucket_encryption_enforcement_config] + //! [update bucket encryption enforcement config] (std::move(client), argv.at(0)); }