Class: Google::Apis::GmailV1::Label
- Inherits:
-
Object
- Object
- Google::Apis::GmailV1::Label
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gmail_v1/classes.rb,
lib/google/apis/gmail_v1/representations.rb,
lib/google/apis/gmail_v1/representations.rb
Overview
Labels are used to categorize messages and threads within the user's mailbox. The maximum number of labels supported for a user's mailbox is 10,000.
Instance Attribute Summary collapse
-
#color ⇒ Google::Apis::GmailV1::LabelColor
The color to assign to the label.
-
#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 messages with this 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.
Constructor Details
#initialize(**args) ⇒ Label
Returns a new instance of Label.
865 866 867 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 865 def initialize(**args) update!(**args) end |
Instance Attribute Details
#color ⇒ Google::Apis::GmailV1::LabelColor
The color to assign to the label. Color is only available for labels that have
their type set to user.
Corresponds to the JSON property color
810 811 812 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 810 def color @color end |
#id ⇒ String
The immutable ID of the label.
Corresponds to the JSON property id
815 816 817 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 815 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
820 821 822 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 820 def label_list_visibility @label_list_visibility end |
#message_list_visibility ⇒ String
The visibility of messages with this label in the message list in the Gmail
web interface.
Corresponds to the JSON property messageListVisibility
826 827 828 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 826 def end |
#messages_total ⇒ Fixnum
The total number of messages with the label.
Corresponds to the JSON property messagesTotal
831 832 833 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 831 def end |
#messages_unread ⇒ Fixnum
The number of unread messages with the label.
Corresponds to the JSON property messagesUnread
836 837 838 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 836 def end |
#name ⇒ String
The display name of the label.
Corresponds to the JSON property name
841 842 843 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 841 def name @name end |
#threads_total ⇒ Fixnum
The total number of threads with the label.
Corresponds to the JSON property threadsTotal
846 847 848 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 846 def threads_total @threads_total end |
#threads_unread ⇒ Fixnum
The number of unread threads with the label.
Corresponds to the JSON property threadsUnread
851 852 853 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 851 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
863 864 865 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 863 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
870 871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 870 def update!(**args) @color = args[:color] if args.key?(:color) @id = args[:id] if args.key?(:id) @label_list_visibility = args[:label_list_visibility] if args.key?(:label_list_visibility) = args[:message_list_visibility] if args.key?(:message_list_visibility) = args[:messages_total] if args.key?(:messages_total) = 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 |