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
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value
EVENT_TYPES_FIELD_NUMBER
public static final int EVENT_TYPES_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
OBJECT_NAME_PREFIX_FIELD_NUMBER
public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER
Field Value
public static final int PAYLOAD_FORMAT_FIELD_NUMBER
Field Value
TOPIC_FIELD_NUMBER
public static final int TOPIC_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Notification getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Notification.Builder newBuilder()
Returns
newBuilder(Notification prototype)
public static Notification.Builder newBuilder(Notification prototype)
Parameter
Returns
public static Notification parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Notification parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Notification parseFrom(byte[] data)
Parameter
Name |
Description |
data |
byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Notification parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Notification parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Notification parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Notification parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Notification parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Notification parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Notification> parser()
Returns
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
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCustomAttributes()
public Map<String,String> getCustomAttributes()
Returns
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
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
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
Returns
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
Returns
getDefaultInstanceForType()
public Notification getDefaultInstanceForType()
Returns
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
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
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
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
Overrides
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.
|
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
Overrides
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
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Name |
Description |
number |
int
|
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Notification.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Notification.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Notification.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions