Class TasksResource.InsertRequest
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.
Inheritance
Inherited Members
Namespace: Google.Apis.Tasks.v1
Assembly: Google.Apis.Tasks.v1.dll
Syntax
public class TasksResource.InsertRequest : TasksBaseServiceRequest<Task>, IClientServiceRequest<Task>, IClientServiceRequest
Constructors
InsertRequest(IClientService, Task, string)
Constructs a new Insert request.
Declaration
public InsertRequest(IClientService service, Task body, string tasklist)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service | |
| Task | body | |
| string | tasklist |
Properties
Hidden
Optional. Flag indicating whether the task is created as 'hidden', as if it had been completed and then cleared from the task list (see the "clear" method). Hidden tasks are not returned by default when retrieving all tasks for a task list (see showHidden). Only completed tasks can be created as hidden, and they can not be nested or positioned, so parent and previous must be empty.
Declaration
[RequestParameter("hidden", RequestParameterType.Query)]
public virtual bool? Hidden { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Parent
Optional. Parent task identifier. If the task is created at 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.
Declaration
[RequestParameter("parent", RequestParameterType.Query)]
public virtual string Parent { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Previous
Optional. Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted.
Declaration
[RequestParameter("previous", RequestParameterType.Query)]
public virtual string Previous { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Tasklist
Task list identifier.
Declaration
[RequestParameter("tasklist", RequestParameterType.Path)]
public virtual string Tasklist { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
| Type | Description |
|---|---|
| object |
Overrides
InitParameters()
Initializes Insert parameter list.
Declaration
protected override void InitParameters()