Class NotificationConfig (2.22.2)

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

getDescriptor()

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

newBuilder()

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

newBuilder(NotificationConfig prototype)

public static NotificationConfig.Builder newBuilder(NotificationConfig prototype)
Parameter
NameDescription
prototypeNotificationConfig
Returns
TypeDescription
NotificationConfig.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<NotificationConfig> parser()
Returns
TypeDescription
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
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 NotificationConfig.

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 NotificationConfig.

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 NotificationConfig.

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 NotificationConfig.

map<string, string> custom_attributes = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getDefaultInstanceForType()

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

The bytes for objectNamePrefix.

getParserForType()

public Parser<NotificationConfig> getParserForType()
Returns
TypeDescription
Parser<NotificationConfig>
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 NotificationConfig.Builder newBuilderForType()
Returns
TypeDescription
NotificationConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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