// 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/chronicle/v1/rule.proto

#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_METADATA_DECORATOR_H
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_METADATA_DECORATOR_H

#include "google/cloud/chronicle/v1/internal/rule_stub.h"
#include "google/cloud/options.h"
#include "google/cloud/version.h"
#include <google/longrunning/operations.grpc.pb.h>
#include <map>
#include <memory>
#include <string>

namespace google {
namespace cloud {
namespace chronicle_v1_internal {
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN

class RuleServiceMetadata : public RuleServiceStub {
 public:
  ~RuleServiceMetadata() override = default;
  RuleServiceMetadata(std::shared_ptr<RuleServiceStub> child,
                      std::multimap<std::string, std::string> fixed_metadata,
                      std::string api_client_header = "");

  StatusOr<google::cloud::chronicle::v1::Rule> CreateRule(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::CreateRuleRequest const& request) override;

  StatusOr<google::cloud::chronicle::v1::Rule> GetRule(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::GetRuleRequest const& request) override;

  StatusOr<google::cloud::chronicle::v1::ListRulesResponse> ListRules(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::ListRulesRequest const& request) override;

  StatusOr<google::cloud::chronicle::v1::Rule> UpdateRule(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::UpdateRuleRequest const& request) override;

  Status DeleteRule(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::DeleteRuleRequest const& request) override;

  StatusOr<google::cloud::chronicle::v1::ListRuleRevisionsResponse>
  ListRuleRevisions(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::ListRuleRevisionsRequest const& request)
      override;

  future<StatusOr<google::longrunning::Operation>> AsyncCreateRetrohunt(
      google::cloud::CompletionQueue& cq,
      std::shared_ptr<grpc::ClientContext> context,
      google::cloud::internal::ImmutableOptions options,
      google::cloud::chronicle::v1::CreateRetrohuntRequest const& request)
      override;

  StatusOr<google::longrunning::Operation> CreateRetrohunt(
      grpc::ClientContext& context, Options options,
      google::cloud::chronicle::v1::CreateRetrohuntRequest const& request)
      override;

  StatusOr<google::cloud::chronicle::v1::Retrohunt> GetRetrohunt(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::GetRetrohuntRequest const& request)
      override;

  StatusOr<google::cloud::chronicle::v1::ListRetrohuntsResponse> ListRetrohunts(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::ListRetrohuntsRequest const& request)
      override;

  StatusOr<google::cloud::chronicle::v1::RuleDeployment> GetRuleDeployment(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::GetRuleDeploymentRequest const& request)
      override;

  StatusOr<google::cloud::chronicle::v1::ListRuleDeploymentsResponse>
  ListRuleDeployments(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::ListRuleDeploymentsRequest const& request)
      override;

  StatusOr<google::cloud::chronicle::v1::RuleDeployment> UpdateRuleDeployment(
      grpc::ClientContext& context, Options const& options,
      google::cloud::chronicle::v1::UpdateRuleDeploymentRequest const& request)
      override;

  StatusOr<google::longrunning::ListOperationsResponse> ListOperations(
      grpc::ClientContext& context, Options const& options,
      google::longrunning::ListOperationsRequest const& request) override;

  StatusOr<google::longrunning::Operation> GetOperation(
      grpc::ClientContext& context, Options const& options,
      google::longrunning::GetOperationRequest const& request) override;

  Status DeleteOperation(
      grpc::ClientContext& context, Options const& options,
      google::longrunning::DeleteOperationRequest const& request) override;

  Status CancelOperation(
      grpc::ClientContext& context, Options const& options,
      google::longrunning::CancelOperationRequest const& request) override;

  future<StatusOr<google::longrunning::Operation>> AsyncGetOperation(
      google::cloud::CompletionQueue& cq,
      std::shared_ptr<grpc::ClientContext> context,
      google::cloud::internal::ImmutableOptions options,
      google::longrunning::GetOperationRequest const& request) override;

  future<Status> AsyncCancelOperation(
      google::cloud::CompletionQueue& cq,
      std::shared_ptr<grpc::ClientContext> context,
      google::cloud::internal::ImmutableOptions options,
      google::longrunning::CancelOperationRequest const& request) override;

 private:
  void SetMetadata(grpc::ClientContext& context, Options const& options,
                   std::string const& request_params);
  void SetMetadata(grpc::ClientContext& context, Options const& options);

  std::shared_ptr<RuleServiceStub> child_;
  std::multimap<std::string, std::string> fixed_metadata_;
  std::string api_client_header_;
};

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
}  // namespace chronicle_v1_internal
}  // namespace cloud
}  // namespace google

#endif  // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_METADATA_DECORATOR_H
