Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Keep\Resource;
use Google\Service\Keep\Attachment;
/**
* The "media" collection of methods.
* Typical usage is:
* <code>
* $keepService = new Google\Service\Keep(...);
* $media = $keepService->media;
* </code>
*/
class Media extends \Google\Service\Resource
{
/**
* Gets an attachment. To download attachment media via REST requires the
* alt=media query parameter. Returns a 400 bad request error if attachment
* media is not available in the requested MIME type. (media.download)
*
* @param string $name Required. The name of the attachment.
* @param array $optParams Optional parameters.
*
* @opt_param string mimeType The IANA MIME type format requested. The requested
* MIME type must be one specified in the attachment.mime_type. Required when
* downloading attachment media and ignored otherwise.
* @return Attachment
* @throws \Google\Service\Exception
*/
public function download($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('download', [$params], Attachment::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Media::class, 'Google_Service_Keep_Resource_Media');

View File

@@ -0,0 +1,110 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Keep\Resource;
use Google\Service\Keep\KeepEmpty;
use Google\Service\Keep\ListNotesResponse;
use Google\Service\Keep\Note;
/**
* The "notes" collection of methods.
* Typical usage is:
* <code>
* $keepService = new Google\Service\Keep(...);
* $notes = $keepService->notes;
* </code>
*/
class Notes extends \Google\Service\Resource
{
/**
* Creates a new note. (notes.create)
*
* @param Note $postBody
* @param array $optParams Optional parameters.
* @return Note
* @throws \Google\Service\Exception
*/
public function create(Note $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], Note::class);
}
/**
* Deletes a note. Caller must have the `OWNER` role on the note to delete.
* Deleting a note removes the resource immediately and cannot be undone. Any
* collaborators will lose access to the note. (notes.delete)
*
* @param string $name Required. Name of the note to delete.
* @param array $optParams Optional parameters.
* @return KeepEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], KeepEmpty::class);
}
/**
* Gets a note. (notes.get)
*
* @param string $name Required. Name of the resource.
* @param array $optParams Optional parameters.
* @return Note
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Note::class);
}
/**
* Lists notes. Every list call returns a page of results with `page_size` as
* the upper bound of returned items. A `page_size` of zero allows the server to
* choose the upper bound. The ListNotesResponse contains at most `page_size`
* entries. If there are more things left to list, it provides a
* `next_page_token` value. (Page tokens are opaque values.) To get the next
* page of results, copy the result's `next_page_token` into the next request's
* `page_token`. Repeat until the `next_page_token` returned with a page of
* results is empty. ListNotes return consistent results in the face of
* concurrent changes, or signals that it cannot with an ABORTED error.
* (notes.listNotes)
*
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filter for list results. If no filter is supplied,
* the `trashed` filter is applied by default. Valid fields to filter by are:
* `create_time`, `update_time`, `trash_time`, and `trashed`. Filter syntax
* follows the [Google AIP filtering spec](https://aip.dev/160).
* @opt_param int pageSize The maximum number of results to return.
* @opt_param string pageToken The previous page's `next_page_token` field.
* @return ListNotesResponse
* @throws \Google\Service\Exception
*/
public function listNotes($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListNotesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Notes::class, 'Google_Service_Keep_Resource_Notes');

View File

@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Keep\Resource;
use Google\Service\Keep\BatchCreatePermissionsRequest;
use Google\Service\Keep\BatchCreatePermissionsResponse;
use Google\Service\Keep\BatchDeletePermissionsRequest;
use Google\Service\Keep\KeepEmpty;
/**
* The "permissions" collection of methods.
* Typical usage is:
* <code>
* $keepService = new Google\Service\Keep(...);
* $permissions = $keepService->notes_permissions;
* </code>
*/
class NotesPermissions extends \Google\Service\Resource
{
/**
* Creates one or more permissions on the note. Only permissions with the
* `WRITER` role may be created. If adding any permission fails, then the entire
* request fails and no changes are made. (permissions.batchCreate)
*
* @param string $parent The parent resource shared by all Permissions being
* created. Format: `notes/{note}` If this is set, the parent field in the
* CreatePermission messages must either be empty or match this field.
* @param BatchCreatePermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return BatchCreatePermissionsResponse
* @throws \Google\Service\Exception
*/
public function batchCreate($parent, BatchCreatePermissionsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchCreate', [$params], BatchCreatePermissionsResponse::class);
}
/**
* Deletes one or more permissions on the note. The specified entities will
* immediately lose access. A permission with the `OWNER` role can't be removed.
* If removing a permission fails, then the entire request fails and no changes
* are made. Returns a 400 bad request error if a specified permission does not
* exist on the note. (permissions.batchDelete)
*
* @param string $parent The parent resource shared by all permissions being
* deleted. Format: `notes/{note}` If this is set, the parent of all of the
* permissions specified in the DeletePermissionRequest messages must match this
* field.
* @param BatchDeletePermissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return KeepEmpty
* @throws \Google\Service\Exception
*/
public function batchDelete($parent, BatchDeletePermissionsRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('batchDelete', [$params], KeepEmpty::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(NotesPermissions::class, 'Google_Service_Keep_Resource_NotesPermissions');