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\Slides\Resource; 19 20use Google\Service\Slides\BatchUpdatePresentationRequest; 21use Google\Service\Slides\BatchUpdatePresentationResponse; 22use Google\Service\Slides\Presentation; 23 24/** 25 * The "presentations" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $slidesService = new Google\Service\Slides(...); 29 * $presentations = $slidesService->presentations; 30 * </code> 31 */ 32class Presentations extends \Google\Service\Resource 33{ 34 /** 35 * Applies one or more updates to the presentation. Each request is validated 36 * before being applied. If any request is not valid, then the entire request 37 * will fail and nothing will be applied. Some requests have replies to give you 38 * some information about how they are applied. Other requests do not need to 39 * return information; these each return an empty reply. The order of replies 40 * matches that of the requests. For example, suppose you call batchUpdate with 41 * four updates, and only the third one returns information. The response would 42 * have two empty replies: the reply to the third request, and another empty 43 * reply, in that order. Because other users may be editing the presentation, 44 * the presentation might not exactly reflect your changes: your changes may be 45 * altered with respect to collaborator changes. If there are no collaborators, 46 * the presentation should reflect your changes. In any case, the updates in 47 * your request are guaranteed to be applied together atomically. 48 * (presentations.batchUpdate) 49 * 50 * @param string $presentationId The presentation to apply the updates to. 51 * @param BatchUpdatePresentationRequest $postBody 52 * @param array $optParams Optional parameters. 53 * @return BatchUpdatePresentationResponse 54 */ 55 public function batchUpdate($presentationId, BatchUpdatePresentationRequest $postBody, $optParams = []) 56 { 57 $params = ['presentationId' => $presentationId, 'postBody' => $postBody]; 58 $params = array_merge($params, $optParams); 59 return $this->call('batchUpdate', [$params], BatchUpdatePresentationResponse::class); 60 } 61 /** 62 * Creates a blank presentation using the title given in the request. If a 63 * `presentationId` is provided, it is used as the ID of the new presentation. 64 * Otherwise, a new ID is generated. Other fields in the request, including any 65 * provided content, are ignored. Returns the created presentation. 66 * (presentations.create) 67 * 68 * @param Presentation $postBody 69 * @param array $optParams Optional parameters. 70 * @return Presentation 71 */ 72 public function create(Presentation $postBody, $optParams = []) 73 { 74 $params = ['postBody' => $postBody]; 75 $params = array_merge($params, $optParams); 76 return $this->call('create', [$params], Presentation::class); 77 } 78 /** 79 * Gets the latest version of the specified presentation. (presentations.get) 80 * 81 * @param string $presentationId The ID of the presentation to retrieve. 82 * @param array $optParams Optional parameters. 83 * @return Presentation 84 */ 85 public function get($presentationId, $optParams = []) 86 { 87 $params = ['presentationId' => $presentationId]; 88 $params = array_merge($params, $optParams); 89 return $this->call('get', [$params], Presentation::class); 90 } 91} 92 93// Adding a class alias for backwards compatibility with the previous class name. 94class_alias(Presentations::class, 'Google_Service_Slides_Resource_Presentations'); 95