Skip to content

Commit

Permalink
Remove invalid region tags. (#2432)
Browse files Browse the repository at this point in the history
This PR removes the region tags that do not exist in the internal
tracking tool. We still want the examples for the library reference, but
these examples will not be reference by cloud.google.com website.
  • Loading branch information
coryan committed Apr 8, 2019
1 parent 81e6c6a commit 13ab180
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
8 changes: 4 additions & 4 deletions google/cloud/storage/examples/storage_bucket_acl_samples.cc
Expand Up @@ -78,7 +78,7 @@ void CreateBucketAcl(google::cloud::storage::Client client, int& argc,
auto bucket_name = ConsumeArg(argc, argv);
auto entity = ConsumeArg(argc, argv);
auto role = ConsumeArg(argc, argv);
//! [create bucket acl] [START storage_create_bucket_acl]
//! [create bucket acl]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name, std::string entity,
Expand All @@ -95,7 +95,7 @@ void CreateBucketAcl(google::cloud::storage::Client client, int& argc,
<< "\n"
<< "Full attributes: " << *bucket_acl << "\n";
}
//! [create bucket acl] [END storage_create_bucket_acl]
//! [create bucket acl]
(std::move(client), bucket_name, entity, role);
}

Expand All @@ -106,7 +106,7 @@ void DeleteBucketAcl(google::cloud::storage::Client client, int& argc,
}
auto bucket_name = ConsumeArg(argc, argv);
auto entity = ConsumeArg(argc, argv);
//! [delete bucket acl] [START storage_delete_bucket_acl]
//! [delete bucket acl]
namespace gcs = google::cloud::storage;
[](gcs::Client client, std::string bucket_name, std::string entity) {
google::cloud::Status status = client.DeleteBucketAcl(bucket_name, entity);
Expand All @@ -118,7 +118,7 @@ void DeleteBucketAcl(google::cloud::storage::Client client, int& argc,
std::cout << "Deleted ACL entry for " << entity << " in bucket "
<< bucket_name << "\n";
}
//! [delete bucket acl] [END storage_delete_bucket_acl]
//! [delete bucket acl]
(std::move(client), bucket_name, entity);
}

Expand Down
6 changes: 2 additions & 4 deletions google/cloud/storage/examples/storage_bucket_samples.cc
Expand Up @@ -190,7 +190,7 @@ void GetBucketMetadata(google::cloud::storage::Client client, int& argc,
throw Usage{"get-bucket-metadata <bucket-name>"};
}
auto bucket_name = ConsumeArg(argc, argv);
//! [get bucket metadata] [START storage_get_bucket_metadata]
//! [get bucket metadata]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name) {
Expand All @@ -204,7 +204,7 @@ void GetBucketMetadata(google::cloud::storage::Client client, int& argc,
std::cout << "The metadata for bucket " << bucket_metadata->name() << " is "
<< *bucket_metadata << "\n";
}
//! [get bucket metadata] [END storage_get_bucket_metadata]
//! [get bucket metadata]
(std::move(client), bucket_name);
}

Expand Down Expand Up @@ -1414,7 +1414,6 @@ void RemoveStaticWebsiteConfiguration(google::cloud::storage::Client client,
}
auto bucket_name = ConsumeArg(argc, argv);
//! [remove bucket website configuration]
// [START storage_remove_bucket_website_configuration]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name) {
Expand Down Expand Up @@ -1444,7 +1443,6 @@ void RemoveStaticWebsiteConfiguration(google::cloud::storage::Client client,
<< "\nThis is unexpected, and may indicate that another"
<< " application has modified the bucket concurrently.\n";
}
// [END storage_remove_bucket_website_configuration]
//! [remove bucket website configuration]
(std::move(client), bucket_name);
}
Expand Down
Expand Up @@ -50,7 +50,7 @@ void ListDefaultObjectAcl(google::cloud::storage::Client client, int& argc,
throw Usage{"list-default-object-acl <bucket-name>"};
}
auto bucket_name = ConsumeArg(argc, argv);
//! [list default object acl] [START storage_print_bucket_default_acl]
//! [list default object acl]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name) {
Expand All @@ -66,7 +66,7 @@ void ListDefaultObjectAcl(google::cloud::storage::Client client, int& argc,
std::cout << acl.role() << ":" << acl.entity() << "\n";
}
}
//! [list default object acl] [END storage_print_bucket_default_acl]
//! [list default object acl]
(std::move(client), bucket_name);
}

