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