// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated by the Codegen C++ plugin.
// If you make any local changes, they will be lost.
// source: google/cloud/financialservices/v1/service.proto

#include "google/cloud/financialservices/v1/internal/aml_metadata_decorator.h"
#include "google/cloud/grpc_options.h"
#include "google/cloud/internal/absl_str_cat_quiet.h"
#include "google/cloud/internal/api_client_header.h"
#include "google/cloud/internal/url_encode.h"
#include "google/cloud/status_or.h"
#include <google/cloud/financialservices/v1/service.grpc.pb.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>

namespace google {
namespace cloud {
namespace financialservices_v1_internal {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

AMLMetadata::AMLMetadata(std::shared_ptr<AMLStub> child,
                         std::multimap<std::string, std::string> fixed_metadata,
                         std::string api_client_header)
    : child_(std::move(child)),
      fixed_metadata_(std::move(fixed_metadata)),
      api_client_header_(
          api_client_header.empty()
              ? google::cloud::internal::GeneratedLibClientHeader()
              : std::move(api_client_header)) {}

StatusOr<google::cloud::financialservices::v1::ListInstancesResponse>
AMLMetadata::ListInstances(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListInstancesRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListInstances(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::Instance>
AMLMetadata::GetInstance(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetInstanceRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetInstance(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncCreateInstance(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreateInstanceRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreateInstance(cq, std::move(context), std::move(options),
                                     request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreateInstance(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreateInstanceRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreateInstance(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncUpdateInstance(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdateInstanceRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("instance.name=",
                           internal::UrlEncode(request.instance().name())));
  return child_->AsyncUpdateInstance(cq, std::move(context), std::move(options),
                                     request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdateInstance(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdateInstanceRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("instance.name=",
                           internal::UrlEncode(request.instance().name())));
  return child_->UpdateInstance(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncDeleteInstance(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeleteInstanceRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeleteInstance(cq, std::move(context), std::move(options),
                                     request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeleteInstance(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeleteInstanceRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteInstance(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncImportRegisteredParties(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::ImportRegisteredPartiesRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncImportRegisteredParties(cq, std::move(context),
                                              std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::ImportRegisteredParties(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::ImportRegisteredPartiesRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->ImportRegisteredParties(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncExportRegisteredParties(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::ExportRegisteredPartiesRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncExportRegisteredParties(cq, std::move(context),
                                              std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::ExportRegisteredParties(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::ExportRegisteredPartiesRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->ExportRegisteredParties(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListDatasetsResponse>
AMLMetadata::ListDatasets(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListDatasetsRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListDatasets(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::Dataset> AMLMetadata::GetDataset(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetDatasetRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetDataset(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncCreateDataset(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreateDatasetRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreateDataset(cq, std::move(context), std::move(options),
                                    request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreateDataset(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreateDatasetRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreateDataset(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncUpdateDataset(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdateDatasetRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("dataset.name=",
                           internal::UrlEncode(request.dataset().name())));
  return child_->AsyncUpdateDataset(cq, std::move(context), std::move(options),
                                    request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdateDataset(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdateDatasetRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("dataset.name=",
                           internal::UrlEncode(request.dataset().name())));
  return child_->UpdateDataset(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncDeleteDataset(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeleteDatasetRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeleteDataset(cq, std::move(context), std::move(options),
                                    request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeleteDataset(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeleteDatasetRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteDataset(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListModelsResponse>
AMLMetadata::ListModels(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListModelsRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListModels(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::Model> AMLMetadata::GetModel(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetModelRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetModel(context, options, request);
}

future<StatusOr<google::longrunning::Operation>> AMLMetadata::AsyncCreateModel(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreateModelRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreateModel(cq, std::move(context), std::move(options),
                                  request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreateModel(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreateModelRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreateModel(context, options, request);
}

future<StatusOr<google::longrunning::Operation>> AMLMetadata::AsyncUpdateModel(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdateModelRequest const& request) {
  SetMetadata(
      *context, *options,
      absl::StrCat("model.name=", internal::UrlEncode(request.model().name())));
  return child_->AsyncUpdateModel(cq, std::move(context), std::move(options),
                                  request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdateModel(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdateModelRequest const& request) {
  SetMetadata(
      context, options,
      absl::StrCat("model.name=", internal::UrlEncode(request.model().name())));
  return child_->UpdateModel(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncExportModelMetadata(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::ExportModelMetadataRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("model=", internal::UrlEncode(request.model())));
  return child_->AsyncExportModelMetadata(cq, std::move(context),
                                          std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::ExportModelMetadata(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::ExportModelMetadataRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("model=", internal::UrlEncode(request.model())));
  return child_->ExportModelMetadata(context, options, request);
}

future<StatusOr<google::longrunning::Operation>> AMLMetadata::AsyncDeleteModel(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeleteModelRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeleteModel(cq, std::move(context), std::move(options),
                                  request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeleteModel(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeleteModelRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteModel(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListEngineConfigsResponse>
AMLMetadata::ListEngineConfigs(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListEngineConfigsRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListEngineConfigs(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::EngineConfig>
AMLMetadata::GetEngineConfig(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetEngineConfigRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetEngineConfig(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncCreateEngineConfig(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreateEngineConfigRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreateEngineConfig(cq, std::move(context),
                                         std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreateEngineConfig(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreateEngineConfigRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreateEngineConfig(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncUpdateEngineConfig(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdateEngineConfigRequest const&
        request) {
  SetMetadata(
      *context, *options,
      absl::StrCat("engine_config.name=",
                   internal::UrlEncode(request.engine_config().name())));
  return child_->AsyncUpdateEngineConfig(cq, std::move(context),
                                         std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdateEngineConfig(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdateEngineConfigRequest const&
        request) {
  SetMetadata(
      context, options,
      absl::StrCat("engine_config.name=",
                   internal::UrlEncode(request.engine_config().name())));
  return child_->UpdateEngineConfig(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncExportEngineConfigMetadata(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::
        ExportEngineConfigMetadataRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("engine_config=",
                           internal::UrlEncode(request.engine_config())));
  return child_->AsyncExportEngineConfigMetadata(cq, std::move(context),
                                                 std::move(options), request);
}

StatusOr<google::longrunning::Operation>
AMLMetadata::ExportEngineConfigMetadata(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::
        ExportEngineConfigMetadataRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("engine_config=",
                           internal::UrlEncode(request.engine_config())));
  return child_->ExportEngineConfigMetadata(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncDeleteEngineConfig(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeleteEngineConfigRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeleteEngineConfig(cq, std::move(context),
                                         std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeleteEngineConfig(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeleteEngineConfigRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteEngineConfig(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::EngineVersion>
AMLMetadata::GetEngineVersion(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetEngineVersionRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetEngineVersion(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListEngineVersionsResponse>
AMLMetadata::ListEngineVersions(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListEngineVersionsRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListEngineVersions(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListPredictionResultsResponse>
AMLMetadata::ListPredictionResults(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListPredictionResultsRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListPredictionResults(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::PredictionResult>
AMLMetadata::GetPredictionResult(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetPredictionResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetPredictionResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncCreatePredictionResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreatePredictionResultRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreatePredictionResult(cq, std::move(context),
                                             std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreatePredictionResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreatePredictionResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreatePredictionResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncUpdatePredictionResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdatePredictionResultRequest const&
        request) {
  SetMetadata(
      *context, *options,
      absl::StrCat("prediction_result.name=",
                   internal::UrlEncode(request.prediction_result().name())));
  return child_->AsyncUpdatePredictionResult(cq, std::move(context),
                                             std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdatePredictionResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdatePredictionResultRequest const&
        request) {
  SetMetadata(
      context, options,
      absl::StrCat("prediction_result.name=",
                   internal::UrlEncode(request.prediction_result().name())));
  return child_->UpdatePredictionResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncExportPredictionResultMetadata(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::
        ExportPredictionResultMetadataRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("prediction_result=",
                           internal::UrlEncode(request.prediction_result())));
  return child_->AsyncExportPredictionResultMetadata(
      cq, std::move(context), std::move(options), request);
}

StatusOr<google::longrunning::Operation>
AMLMetadata::ExportPredictionResultMetadata(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::
        ExportPredictionResultMetadataRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("prediction_result=",
                           internal::UrlEncode(request.prediction_result())));
  return child_->ExportPredictionResultMetadata(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncDeletePredictionResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeletePredictionResultRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeletePredictionResult(cq, std::move(context),
                                             std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeletePredictionResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeletePredictionResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeletePredictionResult(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::ListBacktestResultsResponse>
AMLMetadata::ListBacktestResults(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::ListBacktestResultsRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->ListBacktestResults(context, options, request);
}

StatusOr<google::cloud::financialservices::v1::BacktestResult>
AMLMetadata::GetBacktestResult(
    grpc::ClientContext& context, Options const& options,
    google::cloud::financialservices::v1::GetBacktestResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetBacktestResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncCreateBacktestResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::CreateBacktestResultRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->AsyncCreateBacktestResult(cq, std::move(context),
                                           std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::CreateBacktestResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::CreateBacktestResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("parent=", internal::UrlEncode(request.parent())));
  return child_->CreateBacktestResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncUpdateBacktestResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::UpdateBacktestResultRequest const&
        request) {
  SetMetadata(
      *context, *options,
      absl::StrCat("backtest_result.name=",
                   internal::UrlEncode(request.backtest_result().name())));
  return child_->AsyncUpdateBacktestResult(cq, std::move(context),
                                           std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::UpdateBacktestResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::UpdateBacktestResultRequest const&
        request) {
  SetMetadata(
      context, options,
      absl::StrCat("backtest_result.name=",
                   internal::UrlEncode(request.backtest_result().name())));
  return child_->UpdateBacktestResult(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncExportBacktestResultMetadata(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::
        ExportBacktestResultMetadataRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("backtest_result=",
                           internal::UrlEncode(request.backtest_result())));
  return child_->AsyncExportBacktestResultMetadata(cq, std::move(context),
                                                   std::move(options), request);
}

StatusOr<google::longrunning::Operation>
AMLMetadata::ExportBacktestResultMetadata(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::
        ExportBacktestResultMetadataRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("backtest_result=",
                           internal::UrlEncode(request.backtest_result())));
  return child_->ExportBacktestResultMetadata(context, options, request);
}

future<StatusOr<google::longrunning::Operation>>
AMLMetadata::AsyncDeleteBacktestResult(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::cloud::financialservices::v1::DeleteBacktestResultRequest const&
        request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncDeleteBacktestResult(cq, std::move(context),
                                           std::move(options), request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::DeleteBacktestResult(
    grpc::ClientContext& context, Options options,
    google::cloud::financialservices::v1::DeleteBacktestResultRequest const&
        request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteBacktestResult(context, options, request);
}

StatusOr<google::cloud::location::ListLocationsResponse>
AMLMetadata::ListLocations(
    grpc::ClientContext& context, Options const& options,
    google::cloud::location::ListLocationsRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->ListLocations(context, options, request);
}

StatusOr<google::cloud::location::Location> AMLMetadata::GetLocation(
    grpc::ClientContext& context, Options const& options,
    google::cloud::location::GetLocationRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetLocation(context, options, request);
}

StatusOr<google::longrunning::ListOperationsResponse>
AMLMetadata::ListOperations(
    grpc::ClientContext& context, Options const& options,
    google::longrunning::ListOperationsRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->ListOperations(context, options, request);
}

StatusOr<google::longrunning::Operation> AMLMetadata::GetOperation(
    grpc::ClientContext& context, Options const& options,
    google::longrunning::GetOperationRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->GetOperation(context, options, request);
}

Status AMLMetadata::DeleteOperation(
    grpc::ClientContext& context, Options const& options,
    google::longrunning::DeleteOperationRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->DeleteOperation(context, options, request);
}

Status AMLMetadata::CancelOperation(
    grpc::ClientContext& context, Options const& options,
    google::longrunning::CancelOperationRequest const& request) {
  SetMetadata(context, options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->CancelOperation(context, options, request);
}

future<StatusOr<google::longrunning::Operation>> AMLMetadata::AsyncGetOperation(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::longrunning::GetOperationRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncGetOperation(cq, std::move(context), std::move(options),
                                   request);
}

future<Status> AMLMetadata::AsyncCancelOperation(
    google::cloud::CompletionQueue& cq,
    std::shared_ptr<grpc::ClientContext> context,
    google::cloud::internal::ImmutableOptions options,
    google::longrunning::CancelOperationRequest const& request) {
  SetMetadata(*context, *options,
              absl::StrCat("name=", internal::UrlEncode(request.name())));
  return child_->AsyncCancelOperation(cq, std::move(context),
                                      std::move(options), request);
}

void AMLMetadata::SetMetadata(grpc::ClientContext& context,
                              Options const& options,
                              std::string const& request_params) {
  context.AddMetadata("x-goog-request-params", request_params);
  SetMetadata(context, options);
}

void AMLMetadata::SetMetadata(grpc::ClientContext& context,
                              Options const& options) {
  google::cloud::internal::SetMetadata(context, options, fixed_metadata_,
                                       api_client_header_);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace financialservices_v1_internal
}  // namespace cloud
}  // namespace google
