// 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/cloudsecuritycompliance/v1/deployment.proto

#include "google/cloud/cloudsecuritycompliance/v1/deployment_client.h"
#include <memory>
#include <utility>

namespace google {
namespace cloud {
namespace cloudsecuritycompliance_v1 {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

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

future<
    StatusOr<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>>
DeploymentClient::CreateFrameworkDeployment(
    std::string const& parent,
    google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment const&
        framework_deployment,
    std::string const& framework_deployment_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::CreateFrameworkDeploymentRequest
      request;
  request.set_parent(parent);
  *request.mutable_framework_deployment() = framework_deployment;
  request.set_framework_deployment_id(framework_deployment_id);
  return connection_->CreateFrameworkDeployment(request);
}

StatusOr<google::longrunning::Operation>
DeploymentClient::CreateFrameworkDeployment(
    NoAwaitTag, std::string const& parent,
    google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment const&
        framework_deployment,
    std::string const& framework_deployment_id, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::CreateFrameworkDeploymentRequest
      request;
  request.set_parent(parent);
  *request.mutable_framework_deployment() = framework_deployment;
  request.set_framework_deployment_id(framework_deployment_id);
  return connection_->CreateFrameworkDeployment(NoAwaitTag{}, request);
}

future<
    StatusOr<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>>
DeploymentClient::CreateFrameworkDeployment(
    google::cloud::cloudsecuritycompliance::v1::
        CreateFrameworkDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFrameworkDeployment(request);
}

StatusOr<google::longrunning::Operation>
DeploymentClient::CreateFrameworkDeployment(
    NoAwaitTag,
    google::cloud::cloudsecuritycompliance::v1::
        CreateFrameworkDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFrameworkDeployment(NoAwaitTag{}, request);
}

future<
    StatusOr<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>>
DeploymentClient::CreateFrameworkDeployment(
    google::longrunning::Operation const& operation, Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->CreateFrameworkDeployment(operation);
}

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

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

future<StatusOr<google::cloud::cloudsecuritycompliance::v1::OperationMetadata>>
DeploymentClient::DeleteFrameworkDeployment(
    google::cloud::cloudsecuritycompliance::v1::
        DeleteFrameworkDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteFrameworkDeployment(request);
}

StatusOr<google::longrunning::Operation>
DeploymentClient::DeleteFrameworkDeployment(
    NoAwaitTag,
    google::cloud::cloudsecuritycompliance::v1::
        DeleteFrameworkDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->DeleteFrameworkDeployment(NoAwaitTag{}, request);
}

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

StatusOr<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>
DeploymentClient::GetFrameworkDeployment(std::string const& name,
                                         Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::GetFrameworkDeploymentRequest
      request;
  request.set_name(name);
  return connection_->GetFrameworkDeployment(request);
}

StatusOr<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>
DeploymentClient::GetFrameworkDeployment(
    google::cloud::cloudsecuritycompliance::v1::
        GetFrameworkDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetFrameworkDeployment(request);
}

StreamRange<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>
DeploymentClient::ListFrameworkDeployments(std::string const& parent,
                                           Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::ListFrameworkDeploymentsRequest
      request;
  request.set_parent(parent);
  return connection_->ListFrameworkDeployments(request);
}

StreamRange<google::cloud::cloudsecuritycompliance::v1::FrameworkDeployment>
DeploymentClient::ListFrameworkDeployments(
    google::cloud::cloudsecuritycompliance::v1::ListFrameworkDeploymentsRequest
        request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListFrameworkDeployments(std::move(request));
}

StatusOr<google::cloud::cloudsecuritycompliance::v1::CloudControlDeployment>
DeploymentClient::GetCloudControlDeployment(std::string const& name,
                                            Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::GetCloudControlDeploymentRequest
      request;
  request.set_name(name);
  return connection_->GetCloudControlDeployment(request);
}

StatusOr<google::cloud::cloudsecuritycompliance::v1::CloudControlDeployment>
DeploymentClient::GetCloudControlDeployment(
    google::cloud::cloudsecuritycompliance::v1::
        GetCloudControlDeploymentRequest const& request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->GetCloudControlDeployment(request);
}

StreamRange<google::cloud::cloudsecuritycompliance::v1::CloudControlDeployment>
DeploymentClient::ListCloudControlDeployments(std::string const& parent,
                                              Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  google::cloud::cloudsecuritycompliance::v1::ListCloudControlDeploymentsRequest
      request;
  request.set_parent(parent);
  return connection_->ListCloudControlDeployments(request);
}

StreamRange<google::cloud::cloudsecuritycompliance::v1::CloudControlDeployment>
DeploymentClient::ListCloudControlDeployments(
    google::cloud::cloudsecuritycompliance::v1::
        ListCloudControlDeploymentsRequest request,
    Options opts) {
  internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
  return connection_->ListCloudControlDeployments(std::move(request));
}

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

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

Status DeploymentClient::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 DeploymentClient::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 cloudsecuritycompliance_v1
}  // namespace cloud
}  // namespace google
