QueriesReports.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\DoubleClickBidManager\Resource;
  18. use Google\Service\DoubleClickBidManager\ListReportsResponse;
  19. use Google\Service\DoubleClickBidManager\Report;
  20. /**
  21. * The "reports" collection of methods.
  22. * Typical usage is:
  23. * <code>
  24. * $doubleclickbidmanagerService = new Google\Service\DoubleClickBidManager(...);
  25. * $reports = $doubleclickbidmanagerService->reports;
  26. * </code>
  27. */
  28. class QueriesReports extends \Google\Service\Resource
  29. {
  30. /**
  31. * Retrieves a stored report. (reports.get)
  32. *
  33. * @param string $queryId Required. ID of the query the report is associated
  34. * with.
  35. * @param string $reportId Required. ID of the report to retrieve.
  36. * @param array $optParams Optional parameters.
  37. * @return Report
  38. */
  39. public function get($queryId, $reportId, $optParams = [])
  40. {
  41. $params = ['queryId' => $queryId, 'reportId' => $reportId];
  42. $params = array_merge($params, $optParams);
  43. return $this->call('get', [$params], Report::class);
  44. }
  45. /**
  46. * Lists reports. (reports.listQueriesReports)
  47. *
  48. * @param string $queryId Required. Query ID with which the reports are
  49. * associated.
  50. * @param array $optParams Optional parameters.
  51. *
  52. * @opt_param string orderBy Name of a field used to order results. The default
  53. * sorting order is ascending. To specify descending order for a field, append a
  54. * " desc" suffix. For example "key.reportId desc". Sorting is only supported
  55. * for the following fields: * key.reportId
  56. * @opt_param int pageSize Maximum number of results per page. Must be between
  57. * `1` and `100`. Defaults to `100` if unspecified.
  58. * @opt_param string pageToken A page token, received from a previous list call.
  59. * Provide this to retrieve the subsequent page of reports.
  60. * @return ListReportsResponse
  61. */
  62. public function listQueriesReports($queryId, $optParams = [])
  63. {
  64. $params = ['queryId' => $queryId];
  65. $params = array_merge($params, $optParams);
  66. return $this->call('list', [$params], ListReportsResponse::class);
  67. }
  68. }
  69. // Adding a class alias for backwards compatibility with the previous class name.
  70. class_alias(QueriesReports::class, 'Google_Service_DoubleClickBidManager_Resource_QueriesReports');