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/**
19 * Service definition for Speech (v1).
20 *
21 * <p>
22 * Converts audio to text by applying powerful neural network models.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://cloud.google.com/speech-to-text/docs/quickstart-protocol" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_Speech extends Google_Service
32{
33  /** View and manage your data across Google Cloud Platform services. */
34  const CLOUD_PLATFORM =
35      "https://www.googleapis.com/auth/cloud-platform";
36
37  public $operations;
38  public $projects_locations_operations;
39  public $projects_operations_manualRecognitionTasks;
40  public $speech;
41
42  /**
43   * Constructs the internal representation of the Speech service.
44   *
45   * @param Google_Client $client
46   */
47  public function __construct(Google_Client $client)
48  {
49    parent::__construct($client);
50    $this->rootUrl = 'https://speech.googleapis.com/';
51    $this->servicePath = '';
52    $this->batchPath = 'batch';
53    $this->version = 'v1';
54    $this->serviceName = 'speech';
55
56    $this->operations = new Google_Service_Speech_Resource_Operations(
57        $this,
58        $this->serviceName,
59        'operations',
60        array(
61          'methods' => array(
62            'get' => array(
63              'path' => 'v1/operations/{+name}',
64              'httpMethod' => 'GET',
65              'parameters' => array(
66                'name' => array(
67                  'location' => 'path',
68                  'type' => 'string',
69                  'required' => true,
70                ),
71              ),
72            ),'list' => array(
73              'path' => 'v1/operations',
74              'httpMethod' => 'GET',
75              'parameters' => array(
76                'name' => array(
77                  'location' => 'query',
78                  'type' => 'string',
79                ),
80                'pageToken' => array(
81                  'location' => 'query',
82                  'type' => 'string',
83                ),
84                'pageSize' => array(
85                  'location' => 'query',
86                  'type' => 'integer',
87                ),
88                'filter' => array(
89                  'location' => 'query',
90                  'type' => 'string',
91                ),
92              ),
93            ),
94          )
95        )
96    );
97    $this->projects_locations_operations = new Google_Service_Speech_Resource_ProjectsLocationsOperations(
98        $this,
99        $this->serviceName,
100        'operations',
101        array(
102          'methods' => array(
103            'get' => array(
104              'path' => 'v1/{+name}',
105              'httpMethod' => 'GET',
106              'parameters' => array(
107                'name' => array(
108                  'location' => 'path',
109                  'type' => 'string',
110                  'required' => true,
111                ),
112              ),
113            ),'list' => array(
114              'path' => 'v1/{+name}/operations',
115              'httpMethod' => 'GET',
116              'parameters' => array(
117                'name' => array(
118                  'location' => 'path',
119                  'type' => 'string',
120                  'required' => true,
121                ),
122                'filter' => array(
123                  'location' => 'query',
124                  'type' => 'string',
125                ),
126                'pageToken' => array(
127                  'location' => 'query',
128                  'type' => 'string',
129                ),
130                'pageSize' => array(
131                  'location' => 'query',
132                  'type' => 'integer',
133                ),
134              ),
135            ),
136          )
137        )
138    );
139    $this->projects_operations_manualRecognitionTasks = new Google_Service_Speech_Resource_ProjectsOperationsManualRecognitionTasks(
140        $this,
141        $this->serviceName,
142        'manualRecognitionTasks',
143        array(
144          'methods' => array(
145            'get' => array(
146              'path' => 'v1/{+name}',
147              'httpMethod' => 'GET',
148              'parameters' => array(
149                'name' => array(
150                  'location' => 'path',
151                  'type' => 'string',
152                  'required' => true,
153                ),
154              ),
155            ),
156          )
157        )
158    );
159    $this->speech = new Google_Service_Speech_Resource_Speech(
160        $this,
161        $this->serviceName,
162        'speech',
163        array(
164          'methods' => array(
165            'longrunningrecognize' => array(
166              'path' => 'v1/speech:longrunningrecognize',
167              'httpMethod' => 'POST',
168              'parameters' => array(),
169            ),'recognize' => array(
170              'path' => 'v1/speech:recognize',
171              'httpMethod' => 'POST',
172              'parameters' => array(),
173            ),
174          )
175        )
176    );
177  }
178}
179