[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\Transcoder\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Transcoder\Job;
|
---|
| 21 | use Google\Service\Transcoder\ListJobsResponse;
|
---|
| 22 | use Google\Service\Transcoder\TranscoderEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "jobs" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $transcoderService = new Google\Service\Transcoder(...);
|
---|
| 29 | * $jobs = $transcoderService->projects_locations_jobs;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsJobs extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a job in the specified region. (jobs.create)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The parent location to create and process
|
---|
| 38 | * this job. Format: `projects/{project}/locations/{location}`
|
---|
| 39 | * @param Job $postBody
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return Job
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function create($parent, Job $postBody, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('create', [$params], Job::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Deletes a job. (jobs.delete)
|
---|
| 52 | *
|
---|
| 53 | * @param string $name Required. The name of the job to delete. Format:
|
---|
| 54 | * `projects/{project}/locations/{location}/jobs/{job}`
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | *
|
---|
| 57 | * @opt_param bool allowMissing If set to true, and the job is not found, the
|
---|
| 58 | * request will succeed but no action will be taken on the server.
|
---|
| 59 | * @return TranscoderEmpty
|
---|
| 60 | * @throws \Google\Service\Exception
|
---|
| 61 | */
|
---|
| 62 | public function delete($name, $optParams = [])
|
---|
| 63 | {
|
---|
| 64 | $params = ['name' => $name];
|
---|
| 65 | $params = array_merge($params, $optParams);
|
---|
| 66 | return $this->call('delete', [$params], TranscoderEmpty::class);
|
---|
| 67 | }
|
---|
| 68 | /**
|
---|
| 69 | * Returns the job data. (jobs.get)
|
---|
| 70 | *
|
---|
| 71 | * @param string $name Required. The name of the job to retrieve. Format:
|
---|
| 72 | * `projects/{project}/locations/{location}/jobs/{job}`
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | * @return Job
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function get($name, $optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = ['name' => $name];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('get', [$params], Job::class);
|
---|
| 82 | }
|
---|
| 83 | /**
|
---|
| 84 | * Lists jobs in the specified region. (jobs.listProjectsLocationsJobs)
|
---|
| 85 | *
|
---|
| 86 | * @param string $parent Required. Format:
|
---|
| 87 | * `projects/{project}/locations/{location}`
|
---|
| 88 | * @param array $optParams Optional parameters.
|
---|
| 89 | *
|
---|
| 90 | * @opt_param string filter The filter expression, following the syntax outlined
|
---|
| 91 | * in https://google.aip.dev/160.
|
---|
| 92 | * @opt_param string orderBy One or more fields to compare and use to sort the
|
---|
| 93 | * output. See https://google.aip.dev/132#ordering.
|
---|
| 94 | * @opt_param int pageSize The maximum number of items to return.
|
---|
| 95 | * @opt_param string pageToken The `next_page_token` value returned from a
|
---|
| 96 | * previous List request, if any.
|
---|
| 97 | * @return ListJobsResponse
|
---|
| 98 | * @throws \Google\Service\Exception
|
---|
| 99 | */
|
---|
| 100 | public function listProjectsLocationsJobs($parent, $optParams = [])
|
---|
| 101 | {
|
---|
| 102 | $params = ['parent' => $parent];
|
---|
| 103 | $params = array_merge($params, $optParams);
|
---|
| 104 | return $this->call('list', [$params], ListJobsResponse::class);
|
---|
| 105 | }
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 109 | class_alias(ProjectsLocationsJobs::class, 'Google_Service_Transcoder_Resource_ProjectsLocationsJobs');
|
---|