// Copyright 2023 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/gkebackup/v1/gkebackup.proto

#include "google/cloud/gkebackup/v1/backup_for_gke_client.h"
#include <memory>
#include <utility>

namespace google {
namespace cloud {
namespace gkebackup_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

BackupForGKEClient::BackupForGKEClient(
    std::shared_ptr<BackupForGKEConnection> connection, Options opts)
    : connection_(std::move(connection)),
      options_(
          internal::MergeOptions(std::move(opts), connection_->options())) {}
BackupForGKEClient::~BackupForGKEClient() = default;

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::CreateBackupPlan(
    std::string const& parent,
    google::cloud::gkebackup::v1::BackupPlan const& backup_plan,
    std::string const& backup_plan_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupPlanRequest request;
  request.set_parent(parent);
  *request.mutable_backup_plan() = backup_plan;
  request.set_backup_plan_id(backup_plan_id);
  return connection_->CreateBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateBackupPlan(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::BackupPlan const& backup_plan,
    std::string const& backup_plan_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupPlanRequest request;
  request.set_parent(parent);
  *request.mutable_backup_plan() = backup_plan;
  request.set_backup_plan_id(backup_plan_id);
  return connection_->CreateBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::CreateBackupPlan(
    google::cloud::gkebackup::v1::CreateBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateBackupPlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::CreateBackupPlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupPlan(operation);
}

StreamRange<google::cloud::gkebackup::v1::BackupPlan>
BackupForGKEClient::ListBackupPlans(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListBackupPlansRequest request;
  request.set_parent(parent);
  return connection_->ListBackupPlans(request);
}

StreamRange<google::cloud::gkebackup::v1::BackupPlan>
BackupForGKEClient::ListBackupPlans(
    google::cloud::gkebackup::v1::ListBackupPlansRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListBackupPlans(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::BackupPlan>
BackupForGKEClient::GetBackupPlan(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetBackupPlanRequest request;
  request.set_name(name);
  return connection_->GetBackupPlan(request);
}

StatusOr<google::cloud::gkebackup::v1::BackupPlan>
BackupForGKEClient::GetBackupPlan(
    google::cloud::gkebackup::v1::GetBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetBackupPlan(request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::UpdateBackupPlan(
    google::cloud::gkebackup::v1::BackupPlan const& backup_plan,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupPlanRequest request;
  *request.mutable_backup_plan() = backup_plan;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateBackupPlan(
    NoAwaitTag, google::cloud::gkebackup::v1::BackupPlan const& backup_plan,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupPlanRequest request;
  *request.mutable_backup_plan() = backup_plan;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::UpdateBackupPlan(
    google::cloud::gkebackup::v1::UpdateBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateBackupPlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupPlan>>
BackupForGKEClient::UpdateBackupPlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupPlan(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupPlan(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupPlanRequest request;
  request.set_name(name);
  return connection_->DeleteBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteBackupPlan(
    NoAwaitTag, std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupPlanRequest request;
  request.set_name(name);
  return connection_->DeleteBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupPlan(
    google::cloud::gkebackup::v1::DeleteBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupPlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteBackupPlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteBackupPlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupPlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupPlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupPlan(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::CreateBackupChannel(
    std::string const& parent,
    google::cloud::gkebackup::v1::BackupChannel const& backup_channel,
    std::string const& backup_channel_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupChannelRequest request;
  request.set_parent(parent);
  *request.mutable_backup_channel() = backup_channel;
  request.set_backup_channel_id(backup_channel_id);
  return connection_->CreateBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::CreateBackupChannel(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::BackupChannel const& backup_channel,
    std::string const& backup_channel_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupChannelRequest request;
  request.set_parent(parent);
  *request.mutable_backup_channel() = backup_channel;
  request.set_backup_channel_id(backup_channel_id);
  return connection_->CreateBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::CreateBackupChannel(
    google::cloud::gkebackup::v1::CreateBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::CreateBackupChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::CreateBackupChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackupChannel(operation);
}

StreamRange<google::cloud::gkebackup::v1::BackupChannel>
BackupForGKEClient::ListBackupChannels(std::string const& parent,
                                       Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListBackupChannelsRequest request;
  request.set_parent(parent);
  return connection_->ListBackupChannels(request);
}

StreamRange<google::cloud::gkebackup::v1::BackupChannel>
BackupForGKEClient::ListBackupChannels(
    google::cloud::gkebackup::v1::ListBackupChannelsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListBackupChannels(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::BackupChannel>
BackupForGKEClient::GetBackupChannel(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetBackupChannelRequest request;
  request.set_name(name);
  return connection_->GetBackupChannel(request);
}

StatusOr<google::cloud::gkebackup::v1::BackupChannel>
BackupForGKEClient::GetBackupChannel(
    google::cloud::gkebackup::v1::GetBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetBackupChannel(request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::UpdateBackupChannel(
    google::cloud::gkebackup::v1::BackupChannel const& backup_channel,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupChannelRequest request;
  *request.mutable_backup_channel() = backup_channel;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::UpdateBackupChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::BackupChannel const& backup_channel,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupChannelRequest request;
  *request.mutable_backup_channel() = backup_channel;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::UpdateBackupChannel(
    google::cloud::gkebackup::v1::UpdateBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::UpdateBackupChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::BackupChannel>>
BackupForGKEClient::UpdateBackupChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackupChannel(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupChannel(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupChannelRequest request;
  request.set_name(name);
  return connection_->DeleteBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::DeleteBackupChannel(NoAwaitTag, std::string const& name,
                                        Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupChannelRequest request;
  request.set_name(name);
  return connection_->DeleteBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupChannel(
    google::cloud::gkebackup::v1::DeleteBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::DeleteBackupChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteBackupChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackupChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackupChannel(operation);
}

StreamRange<google::cloud::gkebackup::v1::BackupPlanBinding>
BackupForGKEClient::ListBackupPlanBindings(std::string const& parent,
                                           Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListBackupPlanBindingsRequest request;
  request.set_parent(parent);
  return connection_->ListBackupPlanBindings(request);
}

StreamRange<google::cloud::gkebackup::v1::BackupPlanBinding>
BackupForGKEClient::ListBackupPlanBindings(
    google::cloud::gkebackup::v1::ListBackupPlanBindingsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListBackupPlanBindings(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::BackupPlanBinding>
BackupForGKEClient::GetBackupPlanBinding(std::string const& name,
                                         Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetBackupPlanBindingRequest request;
  request.set_name(name);
  return connection_->GetBackupPlanBinding(request);
}

StatusOr<google::cloud::gkebackup::v1::BackupPlanBinding>
BackupForGKEClient::GetBackupPlanBinding(
    google::cloud::gkebackup::v1::GetBackupPlanBindingRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetBackupPlanBinding(request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::CreateBackup(
    std::string const& parent,
    google::cloud::gkebackup::v1::Backup const& backup,
    std::string const& backup_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupRequest request;
  request.set_parent(parent);
  *request.mutable_backup() = backup;
  request.set_backup_id(backup_id);
  return connection_->CreateBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateBackup(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::Backup const& backup,
    std::string const& backup_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateBackupRequest request;
  request.set_parent(parent);
  *request.mutable_backup() = backup;
  request.set_backup_id(backup_id);
  return connection_->CreateBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::CreateBackup(
    google::cloud::gkebackup::v1::CreateBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateBackup(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::CreateBackup(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateBackup(operation);
}

StreamRange<google::cloud::gkebackup::v1::Backup>
BackupForGKEClient::ListBackups(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListBackupsRequest request;
  request.set_parent(parent);
  return connection_->ListBackups(request);
}

StreamRange<google::cloud::gkebackup::v1::Backup>
BackupForGKEClient::ListBackups(
    google::cloud::gkebackup::v1::ListBackupsRequest request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListBackups(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::Backup> BackupForGKEClient::GetBackup(
    std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetBackupRequest request;
  request.set_name(name);
  return connection_->GetBackup(request);
}

StatusOr<google::cloud::gkebackup::v1::Backup> BackupForGKEClient::GetBackup(
    google::cloud::gkebackup::v1::GetBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetBackup(request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::UpdateBackup(
    google::cloud::gkebackup::v1::Backup const& backup,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupRequest request;
  *request.mutable_backup() = backup;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateBackup(
    NoAwaitTag, google::cloud::gkebackup::v1::Backup const& backup,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateBackupRequest request;
  *request.mutable_backup() = backup;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::UpdateBackup(
    google::cloud::gkebackup::v1::UpdateBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateBackup(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Backup>>
BackupForGKEClient::UpdateBackup(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateBackup(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackup(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupRequest request;
  request.set_name(name);
  return connection_->DeleteBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteBackup(
    NoAwaitTag, std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteBackupRequest request;
  request.set_name(name);
  return connection_->DeleteBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackup(
    google::cloud::gkebackup::v1::DeleteBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackup(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteBackup(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteBackup(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteBackup(operation);
}

StreamRange<google::cloud::gkebackup::v1::VolumeBackup>
BackupForGKEClient::ListVolumeBackups(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListVolumeBackupsRequest request;
  request.set_parent(parent);
  return connection_->ListVolumeBackups(request);
}

StreamRange<google::cloud::gkebackup::v1::VolumeBackup>
BackupForGKEClient::ListVolumeBackups(
    google::cloud::gkebackup::v1::ListVolumeBackupsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListVolumeBackups(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::VolumeBackup>
BackupForGKEClient::GetVolumeBackup(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetVolumeBackupRequest request;
  request.set_name(name);
  return connection_->GetVolumeBackup(request);
}

StatusOr<google::cloud::gkebackup::v1::VolumeBackup>
BackupForGKEClient::GetVolumeBackup(
    google::cloud::gkebackup::v1::GetVolumeBackupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetVolumeBackup(request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::CreateRestorePlan(
    std::string const& parent,
    google::cloud::gkebackup::v1::RestorePlan const& restore_plan,
    std::string const& restore_plan_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestorePlanRequest request;
  request.set_parent(parent);
  *request.mutable_restore_plan() = restore_plan;
  request.set_restore_plan_id(restore_plan_id);
  return connection_->CreateRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateRestorePlan(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::RestorePlan const& restore_plan,
    std::string const& restore_plan_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestorePlanRequest request;
  request.set_parent(parent);
  *request.mutable_restore_plan() = restore_plan;
  request.set_restore_plan_id(restore_plan_id);
  return connection_->CreateRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::CreateRestorePlan(
    google::cloud::gkebackup::v1::CreateRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateRestorePlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::CreateRestorePlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestorePlan(operation);
}

StreamRange<google::cloud::gkebackup::v1::RestorePlan>
BackupForGKEClient::ListRestorePlans(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListRestorePlansRequest request;
  request.set_parent(parent);
  return connection_->ListRestorePlans(request);
}

StreamRange<google::cloud::gkebackup::v1::RestorePlan>
BackupForGKEClient::ListRestorePlans(
    google::cloud::gkebackup::v1::ListRestorePlansRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListRestorePlans(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::RestorePlan>
BackupForGKEClient::GetRestorePlan(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetRestorePlanRequest request;
  request.set_name(name);
  return connection_->GetRestorePlan(request);
}

StatusOr<google::cloud::gkebackup::v1::RestorePlan>
BackupForGKEClient::GetRestorePlan(
    google::cloud::gkebackup::v1::GetRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRestorePlan(request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::UpdateRestorePlan(
    google::cloud::gkebackup::v1::RestorePlan const& restore_plan,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestorePlanRequest request;
  *request.mutable_restore_plan() = restore_plan;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateRestorePlan(
    NoAwaitTag, google::cloud::gkebackup::v1::RestorePlan const& restore_plan,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestorePlanRequest request;
  *request.mutable_restore_plan() = restore_plan;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::UpdateRestorePlan(
    google::cloud::gkebackup::v1::UpdateRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateRestorePlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestorePlan>>
BackupForGKEClient::UpdateRestorePlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestorePlan(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestorePlan(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestorePlanRequest request;
  request.set_name(name);
  return connection_->DeleteRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteRestorePlan(
    NoAwaitTag, std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestorePlanRequest request;
  request.set_name(name);
  return connection_->DeleteRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestorePlan(
    google::cloud::gkebackup::v1::DeleteRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestorePlan(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteRestorePlan(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteRestorePlanRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestorePlan(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestorePlan(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestorePlan(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::CreateRestoreChannel(
    std::string const& parent,
    google::cloud::gkebackup::v1::RestoreChannel const& restore_channel,
    std::string const& restore_channel_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestoreChannelRequest request;
  request.set_parent(parent);
  *request.mutable_restore_channel() = restore_channel;
  request.set_restore_channel_id(restore_channel_id);
  return connection_->CreateRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::CreateRestoreChannel(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::RestoreChannel const& restore_channel,
    std::string const& restore_channel_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestoreChannelRequest request;
  request.set_parent(parent);
  *request.mutable_restore_channel() = restore_channel;
  request.set_restore_channel_id(restore_channel_id);
  return connection_->CreateRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::CreateRestoreChannel(
    google::cloud::gkebackup::v1::CreateRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::CreateRestoreChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::CreateRestoreChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestoreChannel(operation);
}

StreamRange<google::cloud::gkebackup::v1::RestoreChannel>
BackupForGKEClient::ListRestoreChannels(std::string const& parent,
                                        Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListRestoreChannelsRequest request;
  request.set_parent(parent);
  return connection_->ListRestoreChannels(request);
}

StreamRange<google::cloud::gkebackup::v1::RestoreChannel>
BackupForGKEClient::ListRestoreChannels(
    google::cloud::gkebackup::v1::ListRestoreChannelsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListRestoreChannels(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::RestoreChannel>
BackupForGKEClient::GetRestoreChannel(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetRestoreChannelRequest request;
  request.set_name(name);
  return connection_->GetRestoreChannel(request);
}

StatusOr<google::cloud::gkebackup::v1::RestoreChannel>
BackupForGKEClient::GetRestoreChannel(
    google::cloud::gkebackup::v1::GetRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRestoreChannel(request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::UpdateRestoreChannel(
    google::cloud::gkebackup::v1::RestoreChannel const& restore_channel,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestoreChannelRequest request;
  *request.mutable_restore_channel() = restore_channel;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::UpdateRestoreChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::RestoreChannel const& restore_channel,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestoreChannelRequest request;
  *request.mutable_restore_channel() = restore_channel;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::UpdateRestoreChannel(
    google::cloud::gkebackup::v1::UpdateRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::UpdateRestoreChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::RestoreChannel>>
BackupForGKEClient::UpdateRestoreChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestoreChannel(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestoreChannel(std::string const& name,
                                         Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestoreChannelRequest request;
  request.set_name(name);
  return connection_->DeleteRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::DeleteRestoreChannel(NoAwaitTag, std::string const& name,
                                         Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestoreChannelRequest request;
  request.set_name(name);
  return connection_->DeleteRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestoreChannel(
    google::cloud::gkebackup::v1::DeleteRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestoreChannel(request);
}

StatusOr<google::longrunning::Operation>
BackupForGKEClient::DeleteRestoreChannel(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteRestoreChannelRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestoreChannel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestoreChannel(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestoreChannel(operation);
}

StreamRange<google::cloud::gkebackup::v1::RestorePlanBinding>
BackupForGKEClient::ListRestorePlanBindings(std::string const& parent,
                                            Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListRestorePlanBindingsRequest request;
  request.set_parent(parent);
  return connection_->ListRestorePlanBindings(request);
}

StreamRange<google::cloud::gkebackup::v1::RestorePlanBinding>
BackupForGKEClient::ListRestorePlanBindings(
    google::cloud::gkebackup::v1::ListRestorePlanBindingsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListRestorePlanBindings(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::RestorePlanBinding>
BackupForGKEClient::GetRestorePlanBinding(std::string const& name,
                                          Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetRestorePlanBindingRequest request;
  request.set_name(name);
  return connection_->GetRestorePlanBinding(request);
}

StatusOr<google::cloud::gkebackup::v1::RestorePlanBinding>
BackupForGKEClient::GetRestorePlanBinding(
    google::cloud::gkebackup::v1::GetRestorePlanBindingRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRestorePlanBinding(request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::CreateRestore(
    std::string const& parent,
    google::cloud::gkebackup::v1::Restore const& restore,
    std::string const& restore_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestoreRequest request;
  request.set_parent(parent);
  *request.mutable_restore() = restore;
  request.set_restore_id(restore_id);
  return connection_->CreateRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateRestore(
    NoAwaitTag, std::string const& parent,
    google::cloud::gkebackup::v1::Restore const& restore,
    std::string const& restore_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::CreateRestoreRequest request;
  request.set_parent(parent);
  *request.mutable_restore() = restore;
  request.set_restore_id(restore_id);
  return connection_->CreateRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::CreateRestore(
    google::cloud::gkebackup::v1::CreateRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::CreateRestore(
    NoAwaitTag,
    google::cloud::gkebackup::v1::CreateRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::CreateRestore(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRestore(operation);
}

StreamRange<google::cloud::gkebackup::v1::Restore>
BackupForGKEClient::ListRestores(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListRestoresRequest request;
  request.set_parent(parent);
  return connection_->ListRestores(request);
}

StreamRange<google::cloud::gkebackup::v1::Restore>
BackupForGKEClient::ListRestores(
    google::cloud::gkebackup::v1::ListRestoresRequest request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListRestores(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::Restore> BackupForGKEClient::GetRestore(
    std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetRestoreRequest request;
  request.set_name(name);
  return connection_->GetRestore(request);
}

StatusOr<google::cloud::gkebackup::v1::Restore> BackupForGKEClient::GetRestore(
    google::cloud::gkebackup::v1::GetRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRestore(request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::UpdateRestore(
    google::cloud::gkebackup::v1::Restore const& restore,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestoreRequest request;
  *request.mutable_restore() = restore;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateRestore(
    NoAwaitTag, google::cloud::gkebackup::v1::Restore const& restore,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::UpdateRestoreRequest request;
  *request.mutable_restore() = restore;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::UpdateRestore(
    google::cloud::gkebackup::v1::UpdateRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::UpdateRestore(
    NoAwaitTag,
    google::cloud::gkebackup::v1::UpdateRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::Restore>>
BackupForGKEClient::UpdateRestore(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRestore(operation);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestore(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestoreRequest request;
  request.set_name(name);
  return connection_->DeleteRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteRestore(
    NoAwaitTag, std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::DeleteRestoreRequest request;
  request.set_name(name);
  return connection_->DeleteRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestore(
    google::cloud::gkebackup::v1::DeleteRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestore(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::DeleteRestore(
    NoAwaitTag,
    google::cloud::gkebackup::v1::DeleteRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestore(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::gkebackup::v1::OperationMetadata>>
BackupForGKEClient::DeleteRestore(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRestore(operation);
}

StreamRange<google::cloud::gkebackup::v1::VolumeRestore>
BackupForGKEClient::ListVolumeRestores(std::string const& parent,
                                       Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::ListVolumeRestoresRequest request;
  request.set_parent(parent);
  return connection_->ListVolumeRestores(request);
}

StreamRange<google::cloud::gkebackup::v1::VolumeRestore>
BackupForGKEClient::ListVolumeRestores(
    google::cloud::gkebackup::v1::ListVolumeRestoresRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListVolumeRestores(std::move(request));
}

StatusOr<google::cloud::gkebackup::v1::VolumeRestore>
BackupForGKEClient::GetVolumeRestore(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetVolumeRestoreRequest request;
  request.set_name(name);
  return connection_->GetVolumeRestore(request);
}

StatusOr<google::cloud::gkebackup::v1::VolumeRestore>
BackupForGKEClient::GetVolumeRestore(
    google::cloud::gkebackup::v1::GetVolumeRestoreRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetVolumeRestore(request);
}

StatusOr<google::cloud::gkebackup::v1::GetBackupIndexDownloadUrlResponse>
BackupForGKEClient::GetBackupIndexDownloadUrl(std::string const& backup,
                                              Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::gkebackup::v1::GetBackupIndexDownloadUrlRequest request;
  request.set_backup(backup);
  return connection_->GetBackupIndexDownloadUrl(request);
}

StatusOr<google::cloud::gkebackup::v1::GetBackupIndexDownloadUrlResponse>
BackupForGKEClient::GetBackupIndexDownloadUrl(
    google::cloud::gkebackup::v1::GetBackupIndexDownloadUrlRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetBackupIndexDownloadUrl(request);
}

StreamRange<google::cloud::location::Location>
BackupForGKEClient::ListLocations(
    google::cloud::location::ListLocationsRequest request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListLocations(std::move(request));
}

StatusOr<google::cloud::location::Location> BackupForGKEClient::GetLocation(
    google::cloud::location::GetLocationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetLocation(request);
}

StatusOr<google::iam::v1::Policy> BackupForGKEClient::SetIamPolicy(
    google::iam::v1::SetIamPolicyRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->SetIamPolicy(request);
}

StatusOr<google::iam::v1::Policy> BackupForGKEClient::GetIamPolicy(
    google::iam::v1::GetIamPolicyRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetIamPolicy(request);
}

StatusOr<google::iam::v1::TestIamPermissionsResponse>
BackupForGKEClient::TestIamPermissions(
    google::iam::v1::TestIamPermissionsRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->TestIamPermissions(request);
}

StreamRange<google::longrunning::Operation> BackupForGKEClient::ListOperations(
    std::string const& name, std::string const& filter, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::longrunning::ListOperationsRequest request;
  request.set_name(name);
  request.set_filter(filter);
  return connection_->ListOperations(request);
}

StreamRange<google::longrunning::Operation> BackupForGKEClient::ListOperations(
    google::longrunning::ListOperationsRequest request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListOperations(std::move(request));
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::GetOperation(
    std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::longrunning::GetOperationRequest request;
  request.set_name(name);
  return connection_->GetOperation(request);
}

StatusOr<google::longrunning::Operation> BackupForGKEClient::GetOperation(
    google::longrunning::GetOperationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetOperation(request);
}

Status BackupForGKEClient::DeleteOperation(std::string const& name,
                                           Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::longrunning::DeleteOperationRequest request;
  request.set_name(name);
  return connection_->DeleteOperation(request);
}

Status BackupForGKEClient::DeleteOperation(
    google::longrunning::DeleteOperationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteOperation(request);
}

Status BackupForGKEClient::CancelOperation(std::string const& name,
                                           Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::longrunning::CancelOperationRequest request;
  request.set_name(name);
  return connection_->CancelOperation(request);
}

Status BackupForGKEClient::CancelOperation(
    google::longrunning::CancelOperationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CancelOperation(request);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace gkebackup_v1
}  // namespace cloud
}  // namespace google
