// 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/configdelivery/v1/config_delivery.proto

#include "google/cloud/configdelivery/v1/config_delivery_client.h"
#include <memory>
#include <utility>

namespace google {
namespace cloud {
namespace configdelivery_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

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

StreamRange<google::cloud::configdelivery::v1::ResourceBundle>
ConfigDeliveryClient::ListResourceBundles(std::string const& parent,
                                          Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ListResourceBundlesRequest request;
  request.set_parent(parent);
  return connection_->ListResourceBundles(request);
}

StreamRange<google::cloud::configdelivery::v1::ResourceBundle>
ConfigDeliveryClient::ListResourceBundles(
    google::cloud::configdelivery::v1::ListResourceBundlesRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListResourceBundles(std::move(request));
}

StatusOr<google::cloud::configdelivery::v1::ResourceBundle>
ConfigDeliveryClient::GetResourceBundle(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::GetResourceBundleRequest request;
  request.set_name(name);
  return connection_->GetResourceBundle(request);
}

StatusOr<google::cloud::configdelivery::v1::ResourceBundle>
ConfigDeliveryClient::GetResourceBundle(
    google::cloud::configdelivery::v1::GetResourceBundleRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetResourceBundle(request);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::CreateResourceBundle(
    std::string const& parent,
    google::cloud::configdelivery::v1::ResourceBundle const& resource_bundle,
    std::string const& resource_bundle_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateResourceBundleRequest request;
  request.set_parent(parent);
  *request.mutable_resource_bundle() = resource_bundle;
  request.set_resource_bundle_id(resource_bundle_id);
  return connection_->CreateResourceBundle(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::CreateResourceBundle(
    NoAwaitTag, std::string const& parent,
    google::cloud::configdelivery::v1::ResourceBundle const& resource_bundle,
    std::string const& resource_bundle_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateResourceBundleRequest request;
  request.set_parent(parent);
  *request.mutable_resource_bundle() = resource_bundle;
  request.set_resource_bundle_id(resource_bundle_id);
  return connection_->CreateResourceBundle(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::CreateResourceBundle(
    google::cloud::configdelivery::v1::CreateResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateResourceBundle(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::CreateResourceBundle(
    NoAwaitTag,
    google::cloud::configdelivery::v1::CreateResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateResourceBundle(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::CreateResourceBundle(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateResourceBundle(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::UpdateResourceBundle(
    google::cloud::configdelivery::v1::ResourceBundle const& resource_bundle,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateResourceBundleRequest request;
  *request.mutable_resource_bundle() = resource_bundle;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateResourceBundle(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::UpdateResourceBundle(
    NoAwaitTag,
    google::cloud::configdelivery::v1::ResourceBundle const& resource_bundle,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateResourceBundleRequest request;
  *request.mutable_resource_bundle() = resource_bundle;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateResourceBundle(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::UpdateResourceBundle(
    google::cloud::configdelivery::v1::UpdateResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateResourceBundle(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::UpdateResourceBundle(
    NoAwaitTag,
    google::cloud::configdelivery::v1::UpdateResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateResourceBundle(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::ResourceBundle>>
ConfigDeliveryClient::UpdateResourceBundle(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateResourceBundle(operation);
}

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

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

future<StatusOr<google::cloud::configdelivery::v1::OperationMetadata>>
ConfigDeliveryClient::DeleteResourceBundle(
    google::cloud::configdelivery::v1::DeleteResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteResourceBundle(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::DeleteResourceBundle(
    NoAwaitTag,
    google::cloud::configdelivery::v1::DeleteResourceBundleRequest const&
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteResourceBundle(NoAwaitTag{}, request);
}

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

StreamRange<google::cloud::configdelivery::v1::FleetPackage>
ConfigDeliveryClient::ListFleetPackages(std::string const& parent,
                                        Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ListFleetPackagesRequest request;
  request.set_parent(parent);
  return connection_->ListFleetPackages(request);
}

StreamRange<google::cloud::configdelivery::v1::FleetPackage>
ConfigDeliveryClient::ListFleetPackages(
    google::cloud::configdelivery::v1::ListFleetPackagesRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListFleetPackages(std::move(request));
}

StatusOr<google::cloud::configdelivery::v1::FleetPackage>
ConfigDeliveryClient::GetFleetPackage(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::GetFleetPackageRequest request;
  request.set_name(name);
  return connection_->GetFleetPackage(request);
}

StatusOr<google::cloud::configdelivery::v1::FleetPackage>
ConfigDeliveryClient::GetFleetPackage(
    google::cloud::configdelivery::v1::GetFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetFleetPackage(request);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::CreateFleetPackage(
    std::string const& parent,
    google::cloud::configdelivery::v1::FleetPackage const& fleet_package,
    std::string const& fleet_package_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateFleetPackageRequest request;
  request.set_parent(parent);
  *request.mutable_fleet_package() = fleet_package;
  request.set_fleet_package_id(fleet_package_id);
  return connection_->CreateFleetPackage(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::CreateFleetPackage(
    NoAwaitTag, std::string const& parent,
    google::cloud::configdelivery::v1::FleetPackage const& fleet_package,
    std::string const& fleet_package_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateFleetPackageRequest request;
  request.set_parent(parent);
  *request.mutable_fleet_package() = fleet_package;
  request.set_fleet_package_id(fleet_package_id);
  return connection_->CreateFleetPackage(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::CreateFleetPackage(
    google::cloud::configdelivery::v1::CreateFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFleetPackage(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::CreateFleetPackage(
    NoAwaitTag,
    google::cloud::configdelivery::v1::CreateFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFleetPackage(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::CreateFleetPackage(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFleetPackage(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::UpdateFleetPackage(
    google::cloud::configdelivery::v1::FleetPackage const& fleet_package,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateFleetPackageRequest request;
  *request.mutable_fleet_package() = fleet_package;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateFleetPackage(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::UpdateFleetPackage(
    NoAwaitTag,
    google::cloud::configdelivery::v1::FleetPackage const& fleet_package,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateFleetPackageRequest request;
  *request.mutable_fleet_package() = fleet_package;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateFleetPackage(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::UpdateFleetPackage(
    google::cloud::configdelivery::v1::UpdateFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateFleetPackage(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::UpdateFleetPackage(
    NoAwaitTag,
    google::cloud::configdelivery::v1::UpdateFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateFleetPackage(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::FleetPackage>>
ConfigDeliveryClient::UpdateFleetPackage(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateFleetPackage(operation);
}

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

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

future<StatusOr<google::cloud::configdelivery::v1::OperationMetadata>>
ConfigDeliveryClient::DeleteFleetPackage(
    google::cloud::configdelivery::v1::DeleteFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteFleetPackage(request);
}

StatusOr<google::longrunning::Operation>
ConfigDeliveryClient::DeleteFleetPackage(
    NoAwaitTag,
    google::cloud::configdelivery::v1::DeleteFleetPackageRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteFleetPackage(NoAwaitTag{}, request);
}

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

StreamRange<google::cloud::configdelivery::v1::Release>
ConfigDeliveryClient::ListReleases(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ListReleasesRequest request;
  request.set_parent(parent);
  return connection_->ListReleases(request);
}

StreamRange<google::cloud::configdelivery::v1::Release>
ConfigDeliveryClient::ListReleases(
    google::cloud::configdelivery::v1::ListReleasesRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListReleases(std::move(request));
}

StatusOr<google::cloud::configdelivery::v1::Release>
ConfigDeliveryClient::GetRelease(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::GetReleaseRequest request;
  request.set_name(name);
  return connection_->GetRelease(request);
}

StatusOr<google::cloud::configdelivery::v1::Release>
ConfigDeliveryClient::GetRelease(
    google::cloud::configdelivery::v1::GetReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRelease(request);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::CreateRelease(
    std::string const& parent,
    google::cloud::configdelivery::v1::Release const& release,
    std::string const& release_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateReleaseRequest request;
  request.set_parent(parent);
  *request.mutable_release() = release;
  request.set_release_id(release_id);
  return connection_->CreateRelease(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::CreateRelease(
    NoAwaitTag, std::string const& parent,
    google::cloud::configdelivery::v1::Release const& release,
    std::string const& release_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateReleaseRequest request;
  request.set_parent(parent);
  *request.mutable_release() = release;
  request.set_release_id(release_id);
  return connection_->CreateRelease(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::CreateRelease(
    google::cloud::configdelivery::v1::CreateReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRelease(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::CreateRelease(
    NoAwaitTag,
    google::cloud::configdelivery::v1::CreateReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRelease(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::CreateRelease(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateRelease(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::UpdateRelease(
    google::cloud::configdelivery::v1::Release const& release,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateReleaseRequest request;
  *request.mutable_release() = release;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRelease(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::UpdateRelease(
    NoAwaitTag, google::cloud::configdelivery::v1::Release const& release,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateReleaseRequest request;
  *request.mutable_release() = release;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateRelease(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::UpdateRelease(
    google::cloud::configdelivery::v1::UpdateReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRelease(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::UpdateRelease(
    NoAwaitTag,
    google::cloud::configdelivery::v1::UpdateReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRelease(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Release>>
ConfigDeliveryClient::UpdateRelease(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateRelease(operation);
}

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

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

future<StatusOr<google::cloud::configdelivery::v1::OperationMetadata>>
ConfigDeliveryClient::DeleteRelease(
    google::cloud::configdelivery::v1::DeleteReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRelease(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::DeleteRelease(
    NoAwaitTag,
    google::cloud::configdelivery::v1::DeleteReleaseRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteRelease(NoAwaitTag{}, request);
}

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

StreamRange<google::cloud::configdelivery::v1::Variant>
ConfigDeliveryClient::ListVariants(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ListVariantsRequest request;
  request.set_parent(parent);
  return connection_->ListVariants(request);
}

StreamRange<google::cloud::configdelivery::v1::Variant>
ConfigDeliveryClient::ListVariants(
    google::cloud::configdelivery::v1::ListVariantsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListVariants(std::move(request));
}

StatusOr<google::cloud::configdelivery::v1::Variant>
ConfigDeliveryClient::GetVariant(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::GetVariantRequest request;
  request.set_name(name);
  return connection_->GetVariant(request);
}

StatusOr<google::cloud::configdelivery::v1::Variant>
ConfigDeliveryClient::GetVariant(
    google::cloud::configdelivery::v1::GetVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetVariant(request);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::CreateVariant(
    std::string const& parent,
    google::cloud::configdelivery::v1::Variant const& variant,
    std::string const& variant_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateVariantRequest request;
  request.set_parent(parent);
  *request.mutable_variant() = variant;
  request.set_variant_id(variant_id);
  return connection_->CreateVariant(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::CreateVariant(
    NoAwaitTag, std::string const& parent,
    google::cloud::configdelivery::v1::Variant const& variant,
    std::string const& variant_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::CreateVariantRequest request;
  request.set_parent(parent);
  *request.mutable_variant() = variant;
  request.set_variant_id(variant_id);
  return connection_->CreateVariant(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::CreateVariant(
    google::cloud::configdelivery::v1::CreateVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateVariant(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::CreateVariant(
    NoAwaitTag,
    google::cloud::configdelivery::v1::CreateVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateVariant(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::CreateVariant(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateVariant(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::UpdateVariant(
    google::cloud::configdelivery::v1::Variant const& variant,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateVariantRequest request;
  *request.mutable_variant() = variant;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateVariant(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::UpdateVariant(
    NoAwaitTag, google::cloud::configdelivery::v1::Variant const& variant,
    google::protobuf::FieldMask const& update_mask, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::UpdateVariantRequest request;
  *request.mutable_variant() = variant;
  *request.mutable_update_mask() = update_mask;
  return connection_->UpdateVariant(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::UpdateVariant(
    google::cloud::configdelivery::v1::UpdateVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateVariant(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::UpdateVariant(
    NoAwaitTag,
    google::cloud::configdelivery::v1::UpdateVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateVariant(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Variant>>
ConfigDeliveryClient::UpdateVariant(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->UpdateVariant(operation);
}

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

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

future<StatusOr<google::cloud::configdelivery::v1::OperationMetadata>>
ConfigDeliveryClient::DeleteVariant(
    google::cloud::configdelivery::v1::DeleteVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteVariant(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::DeleteVariant(
    NoAwaitTag,
    google::cloud::configdelivery::v1::DeleteVariantRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteVariant(NoAwaitTag{}, request);
}

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

StreamRange<google::cloud::configdelivery::v1::Rollout>
ConfigDeliveryClient::ListRollouts(std::string const& parent, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ListRolloutsRequest request;
  request.set_parent(parent);
  return connection_->ListRollouts(request);
}

StreamRange<google::cloud::configdelivery::v1::Rollout>
ConfigDeliveryClient::ListRollouts(
    google::cloud::configdelivery::v1::ListRolloutsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListRollouts(std::move(request));
}

StatusOr<google::cloud::configdelivery::v1::Rollout>
ConfigDeliveryClient::GetRollout(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::GetRolloutRequest request;
  request.set_name(name);
  return connection_->GetRollout(request);
}

StatusOr<google::cloud::configdelivery::v1::Rollout>
ConfigDeliveryClient::GetRollout(
    google::cloud::configdelivery::v1::GetRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetRollout(request);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::SuspendRollout(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::SuspendRolloutRequest request;
  request.set_name(name);
  return connection_->SuspendRollout(request);
}

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

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::SuspendRollout(
    google::cloud::configdelivery::v1::SuspendRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->SuspendRollout(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::SuspendRollout(
    NoAwaitTag,
    google::cloud::configdelivery::v1::SuspendRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->SuspendRollout(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::SuspendRollout(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->SuspendRollout(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::ResumeRollout(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::ResumeRolloutRequest request;
  request.set_name(name);
  return connection_->ResumeRollout(request);
}

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

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::ResumeRollout(
    google::cloud::configdelivery::v1::ResumeRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ResumeRollout(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::ResumeRollout(
    NoAwaitTag,
    google::cloud::configdelivery::v1::ResumeRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ResumeRollout(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::ResumeRollout(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ResumeRollout(operation);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::AbortRollout(std::string const& name, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::configdelivery::v1::AbortRolloutRequest request;
  request.set_name(name);
  return connection_->AbortRollout(request);
}

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

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::AbortRollout(
    google::cloud::configdelivery::v1::AbortRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->AbortRollout(request);
}

StatusOr<google::longrunning::Operation> ConfigDeliveryClient::AbortRollout(
    NoAwaitTag,
    google::cloud::configdelivery::v1::AbortRolloutRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->AbortRollout(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::configdelivery::v1::Rollout>>
ConfigDeliveryClient::AbortRollout(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->AbortRollout(operation);
}

StreamRange<google::cloud::location::Location>
ConfigDeliveryClient::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> ConfigDeliveryClient::GetLocation(
    google::cloud::location::GetLocationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetLocation(request);
}

StreamRange<google::longrunning::Operation>
ConfigDeliveryClient::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>
ConfigDeliveryClient::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> ConfigDeliveryClient::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> ConfigDeliveryClient::GetOperation(
    google::longrunning::GetOperationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetOperation(request);
}

Status ConfigDeliveryClient::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 ConfigDeliveryClient::DeleteOperation(
    google::longrunning::DeleteOperationRequest const& request, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteOperation(request);
}

Status ConfigDeliveryClient::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 ConfigDeliveryClient::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 configdelivery_v1
}  // namespace cloud
}  // namespace google
