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.



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

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



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

def attachments
  @attachments
end

#bodyGoogle::Apis::KeepV1::Section

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



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

def body
  @body
end

#create_timeString

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

Returns:

  • (String)


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

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)


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

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



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

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)


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

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)


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

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)


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

def trashed
  @trashed
end

#update_timeString

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

Returns:

  • (String)


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

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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