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 Keep (v1).
24 *
25 * <p>
26 * The Google Keep API is used in an enterprise environment to manage Google
27 * Keep content and resolve issues identified by cloud security software.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/keep/api" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Keep extends \Google\Service
37{
38  /** See, edit, create and permanently delete all your Google Keep data. */
39  const KEEP =
40      "https://www.googleapis.com/auth/keep";
41  /** View all your Google Keep data. */
42  const KEEP_READONLY =
43      "https://www.googleapis.com/auth/keep.readonly";
44
45  public $media;
46  public $notes;
47  public $notes_permissions;
48
49  /**
50   * Constructs the internal representation of the Keep service.
51   *
52   * @param Client|array $clientOrConfig The client used to deliver requests, or a
53   *                                     config array to pass to a new Client instance.
54   * @param string $rootUrl The root URL used for requests to the service.
55   */
56  public function __construct($clientOrConfig = [], $rootUrl = null)
57  {
58    parent::__construct($clientOrConfig);
59    $this->rootUrl = $rootUrl ?: 'https://keep.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v1';
63    $this->serviceName = 'keep';
64
65    $this->media = new Keep\Resource\Media(
66        $this,
67        $this->serviceName,
68        'media',
69        [
70          'methods' => [
71            'download' => [
72              'path' => 'v1/{+name}',
73              'httpMethod' => 'GET',
74              'parameters' => [
75                'name' => [
76                  'location' => 'path',
77                  'type' => 'string',
78                  'required' => true,
79                ],
80                'mimeType' => [
81                  'location' => 'query',
82                  'type' => 'string',
83                ],
84              ],
85            ],
86          ]
87        ]
88    );
89    $this->notes = new Keep\Resource\Notes(
90        $this,
91        $this->serviceName,
92        'notes',
93        [
94          'methods' => [
95            'create' => [
96              'path' => 'v1/notes',
97              'httpMethod' => 'POST',
98              'parameters' => [],
99            ],'delete' => [
100              'path' => 'v1/{+name}',
101              'httpMethod' => 'DELETE',
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/notes',
121              'httpMethod' => 'GET',
122              'parameters' => [
123                'filter' => [
124                  'location' => 'query',
125                  'type' => 'string',
126                ],
127                'pageSize' => [
128                  'location' => 'query',
129                  'type' => 'integer',
130                ],
131                'pageToken' => [
132                  'location' => 'query',
133                  'type' => 'string',
134                ],
135              ],
136            ],
137          ]
138        ]
139    );
140    $this->notes_permissions = new Keep\Resource\NotesPermissions(
141        $this,
142        $this->serviceName,
143        'permissions',
144        [
145          'methods' => [
146            'batchCreate' => [
147              'path' => 'v1/{+parent}/permissions:batchCreate',
148              'httpMethod' => 'POST',
149              'parameters' => [
150                'parent' => [
151                  'location' => 'path',
152                  'type' => 'string',
153                  'required' => true,
154                ],
155              ],
156            ],'batchDelete' => [
157              'path' => 'v1/{+parent}/permissions:batchDelete',
158              'httpMethod' => 'POST',
159              'parameters' => [
160                'parent' => [
161                  'location' => 'path',
162                  'type' => 'string',
163                  'required' => true,
164                ],
165              ],
166            ],
167          ]
168        ]
169    );
170  }
171}
172
173// Adding a class alias for backwards compatibility with the previous class name.
174class_alias(Keep::class, 'Google_Service_Keep');
175