Skip to content

Commit 000bb23

Browse files
authored
cleanup(mixin): remove duplicated operations stub (#14838)
1 parent 04f67a7 commit 000bb23

File tree

533 files changed

+1501
-2391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

533 files changed

+1501
-2391
lines changed

generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ DefaultGoldenThingAdminStub::AsyncGetOperation(
433433
[this](grpc::ClientContext* context,
434434
google::longrunning::GetOperationRequest const& request,
435435
grpc::CompletionQueue* cq) {
436-
return operations_->AsyncGetOperation(context, request, cq);
436+
return operations_stub_->AsyncGetOperation(context, request, cq);
437437
},
438438
request, std::move(context));
439439
}
@@ -450,7 +450,7 @@ future<Status> DefaultGoldenThingAdminStub::AsyncCancelOperation(
450450
[this](grpc::ClientContext* context,
451451
google::longrunning::CancelOperationRequest const& request,
452452
grpc::CompletionQueue* cq) {
453-
return operations_->AsyncCancelOperation(context, request, cq);
453+
return operations_stub_->AsyncCancelOperation(context, request, cq);
454454
},
455455
request, std::move(context))
456456
.then([](future<StatusOr<google::protobuf::Empty>> f) {

generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,11 @@ class DefaultGoldenThingAdminStub : public GoldenThingAdminStub {
201201
public:
202202
DefaultGoldenThingAdminStub(
203203
std::unique_ptr<google::test::admin::database::v1::GoldenThingAdmin::StubInterface> grpc_stub,
204-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub,
205204
std::unique_ptr<google::cloud::location::Locations::StubInterface> locations_stub,
206-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations)
205+
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub)
207206
: grpc_stub_(std::move(grpc_stub)),
208-
operations_stub_(std::move(operations_stub)),
209207
locations_stub_(std::move(locations_stub)),
210-
operations_(std::move(operations)) {}
208+
operations_stub_(std::move(operations_stub)) {}
211209

212210
StatusOr<google::test::admin::database::v1::ListDatabasesResponse> ListDatabases(
213211
grpc::ClientContext& context,
@@ -365,9 +363,8 @@ class DefaultGoldenThingAdminStub : public GoldenThingAdminStub {
365363

366364
private:
367365
std::unique_ptr<google::test::admin::database::v1::GoldenThingAdmin::StubInterface> grpc_stub_;
368-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
369366
std::unique_ptr<google::cloud::location::Locations::StubInterface> locations_stub_;
370-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_;
367+
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
371368
};
372369

373370
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END

generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ CreateDefaultGoldenThingAdminStub(
4646
auto channel = auth->CreateChannel(
4747
options.get<EndpointOption>(), internal::MakeChannelArguments(options));
4848
auto service_grpc_stub = google::test::admin::database::v1::GoldenThingAdmin::NewStub(channel);
49-
auto service_operations_stub = google::longrunning::Operations::NewStub(channel);
5049
auto service_locations_stub = google::cloud::location::Locations::NewStub(channel);
5150
std::shared_ptr<GoldenThingAdminStub> stub =
5251
std::make_shared<DefaultGoldenThingAdminStub>(
53-
std::move(service_grpc_stub), std::move(service_operations_stub), std::move(service_locations_stub),
52+
std::move(service_grpc_stub), std::move(service_locations_stub),
5453
google::longrunning::Operations::NewStub(channel));
5554

5655
if (auth->RequiresConfigureContext()) {

generator/integration_tests/golden/v1/internal/request_id_stub.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ DefaultRequestIdServiceStub::AsyncGetOperation(
119119
[this](grpc::ClientContext* context,
120120
google::longrunning::GetOperationRequest const& request,
121121
grpc::CompletionQueue* cq) {
122-
return operations_->AsyncGetOperation(context, request, cq);
122+
return operations_stub_->AsyncGetOperation(context, request, cq);
123123
},
124124
request, std::move(context));
125125
}
@@ -136,7 +136,7 @@ future<Status> DefaultRequestIdServiceStub::AsyncCancelOperation(
136136
[this](grpc::ClientContext* context,
137137
google::longrunning::CancelOperationRequest const& request,
138138
grpc::CompletionQueue* cq) {
139-
return operations_->AsyncCancelOperation(context, request, cq);
139+
return operations_stub_->AsyncCancelOperation(context, request, cq);
140140
},
141141
request, std::move(context))
142142
.then([](future<StatusOr<google::protobuf::Empty>> f) {

generator/integration_tests/golden/v1/internal/request_id_stub.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ class DefaultRequestIdServiceStub : public RequestIdServiceStub {
8383
public:
8484
DefaultRequestIdServiceStub(
8585
std::unique_ptr<google::test::requestid::v1::RequestIdService::StubInterface> grpc_stub,
86-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations)
86+
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub)
8787
: grpc_stub_(std::move(grpc_stub)),
88-
operations_(std::move(operations)) {}
88+
operations_stub_(std::move(operations_stub)) {}
8989

9090
StatusOr<google::test::requestid::v1::Foo> CreateFoo(
9191
grpc::ClientContext& context,
@@ -128,7 +128,7 @@ class DefaultRequestIdServiceStub : public RequestIdServiceStub {
128128

129129
private:
130130
std::unique_ptr<google::test::requestid::v1::RequestIdService::StubInterface> grpc_stub_;
131-
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_;
131+
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
132132
};
133133

134134
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END

0 commit comments

Comments
 (0)