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

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

Defined Under Namespace

Classes: Link

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Task


116
117
118
# File 'generated/google/apis/tasks_v1/classes.rb', line 116

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

Instance Attribute Details

#completedDateTime

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


33
34
35
# File 'generated/google/apis/tasks_v1/classes.rb', line 33

def completed
  @completed
end

#deletedBoolean Also known as: deleted?

Flag indicating whether the task has been deleted. The default if False. Corresponds to the JSON property deleted


38
39
40
# File 'generated/google/apis/tasks_v1/classes.rb', line 38

def deleted
  @deleted
end

#dueDateTime

Due date of the task (as a RFC 3339 timestamp). Optional. Corresponds to the JSON property due


44
45
46
# File 'generated/google/apis/tasks_v1/classes.rb', line 44

def due
  @due
end

#etagString

ETag of the resource. Corresponds to the JSON property etag


49
50
51
# File 'generated/google/apis/tasks_v1/classes.rb', line 49

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


56
57
58
# File 'generated/google/apis/tasks_v1/classes.rb', line 56

def hidden
  @hidden
end

#idString

Task identifier. Corresponds to the JSON property id


62
63
64
# File 'generated/google/apis/tasks_v1/classes.rb', line 62

def id
  @id
end

#kindString

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


67
68
69
# File 'generated/google/apis/tasks_v1/classes.rb', line 67

def kind
  @kind
end

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


72
73
74
# File 'generated/google/apis/tasks_v1/classes.rb', line 72

def links
  @links
end

#notesString

Notes describing the task. Optional. Corresponds to the JSON property notes


77
78
79
# File 'generated/google/apis/tasks_v1/classes.rb', line 77

def notes
  @notes
end

#parentString

Parent task identifier. This field is omitted if it is a top-level task. This field is read-only. Use the "move" method to move the task under a different parent or to the top level. Corresponds to the JSON property parent


84
85
86
# File 'generated/google/apis/tasks_v1/classes.rb', line 84

def parent
  @parent
end

#positionString

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). This field is read-only. Use the "move" method to move the task to another position. Corresponds to the JSON property position


94
95
96
# File 'generated/google/apis/tasks_v1/classes.rb', line 94

def position
  @position
end

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


99
100
101
# File 'generated/google/apis/tasks_v1/classes.rb', line 99

def self_link
  @self_link
end

#statusString

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


104
105
106
# File 'generated/google/apis/tasks_v1/classes.rb', line 104

def status
  @status
end

#titleString

Title of the task. Corresponds to the JSON property title


109
110
111
# File 'generated/google/apis/tasks_v1/classes.rb', line 109

def title
  @title
end

#updatedDateTime

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


114
115
116
# File 'generated/google/apis/tasks_v1/classes.rb', line 114

def updated
  @updated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'generated/google/apis/tasks_v1/classes.rb', line 121

def update!(**args)
  @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)
end