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;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for DataPortability (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * The Data Portability API lets you build applications that request
|
---|
27 | * authorization from a user to move a copy of data from Google services into
|
---|
28 | * your application. This enables data portability and facilitates switching
|
---|
29 | * services.</p>
|
---|
30 | *
|
---|
31 | * <p>
|
---|
32 | * For more information about this service, see the API
|
---|
33 | * <a href="https://developers.google.com/data-portability" target="_blank">Documentation</a>
|
---|
34 | * </p>
|
---|
35 | *
|
---|
36 | * @author Google, Inc.
|
---|
37 | */
|
---|
38 | class DataPortability extends \Google\Service
|
---|
39 | {
|
---|
40 | /** Move a copy of the Google Alerts subscriptions you created.. */
|
---|
41 | const DATAPORTABILITY_ALERTS_SUBSCRIPTIONS =
|
---|
42 | "https://www.googleapis.com/auth/dataportability.alerts.subscriptions";
|
---|
43 | /** Move a copy of messages between you and the businesses you have conversations with across Google services.. */
|
---|
44 | const DATAPORTABILITY_BUSINESSMESSAGING_CONVERSATIONS =
|
---|
45 | "https://www.googleapis.com/auth/dataportability.businessmessaging.conversations";
|
---|
46 | /** Move a copy of the information you entered into online forms in Chrome.. */
|
---|
47 | const DATAPORTABILITY_CHROME_AUTOFILL =
|
---|
48 | "https://www.googleapis.com/auth/dataportability.chrome.autofill";
|
---|
49 | /** Move a copy of pages you bookmarked in Chrome.. */
|
---|
50 | const DATAPORTABILITY_CHROME_BOOKMARKS =
|
---|
51 | "https://www.googleapis.com/auth/dataportability.chrome.bookmarks";
|
---|
52 | /** Move a copy of words you added to Chrome's dictionary.. */
|
---|
53 | const DATAPORTABILITY_CHROME_DICTIONARY =
|
---|
54 | "https://www.googleapis.com/auth/dataportability.chrome.dictionary";
|
---|
55 | /** Move a copy of extensions you installed from the Chrome Web Store.. */
|
---|
56 | const DATAPORTABILITY_CHROME_EXTENSIONS =
|
---|
57 | "https://www.googleapis.com/auth/dataportability.chrome.extensions";
|
---|
58 | /** Move a copy of sites you visited in Chrome.. */
|
---|
59 | const DATAPORTABILITY_CHROME_HISTORY =
|
---|
60 | "https://www.googleapis.com/auth/dataportability.chrome.history";
|
---|
61 | /** Move a copy of pages you added to your reading list in Chrome.. */
|
---|
62 | const DATAPORTABILITY_CHROME_READING_LIST =
|
---|
63 | "https://www.googleapis.com/auth/dataportability.chrome.reading_list";
|
---|
64 | /** Move a copy of your settings in Chrome.. */
|
---|
65 | const DATAPORTABILITY_CHROME_SETTINGS =
|
---|
66 | "https://www.googleapis.com/auth/dataportability.chrome.settings";
|
---|
67 | /** Move a copy of searches and sites you follow, saved by Discover.. */
|
---|
68 | const DATAPORTABILITY_DISCOVER_FOLLOWS =
|
---|
69 | "https://www.googleapis.com/auth/dataportability.discover.follows";
|
---|
70 | /** Move a copy of links to your liked documents, saved by Discover.. */
|
---|
71 | const DATAPORTABILITY_DISCOVER_LIKES =
|
---|
72 | "https://www.googleapis.com/auth/dataportability.discover.likes";
|
---|
73 | /** Move a copy of content you marked as not interested, saved by Discover.. */
|
---|
74 | const DATAPORTABILITY_DISCOVER_NOT_INTERESTED =
|
---|
75 | "https://www.googleapis.com/auth/dataportability.discover.not_interested";
|
---|
76 | /** Move a copy of the places you labeled on Maps.. */
|
---|
77 | const DATAPORTABILITY_MAPS_ALIASED_PLACES =
|
---|
78 | "https://www.googleapis.com/auth/dataportability.maps.aliased_places";
|
---|
79 | /** Move a copy of your pinned trips on Maps.. */
|
---|
80 | const DATAPORTABILITY_MAPS_COMMUTE_ROUTES =
|
---|
81 | "https://www.googleapis.com/auth/dataportability.maps.commute_routes";
|
---|
82 | /** Move a copy of your commute settings on Maps.. */
|
---|
83 | const DATAPORTABILITY_MAPS_COMMUTE_SETTINGS =
|
---|
84 | "https://www.googleapis.com/auth/dataportability.maps.commute_settings";
|
---|
85 | /** Move a copy of your electric vehicle profile on Maps.. */
|
---|
86 | const DATAPORTABILITY_MAPS_EV_PROFILE =
|
---|
87 | "https://www.googleapis.com/auth/dataportability.maps.ev_profile";
|
---|
88 | /** Move a copy of the corrections you made to places or map information on Maps.. */
|
---|
89 | const DATAPORTABILITY_MAPS_FACTUAL_CONTRIBUTIONS =
|
---|
90 | "https://www.googleapis.com/auth/dataportability.maps.factual_contributions";
|
---|
91 | /** Move a copy of your updates to places on Maps.. */
|
---|
92 | const DATAPORTABILITY_MAPS_OFFERING_CONTRIBUTIONS =
|
---|
93 | "https://www.googleapis.com/auth/dataportability.maps.offering_contributions";
|
---|
94 | /** Move a copy of the photos and videos you posted on Maps.. */
|
---|
95 | const DATAPORTABILITY_MAPS_PHOTOS_VIDEOS =
|
---|
96 | "https://www.googleapis.com/auth/dataportability.maps.photos_videos";
|
---|
97 | /** Move a copy of the questions and answers you posted on Maps.. */
|
---|
98 | const DATAPORTABILITY_MAPS_QUESTIONS_ANSWERS =
|
---|
99 | "https://www.googleapis.com/auth/dataportability.maps.questions_answers";
|
---|
100 | /** Move a copy of your reviews and posts on Maps.. */
|
---|
101 | const DATAPORTABILITY_MAPS_REVIEWS =
|
---|
102 | "https://www.googleapis.com/auth/dataportability.maps.reviews";
|
---|
103 | /** Move a copy of your Starred places list on Maps.. */
|
---|
104 | const DATAPORTABILITY_MAPS_STARRED_PLACES =
|
---|
105 | "https://www.googleapis.com/auth/dataportability.maps.starred_places";
|
---|
106 | /** Move a copy of your Maps activity.. */
|
---|
107 | const DATAPORTABILITY_MYACTIVITY_MAPS =
|
---|
108 | "https://www.googleapis.com/auth/dataportability.myactivity.maps";
|
---|
109 | /** Move a copy of your My Ad Center activity.. */
|
---|
110 | const DATAPORTABILITY_MYACTIVITY_MYADCENTER =
|
---|
111 | "https://www.googleapis.com/auth/dataportability.myactivity.myadcenter";
|
---|
112 | /** Move a copy of your Google Play activity.. */
|
---|
113 | const DATAPORTABILITY_MYACTIVITY_PLAY =
|
---|
114 | "https://www.googleapis.com/auth/dataportability.myactivity.play";
|
---|
115 | /** Move a copy of your Google Search activity.. */
|
---|
116 | const DATAPORTABILITY_MYACTIVITY_SEARCH =
|
---|
117 | "https://www.googleapis.com/auth/dataportability.myactivity.search";
|
---|
118 | /** Move a copy of your Shopping activity.. */
|
---|
119 | const DATAPORTABILITY_MYACTIVITY_SHOPPING =
|
---|
120 | "https://www.googleapis.com/auth/dataportability.myactivity.shopping";
|
---|
121 | /** Move a copy of your YouTube activity.. */
|
---|
122 | const DATAPORTABILITY_MYACTIVITY_YOUTUBE =
|
---|
123 | "https://www.googleapis.com/auth/dataportability.myactivity.youtube";
|
---|
124 | /** Move a copy of the maps you created in My Maps.. */
|
---|
125 | const DATAPORTABILITY_MYMAPS_MAPS =
|
---|
126 | "https://www.googleapis.com/auth/dataportability.mymaps.maps";
|
---|
127 | /** Move a copy of your food purchase and reservation activity.. */
|
---|
128 | const DATAPORTABILITY_ORDER_RESERVE_PURCHASES_RESERVATIONS =
|
---|
129 | "https://www.googleapis.com/auth/dataportability.order_reserve.purchases_reservations";
|
---|
130 | /** Move a copy of information about your devices with Google Play Store installed.. */
|
---|
131 | const DATAPORTABILITY_PLAY_DEVICES =
|
---|
132 | "https://www.googleapis.com/auth/dataportability.play.devices";
|
---|
133 | /** Move a copy of your Google Play Store Grouping tags created by app developers.. */
|
---|
134 | const DATAPORTABILITY_PLAY_GROUPING =
|
---|
135 | "https://www.googleapis.com/auth/dataportability.play.grouping";
|
---|
136 | /** Move a copy of your Google Play Store app installations.. */
|
---|
137 | const DATAPORTABILITY_PLAY_INSTALLS =
|
---|
138 | "https://www.googleapis.com/auth/dataportability.play.installs";
|
---|
139 | /** Move a copy of your Google Play Store downloads, including books, games, and apps.. */
|
---|
140 | const DATAPORTABILITY_PLAY_LIBRARY =
|
---|
141 | "https://www.googleapis.com/auth/dataportability.play.library";
|
---|
142 | /** Move a copy of information about your Google Play Store Points.. */
|
---|
143 | const DATAPORTABILITY_PLAY_PLAYPOINTS =
|
---|
144 | "https://www.googleapis.com/auth/dataportability.play.playpoints";
|
---|
145 | /** Move a copy of information about your Google Play Store promotions.. */
|
---|
146 | const DATAPORTABILITY_PLAY_PROMOTIONS =
|
---|
147 | "https://www.googleapis.com/auth/dataportability.play.promotions";
|
---|
148 | /** Move a copy of your Google Play Store purchases.. */
|
---|
149 | const DATAPORTABILITY_PLAY_PURCHASES =
|
---|
150 | "https://www.googleapis.com/auth/dataportability.play.purchases";
|
---|
151 | /** Move a copy of your Google Play Store redemption activities.. */
|
---|
152 | const DATAPORTABILITY_PLAY_REDEMPTIONS =
|
---|
153 | "https://www.googleapis.com/auth/dataportability.play.redemptions";
|
---|
154 | /** Move a copy of your Google Play Store subscriptions.. */
|
---|
155 | const DATAPORTABILITY_PLAY_SUBSCRIPTIONS =
|
---|
156 | "https://www.googleapis.com/auth/dataportability.play.subscriptions";
|
---|
157 | /** Move a copy of your Google Play Store user settings and preferences.. */
|
---|
158 | const DATAPORTABILITY_PLAY_USERSETTINGS =
|
---|
159 | "https://www.googleapis.com/auth/dataportability.play.usersettings";
|
---|
160 | /** Move a copy of your saved links, images, places, and collections from your use of Google services.. */
|
---|
161 | const DATAPORTABILITY_SAVED_COLLECTIONS =
|
---|
162 | "https://www.googleapis.com/auth/dataportability.saved.collections";
|
---|
163 | /** Move a copy of your media reviews on Google Search.. */
|
---|
164 | const DATAPORTABILITY_SEARCH_UGC_MEDIA_REVIEWS_AND_STARS =
|
---|
165 | "https://www.googleapis.com/auth/dataportability.search_ugc.media.reviews_and_stars";
|
---|
166 | /** Move a copy of your self-reported video streaming provider preferences from Google Search and Google TV.. */
|
---|
167 | const DATAPORTABILITY_SEARCH_UGC_MEDIA_STREAMING_VIDEO_PROVIDERS =
|
---|
168 | "https://www.googleapis.com/auth/dataportability.search_ugc.media.streaming_video_providers";
|
---|
169 | /** Move a copy of your indicated thumbs up and thumbs down on media in Google Search and Google TV.. */
|
---|
170 | const DATAPORTABILITY_SEARCH_UGC_MEDIA_THUMBS =
|
---|
171 | "https://www.googleapis.com/auth/dataportability.search_ugc.media.thumbs";
|
---|
172 | /** Move a copy of information about the movies and TV shows you marked as watched on Google Search and Google TV.. */
|
---|
173 | const DATAPORTABILITY_SEARCH_UGC_MEDIA_WATCHED =
|
---|
174 | "https://www.googleapis.com/auth/dataportability.search_ugc.media.watched";
|
---|
175 | /** Move a copy of your notification settings on the Google Search app.. */
|
---|
176 | const DATAPORTABILITY_SEARCHNOTIFICATIONS_SETTINGS =
|
---|
177 | "https://www.googleapis.com/auth/dataportability.searchnotifications.settings";
|
---|
178 | /** Move a copy of your notification subscriptions on Google Search app.. */
|
---|
179 | const DATAPORTABILITY_SEARCHNOTIFICATIONS_SUBSCRIPTIONS =
|
---|
180 | "https://www.googleapis.com/auth/dataportability.searchnotifications.subscriptions";
|
---|
181 | /** Move a copy of your shipping information on Shopping.. */
|
---|
182 | const DATAPORTABILITY_SHOPPING_ADDRESSES =
|
---|
183 | "https://www.googleapis.com/auth/dataportability.shopping.addresses";
|
---|
184 | /** Move a copy of reviews you wrote about products or online stores on Google Search.. */
|
---|
185 | const DATAPORTABILITY_SHOPPING_REVIEWS =
|
---|
186 | "https://www.googleapis.com/auth/dataportability.shopping.reviews";
|
---|
187 | /** Move a copy of the images and videos you uploaded to Street View.. */
|
---|
188 | const DATAPORTABILITY_STREETVIEW_IMAGERY =
|
---|
189 | "https://www.googleapis.com/auth/dataportability.streetview.imagery";
|
---|
190 | /** Move a copy of information about your YouTube channel.. */
|
---|
191 | const DATAPORTABILITY_YOUTUBE_CHANNEL =
|
---|
192 | "https://www.googleapis.com/auth/dataportability.youtube.channel";
|
---|
193 | /** Move a copy of your YouTube clips metadata.. */
|
---|
194 | const DATAPORTABILITY_YOUTUBE_CLIPS =
|
---|
195 | "https://www.googleapis.com/auth/dataportability.youtube.clips";
|
---|
196 | /** Move a copy of your YouTube comments.. */
|
---|
197 | const DATAPORTABILITY_YOUTUBE_COMMENTS =
|
---|
198 | "https://www.googleapis.com/auth/dataportability.youtube.comments";
|
---|
199 | /** Move a copy of your YouTube messages in live chat.. */
|
---|
200 | const DATAPORTABILITY_YOUTUBE_LIVE_CHAT =
|
---|
201 | "https://www.googleapis.com/auth/dataportability.youtube.live_chat";
|
---|
202 | /** Move a copy of your uploaded YouTube music tracks and your YouTube music library.. */
|
---|
203 | const DATAPORTABILITY_YOUTUBE_MUSIC =
|
---|
204 | "https://www.googleapis.com/auth/dataportability.youtube.music";
|
---|
205 | /** Move a copy of your YouTube playables saved game progress files.. */
|
---|
206 | const DATAPORTABILITY_YOUTUBE_PLAYABLE =
|
---|
207 | "https://www.googleapis.com/auth/dataportability.youtube.playable";
|
---|
208 | /** Move a copy of your YouTube posts.. */
|
---|
209 | const DATAPORTABILITY_YOUTUBE_POSTS =
|
---|
210 | "https://www.googleapis.com/auth/dataportability.youtube.posts";
|
---|
211 | /** Move a copy of your YouTube private playlists.. */
|
---|
212 | const DATAPORTABILITY_YOUTUBE_PRIVATE_PLAYLISTS =
|
---|
213 | "https://www.googleapis.com/auth/dataportability.youtube.private_playlists";
|
---|
214 | /** Move a copy of your private YouTube videos and information about them.. */
|
---|
215 | const DATAPORTABILITY_YOUTUBE_PRIVATE_VIDEOS =
|
---|
216 | "https://www.googleapis.com/auth/dataportability.youtube.private_videos";
|
---|
217 | /** Move a copy of your public YouTube playlists.. */
|
---|
218 | const DATAPORTABILITY_YOUTUBE_PUBLIC_PLAYLISTS =
|
---|
219 | "https://www.googleapis.com/auth/dataportability.youtube.public_playlists";
|
---|
220 | /** Move a copy of your public YouTube videos and information about them.. */
|
---|
221 | const DATAPORTABILITY_YOUTUBE_PUBLIC_VIDEOS =
|
---|
222 | "https://www.googleapis.com/auth/dataportability.youtube.public_videos";
|
---|
223 | /** Move a copy of your YouTube shopping wishlists, and wishlist items.. */
|
---|
224 | const DATAPORTABILITY_YOUTUBE_SHOPPING =
|
---|
225 | "https://www.googleapis.com/auth/dataportability.youtube.shopping";
|
---|
226 | /** Move a copy of your YouTube channel subscriptions, even if they're private.. */
|
---|
227 | const DATAPORTABILITY_YOUTUBE_SUBSCRIPTIONS =
|
---|
228 | "https://www.googleapis.com/auth/dataportability.youtube.subscriptions";
|
---|
229 | /** Move a copy of your unlisted YouTube playlists.. */
|
---|
230 | const DATAPORTABILITY_YOUTUBE_UNLISTED_PLAYLISTS =
|
---|
231 | "https://www.googleapis.com/auth/dataportability.youtube.unlisted_playlists";
|
---|
232 | /** Move a copy of your unlisted YouTube videos and information about them.. */
|
---|
233 | const DATAPORTABILITY_YOUTUBE_UNLISTED_VIDEOS =
|
---|
234 | "https://www.googleapis.com/auth/dataportability.youtube.unlisted_videos";
|
---|
235 |
|
---|
236 | public $archiveJobs;
|
---|
237 | public $authorization;
|
---|
238 | public $portabilityArchive;
|
---|
239 | public $rootUrlTemplate;
|
---|
240 |
|
---|
241 | /**
|
---|
242 | * Constructs the internal representation of the DataPortability service.
|
---|
243 | *
|
---|
244 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
245 | * config array to pass to a new Client instance.
|
---|
246 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
247 | */
|
---|
248 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
249 | {
|
---|
250 | parent::__construct($clientOrConfig);
|
---|
251 | $this->rootUrl = $rootUrl ?: 'https://dataportability.googleapis.com/';
|
---|
252 | $this->rootUrlTemplate = $rootUrl ?: 'https://dataportability.UNIVERSE_DOMAIN/';
|
---|
253 | $this->servicePath = '';
|
---|
254 | $this->batchPath = 'batch';
|
---|
255 | $this->version = 'v1';
|
---|
256 | $this->serviceName = 'dataportability';
|
---|
257 |
|
---|
258 | $this->archiveJobs = new DataPortability\Resource\ArchiveJobs(
|
---|
259 | $this,
|
---|
260 | $this->serviceName,
|
---|
261 | 'archiveJobs',
|
---|
262 | [
|
---|
263 | 'methods' => [
|
---|
264 | 'getPortabilityArchiveState' => [
|
---|
265 | 'path' => 'v1/{+name}',
|
---|
266 | 'httpMethod' => 'GET',
|
---|
267 | 'parameters' => [
|
---|
268 | 'name' => [
|
---|
269 | 'location' => 'path',
|
---|
270 | 'type' => 'string',
|
---|
271 | 'required' => true,
|
---|
272 | ],
|
---|
273 | ],
|
---|
274 | ],'retry' => [
|
---|
275 | 'path' => 'v1/{+name}:retry',
|
---|
276 | 'httpMethod' => 'POST',
|
---|
277 | 'parameters' => [
|
---|
278 | 'name' => [
|
---|
279 | 'location' => 'path',
|
---|
280 | 'type' => 'string',
|
---|
281 | 'required' => true,
|
---|
282 | ],
|
---|
283 | ],
|
---|
284 | ],
|
---|
285 | ]
|
---|
286 | ]
|
---|
287 | );
|
---|
288 | $this->authorization = new DataPortability\Resource\Authorization(
|
---|
289 | $this,
|
---|
290 | $this->serviceName,
|
---|
291 | 'authorization',
|
---|
292 | [
|
---|
293 | 'methods' => [
|
---|
294 | 'reset' => [
|
---|
295 | 'path' => 'v1/authorization:reset',
|
---|
296 | 'httpMethod' => 'POST',
|
---|
297 | 'parameters' => [],
|
---|
298 | ],
|
---|
299 | ]
|
---|
300 | ]
|
---|
301 | );
|
---|
302 | $this->portabilityArchive = new DataPortability\Resource\PortabilityArchive(
|
---|
303 | $this,
|
---|
304 | $this->serviceName,
|
---|
305 | 'portabilityArchive',
|
---|
306 | [
|
---|
307 | 'methods' => [
|
---|
308 | 'initiate' => [
|
---|
309 | 'path' => 'v1/portabilityArchive:initiate',
|
---|
310 | 'httpMethod' => 'POST',
|
---|
311 | 'parameters' => [],
|
---|
312 | ],
|
---|
313 | ]
|
---|
314 | ]
|
---|
315 | );
|
---|
316 | }
|
---|
317 | }
|
---|
318 |
|
---|
319 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
320 | class_alias(DataPortability::class, 'Google_Service_DataPortability');
|
---|