source: vendor/google/apiclient-services/src/Analytics/Resource/ManagementUploads.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 12 days ago

Upload new project files

  • Property mode set to 100644
File size: 4.7 KB
Line 
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
18namespace Google\Service\Analytics\Resource;
19
20use Google\Service\Analytics\AnalyticsDataimportDeleteUploadDataRequest;
21use Google\Service\Analytics\Upload;
22use Google\Service\Analytics\Uploads;
23
24/**
25 * The "uploads" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $analyticsService = new Google\Service\Analytics(...);
29 * $uploads = $analyticsService->management_uploads;
30 * </code>
31 */
32class ManagementUploads extends \Google\Service\Resource
33{
34 /**
35 * Delete data associated with a previous upload. (uploads.deleteUploadData)
36 *
37 * @param string $accountId Account Id for the uploads to be deleted.
38 * @param string $webPropertyId Web property Id for the uploads to be deleted.
39 * @param string $customDataSourceId Custom data source Id for the uploads to be
40 * deleted.
41 * @param AnalyticsDataimportDeleteUploadDataRequest $postBody
42 * @param array $optParams Optional parameters.
43 * @throws \Google\Service\Exception
44 */
45 public function deleteUploadData($accountId, $webPropertyId, $customDataSourceId, AnalyticsDataimportDeleteUploadDataRequest $postBody, $optParams = [])
46 {
47 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'postBody' => $postBody];
48 $params = array_merge($params, $optParams);
49 return $this->call('deleteUploadData', [$params]);
50 }
51 /**
52 * List uploads to which the user has access. (uploads.get)
53 *
54 * @param string $accountId Account Id for the upload to retrieve.
55 * @param string $webPropertyId Web property Id for the upload to retrieve.
56 * @param string $customDataSourceId Custom data source Id for upload to
57 * retrieve.
58 * @param string $uploadId Upload Id to retrieve.
59 * @param array $optParams Optional parameters.
60 * @return Upload
61 * @throws \Google\Service\Exception
62 */
63 public function get($accountId, $webPropertyId, $customDataSourceId, $uploadId, $optParams = [])
64 {
65 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'uploadId' => $uploadId];
66 $params = array_merge($params, $optParams);
67 return $this->call('get', [$params], Upload::class);
68 }
69 /**
70 * List uploads to which the user has access. (uploads.listManagementUploads)
71 *
72 * @param string $accountId Account Id for the uploads to retrieve.
73 * @param string $webPropertyId Web property Id for the uploads to retrieve.
74 * @param string $customDataSourceId Custom data source Id for uploads to
75 * retrieve.
76 * @param array $optParams Optional parameters.
77 *
78 * @opt_param int max-results The maximum number of uploads to include in this
79 * response.
80 * @opt_param int start-index A 1-based index of the first upload to retrieve.
81 * Use this parameter as a pagination mechanism along with the max-results
82 * parameter.
83 * @return Uploads
84 * @throws \Google\Service\Exception
85 */
86 public function listManagementUploads($accountId, $webPropertyId, $customDataSourceId, $optParams = [])
87 {
88 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId];
89 $params = array_merge($params, $optParams);
90 return $this->call('list', [$params], Uploads::class);
91 }
92 /**
93 * Upload data for a custom data source. (uploads.uploadData)
94 *
95 * @param string $accountId Account Id associated with the upload.
96 * @param string $webPropertyId Web property UA-string associated with the
97 * upload.
98 * @param string $customDataSourceId Custom data source Id to which the data
99 * being uploaded belongs.
100 * @param array $optParams Optional parameters.
101 * @return Upload
102 * @throws \Google\Service\Exception
103 */
104 public function uploadData($accountId, $webPropertyId, $customDataSourceId, $optParams = [])
105 {
106 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId];
107 $params = array_merge($params, $optParams);
108 return $this->call('uploadData', [$params], Upload::class);
109 }
110}
111
112// Adding a class alias for backwards compatibility with the previous class name.
113class_alias(ManagementUploads::class, 'Google_Service_Analytics_Resource_ManagementUploads');
Note: See TracBrowser for help on using the repository browser.