Class: Google::Apis::KeepV1::Note

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

Overview

A single note.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Note

Returns a new instance of Note.



319
320
321
# File 'lib/google/apis/keep_v1/classes.rb', line 319

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

Instance Attribute Details

#attachmentsArray<Google::Apis::KeepV1::Attachment>

Output only. The attachments attached to this note. Corresponds to the JSON property attachments



271
272
273
# File 'lib/google/apis/keep_v1/classes.rb', line 271

def attachments
  @attachments
end

#bodyGoogle::Apis::KeepV1::Section

The content of the note. Corresponds to the JSON property body



276
277
278
# File 'lib/google/apis/keep_v1/classes.rb', line 276

def body
  @body
end

#create_timeString

Output only. When this note was created. Corresponds to the JSON property createTime

Returns:

  • (String)


281
282
283
# File 'lib/google/apis/keep_v1/classes.rb', line 281

def create_time
  @create_time
end

#nameString

Output only. The resource name of this note. See general note on identifiers in KeepService. Corresponds to the JSON property name

Returns:

  • (String)


287
288
289
# File 'lib/google/apis/keep_v1/classes.rb', line 287

def name
  @name
end

#permissionsArray<Google::Apis::KeepV1::Permission>

Output only. The list of permissions set on the note. Contains at least one entry for the note owner. Corresponds to the JSON property permissions



293
294
295
# File 'lib/google/apis/keep_v1/classes.rb', line 293

def permissions
  @permissions
end

#titleString

The title of the note. Length must be less than 1,000 characters. Corresponds to the JSON property title

Returns:

  • (String)


298
299
300
# File 'lib/google/apis/keep_v1/classes.rb', line 298

def title
  @title
end

#trash_timeString

Output only. When this note was trashed. If trashed, the note is eventually deleted. If the note is not trashed, this field is not set (and the trashed field is false). Corresponds to the JSON property trashTime

Returns:

  • (String)


305
306
307
# File 'lib/google/apis/keep_v1/classes.rb', line 305

def trash_time
  @trash_time
end

#trashedBoolean Also known as: trashed?

Output only. true if this note has been trashed. If trashed, the note is eventually deleted. Corresponds to the JSON property trashed

Returns:

  • (Boolean)


311
312
313
# File 'lib/google/apis/keep_v1/classes.rb', line 311

def trashed
  @trashed
end

#update_timeString

Output only. When this note was last modified. Corresponds to the JSON property updateTime

Returns:

  • (String)


317
318
319
# File 'lib/google/apis/keep_v1/classes.rb', line 317

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



324
325
326
327
328
329
330
331
332
333
334
# File 'lib/google/apis/keep_v1/classes.rb', line 324

def update!(**args)
  @attachments = args[:attachments] if args.key?(:attachments)
  @body = args[:body] if args.key?(:body)
  @create_time = args[:create_time] if args.key?(:create_time)
  @name = args[:name] if args.key?(:name)
  @permissions = args[:permissions] if args.key?(:permissions)
  @title = args[:title] if args.key?(:title)
  @trash_time = args[:trash_time] if args.key?(:trash_time)
  @trashed = args[:trashed] if args.key?(:trashed)
  @update_time = args[:update_time] if args.key?(:update_time)
end