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\Books\Resource; 19 20use Google\Service\Books\BooksCloudloadingResource; 21use Google\Service\Books\BooksEmpty; 22 23/** 24 * The "cloudloading" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $booksService = new Google\Service\Books(...); 28 * $cloudloading = $booksService->cloudloading; 29 * </code> 30 */ 31class Cloudloading extends \Google\Service\Resource 32{ 33 /** 34 * Add a user-upload volume and triggers processing. (cloudloading.addBook) 35 * 36 * @param array $optParams Optional parameters. 37 * 38 * @opt_param string drive_document_id A drive document id. The 39 * upload_client_token must not be set. 40 * @opt_param string mime_type The document MIME type. It can be set only if the 41 * drive_document_id is set. 42 * @opt_param string name The document name. It can be set only if the 43 * drive_document_id is set. 44 * @opt_param string upload_client_token Scotty upload token. 45 * @return BooksCloudloadingResource 46 */ 47 public function addBook($optParams = []) 48 { 49 $params = []; 50 $params = array_merge($params, $optParams); 51 return $this->call('addBook', [$params], BooksCloudloadingResource::class); 52 } 53 /** 54 * Remove the book and its contents (cloudloading.deleteBook) 55 * 56 * @param string $volumeId The id of the book to be removed. 57 * @param array $optParams Optional parameters. 58 * @return BooksEmpty 59 */ 60 public function deleteBook($volumeId, $optParams = []) 61 { 62 $params = ['volumeId' => $volumeId]; 63 $params = array_merge($params, $optParams); 64 return $this->call('deleteBook', [$params], BooksEmpty::class); 65 } 66 /** 67 * Updates a user-upload volume. (cloudloading.updateBook) 68 * 69 * @param BooksCloudloadingResource $postBody 70 * @param array $optParams Optional parameters. 71 * @return BooksCloudloadingResource 72 */ 73 public function updateBook(BooksCloudloadingResource $postBody, $optParams = []) 74 { 75 $params = ['postBody' => $postBody]; 76 $params = array_merge($params, $optParams); 77 return $this->call('updateBook', [$params], BooksCloudloadingResource::class); 78 } 79} 80 81// Adding a class alias for backwards compatibility with the previous class name. 82class_alias(Cloudloading::class, 'Google_Service_Books_Resource_Cloudloading'); 83