File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
integration_tests/golden/internal Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1717// source: generator/integration_tests/test.proto
1818
1919#include " generator/integration_tests/golden/internal/golden_kitchen_sink_rest_stub.h"
20+ #include " google/cloud/common_options.h"
2021#include " google/cloud/internal/absl_str_cat_quiet.h"
2122#include " google/cloud/internal/rest_stub_helpers.h"
2223#include " google/cloud/status_or.h"
@@ -30,7 +31,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3031
3132DefaultGoldenKitchenSinkRestStub::DefaultGoldenKitchenSinkRestStub (Options options)
3233 : rest_client_(rest_internal::MakePooledRestClient(
33- " https://goldenkitchensink.googleapis.com " , options)),
34+ options.get<EndpointOption>() , options)),
3435 options_ (std::move(options)) {}
3536
3637DefaultGoldenKitchenSinkRestStub::DefaultGoldenKitchenSinkRestStub (
Original file line number Diff line number Diff line change 1717// source: generator/integration_tests/test.proto
1818
1919#include " generator/integration_tests/golden/internal/golden_thing_admin_rest_stub.h"
20+ #include " google/cloud/common_options.h"
2021#include " google/cloud/internal/absl_str_cat_quiet.h"
2122#include " google/cloud/internal/rest_stub_helpers.h"
2223#include " google/cloud/status_or.h"
@@ -31,7 +32,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3132
3233DefaultGoldenThingAdminRestStub::DefaultGoldenThingAdminRestStub (Options options)
3334 : rest_client_(rest_internal::MakePooledRestClient(
34- " https://test.googleapis.com " , options)),
35+ options.get<EndpointOption>() , options)),
3536 options_ (std::move(options)) {}
3637
3738DefaultGoldenThingAdminRestStub::DefaultGoldenThingAdminRestStub (
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ Status StubRestGenerator::GenerateCc() {
141141
142142 CcPrint (" \n " );
143143 CcLocalIncludes ({vars (" stub_rest_header_path" ),
144+ " google/cloud/common_options.h" ,
144145 " google/cloud/internal/absl_str_cat_quiet.h" ,
145146 " google/cloud/internal/rest_stub_helpers.h" ,
146147 " google/cloud/status_or.h" });
@@ -152,11 +153,10 @@ Status StubRestGenerator::GenerateCc() {
152153 auto result = CcOpenNamespaces (NamespaceType::kInternal );
153154 if (!result.ok ()) return result;
154155
155- // TODO(#10214): Emit code to check options for a potential endpoint override.
156156 CcPrint (R"""(
157157Default$stub_rest_class_name$::Default$stub_rest_class_name$(Options options)
158158 : rest_client_(rest_internal::MakePooledRestClient(
159- "https://$service_endpoint$" , options)),
159+ options.get<EndpointOption>() , options)),
160160 options_(std::move(options)) {}
161161
162162Default$stub_rest_class_name$::Default$stub_rest_class_name$(
You can’t perform that action at this time.
0 commit comments