// 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/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.proto

#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_client.h"
#include <memory>
#include <utility>

namespace google {
namespace cloud {
namespace compute_interconnect_attachment_groups_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

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

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::DeleteInterconnectAttachmentGroup(
    std::string const& project,
    std::string const& interconnect_attachment_group, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      DeleteInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  return connection_->DeleteInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::DeleteInterconnectAttachmentGroup(
    NoAwaitTag, std::string const& project,
    std::string const& interconnect_attachment_group, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      DeleteInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  return connection_->DeleteInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::DeleteInterconnectAttachmentGroup(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        DeleteInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::DeleteInterconnectAttachmentGroup(
    NoAwaitTag,
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        DeleteInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::DeleteInterconnectAttachmentGroup(
    google::cloud::cpp::compute::v1::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteInterconnectAttachmentGroup(operation);
}

StatusOr<google::cloud::cpp::compute::v1::InterconnectAttachmentGroup>
InterconnectAttachmentGroupsClient::GetInterconnectAttachmentGroup(
    std::string const& project,
    std::string const& interconnect_attachment_group, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      GetInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  return connection_->GetInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::InterconnectAttachmentGroup>
InterconnectAttachmentGroupsClient::GetInterconnectAttachmentGroup(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        GetInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Policy>
InterconnectAttachmentGroupsClient::GetIamPolicy(std::string const& project,
                                                 std::string const& resource,
                                                 Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      GetIamPolicyRequest request;
  request.set_project(project);
  request.set_resource(resource);
  return connection_->GetIamPolicy(request);
}

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

StatusOr<google::cloud::cpp::compute::v1::
             InterconnectAttachmentGroupsGetOperationalStatusResponse>
InterconnectAttachmentGroupsClient::GetOperationalStatus(
    std::string const& project,
    std::string const& interconnect_attachment_group, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      GetOperationalStatusRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  return connection_->GetOperationalStatus(request);
}

StatusOr<google::cloud::cpp::compute::v1::
             InterconnectAttachmentGroupsGetOperationalStatusResponse>
InterconnectAttachmentGroupsClient::GetOperationalStatus(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        GetOperationalStatusRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetOperationalStatus(request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::InsertInterconnectAttachmentGroup(
    std::string const& project,
    google::cloud::cpp::compute::v1::InterconnectAttachmentGroup const&
        interconnect_attachment_group_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      InsertInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  *request.mutable_interconnect_attachment_group_resource() =
      interconnect_attachment_group_resource;
  return connection_->InsertInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::InsertInterconnectAttachmentGroup(
    NoAwaitTag, std::string const& project,
    google::cloud::cpp::compute::v1::InterconnectAttachmentGroup const&
        interconnect_attachment_group_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      InsertInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  *request.mutable_interconnect_attachment_group_resource() =
      interconnect_attachment_group_resource;
  return connection_->InsertInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::InsertInterconnectAttachmentGroup(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        InsertInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->InsertInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::InsertInterconnectAttachmentGroup(
    NoAwaitTag,
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        InsertInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->InsertInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::InsertInterconnectAttachmentGroup(
    google::cloud::cpp::compute::v1::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->InsertInterconnectAttachmentGroup(operation);
}

StreamRange<google::cloud::cpp::compute::v1::InterconnectAttachmentGroup>
InterconnectAttachmentGroupsClient::ListInterconnectAttachmentGroups(
    std::string const& project, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      ListInterconnectAttachmentGroupsRequest request;
  request.set_project(project);
  return connection_->ListInterconnectAttachmentGroups(request);
}

StreamRange<google::cloud::cpp::compute::v1::InterconnectAttachmentGroup>
InterconnectAttachmentGroupsClient::ListInterconnectAttachmentGroups(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        ListInterconnectAttachmentGroupsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListInterconnectAttachmentGroups(std::move(request));
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::PatchInterconnectAttachmentGroup(
    std::string const& project,
    std::string const& interconnect_attachment_group,
    std::string const& update_mask,
    google::cloud::cpp::compute::v1::InterconnectAttachmentGroup const&
        interconnect_attachment_group_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      PatchInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  request.set_update_mask(update_mask);
  *request.mutable_interconnect_attachment_group_resource() =
      interconnect_attachment_group_resource;
  return connection_->PatchInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::PatchInterconnectAttachmentGroup(
    NoAwaitTag, std::string const& project,
    std::string const& interconnect_attachment_group,
    std::string const& update_mask,
    google::cloud::cpp::compute::v1::InterconnectAttachmentGroup const&
        interconnect_attachment_group_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      PatchInterconnectAttachmentGroupRequest request;
  request.set_project(project);
  request.set_interconnect_attachment_group(interconnect_attachment_group);
  request.set_update_mask(update_mask);
  *request.mutable_interconnect_attachment_group_resource() =
      interconnect_attachment_group_resource;
  return connection_->PatchInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::PatchInterconnectAttachmentGroup(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        PatchInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->PatchInterconnectAttachmentGroup(request);
}

StatusOr<google::cloud::cpp::compute::v1::Operation>
InterconnectAttachmentGroupsClient::PatchInterconnectAttachmentGroup(
    NoAwaitTag,
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        PatchInterconnectAttachmentGroupRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->PatchInterconnectAttachmentGroup(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
InterconnectAttachmentGroupsClient::PatchInterconnectAttachmentGroup(
    google::cloud::cpp::compute::v1::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->PatchInterconnectAttachmentGroup(operation);
}

StatusOr<google::cloud::cpp::compute::v1::Policy>
InterconnectAttachmentGroupsClient::SetIamPolicy(
    std::string const& project, std::string const& resource,
    google::cloud::cpp::compute::v1::GlobalSetPolicyRequest const&
        global_set_policy_request_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      SetIamPolicyRequest request;
  request.set_project(project);
  request.set_resource(resource);
  *request.mutable_global_set_policy_request_resource() =
      global_set_policy_request_resource;
  return connection_->SetIamPolicy(request);
}

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

StatusOr<google::cloud::cpp::compute::v1::TestPermissionsResponse>
InterconnectAttachmentGroupsClient::TestIamPermissions(
    std::string const& project, std::string const& resource,
    google::cloud::cpp::compute::v1::TestPermissionsRequest const&
        test_permissions_request_resource,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cpp::compute::interconnect_attachment_groups::v1::
      TestIamPermissionsRequest request;
  request.set_project(project);
  request.set_resource(resource);
  *request.mutable_test_permissions_request_resource() =
      test_permissions_request_resource;
  return connection_->TestIamPermissions(request);
}

StatusOr<google::cloud::cpp::compute::v1::TestPermissionsResponse>
InterconnectAttachmentGroupsClient::TestIamPermissions(
    google::cloud::cpp::compute::interconnect_attachment_groups::v1::
        TestIamPermissionsRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->TestIamPermissions(request);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace compute_interconnect_attachment_groups_v1
}  // namespace cloud
}  // namespace google
