Class Notification (2.18.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
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_TYPES_FIELD_NUMBER

public static final int EVENT_TYPES_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OBJECT_NAME_PREFIX_FIELD_NUMBER

public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

PAYLOAD_FORMAT_FIELD_NUMBER

public static final int PAYLOAD_FORMAT_FIELD_NUMBER
Field Value
TypeDescription
int

TOPIC_FIELD_NUMBER

public static final int TOPIC_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Notification getDefaultInstance()
Returns
TypeDescription
Notification

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Notification.Builder newBuilder()
Returns
TypeDescription
Notification.Builder

newBuilder(Notification prototype)

public static Notification.Builder newBuilder(Notification prototype)
Parameter
NameDescription
prototypeNotification
Returns
TypeDescription
Notification.Builder

parseDelimitedFrom(InputStream input)

public static Notification parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Notification parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Notification parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Notification parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Notification parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Notification parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Notification parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Notification
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Notification> parser()
Returns
TypeDescription
Parser<Notification>

Methods

containsCustomAttributes(String key)

public boolean containsCustomAttributes(String key)

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

map<string, string> custom_attributes = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCustomAttributes()

public Map<String,String> getCustomAttributes()
Returns
TypeDescription
Map<String,String>

getCustomAttributesCount()

public int getCustomAttributesCount()

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

map<string, string> custom_attributes = 4;

Returns
TypeDescription
int

getCustomAttributesMap()

public Map<String,String> getCustomAttributesMap()

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

map<string, string> custom_attributes = 4;

Returns
TypeDescription
Map<String,String>

getCustomAttributesOrDefault(String key, String defaultValue)

public String getCustomAttributesOrDefault(String key, String defaultValue)

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

map<string, string> custom_attributes = 4;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getCustomAttributesOrThrow(String key)

public String getCustomAttributesOrThrow(String key)

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

map<string, string> custom_attributes = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getDefaultInstanceForType()

public Notification getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for etag.

getEventTypes(int index)

public String getEventTypes(int index)

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

repeated string event_types = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The eventTypes at the given index.

getEventTypesBytes(int index)

public ByteString getEventTypesBytes(int index)

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

repeated string event_types = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the eventTypes at the given index.

getEventTypesCount()

public int getEventTypesCount()

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

repeated string event_types = 3;

Returns
TypeDescription
int

The count of eventTypes.

getEventTypesList()

public ProtocolStringList getEventTypesList()

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

repeated string event_types = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getObjectNamePrefix()

public String getObjectNamePrefix()

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

string object_name_prefix = 5;

Returns
TypeDescription
String

The objectNamePrefix.

getObjectNamePrefixBytes()

public ByteString getObjectNamePrefixBytes()

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

string object_name_prefix = 5;

Returns
TypeDescription
ByteString

The bytes for objectNamePrefix.

getParserForType()

public Parser<Notification> getParserForType()
Returns
TypeDescription
Parser<Notification>
Overrides

getPayloadFormat()

public String getPayloadFormat()

Required. The desired content of the Payload.

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

Returns
TypeDescription
String

The payloadFormat.

getPayloadFormatBytes()

public ByteString getPayloadFormatBytes()

Required. The desired content of the Payload.

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

Returns
TypeDescription
ByteString

The bytes for payloadFormat.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for topic.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Notification.Builder newBuilderForType()
Returns
TypeDescription
Notification.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Notification.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Notification.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Notification.Builder toBuilder()
Returns
TypeDescription
Notification.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException