public class NotificationInfo extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
NotificationInfo.Builder
Builder for
NotificationInfo . |
static class |
NotificationInfo.BuilderImpl
Builder for
NotificationInfo . |
static class |
NotificationInfo.EventType |
static class |
NotificationInfo.PayloadFormat |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Map<String,String> |
getCustomAttributes()
Returns the list of additional attributes to attach to each Cloud PubSub message published for
this notification subscription.
|
String |
getEtag()
Returns HTTP 1.1 Entity tag for the notification.
|
List<NotificationInfo.EventType> |
getEventTypes()
Returns the events that trigger a notification to be sent.
|
String |
getNotificationId()
Returns the service-generated id for the notification.
|
String |
getObjectNamePrefix()
Returns the object name prefix for which this notification configuration applies.
|
NotificationInfo.PayloadFormat |
getPayloadFormat()
Returns the desired content of the Payload.
|
String |
getSelfLink()
Returns the canonical URI of this topic as a string.
|
String |
getTopic()
Returns the topic in Pub/Sub that receives notifications.
|
int |
hashCode() |
static NotificationInfo.Builder |
newBuilder(String topic)
Creates a
NotificationInfo object for the provided topic. |
static NotificationInfo |
of(String topic)
Creates a
NotificationInfo object for the provided topic. |
NotificationInfo.Builder |
toBuilder()
Returns a builder for the current notification.
|
String |
toString() |
public String getNotificationId()
public String getTopic()
public String getSelfLink()
public NotificationInfo.PayloadFormat getPayloadFormat()
public String getObjectNamePrefix()
public String getEtag()
public List<NotificationInfo.EventType> getEventTypes()
public Map<String,String> getCustomAttributes()
public static NotificationInfo of(String topic)
NotificationInfo
object for the provided topic.
Example of creating the NotificationInfo object:
String topic = "projects/myProject/topics/myTopic"
NotificationInfo notificationInfo = NotificationInfo.of(topic)
topic
- a string in the format "projects/{project}/topics/{topic}"public static NotificationInfo.Builder newBuilder(String topic)
NotificationInfo
object for the provided topic.topic
- a string in the format "projects/{project}/topics/{topic}"public NotificationInfo.Builder toBuilder()
Copyright © 2023 Google LLC. All rights reserved.