[f9c482b] | 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 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 | */
|
---|
| 35 | class 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 | public $rootUrlTemplate;
|
---|
| 44 |
|
---|
| 45 | /**
|
---|
| 46 | * Constructs the internal representation of the Libraryagent service.
|
---|
| 47 | *
|
---|
| 48 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
| 49 | * config array to pass to a new Client instance.
|
---|
| 50 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
| 51 | */
|
---|
| 52 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
| 53 | {
|
---|
| 54 | parent::__construct($clientOrConfig);
|
---|
| 55 | $this->rootUrl = $rootUrl ?: 'https://libraryagent.googleapis.com/';
|
---|
| 56 | $this->rootUrlTemplate = $rootUrl ?: 'https://libraryagent.UNIVERSE_DOMAIN/';
|
---|
| 57 | $this->servicePath = '';
|
---|
| 58 | $this->batchPath = 'batch';
|
---|
| 59 | $this->version = 'v1';
|
---|
| 60 | $this->serviceName = 'libraryagent';
|
---|
| 61 |
|
---|
| 62 | $this->shelves = new Libraryagent\Resource\Shelves(
|
---|
| 63 | $this,
|
---|
| 64 | $this->serviceName,
|
---|
| 65 | 'shelves',
|
---|
| 66 | [
|
---|
| 67 | 'methods' => [
|
---|
| 68 | 'get' => [
|
---|
| 69 | 'path' => 'v1/{+name}',
|
---|
| 70 | 'httpMethod' => 'GET',
|
---|
| 71 | 'parameters' => [
|
---|
| 72 | 'name' => [
|
---|
| 73 | 'location' => 'path',
|
---|
| 74 | 'type' => 'string',
|
---|
| 75 | 'required' => true,
|
---|
| 76 | ],
|
---|
| 77 | ],
|
---|
| 78 | ],'list' => [
|
---|
| 79 | 'path' => 'v1/shelves',
|
---|
| 80 | 'httpMethod' => 'GET',
|
---|
| 81 | 'parameters' => [
|
---|
| 82 | 'pageSize' => [
|
---|
| 83 | 'location' => 'query',
|
---|
| 84 | 'type' => 'integer',
|
---|
| 85 | ],
|
---|
| 86 | 'pageToken' => [
|
---|
| 87 | 'location' => 'query',
|
---|
| 88 | 'type' => 'string',
|
---|
| 89 | ],
|
---|
| 90 | ],
|
---|
| 91 | ],
|
---|
| 92 | ]
|
---|
| 93 | ]
|
---|
| 94 | );
|
---|
| 95 | $this->shelves_books = new Libraryagent\Resource\ShelvesBooks(
|
---|
| 96 | $this,
|
---|
| 97 | $this->serviceName,
|
---|
| 98 | 'books',
|
---|
| 99 | [
|
---|
| 100 | 'methods' => [
|
---|
| 101 | 'borrow' => [
|
---|
| 102 | 'path' => 'v1/{+name}:borrow',
|
---|
| 103 | 'httpMethod' => 'POST',
|
---|
| 104 | 'parameters' => [
|
---|
| 105 | 'name' => [
|
---|
| 106 | 'location' => 'path',
|
---|
| 107 | 'type' => 'string',
|
---|
| 108 | 'required' => true,
|
---|
| 109 | ],
|
---|
| 110 | ],
|
---|
| 111 | ],'get' => [
|
---|
| 112 | 'path' => 'v1/{+name}',
|
---|
| 113 | 'httpMethod' => 'GET',
|
---|
| 114 | 'parameters' => [
|
---|
| 115 | 'name' => [
|
---|
| 116 | 'location' => 'path',
|
---|
| 117 | 'type' => 'string',
|
---|
| 118 | 'required' => true,
|
---|
| 119 | ],
|
---|
| 120 | ],
|
---|
| 121 | ],'list' => [
|
---|
| 122 | 'path' => 'v1/{+parent}/books',
|
---|
| 123 | 'httpMethod' => 'GET',
|
---|
| 124 | 'parameters' => [
|
---|
| 125 | 'parent' => [
|
---|
| 126 | 'location' => 'path',
|
---|
| 127 | 'type' => 'string',
|
---|
| 128 | 'required' => true,
|
---|
| 129 | ],
|
---|
| 130 | 'pageSize' => [
|
---|
| 131 | 'location' => 'query',
|
---|
| 132 | 'type' => 'integer',
|
---|
| 133 | ],
|
---|
| 134 | 'pageToken' => [
|
---|
| 135 | 'location' => 'query',
|
---|
| 136 | 'type' => 'string',
|
---|
| 137 | ],
|
---|
| 138 | ],
|
---|
| 139 | ],'return' => [
|
---|
| 140 | 'path' => 'v1/{+name}:return',
|
---|
| 141 | 'httpMethod' => 'POST',
|
---|
| 142 | 'parameters' => [
|
---|
| 143 | 'name' => [
|
---|
| 144 | 'location' => 'path',
|
---|
| 145 | 'type' => 'string',
|
---|
| 146 | 'required' => true,
|
---|
| 147 | ],
|
---|
| 148 | ],
|
---|
| 149 | ],
|
---|
| 150 | ]
|
---|
| 151 | ]
|
---|
| 152 | );
|
---|
| 153 | }
|
---|
| 154 | }
|
---|
| 155 |
|
---|
| 156 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 157 | class_alias(Libraryagent::class, 'Google_Service_Libraryagent');
|
---|