All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.gmail.model.Label.html Maven / Gradle / Ivy

There is a newer version: v1-rev20240520-2.0.0
Show newest version






Label (Gmail API v1-rev20230925-2.0.0)












com.google.api.services.gmail.model

Class Label

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class Label
    extends com.google.api.client.json.GenericJson
    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.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Gmail API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Constructor Detail

      • Label

        public Label()
    • Method Detail

      • getColor

        public LabelColor getColor()
        The color to assign to the label. Color is only available for labels that have their `type` set to `user`.
        Returns:
        value or null for none
      • setColor

        public Label setColor(LabelColor color)
        The color to assign to the label. Color is only available for labels that have their `type` set to `user`.
        Parameters:
        color - color or null for none
      • getId

        public String getId()
        The immutable ID of the label.
        Returns:
        value or null for none
      • setId

        public Label setId(String id)
        The immutable ID of the label.
        Parameters:
        id - id or null for none
      • getLabelListVisibility

        public String getLabelListVisibility()
        The visibility of the label in the label list in the Gmail web interface.
        Returns:
        value or null for none
      • setLabelListVisibility

        public Label setLabelListVisibility(String labelListVisibility)
        The visibility of the label in the label list in the Gmail web interface.
        Parameters:
        labelListVisibility - labelListVisibility or null for none
      • getMessageListVisibility

        public String getMessageListVisibility()
        The visibility of messages with this label in the message list in the Gmail web interface.
        Returns:
        value or null for none
      • setMessageListVisibility

        public Label setMessageListVisibility(String messageListVisibility)
        The visibility of messages with this label in the message list in the Gmail web interface.
        Parameters:
        messageListVisibility - messageListVisibility or null for none
      • getMessagesTotal

        public Integer getMessagesTotal()
        The total number of messages with the label.
        Returns:
        value or null for none
      • setMessagesTotal

        public Label setMessagesTotal(Integer messagesTotal)
        The total number of messages with the label.
        Parameters:
        messagesTotal - messagesTotal or null for none
      • getMessagesUnread

        public Integer getMessagesUnread()
        The number of unread messages with the label.
        Returns:
        value or null for none
      • setMessagesUnread

        public Label setMessagesUnread(Integer messagesUnread)
        The number of unread messages with the label.
        Parameters:
        messagesUnread - messagesUnread or null for none
      • getName

        public String getName()
        The display name of the label.
        Returns:
        value or null for none
      • setName

        public Label setName(String name)
        The display name of the label.
        Parameters:
        name - name or null for none
      • getThreadsTotal

        public Integer getThreadsTotal()
        The total number of threads with the label.
        Returns:
        value or null for none
      • setThreadsTotal

        public Label setThreadsTotal(Integer threadsTotal)
        The total number of threads with the label.
        Parameters:
        threadsTotal - threadsTotal or null for none
      • getThreadsUnread

        public Integer getThreadsUnread()
        The number of unread threads with the label.
        Returns:
        value or null for none
      • setThreadsUnread

        public Label setThreadsUnread(Integer threadsUnread)
        The number of unread threads with the label.
        Parameters:
        threadsUnread - threadsUnread or null for none
      • getType

        public String getType()
        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.
        Returns:
        value or null for none
      • setType

        public Label setType(String type)
        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.
        Parameters:
        type - type or null for none
      • set

        public Label set(String fieldName,
                         Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public Label clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2023 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy