Class NotificationConfig (2.22.6)

public final class NotificationConfig extends GeneratedMessageV3 implements NotificationConfigOrBuilder

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

Protobuf type google.storage.v2.NotificationConfig

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 NotificationConfig getDefaultInstance()
Returns
Type Description
NotificationConfig

getDescriptor()

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

newBuilder()

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

newBuilder(NotificationConfig prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

containsCustomAttributes(String key)

public boolean containsCustomAttributes(String key)

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

map<string, string> custom_attributes = 4;

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()

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

map<string, string> custom_attributes = 4;

Returns
Type Description
int

getCustomAttributesMap()

public Map<String,String> getCustomAttributesMap()

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

map<string, string> custom_attributes = 4;

Returns
Type Description
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 NotificationConfig.

map<string, string> custom_attributes = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getCustomAttributesOrThrow(String key)

public String getCustomAttributesOrThrow(String key)

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

map<string, string> custom_attributes = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getDefaultInstanceForType()

public NotificationConfig getDefaultInstanceForType()
Returns
Type Description
NotificationConfig

getEtag()

public String getEtag()

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

string etag = 7;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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

string etag = 7;

Returns
Type Description
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
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)

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

repeated string event_types = 3;

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()

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

repeated string event_types = 3;

Returns
Type 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;

Returns
Type Description
ProtocolStringList

A list containing the eventTypes.

getName()

public String getName()

Required. The resource name of this NotificationConfig. Format: projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig} 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 NotificationConfig. Format: projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig} 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()

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

string object_name_prefix = 5;

Returns
Type Description
String

The objectNamePrefix.

getObjectNamePrefixBytes()

public ByteString getObjectNamePrefixBytes()

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

string object_name_prefix = 5;

Returns
Type Description
ByteString

The bytes for objectNamePrefix.

getParserForType()

public Parser<NotificationConfig> getParserForType()
Returns
Type Description
Parser<NotificationConfig>
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.

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 NotificationConfig.Builder newBuilderForType()
Returns
Type Description
NotificationConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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