|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +// Generated by the Codegen C++ plugin. |
| 16 | +// If you make any local changes, they will be lost. |
| 17 | +// source: google/cloud/maintenance/api/v1/maintenance_service.proto |
| 18 | + |
| 19 | +#include "google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h" |
| 20 | +#include <google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h> |
| 21 | +#include <memory> |
| 22 | +#include <utility> |
| 23 | + |
| 24 | +namespace google { |
| 25 | +namespace cloud { |
| 26 | +namespace maintenance_api_v1_internal { |
| 27 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN |
| 28 | + |
| 29 | +MaintenanceAuth::MaintenanceAuth( |
| 30 | + std::shared_ptr<google::cloud::internal::GrpcAuthenticationStrategy> auth, |
| 31 | + std::shared_ptr<MaintenanceStub> child) |
| 32 | + : auth_(std::move(auth)), child_(std::move(child)) {} |
| 33 | + |
| 34 | +StatusOr<google::cloud::maintenance::api::v1::SummarizeMaintenancesResponse> |
| 35 | +MaintenanceAuth::SummarizeMaintenances( |
| 36 | + grpc::ClientContext& context, Options const& options, |
| 37 | + google::cloud::maintenance::api::v1::SummarizeMaintenancesRequest const& |
| 38 | + request) { |
| 39 | + auto status = auth_->ConfigureContext(context); |
| 40 | + if (!status.ok()) return status; |
| 41 | + return child_->SummarizeMaintenances(context, options, request); |
| 42 | +} |
| 43 | + |
| 44 | +StatusOr<google::cloud::maintenance::api::v1::ListResourceMaintenancesResponse> |
| 45 | +MaintenanceAuth::ListResourceMaintenances( |
| 46 | + grpc::ClientContext& context, Options const& options, |
| 47 | + google::cloud::maintenance::api::v1::ListResourceMaintenancesRequest const& |
| 48 | + request) { |
| 49 | + auto status = auth_->ConfigureContext(context); |
| 50 | + if (!status.ok()) return status; |
| 51 | + return child_->ListResourceMaintenances(context, options, request); |
| 52 | +} |
| 53 | + |
| 54 | +StatusOr<google::cloud::maintenance::api::v1::ResourceMaintenance> |
| 55 | +MaintenanceAuth::GetResourceMaintenance( |
| 56 | + grpc::ClientContext& context, Options const& options, |
| 57 | + google::cloud::maintenance::api::v1::GetResourceMaintenanceRequest const& |
| 58 | + request) { |
| 59 | + auto status = auth_->ConfigureContext(context); |
| 60 | + if (!status.ok()) return status; |
| 61 | + return child_->GetResourceMaintenance(context, options, request); |
| 62 | +} |
| 63 | + |
| 64 | +StatusOr<google::cloud::location::ListLocationsResponse> |
| 65 | +MaintenanceAuth::ListLocations( |
| 66 | + grpc::ClientContext& context, Options const& options, |
| 67 | + google::cloud::location::ListLocationsRequest const& request) { |
| 68 | + auto status = auth_->ConfigureContext(context); |
| 69 | + if (!status.ok()) return status; |
| 70 | + return child_->ListLocations(context, options, request); |
| 71 | +} |
| 72 | + |
| 73 | +StatusOr<google::cloud::location::Location> MaintenanceAuth::GetLocation( |
| 74 | + grpc::ClientContext& context, Options const& options, |
| 75 | + google::cloud::location::GetLocationRequest const& request) { |
| 76 | + auto status = auth_->ConfigureContext(context); |
| 77 | + if (!status.ok()) return status; |
| 78 | + return child_->GetLocation(context, options, request); |
| 79 | +} |
| 80 | + |
| 81 | +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END |
| 82 | +} // namespace maintenance_api_v1_internal |
| 83 | +} // namespace cloud |
| 84 | +} // namespace google |
0 commit comments