[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\Cloudchannel\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ListReportsResponse;
|
---|
| 21 | use Google\Service\Cloudchannel\GoogleCloudChannelV1RunReportJobRequest;
|
---|
| 22 | use Google\Service\Cloudchannel\GoogleLongrunningOperation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "reports" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $cloudchannelService = new Google\Service\Cloudchannel(...);
|
---|
| 29 | * $reports = $cloudchannelService->accounts_reports;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class AccountsReports extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Lists the reports that RunReportJob can run. These reports include an ID, a
|
---|
| 36 | * description, and the list of columns that will be in the result. Deprecated:
|
---|
| 37 | * Please use [Export Channel Services data to
|
---|
| 38 | * BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-
|
---|
| 39 | * bigquery) instead. (reports.listAccountsReports)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. The resource name of the partner account to
|
---|
| 42 | * list available reports for. Parent uses the format: accounts/{account_id}
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | *
|
---|
| 45 | * @opt_param string languageCode Optional. The BCP-47 language code, such as
|
---|
| 46 | * "en-US". If specified, the response is localized to the corresponding
|
---|
| 47 | * language code if the original data sources support it. Default is "en-US".
|
---|
| 48 | * @opt_param int pageSize Optional. Requested page size of the report. The
|
---|
| 49 | * server might return fewer results than requested. If unspecified, returns 20
|
---|
| 50 | * reports. The maximum value is 100.
|
---|
| 51 | * @opt_param string pageToken Optional. A token that specifies a page of
|
---|
| 52 | * results beyond the first page. Obtained through
|
---|
| 53 | * ListReportsResponse.next_page_token of the previous
|
---|
| 54 | * CloudChannelReportsService.ListReports call.
|
---|
| 55 | * @return GoogleCloudChannelV1ListReportsResponse
|
---|
| 56 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function listAccountsReports($parent, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['parent' => $parent];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('list', [$params], GoogleCloudChannelV1ListReportsResponse::class);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Begins generation of data for a given report. The report identifier is a UID
|
---|
| 66 | * (for example, `613bf59q`). Possible error codes: * PERMISSION_DENIED: The
|
---|
| 67 | * user doesn't have access to this report. * INVALID_ARGUMENT: Required request
|
---|
| 68 | * parameters are missing or invalid. * NOT_FOUND: The report identifier was not
|
---|
| 69 | * found. * INTERNAL: Any non-user error related to a technical issue in the
|
---|
| 70 | * backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related
|
---|
| 71 | * to a technical issue in the backend. Contact Cloud Channel support. Return
|
---|
| 72 | * value: The ID of a long-running operation. To get the results of the
|
---|
| 73 | * operation, call the GetOperation method of CloudChannelOperationsService. The
|
---|
| 74 | * Operation metadata contains an instance of OperationMetadata. To get the
|
---|
| 75 | * results of report generation, call
|
---|
| 76 | * CloudChannelReportsService.FetchReportResults with the
|
---|
| 77 | * RunReportJobResponse.report_job. Deprecated: Please use [Export Channel
|
---|
| 78 | * Services data to
|
---|
| 79 | * BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-
|
---|
| 80 | * bigquery) instead. (reports.run)
|
---|
| 81 | *
|
---|
| 82 | * @param string $name Required. The report's resource name. Specifies the
|
---|
| 83 | * account and report used to generate report data. The report_id identifier is
|
---|
| 84 | * a UID (for example, `613bf59q`). Name uses the format:
|
---|
| 85 | * accounts/{account_id}/reports/{report_id}
|
---|
| 86 | * @param GoogleCloudChannelV1RunReportJobRequest $postBody
|
---|
| 87 | * @param array $optParams Optional parameters.
|
---|
| 88 | * @return GoogleLongrunningOperation
|
---|
| 89 | * @throws \Google\Service\Exception
|
---|
| 90 | */
|
---|
| 91 | public function run($name, GoogleCloudChannelV1RunReportJobRequest $postBody, $optParams = [])
|
---|
| 92 | {
|
---|
| 93 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 94 | $params = array_merge($params, $optParams);
|
---|
| 95 | return $this->call('run', [$params], GoogleLongrunningOperation::class);
|
---|
| 96 | }
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 100 | class_alias(AccountsReports::class, 'Google_Service_Cloudchannel_Resource_AccountsReports');
|
---|