Package com.google.cloud.storage
Class NotificationInfo
java.lang.Object
com.google.cloud.storage.NotificationInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Notification
The class representing Pub/Sub Notification metadata for the Storage.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forNotificationInfo.static classBuilder forNotificationInfo.static enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.getEtag()Returns HTTP 1.1 Entity tag for the notification.Returns the events that trigger a notification to be sent.Returns the service-generated id for the notification.Returns the object name prefix for which this notification configuration applies.Returns the desired content of the Payload.Returns the canonical URI of this topic as a string.getTopic()Returns the topic in Pub/Sub that receives notifications.inthashCode()static NotificationInfo.BuildernewBuilder(String topic) Creates aNotificationInfoobject for the provided topic.static NotificationInfoCreates aNotificationInfoobject for the provided topic.Returns a builder for the current notification.toString()
-
Method Details
-
getNotificationId
Returns the service-generated id for the notification. -
getTopic
Returns the topic in Pub/Sub that receives notifications. -
getSelfLink
Returns the canonical URI of this topic as a string. -
getPayloadFormat
Returns the desired content of the Payload. -
getObjectNamePrefix
Returns the object name prefix for which this notification configuration applies. -
getEtag
Returns HTTP 1.1 Entity tag for the notification. See Entity Tags -
getEventTypes
Returns the events that trigger a notification to be sent. If empty, notifications are triggered by any event. See Event types to get list of available events. -
getCustomAttributes
Returns the list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. -
hashCode
public int hashCode() -
equals
-
toString
-
of
Creates aNotificationInfoobject for the provided topic.Example of creating the NotificationInfo object:
String topic = "projects/myProject/topics/myTopic" NotificationInfo notificationInfo = NotificationInfo.of(topic)- Parameters:
topic- a string in the format "projects/{project}/topics/{topic}"
-
newBuilder
Creates aNotificationInfoobject for the provided topic.- Parameters:
topic- a string in the format "projects/{project}/topics/{topic}"
-
toBuilder
Returns a builder for the current notification.
-