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 Libraryagent (v1). 24 * 25 * <p> 26 * A simple Google Example Library API.</p> 27 * 28 * <p> 29 * For more information about this service, see the API 30 * <a href="https://cloud.google.com/docs/quota" target="_blank">Documentation</a> 31 * </p> 32 * 33 * @author Google, Inc. 34 */ 35class Libraryagent extends \Google\Service 36{ 37 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */ 38 const CLOUD_PLATFORM = 39 "https://www.googleapis.com/auth/cloud-platform"; 40 41 public $shelves; 42 public $shelves_books; 43 44 /** 45 * Constructs the internal representation of the Libraryagent service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://libraryagent.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'libraryagent'; 59 60 $this->shelves = new Libraryagent\Resource\Shelves( 61 $this, 62 $this->serviceName, 63 'shelves', 64 [ 65 'methods' => [ 66 'get' => [ 67 'path' => 'v1/{+name}', 68 'httpMethod' => 'GET', 69 'parameters' => [ 70 'name' => [ 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ], 75 ], 76 ],'list' => [ 77 'path' => 'v1/shelves', 78 'httpMethod' => 'GET', 79 'parameters' => [ 80 'pageSize' => [ 81 'location' => 'query', 82 'type' => 'integer', 83 ], 84 'pageToken' => [ 85 'location' => 'query', 86 'type' => 'string', 87 ], 88 ], 89 ], 90 ] 91 ] 92 ); 93 $this->shelves_books = new Libraryagent\Resource\ShelvesBooks( 94 $this, 95 $this->serviceName, 96 'books', 97 [ 98 'methods' => [ 99 'borrow' => [ 100 'path' => 'v1/{+name}:borrow', 101 'httpMethod' => 'POST', 102 'parameters' => [ 103 'name' => [ 104 'location' => 'path', 105 'type' => 'string', 106 'required' => true, 107 ], 108 ], 109 ],'get' => [ 110 'path' => 'v1/{+name}', 111 'httpMethod' => 'GET', 112 'parameters' => [ 113 'name' => [ 114 'location' => 'path', 115 'type' => 'string', 116 'required' => true, 117 ], 118 ], 119 ],'list' => [ 120 'path' => 'v1/{+parent}/books', 121 'httpMethod' => 'GET', 122 'parameters' => [ 123 'parent' => [ 124 'location' => 'path', 125 'type' => 'string', 126 'required' => true, 127 ], 128 'pageSize' => [ 129 'location' => 'query', 130 'type' => 'integer', 131 ], 132 'pageToken' => [ 133 'location' => 'query', 134 'type' => 'string', 135 ], 136 ], 137 ],'return' => [ 138 'path' => 'v1/{+name}:return', 139 'httpMethod' => 'POST', 140 'parameters' => [ 141 'name' => [ 142 'location' => 'path', 143 'type' => 'string', 144 'required' => true, 145 ], 146 ], 147 ], 148 ] 149 ] 150 ); 151 } 152} 153 154// Adding a class alias for backwards compatibility with the previous class name. 155class_alias(Libraryagent::class, 'Google_Service_Libraryagent'); 156