# Generated by the protocol buffer compiler.  DO NOT EDIT!
# Source: google/ads/admanager/v1/report_service.proto for package 'Google.Ads.AdManager.V1'
# Original file comments:
# Copyright 2024 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
#
#     http://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.
#

require 'grpc'
require 'google/ads/admanager/v1/report_service_pb'

module Google
  module Ads
    module AdManager
      module V1
        module ReportService
          # Provides methods for interacting with reports.
          class Service

            include ::GRPC::GenericService

            self.marshal_class_method = :encode
            self.unmarshal_class_method = :decode
            self.service_name = 'google.ads.admanager.v1.ReportService'

            # API to retrieve a `Report` object.
            rpc :GetReport, ::Google::Ads::AdManager::V1::GetReportRequest, ::Google::Ads::AdManager::V1::Report
            # API to retrieve a list of `Report` objects.
            rpc :ListReports, ::Google::Ads::AdManager::V1::ListReportsRequest, ::Google::Ads::AdManager::V1::ListReportsResponse
            # API to create a `Report` object.
            rpc :CreateReport, ::Google::Ads::AdManager::V1::CreateReportRequest, ::Google::Ads::AdManager::V1::Report
            # API to update a `Report` object.
            rpc :UpdateReport, ::Google::Ads::AdManager::V1::UpdateReportRequest, ::Google::Ads::AdManager::V1::Report
            # Initiates the execution of an existing report asynchronously. Users can
            # get the report by polling this operation via
            # `OperationsService.GetOperation`.
            # Poll every 5 seconds initially, with an exponential
            # backoff. Once a report is complete, the operation will contain a
            # `RunReportResponse` in its response field containing a report_result that
            # can be passed to the `FetchReportResultRows` method to retrieve the report
            # data.
            rpc :RunReport, ::Google::Ads::AdManager::V1::RunReportRequest, ::Google::Longrunning::Operation
            # Returns the result rows from a completed report.
            # The caller must have previously called `RunReport` and waited for that
            # operation to complete. The rows will be returned according to the order
            # specified by the `sorts` member of the report definition.
            rpc :FetchReportResultRows, ::Google::Ads::AdManager::V1::FetchReportResultRowsRequest, ::Google::Ads::AdManager::V1::FetchReportResultRowsResponse
          end

          Stub = Service.rpc_stub_class
        end
      end
    end
  end
end
