source: vendor/google/apiclient-services/src/YouTubeReporting/Resource/Jobs.php

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

Upload project files

  • Property mode set to 100644
File size: 4.1 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\YouTubeReporting\Resource;
19
20use Google\Service\YouTubeReporting\Job;
21use Google\Service\YouTubeReporting\ListJobsResponse;
22use Google\Service\YouTubeReporting\YoutubereportingEmpty;
23
24/**
25 * The "jobs" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $youtubereportingService = new Google\Service\YouTubeReporting(...);
29 * $jobs = $youtubereportingService->jobs;
30 * </code>
31 */
32class Jobs extends \Google\Service\Resource
33{
34 /**
35 * Creates a job and returns it. (jobs.create)
36 *
37 * @param Job $postBody
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param string onBehalfOfContentOwner The content owner's external ID on
41 * which behalf the user is acting on. If not set, the user is acting for
42 * himself (his own channel).
43 * @return Job
44 * @throws \Google\Service\Exception
45 */
46 public function create(Job $postBody, $optParams = [])
47 {
48 $params = ['postBody' => $postBody];
49 $params = array_merge($params, $optParams);
50 return $this->call('create', [$params], Job::class);
51 }
52 /**
53 * Deletes a job. (jobs.delete)
54 *
55 * @param string $jobId The ID of the job to delete.
56 * @param array $optParams Optional parameters.
57 *
58 * @opt_param string onBehalfOfContentOwner The content owner's external ID on
59 * which behalf the user is acting on. If not set, the user is acting for
60 * himself (his own channel).
61 * @return YoutubereportingEmpty
62 * @throws \Google\Service\Exception
63 */
64 public function delete($jobId, $optParams = [])
65 {
66 $params = ['jobId' => $jobId];
67 $params = array_merge($params, $optParams);
68 return $this->call('delete', [$params], YoutubereportingEmpty::class);
69 }
70 /**
71 * Gets a job. (jobs.get)
72 *
73 * @param string $jobId The ID of the job to retrieve.
74 * @param array $optParams Optional parameters.
75 *
76 * @opt_param string onBehalfOfContentOwner The content owner's external ID on
77 * which behalf the user is acting on. If not set, the user is acting for
78 * himself (his own channel).
79 * @return Job
80 * @throws \Google\Service\Exception
81 */
82 public function get($jobId, $optParams = [])
83 {
84 $params = ['jobId' => $jobId];
85 $params = array_merge($params, $optParams);
86 return $this->call('get', [$params], Job::class);
87 }
88 /**
89 * Lists jobs. (jobs.listJobs)
90 *
91 * @param array $optParams Optional parameters.
92 *
93 * @opt_param bool includeSystemManaged If set to true, also system-managed jobs
94 * will be returned; otherwise only user-created jobs will be returned. System-
95 * managed jobs can neither be modified nor deleted.
96 * @opt_param string onBehalfOfContentOwner The content owner's external ID on
97 * which behalf the user is acting on. If not set, the user is acting for
98 * himself (his own channel).
99 * @opt_param int pageSize Requested page size. Server may return fewer jobs
100 * than requested. If unspecified, server will pick an appropriate default.
101 * @opt_param string pageToken A token identifying a page of results the server
102 * should return. Typically, this is the value of
103 * ListReportTypesResponse.next_page_token returned in response to the previous
104 * call to the `ListJobs` method.
105 * @return ListJobsResponse
106 * @throws \Google\Service\Exception
107 */
108 public function listJobs($optParams = [])
109 {
110 $params = [];
111 $params = array_merge($params, $optParams);
112 return $this->call('list', [$params], ListJobsResponse::class);
113 }
114}
115
116// Adding a class alias for backwards compatibility with the previous class name.
117class_alias(Jobs::class, 'Google_Service_YouTubeReporting_Resource_Jobs');
Note: See TracBrowser for help on using the repository browser.