Expand Down
12 changes: 6 additions & 6 deletions google/cloud/storage/examples/storage_object_acl_samples.cc
Expand Up @@ -82,7 +82,7 @@ void CreateObjectAcl(gcs::Client client, int& argc, char* argv[]) {
auto object_name = ConsumeArg(argc, argv);
auto entity = ConsumeArg(argc, argv);
auto role = ConsumeArg(argc, argv);
//! [create object acl] [START storage_create_file_acl]
//! [create object acl]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name, std::string object_name,
Expand All @@ -98,7 +98,7 @@ void CreateObjectAcl(gcs::Client client, int& argc, char* argv[]) {
<< object_acl->entity() << " on " << object_acl->object()
<< "\nFull attributes: " << *object_acl << "\n";
}
//! [create object acl] [END storage_create_file_acl]
//! [create object acl]
(std::move(client), bucket_name, object_name, entity, role);
}

Expand All @@ -109,7 +109,7 @@ void DeleteObjectAcl(gcs::Client client, int& argc, char* argv[]) {
auto bucket_name = ConsumeArg(argc, argv);
auto object_name = ConsumeArg(argc, argv);
auto entity = ConsumeArg(argc, argv);
//! [delete object acl] [START storage_delete_file_acl]
//! [delete object acl]
namespace gcs = google::cloud::storage;
[](gcs::Client client, std::string bucket_name, std::string object_name,
std::string entity) {
Expand All @@ -123,7 +123,7 @@ void DeleteObjectAcl(gcs::Client client, int& argc, char* argv[]) {
std::cout << "Deleted ACL entry for " << entity << " in object "
<< object_name << " in bucket " << bucket_name << "\n";
}
//! [delete object acl] [END storage_delete_file_acl]
//! [delete object acl]
(std::move(client), bucket_name, object_name, entity);
}

Expand Down Expand Up @@ -163,7 +163,7 @@ void UpdateObjectAcl(gcs::Client client, int& argc, char* argv[]) {
auto object_name = ConsumeArg(argc, argv);
auto entity = ConsumeArg(argc, argv);
auto role = ConsumeArg(argc, argv);
//! [update object acl] [START storage_update_file_acl]
//! [update object acl]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string bucket_name, std::string object_name,
Expand All @@ -188,7 +188,7 @@ void UpdateObjectAcl(gcs::Client client, int& argc, char* argv[]) {
<< updated_acl->object() << " in bucket " << updated_acl->bucket()
<< " is now " << *updated_acl << "\n";
}
//! [update object acl] [END storage_update_file_acl]
//! [update object acl]
(std::move(client), bucket_name, object_name, entity, role);
}

Expand Down
4 changes: 2 additions & 2 deletions google/cloud/storage/examples/storage_object_samples.cc
Expand Up @@ -100,7 +100,7 @@ void ListVersionedObjects(google::cloud::storage::Client client, int& argc,
throw Usage{"list-versioned-objects <bucket-name>"};
}
auto bucket_name = ConsumeArg(argc, argv);
//! [list versioned objects] [START storage_list_versioned_files]
//! [list versioned objects] [START storage_list_file_archived_generations]
namespace gcs = google::cloud::storage;
[](gcs::Client client, std::string bucket_name) {
for (auto&& object_metadata :
Expand All @@ -114,7 +114,7 @@ void ListVersionedObjects(google::cloud::storage::Client client, int& argc,
<< ", generation=" << object_metadata->generation() << "\n";
}
}
//! [list versioned objects] [END storage_list_versioned_files]
//! [list versioned objects] [END storage_list_file_archived_generations]
(std::move(client), bucket_name);
}

Expand Down
Expand Up @@ -49,7 +49,7 @@ void GetServiceAccount(google::cloud::storage::Client client, int& argc,
if (argc != 1) {
throw Usage{"get-service-account"};
}
//! [get service account] [START storage_get_service_account]
//! [get service account]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client) {
Expand All @@ -62,7 +62,7 @@ void GetServiceAccount(google::cloud::storage::Client client, int& argc,
std::cout << "The service account details are " << *service_account_details
<< "\n";
}
//! [get service account] [END storage_get_service_account]
//! [get service account]
(std::move(client));
}

Expand All @@ -73,7 +73,6 @@ void GetServiceAccountForProject(google::cloud::storage::Client client,
}
auto project_id = ConsumeArg(argc, argv);
//! [get service account for project]
// [START storage_get_service_account_for_project]
namespace gcs = google::cloud::storage;
using ::google::cloud::StatusOr;
[](gcs::Client client, std::string project_id) {
Expand All @@ -87,7 +86,6 @@ void GetServiceAccountForProject(google::cloud::storage::Client client,
std::cout << "The service account details for project " << project_id
<< " are " << *service_account_details << "\n";
}
// [END storage_get_service_account_for_project]
//! [get service account for project]
(std::move(client), project_id);
}
Expand Down

0 comments on commit 13ab180

Please sign in to comment.