source: vendor/google/apiclient-services/src/Texttospeech.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.6 KB
RevLine 
[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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for Texttospeech (v1).
24 *
25 * <p>
26 * Synthesizes natural-sounding speech by applying powerful neural network
27 * models.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/text-to-speech/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Texttospeech 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 $operations;
43 public $projects_locations;
44 public $projects_locations_operations;
45 public $text;
46 public $voices;
47 public $rootUrlTemplate;
48
49 /**
50 * Constructs the internal representation of the Texttospeech service.
51 *
52 * @param Client|array $clientOrConfig The client used to deliver requests, or a
53 * config array to pass to a new Client instance.
54 * @param string $rootUrl The root URL used for requests to the service.
55 */
56 public function __construct($clientOrConfig = [], $rootUrl = null)
57 {
58 parent::__construct($clientOrConfig);
59 $this->rootUrl = $rootUrl ?: 'https://texttospeech.googleapis.com/';
60 $this->rootUrlTemplate = $rootUrl ?: 'https://texttospeech.UNIVERSE_DOMAIN/';
61 $this->servicePath = '';
62 $this->batchPath = 'batch';
63 $this->version = 'v1';
64 $this->serviceName = 'texttospeech';
65
66 $this->operations = new Texttospeech\Resource\Operations(
67 $this,
68 $this->serviceName,
69 'operations',
70 [
71 'methods' => [
72 'cancel' => [
73 'path' => 'v1/{+name}:cancel',
74 'httpMethod' => 'POST',
75 'parameters' => [
76 'name' => [
77 'location' => 'path',
78 'type' => 'string',
79 'required' => true,
80 ],
81 ],
82 ],'delete' => [
83 'path' => 'v1/{+name}',
84 'httpMethod' => 'DELETE',
85 'parameters' => [
86 'name' => [
87 'location' => 'path',
88 'type' => 'string',
89 'required' => true,
90 ],
91 ],
92 ],
93 ]
94 ]
95 );
96 $this->projects_locations = new Texttospeech\Resource\ProjectsLocations(
97 $this,
98 $this->serviceName,
99 'locations',
100 [
101 'methods' => [
102 'synthesizeLongAudio' => [
103 'path' => 'v1/{+parent}:synthesizeLongAudio',
104 'httpMethod' => 'POST',
105 'parameters' => [
106 'parent' => [
107 'location' => 'path',
108 'type' => 'string',
109 'required' => true,
110 ],
111 ],
112 ],
113 ]
114 ]
115 );
116 $this->projects_locations_operations = new Texttospeech\Resource\ProjectsLocationsOperations(
117 $this,
118 $this->serviceName,
119 'operations',
120 [
121 'methods' => [
122 'get' => [
123 'path' => 'v1/{+name}',
124 'httpMethod' => 'GET',
125 'parameters' => [
126 'name' => [
127 'location' => 'path',
128 'type' => 'string',
129 'required' => true,
130 ],
131 ],
132 ],'list' => [
133 'path' => 'v1/{+name}/operations',
134 'httpMethod' => 'GET',
135 'parameters' => [
136 'name' => [
137 'location' => 'path',
138 'type' => 'string',
139 'required' => true,
140 ],
141 'filter' => [
142 'location' => 'query',
143 'type' => 'string',
144 ],
145 'pageSize' => [
146 'location' => 'query',
147 'type' => 'integer',
148 ],
149 'pageToken' => [
150 'location' => 'query',
151 'type' => 'string',
152 ],
153 ],
154 ],
155 ]
156 ]
157 );
158 $this->text = new Texttospeech\Resource\Text(
159 $this,
160 $this->serviceName,
161 'text',
162 [
163 'methods' => [
164 'synthesize' => [
165 'path' => 'v1/text:synthesize',
166 'httpMethod' => 'POST',
167 'parameters' => [],
168 ],
169 ]
170 ]
171 );
172 $this->voices = new Texttospeech\Resource\Voices(
173 $this,
174 $this->serviceName,
175 'voices',
176 [
177 'methods' => [
178 'list' => [
179 'path' => 'v1/voices',
180 'httpMethod' => 'GET',
181 'parameters' => [
182 'languageCode' => [
183 'location' => 'query',
184 'type' => 'string',
185 ],
186 ],
187 ],
188 ]
189 ]
190 );
191 }
192}
193
194// Adding a class alias for backwards compatibility with the previous class name.
195class_alias(Texttospeech::class, 'Google_Service_Texttospeech');
Note: See TracBrowser for help on using the repository browser.