Class: Google::Apis::TasksV1::Task

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/tasks_v1/classes.rb,
lib/google/apis/tasks_v1/representations.rb,
lib/google/apis/tasks_v1/representations.rb

Defined Under Namespace

Classes: Link

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Task

Returns a new instance of Task.



224
225
226
# File 'lib/google/apis/tasks_v1/classes.rb', line 224

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#assignment_infoGoogle::Apis::TasksV1::AssignmentInfo

Information about the source of the task assignment (Document, Chat Space). Corresponds to the JSON property assignmentInfo



120
121
122
# File 'lib/google/apis/tasks_v1/classes.rb', line 120

def assignment_info
  @assignment_info
end

#completedString

Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed. Corresponds to the JSON property completed

Returns:

  • (String)


126
127
128
# File 'lib/google/apis/tasks_v1/classes.rb', line 126

def completed
  @completed
end

#deletedBoolean Also known as: deleted?

Flag indicating whether the task has been deleted. For assigned tasks this field is read-only. They can only be deleted by calling tasks.delete, in which case both the assigned task and the original task (in Docs or Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there. The default is False. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


135
136
137
# File 'lib/google/apis/tasks_v1/classes.rb', line 135

def deleted
  @deleted
end

#dueString

Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API. Corresponds to the JSON property due

Returns:

  • (String)


144
145
146
# File 'lib/google/apis/tasks_v1/classes.rb', line 144

def due
  @due
end

#etagString

ETag of the resource. Corresponds to the JSON property etag

Returns:

  • (String)


149
150
151
# File 'lib/google/apis/tasks_v1/classes.rb', line 149

def etag
  @etag
end

#hiddenBoolean Also known as: hidden?

Flag indicating whether the task is hidden. This is the case if the task had been marked completed when the task list was last cleared. The default is False. This field is read-only. Corresponds to the JSON property hidden

Returns:

  • (Boolean)


156
157
158
# File 'lib/google/apis/tasks_v1/classes.rb', line 156

def hidden
  @hidden
end

#idString

Task identifier. Corresponds to the JSON property id

Returns:

  • (String)


162
163
164
# File 'lib/google/apis/tasks_v1/classes.rb', line 162

def id
  @id
end

#kindString

Output only. Type of the resource. This is always "tasks#task". Corresponds to the JSON property kind

Returns:

  • (String)


167
168
169
# File 'lib/google/apis/tasks_v1/classes.rb', line 167

def kind
  @kind
end

Output only. Collection of links. This collection is read-only. Corresponds to the JSON property links



172
173
174
# File 'lib/google/apis/tasks_v1/classes.rb', line 172

def links
  @links
end

#notesString

Notes describing the task. Tasks assigned from Google Docs cannot have notes. Optional. Maximum length allowed: 8192 characters. Corresponds to the JSON property notes

Returns:

  • (String)


178
179
180
# File 'lib/google/apis/tasks_v1/classes.rb', line 178

def notes
  @notes
end

#parentString

Output only. Parent task identifier. This field is omitted if it is a top- level task. Use the "move" method to move the task under a different parent or to the top level. A parent task can never be an assigned task (from Chat Spaces, Docs). This field is read-only. Corresponds to the JSON property parent

Returns:

  • (String)


186
187
188
# File 'lib/google/apis/tasks_v1/classes.rb', line 186

def parent
  @parent
end

#positionString

Output only. String indicating the position of the task among its sibling tasks under the same parent task or at the top level. If this string is greater than another task's corresponding position string according to lexicographical ordering, the task is positioned after the other task under the same parent task (or at the top level). Use the "move" method to move the task to another position. Corresponds to the JSON property position

Returns:

  • (String)


196
197
198
# File 'lib/google/apis/tasks_v1/classes.rb', line 196

def position
  @position
end

Output only. URL pointing to this task. Used to retrieve, update, or delete this task. Corresponds to the JSON property selfLink

Returns:

  • (String)


202
203
204
# File 'lib/google/apis/tasks_v1/classes.rb', line 202

def self_link
  @self_link
end

#statusString

Status of the task. This is either "needsAction" or "completed". Corresponds to the JSON property status

Returns:

  • (String)


207
208
209
# File 'lib/google/apis/tasks_v1/classes.rb', line 207

def status
  @status
end

#titleString

Title of the task. Maximum length allowed: 1024 characters. Corresponds to the JSON property title

Returns:

  • (String)


212
213
214
# File 'lib/google/apis/tasks_v1/classes.rb', line 212

def title
  @title
end

#updatedString

Output only. Last modification time of the task (as a RFC 3339 timestamp). Corresponds to the JSON property updated

Returns:

  • (String)


217
218
219
# File 'lib/google/apis/tasks_v1/classes.rb', line 217

def updated
  @updated
end

Output only. An absolute link to the task in the Google Tasks Web UI. Corresponds to the JSON property webViewLink

Returns:

  • (String)


222
223
224
# File 'lib/google/apis/tasks_v1/classes.rb', line 222

def web_view_link
  @web_view_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/google/apis/tasks_v1/classes.rb', line 229

def update!(**args)
  @assignment_info = args[:assignment_info] if args.key?(:assignment_info)
  @completed = args[:completed] if args.key?(:completed)
  @deleted = args[:deleted] if args.key?(:deleted)
  @due = args[:due] if args.key?(:due)
  @etag = args[:etag] if args.key?(:etag)
  @hidden = args[:hidden] if args.key?(:hidden)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @links = args[:links] if args.key?(:links)
  @notes = args[:notes] if args.key?(:notes)
  @parent = args[:parent] if args.key?(:parent)
  @position = args[:position] if args.key?(:position)
  @self_link = args[:self_link] if args.key?(:self_link)
  @status = args[:status] if args.key?(:status)
  @title = args[:title] if args.key?(:title)
  @updated = args[:updated] if args.key?(:updated)
  @web_view_link = args[:web_view_link] if args.key?(:web_view_link)
end