Class Notification (2.10.0)

public final class Notification extends GeneratedMessageV3 implements NotificationOrBuilder

A directive to publish Pub/Sub notifications upon changes to a bucket.

Protobuf type google.storage.v2.Notification

Static Fields

CUSTOM_ATTRIBUTES_FIELD_NUMBER

public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TYPES_FIELD_NUMBER

public static final int EVENT_TYPES_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OBJECT_NAME_PREFIX_FIELD_NUMBER

public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER
Field Value
Type Description
int

PAYLOAD_FORMAT_FIELD_NUMBER

public static final int PAYLOAD_FORMAT_FIELD_NUMBER
Field Value
Type Description
int

TOPIC_FIELD_NUMBER

public static final int TOPIC_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Notification getDefaultInstance()
Returns
Type Description
Notification

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Notification.Builder newBuilder()
Returns
Type Description
Notification.Builder

newBuilder(Notification prototype)

public static Notification.Builder newBuilder(Notification prototype)
Parameter
Name Description
prototype Notification
Returns
Type Description
Notification.Builder

parseDelimitedFrom(InputStream input)

public static Notification parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Notification parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Notification parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Notification parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Notification parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Notification parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Notification
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Notification> parser()
Returns
Type Description
Parser<Notification>

Methods

containsCustomAttributes(String key)

public boolean containsCustomAttributes(String key)

Optional. An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription.

map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCustomAttributes()

public Map<String,String> getCustomAttributes()
Returns
Type Description
Map<String,String>

getCustomAttributesCount()

public int getCustomAttributesCount()

Optional. An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription.

map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCustomAttributesMap()

public Map<String,String> getCustomAttributesMap()

Optional. An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription.

map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getCustomAttributesOrDefault(String key, String defaultValue)

public String getCustomAttributesOrDefault(String key, String defaultValue)

Optional. An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription.

map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getCustomAttributesOrThrow(String key)

public String getCustomAttributesOrThrow(String key)

Optional. An optional list of additional attributes to attach to each Pub/Sub message published for this notification subscription.

map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getDefaultInstanceForType()

public Notification getDefaultInstanceForType()
Returns
Type Description
Notification

getEtag()

public String getEtag()

The etag of the Notification. If included in the metadata of GetNotificationRequest, the operation will only be performed if the etag matches that of the Notification.

string etag = 7;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

The etag of the Notification. If included in the metadata of GetNotificationRequest, the operation will only be performed if the etag matches that of the Notification.

string etag = 7;

Returns
Type Description
ByteString

The bytes for etag.

getEventTypes(int index)

public String getEventTypes(int index)

Optional. If present, only send notifications about listed event types. If empty, sent notifications for all event types.

repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The eventTypes at the given index.

getEventTypesBytes(int index)

public ByteString getEventTypesBytes(int index)

Optional. If present, only send notifications about listed event types. If empty, sent notifications for all event types.

repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the eventTypes at the given index.

getEventTypesCount()

public int getEventTypesCount()

Optional. If present, only send notifications about listed event types. If empty, sent notifications for all event types.

repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of eventTypes.

getEventTypesList()

public ProtocolStringList getEventTypesList()

Optional. If present, only send notifications about listed event types. If empty, sent notifications for all event types.

repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the eventTypes.

getName()

public String getName()

Required. The resource name of this notification. Format: projects/{project}/buckets/{bucket}/notificationConfigs/{notification} The {project} portion may be _ for globally unique buckets.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The resource name of this notification. Format: projects/{project}/buckets/{bucket}/notificationConfigs/{notification} The {project} portion may be _ for globally unique buckets.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getObjectNamePrefix()

public String getObjectNamePrefix()

Optional. If present, only apply this notification config to object names that begin with this prefix.

string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The objectNamePrefix.

getObjectNamePrefixBytes()

public ByteString getObjectNamePrefixBytes()

Optional. If present, only apply this notification config to object names that begin with this prefix.

string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for objectNamePrefix.

getParserForType()

public Parser<Notification> getParserForType()
Returns
Type Description
Parser<Notification>
Overrides

getPayloadFormat()

public String getPayloadFormat()

Required. The desired content of the Payload.

string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The payloadFormat.

getPayloadFormatBytes()

public ByteString getPayloadFormatBytes()

Required. The desired content of the Payload.

string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for payloadFormat.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTopic()

public String getTopic()

Required. The Pub/Sub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'

string topic = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The topic.

getTopicBytes()

public ByteString getTopicBytes()

Required. The Pub/Sub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'

string topic = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for topic.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Notification.Builder newBuilderForType()
Returns
Type Description
Notification.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Notification.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Notification.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Notification.Builder toBuilder()
Returns
Type Description
Notification.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides Exceptions
Type Description
IOException