// 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/securesourcemanager/v1/secure_source_manager.proto

#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_TRACING_CONNECTION_H
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_TRACING_CONNECTION_H

#include "google/cloud/securesourcemanager/v1/secure_source_manager_connection.h"
#include "google/cloud/version.h"
#include <memory>

namespace google {
namespace cloud {
namespace securesourcemanager_v1_internal {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY

class SecureSourceManagerTracingConnection
    : public securesourcemanager_v1::SecureSourceManagerConnection {
 public:
  ~SecureSourceManagerTracingConnection() override = default;

  explicit SecureSourceManagerTracingConnection(
      std::shared_ptr<securesourcemanager_v1::SecureSourceManagerConnection>
          child);

  Options options() override { return child_->options(); }

  StreamRange<google::cloud::securesourcemanager::v1::Instance> ListInstances(
      google::cloud::securesourcemanager::v1::ListInstancesRequest request)
      override;

  StatusOr<google::cloud::securesourcemanager::v1::Instance> GetInstance(
      google::cloud::securesourcemanager::v1::GetInstanceRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Instance>>
  CreateInstance(
      google::cloud::securesourcemanager::v1::CreateInstanceRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> CreateInstance(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateInstanceRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Instance>>
  CreateInstance(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteInstance(
      google::cloud::securesourcemanager::v1::DeleteInstanceRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> DeleteInstance(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteInstanceRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteInstance(google::longrunning::Operation const& operation) override;

  StreamRange<google::cloud::securesourcemanager::v1::Repository>
  ListRepositories(
      google::cloud::securesourcemanager::v1::ListRepositoriesRequest request)
      override;

  StatusOr<google::cloud::securesourcemanager::v1::Repository> GetRepository(
      google::cloud::securesourcemanager::v1::GetRepositoryRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Repository>>
  CreateRepository(
      google::cloud::securesourcemanager::v1::CreateRepositoryRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> CreateRepository(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateRepositoryRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Repository>>
  CreateRepository(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Repository>>
  UpdateRepository(
      google::cloud::securesourcemanager::v1::UpdateRepositoryRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> UpdateRepository(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdateRepositoryRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Repository>>
  UpdateRepository(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteRepository(
      google::cloud::securesourcemanager::v1::DeleteRepositoryRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> DeleteRepository(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteRepositoryRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteRepository(google::longrunning::Operation const& operation) override;

  StreamRange<google::cloud::securesourcemanager::v1::Hook> ListHooks(
      google::cloud::securesourcemanager::v1::ListHooksRequest request)
      override;

  StatusOr<google::cloud::securesourcemanager::v1::Hook> GetHook(
      google::cloud::securesourcemanager::v1::GetHookRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Hook>> CreateHook(
      google::cloud::securesourcemanager::v1::CreateHookRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> CreateHook(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateHookRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Hook>> CreateHook(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Hook>> UpdateHook(
      google::cloud::securesourcemanager::v1::UpdateHookRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> UpdateHook(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdateHookRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Hook>> UpdateHook(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteHook(google::cloud::securesourcemanager::v1::DeleteHookRequest const&
                 request) override;

  StatusOr<google::longrunning::Operation> DeleteHook(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteHookRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteHook(google::longrunning::Operation const& operation) override;

  StatusOr<google::iam::v1::Policy> GetIamPolicyRepo(
      google::iam::v1::GetIamPolicyRequest const& request) override;

  StatusOr<google::iam::v1::Policy> SetIamPolicyRepo(
      google::iam::v1::SetIamPolicyRequest const& request) override;

  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissionsRepo(
      google::iam::v1::TestIamPermissionsRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::BranchRule>>
  CreateBranchRule(
      google::cloud::securesourcemanager::v1::CreateBranchRuleRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> CreateBranchRule(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateBranchRuleRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::BranchRule>>
  CreateBranchRule(google::longrunning::Operation const& operation) override;

  StreamRange<google::cloud::securesourcemanager::v1::BranchRule>
  ListBranchRules(google::cloud::securesourcemanager::v1::ListBranchRulesRequest
                      request) override;

  StatusOr<google::cloud::securesourcemanager::v1::BranchRule> GetBranchRule(
      google::cloud::securesourcemanager::v1::GetBranchRuleRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::BranchRule>>
  UpdateBranchRule(
      google::cloud::securesourcemanager::v1::UpdateBranchRuleRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> UpdateBranchRule(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdateBranchRuleRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::BranchRule>>
  UpdateBranchRule(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteBranchRule(
      google::cloud::securesourcemanager::v1::DeleteBranchRuleRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> DeleteBranchRule(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteBranchRuleRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteBranchRule(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  CreatePullRequest(
      google::cloud::securesourcemanager::v1::CreatePullRequestRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> CreatePullRequest(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreatePullRequestRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  CreatePullRequest(google::longrunning::Operation const& operation) override;

  StatusOr<google::cloud::securesourcemanager::v1::PullRequest> GetPullRequest(
      google::cloud::securesourcemanager::v1::GetPullRequestRequest const&
          request) override;

  StreamRange<google::cloud::securesourcemanager::v1::PullRequest>
  ListPullRequests(
      google::cloud::securesourcemanager::v1::ListPullRequestsRequest request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  UpdatePullRequest(
      google::cloud::securesourcemanager::v1::UpdatePullRequestRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> UpdatePullRequest(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdatePullRequestRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  UpdatePullRequest(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  MergePullRequest(
      google::cloud::securesourcemanager::v1::MergePullRequestRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> MergePullRequest(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::MergePullRequestRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  MergePullRequest(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  OpenPullRequest(
      google::cloud::securesourcemanager::v1::OpenPullRequestRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> OpenPullRequest(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::OpenPullRequestRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  OpenPullRequest(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  ClosePullRequest(
      google::cloud::securesourcemanager::v1::ClosePullRequestRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> ClosePullRequest(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::ClosePullRequestRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequest>>
  ClosePullRequest(google::longrunning::Operation const& operation) override;

  StreamRange<google::cloud::securesourcemanager::v1::FileDiff>
  ListPullRequestFileDiffs(
      google::cloud::securesourcemanager::v1::ListPullRequestFileDiffsRequest
          request) override;

  StreamRange<google::cloud::securesourcemanager::v1::TreeEntry> FetchTree(
      google::cloud::securesourcemanager::v1::FetchTreeRequest request)
      override;

  StatusOr<google::cloud::securesourcemanager::v1::FetchBlobResponse> FetchBlob(
      google::cloud::securesourcemanager::v1::FetchBlobRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> CreateIssue(
      google::cloud::securesourcemanager::v1::CreateIssueRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> CreateIssue(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateIssueRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> CreateIssue(
      google::longrunning::Operation const& operation) override;

  StatusOr<google::cloud::securesourcemanager::v1::Issue> GetIssue(
      google::cloud::securesourcemanager::v1::GetIssueRequest const& request)
      override;

  StreamRange<google::cloud::securesourcemanager::v1::Issue> ListIssues(
      google::cloud::securesourcemanager::v1::ListIssuesRequest request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> UpdateIssue(
      google::cloud::securesourcemanager::v1::UpdateIssueRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> UpdateIssue(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdateIssueRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> UpdateIssue(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteIssue(google::cloud::securesourcemanager::v1::DeleteIssueRequest const&
                  request) override;

  StatusOr<google::longrunning::Operation> DeleteIssue(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteIssueRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteIssue(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> OpenIssue(
      google::cloud::securesourcemanager::v1::OpenIssueRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> OpenIssue(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::OpenIssueRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> OpenIssue(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> CloseIssue(
      google::cloud::securesourcemanager::v1::CloseIssueRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> CloseIssue(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CloseIssueRequest const& request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::Issue>> CloseIssue(
      google::longrunning::Operation const& operation) override;

  StatusOr<google::cloud::securesourcemanager::v1::PullRequestComment>
  GetPullRequestComment(
      google::cloud::securesourcemanager::v1::
          GetPullRequestCommentRequest const& request) override;

  StreamRange<google::cloud::securesourcemanager::v1::PullRequestComment>
  ListPullRequestComments(
      google::cloud::securesourcemanager::v1::ListPullRequestCommentsRequest
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequestComment>>
  CreatePullRequestComment(
      google::cloud::securesourcemanager::v1::
          CreatePullRequestCommentRequest const& request) override;

  StatusOr<google::longrunning::Operation> CreatePullRequestComment(
      NoAwaitTag, google::cloud::securesourcemanager::v1::
                      CreatePullRequestCommentRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequestComment>>
  CreatePullRequestComment(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequestComment>>
  UpdatePullRequestComment(
      google::cloud::securesourcemanager::v1::
          UpdatePullRequestCommentRequest const& request) override;

  StatusOr<google::longrunning::Operation> UpdatePullRequestComment(
      NoAwaitTag, google::cloud::securesourcemanager::v1::
                      UpdatePullRequestCommentRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::PullRequestComment>>
  UpdatePullRequestComment(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeletePullRequestComment(
      google::cloud::securesourcemanager::v1::
          DeletePullRequestCommentRequest const& request) override;

  StatusOr<google::longrunning::Operation> DeletePullRequestComment(
      NoAwaitTag, google::cloud::securesourcemanager::v1::
                      DeletePullRequestCommentRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeletePullRequestComment(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      BatchCreatePullRequestCommentsResponse>>
  BatchCreatePullRequestComments(
      google::cloud::securesourcemanager::v1::
          BatchCreatePullRequestCommentsRequest const& request) override;

  StatusOr<google::longrunning::Operation> BatchCreatePullRequestComments(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::
          BatchCreatePullRequestCommentsRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      BatchCreatePullRequestCommentsResponse>>
  BatchCreatePullRequestComments(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      ResolvePullRequestCommentsResponse>>
  ResolvePullRequestComments(
      google::cloud::securesourcemanager::v1::
          ResolvePullRequestCommentsRequest const& request) override;

  StatusOr<google::longrunning::Operation> ResolvePullRequestComments(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::
          ResolvePullRequestCommentsRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      ResolvePullRequestCommentsResponse>>
  ResolvePullRequestComments(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      UnresolvePullRequestCommentsResponse>>
  UnresolvePullRequestComments(
      google::cloud::securesourcemanager::v1::
          UnresolvePullRequestCommentsRequest const& request) override;

  StatusOr<google::longrunning::Operation> UnresolvePullRequestComments(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::
          UnresolvePullRequestCommentsRequest const& request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::
                      UnresolvePullRequestCommentsResponse>>
  UnresolvePullRequestComments(
      google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::IssueComment>>
  CreateIssueComment(
      google::cloud::securesourcemanager::v1::CreateIssueCommentRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> CreateIssueComment(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::CreateIssueCommentRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::IssueComment>>
  CreateIssueComment(google::longrunning::Operation const& operation) override;

  StatusOr<google::cloud::securesourcemanager::v1::IssueComment>
  GetIssueComment(
      google::cloud::securesourcemanager::v1::GetIssueCommentRequest const&
          request) override;

  StreamRange<google::cloud::securesourcemanager::v1::IssueComment>
  ListIssueComments(
      google::cloud::securesourcemanager::v1::ListIssueCommentsRequest request)
      override;

  future<StatusOr<google::cloud::securesourcemanager::v1::IssueComment>>
  UpdateIssueComment(
      google::cloud::securesourcemanager::v1::UpdateIssueCommentRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> UpdateIssueComment(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::UpdateIssueCommentRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::IssueComment>>
  UpdateIssueComment(google::longrunning::Operation const& operation) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteIssueComment(
      google::cloud::securesourcemanager::v1::DeleteIssueCommentRequest const&
          request) override;

  StatusOr<google::longrunning::Operation> DeleteIssueComment(
      NoAwaitTag,
      google::cloud::securesourcemanager::v1::DeleteIssueCommentRequest const&
          request) override;

  future<StatusOr<google::cloud::securesourcemanager::v1::OperationMetadata>>
  DeleteIssueComment(google::longrunning::Operation const& operation) override;

  StreamRange<google::cloud::location::Location> ListLocations(
      google::cloud::location::ListLocationsRequest request) override;

  StatusOr<google::cloud::location::Location> GetLocation(
      google::cloud::location::GetLocationRequest const& request) override;

  StatusOr<google::iam::v1::Policy> SetIamPolicy(
      google::iam::v1::SetIamPolicyRequest const& request) override;

  StatusOr<google::iam::v1::Policy> GetIamPolicy(
      google::iam::v1::GetIamPolicyRequest const& request) override;

  StatusOr<google::iam::v1::TestIamPermissionsResponse> TestIamPermissions(
      google::iam::v1::TestIamPermissionsRequest const& request) override;

  StreamRange<google::longrunning::Operation> ListOperations(
      google::longrunning::ListOperationsRequest request) override;

  StatusOr<google::longrunning::Operation> GetOperation(
      google::longrunning::GetOperationRequest const& request) override;

  Status DeleteOperation(
      google::longrunning::DeleteOperationRequest const& request) override;

  Status CancelOperation(
      google::longrunning::CancelOperationRequest const& request) override;

 private:
  std::shared_ptr<securesourcemanager_v1::SecureSourceManagerConnection> child_;
};

#endif  // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY

/**
 * Conditionally applies the tracing decorator to the given connection.
 *
 * The connection is only decorated if tracing is enabled (as determined by the
 * connection's options).
 */
std::shared_ptr<securesourcemanager_v1::SecureSourceManagerConnection>
MakeSecureSourceManagerTracingConnection(
    std::shared_ptr<securesourcemanager_v1::SecureSourceManagerConnection>
        conn);

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace securesourcemanager_v1_internal
}  // namespace cloud
}  // namespace google

#endif  // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_TRACING_CONNECTION_H
