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 ValueETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field ValueEVENT_TYPES_FIELD_NUMBER
public static final int EVENT_TYPES_FIELD_NUMBER
Field ValueNAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field ValueOBJECT_NAME_PREFIX_FIELD_NUMBER
public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER
Field Valuepublic static final int PAYLOAD_FORMAT_FIELD_NUMBER
Field ValueTOPIC_FIELD_NUMBER
public static final int TOPIC_FIELD_NUMBER
Field ValueStatic Methods
getDefaultInstance()
public static Notification getDefaultInstance()
ReturnsgetDescriptor()
public static final Descriptors.Descriptor getDescriptor()
ReturnsnewBuilder()
public static Notification.Builder newBuilder()
ReturnsnewBuilder(Notification )
public static Notification.Builder newBuilder(Notification )
ParameterReturnspublic static Notification parseDelimitedFrom(InputStream input)
ParameterReturnsExceptionspublic static Notification parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(byte[] data)
public static Notification parseFrom(byte[] data)
ParameterName | Description |
data | byte[]
|
ReturnsExceptionsparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(ByteString data)
public static Notification parseFrom(ByteString data)
ParameterReturnsExceptionsparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionspublic static Notification parseFrom(CodedInputStream input)
ParameterReturnsExceptionspublic static Notification parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionspublic static Notification parseFrom(InputStream input)
ParameterReturnsExceptionspublic static Notification parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(ByteBuffer data)
public static Notification parseFrom(ByteBuffer data)
ParameterReturnsExceptionsparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Notification parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparser()
public static Parser<Notification> parser()
ReturnsMethods
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;
ParameterReturnsequals(Object obj)
public boolean equals(Object obj)
ParameterReturnsOverridesgetCustomAttributes()
public Map<String,String> getCustomAttributes()
ReturnsgetCustomAttributesCount()
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;
ReturnsgetCustomAttributesMap()
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;
ReturnsgetCustomAttributesOrDefault(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;
ParametersReturnsgetCustomAttributesOrThrow(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;
ParameterReturnsgetDefaultInstanceForType()
public Notification getDefaultInstanceForType()
ReturnsgetEtag()
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;
ReturnsType | 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;
ReturnsgetEventTypes(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;
ParameterName | Description |
index | int
The index of the element to return. |
ReturnsType | Description |
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;
ParameterName | Description |
index | int
The index of the value to return. |
ReturnsType | Description |
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;
ReturnsType | Description |
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;
ReturnsgetName()
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];
ReturnsType | 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];
ReturnsgetObjectNamePrefix()
public String getObjectNamePrefix()
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;
ReturnsType | Description |
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;
ReturnsType | Description |
ByteString | The bytes for objectNamePrefix. |
getParserForType()
public Parser<Notification> getParserForType()
ReturnsOverridespublic String getPayloadFormat()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
ReturnsType | Description |
String | The payloadFormat. |
public ByteString getPayloadFormatBytes()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
ReturnsType | Description |
ByteString | The bytes for payloadFormat. |
getSerializedSize()
public int getSerializedSize()
ReturnsOverridesgetTopic()
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];
ReturnsType | 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];
ReturnsgetUnknownFields()
public final UnknownFieldSet getUnknownFields()
ReturnsOverrideshashCode()
ReturnsOverridesinternalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
ReturnsOverridesinternalGetMapField(int number)
protected MapField internalGetMapField(int number)
ParameterReturnsOverridesisInitialized()
public final boolean isInitialized()
ReturnsOverridesnewBuilderForType()
public Notification.Builder newBuilderForType()
ReturnsnewBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Notification.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
ParameterReturnsOverridesnewInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
ParameterReturnsOverridestoBuilder()
public Notification.Builder toBuilder()
ReturnswriteTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
ParameterOverridesExceptions