class Google::Apis::GmailV1::Label

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.

Attributes

color[RW]

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` @return [Google::Apis::GmailV1::LabelColor]

id[RW]

The immutable ID of the label. Corresponds to the JSON property `id` @return [String]

label_list_visibility[RW]

The visibility of the label in the label list in the Gmail web interface. Corresponds to the JSON property `labelListVisibility` @return [String]

message_list_visibility[RW]

The visibility of messages with this label in the message list in the Gmail web interface. Corresponds to the JSON property `messageListVisibility` @return [String]

messages_total[RW]

The total number of messages with the label. Corresponds to the JSON property `messagesTotal` @return [Fixnum]

messages_unread[RW]

The number of unread messages with the label. Corresponds to the JSON property `messagesUnread` @return [Fixnum]

name[RW]

The display name of the label. Corresponds to the JSON property `name` @return [String]

threads_total[RW]

The total number of threads with the label. Corresponds to the JSON property `threadsTotal` @return [Fixnum]

threads_unread[RW]

The number of unread threads with the label. Corresponds to the JSON property `threadsUnread` @return [Fixnum]

type[RW]

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` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/gmail_v1/classes.rb, line 576
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/gmail_v1/classes.rb, line 581
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)
  @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