Class: Google::Apis::GmailV1::Label
- Inherits:
-
Object
- Object
- Google::Apis::GmailV1::Label
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/gmail_v1/classes.rb,
generated/google/apis/gmail_v1/representations.rb,
generated/google/apis/gmail_v1/representations.rb
Overview
Labels are used to categorize messages and threads within the user's mailbox.
Instance Attribute Summary collapse
-
#id ⇒ String
The immutable ID of the label.
-
#label_list_visibility ⇒ String
The visibility of the label in the label list in the Gmail web interface.
-
#message_list_visibility ⇒ String
The visibility of the label in the message list in the Gmail web interface.
-
#messages_total ⇒ Fixnum
The total number of messages with the label.
-
#messages_unread ⇒ Fixnum
The number of unread messages with the label.
-
#name ⇒ String
The display name of the label.
-
#threads_total ⇒ Fixnum
The total number of threads with the label.
-
#threads_unread ⇒ Fixnum
The number of unread threads with the label.
-
#type ⇒ String
The owner type for the label.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Label
constructor
A new instance of Label.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Label
Returns a new instance of Label.
509 510 511 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 509 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
The immutable ID of the label.
Corresponds to the JSON property id
460 461 462 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 460 def id @id end |
#label_list_visibility ⇒ String
The visibility of the label in the label list in the Gmail web interface.
Corresponds to the JSON property labelListVisibility
465 466 467 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 465 def label_list_visibility @label_list_visibility end |
#message_list_visibility ⇒ String
The visibility of the label in the message list in the Gmail web interface.
Corresponds to the JSON property messageListVisibility
470 471 472 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 470 def @message_list_visibility end |
#messages_total ⇒ Fixnum
The total number of messages with the label.
Corresponds to the JSON property messagesTotal
475 476 477 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 475 def @messages_total end |
#messages_unread ⇒ Fixnum
The number of unread messages with the label.
Corresponds to the JSON property messagesUnread
480 481 482 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 480 def @messages_unread end |
#name ⇒ String
The display name of the label.
Corresponds to the JSON property name
485 486 487 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 485 def name @name end |
#threads_total ⇒ Fixnum
The total number of threads with the label.
Corresponds to the JSON property threadsTotal
490 491 492 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 490 def threads_total @threads_total end |
#threads_unread ⇒ Fixnum
The number of unread threads with the label.
Corresponds to the JSON property threadsUnread
495 496 497 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 495 def threads_unread @threads_unread end |
#type ⇒ String
The owner type for the label. User labels are created by the user and can be
modified and deleted by the user and can be applied to any message or thread.
System labels are internally created and cannot be added, modified, or deleted.
System labels may be able to be applied to or removed from messages and
threads under some circumstances but this is not guaranteed. For example,
users can apply and remove the INBOX and UNREAD labels from messages and
threads, but cannot apply or remove the DRAFTS or SENT labels from messages or
threads.
Corresponds to the JSON property type
507 508 509 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 507 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
514 515 516 517 518 519 520 521 522 523 524 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 514 def update!(**args) @id = args[:id] if args.key?(:id) @label_list_visibility = args[:label_list_visibility] if args.key?(:label_list_visibility) @message_list_visibility = args[:message_list_visibility] if args.key?(:message_list_visibility) @messages_total = args[:messages_total] if args.key?(:messages_total) @messages_unread = args[:messages_unread] if args.key?(:messages_unread) @name = args[:name] if args.key?(:name) @threads_total = args[:threads_total] if args.key?(:threads_total) @threads_unread = args[:threads_unread] if args.key?(:threads_unread) @type = args[:type] if args.key?(:type) end |