target.apidocs.com.google.api.services.gmail.model.WatchRequest.html Maven / Gradle / Ivy
WatchRequest (Gmail API v1-rev20240422-2.0.0)
com.google.api.services.gmail.model
Class WatchRequest
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.gmail.model.WatchRequest
-
public final class WatchRequest
extends com.google.api.client.json.GenericJson
Set up or update a new push notification watch on this user's mailbox.
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
WatchRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
WatchRequest
clone()
String
getLabelFilterAction()
Filtering behavior of `labelIds list` specified.
String
getLabelFilterBehavior()
Filtering behavior of `labelIds list` specified.
List<String>
getLabelIds()
List of label_ids to restrict notifications about.
String
getTopicName()
A fully qualified Google Cloud Pub/Sub API topic name to publish the events to.
WatchRequest
set(String fieldName,
Object value)
WatchRequest
setLabelFilterAction(String labelFilterAction)
Filtering behavior of `labelIds list` specified.
WatchRequest
setLabelFilterBehavior(String labelFilterBehavior)
Filtering behavior of `labelIds list` specified.
WatchRequest
setLabelIds(List<String> labelIds)
List of label_ids to restrict notifications about.
WatchRequest
setTopicName(String topicName)
A fully qualified Google Cloud Pub/Sub API topic name to publish the events to.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getLabelFilterAction
public String getLabelFilterAction()
Filtering behavior of `labelIds list` specified. This field is deprecated because it caused
incorrect behavior in some cases; use `label_filter_behavior` instead.
- Returns:
- value or
null
for none
-
setLabelFilterAction
public WatchRequest setLabelFilterAction(String labelFilterAction)
Filtering behavior of `labelIds list` specified. This field is deprecated because it caused
incorrect behavior in some cases; use `label_filter_behavior` instead.
- Parameters:
labelFilterAction
- labelFilterAction or null
for none
-
getLabelFilterBehavior
public String getLabelFilterBehavior()
Filtering behavior of `labelIds list` specified. This field replaces `label_filter_action`; if
set, `label_filter_action` is ignored.
- Returns:
- value or
null
for none
-
setLabelFilterBehavior
public WatchRequest setLabelFilterBehavior(String labelFilterBehavior)
Filtering behavior of `labelIds list` specified. This field replaces `label_filter_action`; if
set, `label_filter_action` is ignored.
- Parameters:
labelFilterBehavior
- labelFilterBehavior or null
for none
-
getLabelIds
public List<String> getLabelIds()
List of label_ids to restrict notifications about. By default, if unspecified, all changes are
pushed out. If specified then dictates which labels are required for a push notification to be
generated.
- Returns:
- value or
null
for none
-
setLabelIds
public WatchRequest setLabelIds(List<String> labelIds)
List of label_ids to restrict notifications about. By default, if unspecified, all changes are
pushed out. If specified then dictates which labels are required for a push notification to be
generated.
- Parameters:
labelIds
- labelIds or null
for none
-
getTopicName
public String getTopicName()
A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name
**must** already exist in Cloud Pub/Sub and you **must** have already granted gmail "publish"
permission on it. For example, "projects/my-project-identifier/topics/my-topic-name" (using the
Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-identifier" portion must
exactly match your Google developer project id (the one executing this watch request).
- Returns:
- value or
null
for none
-
setTopicName
public WatchRequest setTopicName(String topicName)
A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name
**must** already exist in Cloud Pub/Sub and you **must** have already granted gmail "publish"
permission on it. For example, "projects/my-project-identifier/topics/my-topic-name" (using the
Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-identifier" portion must
exactly match your Google developer project id (the one executing this watch request).
- Parameters:
topicName
- topicName or null
for none
-
set
public WatchRequest set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public WatchRequest clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy