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;
19
20use Google\Client;
21
22/**
23 * Service definition for Transcoder (v1).
24 *
25 * <p>
26 * This API converts video files into formats suitable for consumer
27 * distribution.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/transcoder/docs/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Transcoder extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $projects_locations_jobTemplates;
43  public $projects_locations_jobs;
44
45  /**
46   * Constructs the internal representation of the Transcoder service.
47   *
48   * @param Client|array $clientOrConfig The client used to deliver requests, or a
49   *                                     config array to pass to a new Client instance.
50   * @param string $rootUrl The root URL used for requests to the service.
51   */
52  public function __construct($clientOrConfig = [], $rootUrl = null)
53  {
54    parent::__construct($clientOrConfig);
55    $this->rootUrl = $rootUrl ?: 'https://transcoder.googleapis.com/';
56    $this->servicePath = '';
57    $this->batchPath = 'batch';
58    $this->version = 'v1';
59    $this->serviceName = 'transcoder';
60
61    $this->projects_locations_jobTemplates = new Transcoder\Resource\ProjectsLocationsJobTemplates(
62        $this,
63        $this->serviceName,
64        'jobTemplates',
65        [
66          'methods' => [
67            'create' => [
68              'path' => 'v1/{+parent}/jobTemplates',
69              'httpMethod' => 'POST',
70              'parameters' => [
71                'parent' => [
72                  'location' => 'path',
73                  'type' => 'string',
74                  'required' => true,
75                ],
76                'jobTemplateId' => [
77                  'location' => 'query',
78                  'type' => 'string',
79                ],
80              ],
81            ],'delete' => [
82              'path' => 'v1/{+name}',
83              'httpMethod' => 'DELETE',
84              'parameters' => [
85                'name' => [
86                  'location' => 'path',
87                  'type' => 'string',
88                  'required' => true,
89                ],
90                'allowMissing' => [
91                  'location' => 'query',
92                  'type' => 'boolean',
93                ],
94              ],
95            ],'get' => [
96              'path' => 'v1/{+name}',
97              'httpMethod' => 'GET',
98              'parameters' => [
99                'name' => [
100                  'location' => 'path',
101                  'type' => 'string',
102                  'required' => true,
103                ],
104              ],
105            ],'list' => [
106              'path' => 'v1/{+parent}/jobTemplates',
107              'httpMethod' => 'GET',
108              'parameters' => [
109                'parent' => [
110                  'location' => 'path',
111                  'type' => 'string',
112                  'required' => true,
113                ],
114                'filter' => [
115                  'location' => 'query',
116                  'type' => 'string',
117                ],
118                'orderBy' => [
119                  'location' => 'query',
120                  'type' => 'string',
121                ],
122                'pageSize' => [
123                  'location' => 'query',
124                  'type' => 'integer',
125                ],
126                'pageToken' => [
127                  'location' => 'query',
128                  'type' => 'string',
129                ],
130              ],
131            ],
132          ]
133        ]
134    );
135    $this->projects_locations_jobs = new Transcoder\Resource\ProjectsLocationsJobs(
136        $this,
137        $this->serviceName,
138        'jobs',
139        [
140          'methods' => [
141            'create' => [
142              'path' => 'v1/{+parent}/jobs',
143              'httpMethod' => 'POST',
144              'parameters' => [
145                'parent' => [
146                  'location' => 'path',
147                  'type' => 'string',
148                  'required' => true,
149                ],
150              ],
151            ],'delete' => [
152              'path' => 'v1/{+name}',
153              'httpMethod' => 'DELETE',
154              'parameters' => [
155                'name' => [
156                  'location' => 'path',
157                  'type' => 'string',
158                  'required' => true,
159                ],
160                'allowMissing' => [
161                  'location' => 'query',
162                  'type' => 'boolean',
163                ],
164              ],
165            ],'get' => [
166              'path' => 'v1/{+name}',
167              'httpMethod' => 'GET',
168              'parameters' => [
169                'name' => [
170                  'location' => 'path',
171                  'type' => 'string',
172                  'required' => true,
173                ],
174              ],
175            ],'list' => [
176              'path' => 'v1/{+parent}/jobs',
177              'httpMethod' => 'GET',
178              'parameters' => [
179                'parent' => [
180                  'location' => 'path',
181                  'type' => 'string',
182                  'required' => true,
183                ],
184                'filter' => [
185                  'location' => 'query',
186                  'type' => 'string',
187                ],
188                'orderBy' => [
189                  'location' => 'query',
190                  'type' => 'string',
191                ],
192                'pageSize' => [
193                  'location' => 'query',
194                  'type' => 'integer',
195                ],
196                'pageToken' => [
197                  'location' => 'query',
198                  'type' => 'string',
199                ],
200              ],
201            ],
202          ]
203        ]
204    );
205  }
206}
207
208// Adding a class alias for backwards compatibility with the previous class name.
209class_alias(Transcoder::class, 'Google_Service_Transcoder');
210