Skip to content

Commit

Permalink
Regenerate tasks client (#5309)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Jul 2, 2024
1 parent 632e6ad commit 5a0943e
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 16 deletions.
8 changes: 8 additions & 0 deletions src/Tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'location' => 'query',
'type' => 'string',
],
'showAssigned' => [
'location' => 'query',
'type' => 'boolean',
],
'showCompleted' => [
'location' => 'query',
'type' => 'boolean',
Expand Down Expand Up @@ -257,6 +261,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'type' => 'string',
'required' => true,
],
'destinationTasklist' => [
'location' => 'query',
'type' => 'string',
],
'parent' => [
'location' => 'query',
'type' => 'string',
Expand Down
94 changes: 94 additions & 0 deletions src/Tasks/AssignmentInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?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\Tasks;

class AssignmentInfo extends \Google\Model
{
protected $driveResourceInfoType = DriveResourceInfo::class;
protected $driveResourceInfoDataType = '';
/**
* @var string
*/
public $linkToTask;
protected $spaceInfoType = SpaceInfo::class;
protected $spaceInfoDataType = '';
/**
* @var string
*/
public $surfaceType;

/**
* @param DriveResourceInfo
*/
public function setDriveResourceInfo(DriveResourceInfo $driveResourceInfo)
{
$this->driveResourceInfo = $driveResourceInfo;
}
/**
* @return DriveResourceInfo
*/
public function getDriveResourceInfo()
{
return $this->driveResourceInfo;
}
/**
* @param string
*/
public function setLinkToTask($linkToTask)
{
$this->linkToTask = $linkToTask;
}
/**
* @return string
*/
public function getLinkToTask()
{
return $this->linkToTask;
}
/**
* @param SpaceInfo
*/
public function setSpaceInfo(SpaceInfo $spaceInfo)
{
$this->spaceInfo = $spaceInfo;
}
/**
* @return SpaceInfo
*/
public function getSpaceInfo()
{
return $this->spaceInfo;
}
/**
* @param string
*/
public function setSurfaceType($surfaceType)
{
$this->surfaceType = $surfaceType;
}
/**
* @return string
*/
public function getSurfaceType()
{
return $this->surfaceType;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AssignmentInfo::class, 'Google_Service_Tasks_AssignmentInfo');
62 changes: 62 additions & 0 deletions src/Tasks/DriveResourceInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?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\Tasks;

class DriveResourceInfo extends \Google\Model
{
/**
* @var string
*/
public $driveFileId;
/**
* @var string
*/
public $resourceKey;

/**
* @param string
*/
public function setDriveFileId($driveFileId)
{
$this->driveFileId = $driveFileId;
}
/**
* @return string
*/
public function getDriveFileId()
{
return $this->driveFileId;
}
/**
* @param string
*/
public function setResourceKey($resourceKey)
{
$this->resourceKey = $resourceKey;
}
/**
* @return string
*/
public function getResourceKey()
{
return $this->resourceKey;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DriveResourceInfo::class, 'Google_Service_Tasks_DriveResourceInfo');
4 changes: 3 additions & 1 deletion src/Tasks/Resource/Tasklists.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
class Tasklists extends \Google\Service\Resource
{
/**
* Deletes the authenticated user's specified task list. (tasklists.delete)
* Deletes the authenticated user's specified task list. If the list contains
* assigned tasks, both the assigned tasks and the original tasks in the
* assignment surface (Docs, Chat Spaces) are deleted. (tasklists.delete)
*
* @param string $tasklist Task list identifier.
* @param array $optParams Optional parameters.
Expand Down
47 changes: 32 additions & 15 deletions src/Tasks/Resource/Tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public function clear($tasklist, $optParams = [])
return $this->call('clear', [$params]);
}
/**
* Deletes the specified task from the task list. (tasks.delete)
* Deletes the specified task from the task list. If the task is assigned, both
* the assigned task and the original task (in Docs, Chat Spaces) are deleted.
* To delete the assigned task only, navigate to the assignment surface and
* unassign the task from there. (tasks.delete)
*
* @param string $tasklist Task list identifier.
* @param string $task Task identifier.
Expand Down Expand Up @@ -75,16 +78,20 @@ public function get($tasklist, $task, $optParams = [])
return $this->call('get', [$params], Task::class);
}
/**
* Creates a new task on the specified task list. A user can have up to 20,000
* non-hidden tasks per list and up to 100,000 tasks in total at a time.
* Creates a new task on the specified task list. Tasks assigned from Docs or
* Chat Spaces cannot be inserted from Tasks Public API; they can only be
* created by assigning them from Docs or Chat Spaces. A user can have up to
* 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
* (tasks.insert)
*
* @param string $tasklist Task list identifier.
* @param Task $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string parent Parent task identifier. If the task is created at
* the top level, this parameter is omitted. Optional.
* the top level, this parameter is omitted. An assigned task cannot be a parent
* task, nor can it have a parent. Setting the parent to an assigned task
* results in failure of the request. Optional.
* @opt_param string previous Previous sibling task identifier. If the task is
* created at the first position among its siblings, this parameter is omitted.
* Optional.
Expand All @@ -98,9 +105,9 @@ public function insert($tasklist, Task $postBody, $optParams = [])
return $this->call('insert', [$params], Task::class);
}
/**
* Returns all tasks in the specified task list. A user can have up to 20,000
* non-hidden tasks per list and up to 100,000 tasks in total at a time.
* (tasks.listTasks)
* Returns all tasks in the specified task list. Does not return assigned tasks
* be default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden
* tasks per list and up to 100,000 tasks in total at a time. (tasks.listTasks)
*
* @param string $tasklist Task list identifier.
* @param array $optParams Optional parameters.
Expand All @@ -119,10 +126,13 @@ public function insert($tasklist, Task $postBody, $optParams = [])
* Optional. The default is 20 (max allowed: 100).
* @opt_param string pageToken Token specifying the result page to return.
* Optional.
* @opt_param bool showAssigned Optional. Flag indicating whether tasks assigned
* to the current user are returned in the result. Optional. The default is
* False.
* @opt_param bool showCompleted Flag indicating whether completed tasks are
* returned in the result. Optional. The default is True. Note that showHidden
* must also be True to show tasks completed in first party clients, such as the
* web UI and Google's mobile apps.
* returned in the result. Note that showHidden must also be True to show tasks
* completed in first party clients, such as the web UI and Google's mobile
* apps. Optional. The default is True.
* @opt_param bool showDeleted Flag indicating whether deleted tasks are
* returned in the result. Optional. The default is False.
* @opt_param bool showHidden Flag indicating whether hidden tasks are returned
Expand All @@ -140,17 +150,24 @@ public function listTasks($tasklist, $optParams = [])
return $this->call('list', [$params], TasksModel::class);
}
/**
* Moves the specified task to another position in the task list. This can
* include putting it as a child task under a new parent and/or move it to a
* different position among its sibling tasks. A user can have up to 2,000
* subtasks per task. (tasks.move)
* Moves the specified task to another position in the destination task list. If
* the destination list is not specified, the task is moved within its current
* list. This can include putting it as a child task under a new parent and/or
* move it to a different position among its sibling tasks. A user can have up
* to 2,000 subtasks per task. (tasks.move)
*
* @param string $tasklist Task list identifier.
* @param string $task Task identifier.
* @param array $optParams Optional parameters.
*
* @opt_param string destinationTasklist Optional. Destination task list
* identifier. If set, the task is moved from tasklist to the
* destinationTasklist list. Otherwise the task is moved within its current
* list. Recurrent tasks cannot currently be moved between lists. Optional.
* @opt_param string parent New parent task identifier. If the task is moved to
* the top level, this parameter is omitted. Optional.
* the top level, this parameter is omitted. Assigned tasks can not be set as
* parent task (have subtasks) or be moved under a parent task (become
* subtasks). Optional.
* @opt_param string previous New previous sibling task identifier. If the task
* is moved to the first position among its siblings, this parameter is omitted.
* Optional.
Expand Down
44 changes: 44 additions & 0 deletions src/Tasks/SpaceInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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\Tasks;

class SpaceInfo extends \Google\Model
{
/**
* @var string
*/
public $space;

/**
* @param string
*/
public function setSpace($space)
{
$this->space = $space;
}
/**
* @return string
*/
public function getSpace()
{
return $this->space;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SpaceInfo::class, 'Google_Service_Tasks_SpaceInfo');
16 changes: 16 additions & 0 deletions src/Tasks/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
class Task extends \Google\Collection
{
protected $collection_key = 'links';
protected $assignmentInfoType = AssignmentInfo::class;
protected $assignmentInfoDataType = '';
/**
* @var string
*/
Expand Down Expand Up @@ -83,6 +85,20 @@ class Task extends \Google\Collection
*/
public $webViewLink;

/**
* @param AssignmentInfo
*/
public function setAssignmentInfo(AssignmentInfo $assignmentInfo)
{
$this->assignmentInfo = $assignmentInfo;
}
/**
* @return AssignmentInfo
*/
public function getAssignmentInfo()
{
return $this->assignmentInfo;
}
/**
* @param string
*/
Expand Down

0 comments on commit 5a0943e

Please sign in to comment.