diff --git a/generator/internal/scaffold_generator.cc b/generator/internal/scaffold_generator.cc index 6ca28772fd29b..0550e4f5abd66 100644 --- a/generator/internal/scaffold_generator.cc +++ b/generator/internal/scaffold_generator.cc @@ -868,13 +868,13 @@ void GenerateQuickstartSkeleton( // limitations under the License. #include "google/cloud/$library$/ EDIT HERE .h" +#include "google/cloud/project.h" #include #include int main(int argc, char* argv[]) try { - if (argc != 4) { - std::cerr << "Usage: " << argv[0] - << " project-id \n"; + if (argc != 2) { + std::cerr << "Usage: " << argv[0] << " project-id\n"; return 1; } @@ -882,7 +882,11 @@ int main(int argc, char* argv[]) try { auto client = $library$::Client( $library$::MakeConnection(/* EDIT HERE */)); - // EDIT HERE: add some code + auto const project = google::cloud::Project(argv[1]); + for (auto r : client.List/*EDIT HERE*/(project.FullName()) { + if (!r) throw std::runtime_error(r.status().message()); + std::cout << r->DebugString() << "\n"; + } return 0; } catch (std::exception const& ex) {