public static final class Notification.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder> implements NotificationOrBuilder
A directive to publish Pub/Sub notifications upon changes to a bucket.Protobuf type
google.storage.v2.Notification| Modifier and Type | Method and Description |
|---|---|
Notification.Builder |
addAllEventTypes(Iterable<String> values)
If present, only send notifications about listed event types.
|
Notification.Builder |
addEventTypes(String value)
If present, only send notifications about listed event types.
|
Notification.Builder |
addEventTypesBytes(com.google.protobuf.ByteString value)
If present, only send notifications about listed event types.
|
Notification.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Notification |
build() |
Notification |
buildPartial() |
Notification.Builder |
clear() |
Notification.Builder |
clearCustomAttributes() |
Notification.Builder |
clearEtag()
The etag of the Notification.
|
Notification.Builder |
clearEventTypes()
If present, only send notifications about listed event types.
|
Notification.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Notification.Builder |
clearName()
Required.
|
Notification.Builder |
clearObjectNamePrefix()
If present, only apply this notification config to object names that
begin with this prefix.
|
Notification.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Notification.Builder |
clearPayloadFormat()
Required.
|
Notification.Builder |
clearTopic()
Required.
|
Notification.Builder |
clone() |
boolean |
containsCustomAttributes(String key)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Map<String,String> |
getCustomAttributes()
Deprecated.
|
int |
getCustomAttributesCount()
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Map<String,String> |
getCustomAttributesMap()
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
String |
getCustomAttributesOrDefault(String key,
String defaultValue)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
String |
getCustomAttributesOrThrow(String key)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Notification |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getEtag()
The etag of the Notification.
|
com.google.protobuf.ByteString |
getEtagBytes()
The etag of the Notification.
|
String |
getEventTypes(int index)
If present, only send notifications about listed event types.
|
com.google.protobuf.ByteString |
getEventTypesBytes(int index)
If present, only send notifications about listed event types.
|
int |
getEventTypesCount()
If present, only send notifications about listed event types.
|
com.google.protobuf.ProtocolStringList |
getEventTypesList()
If present, only send notifications about listed event types.
|
Map<String,String> |
getMutableCustomAttributes()
Deprecated.
|
String |
getName()
Required.
|
com.google.protobuf.ByteString |
getNameBytes()
Required.
|
String |
getObjectNamePrefix()
If present, only apply this notification config to object names that
begin with this prefix.
|
com.google.protobuf.ByteString |
getObjectNamePrefixBytes()
If present, only apply this notification config to object names that
begin with this prefix.
|
String |
getPayloadFormat()
Required.
|
com.google.protobuf.ByteString |
getPayloadFormatBytes()
Required.
|
String |
getTopic()
Required.
|
com.google.protobuf.ByteString |
getTopicBytes()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Notification.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Notification.Builder |
mergeFrom(com.google.protobuf.Message other) |
Notification.Builder |
mergeFrom(Notification other) |
Notification.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Notification.Builder |
putAllCustomAttributes(Map<String,String> values)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Notification.Builder |
putCustomAttributes(String key,
String value)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Notification.Builder |
removeCustomAttributes(String key)
A list of additional attributes to attach to each Pub/Sub
message published for this notification subscription.
|
Notification.Builder |
setEtag(String value)
The etag of the Notification.
|
Notification.Builder |
setEtagBytes(com.google.protobuf.ByteString value)
The etag of the Notification.
|
Notification.Builder |
setEventTypes(int index,
String value)
If present, only send notifications about listed event types.
|
Notification.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Notification.Builder |
setName(String value)
Required.
|
Notification.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Required.
|
Notification.Builder |
setObjectNamePrefix(String value)
If present, only apply this notification config to object names that
begin with this prefix.
|
Notification.Builder |
setObjectNamePrefixBytes(com.google.protobuf.ByteString value)
If present, only apply this notification config to object names that
begin with this prefix.
|
Notification.Builder |
setPayloadFormat(String value)
Required.
|
Notification.Builder |
setPayloadFormatBytes(com.google.protobuf.ByteString value)
Required.
|
Notification.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Notification.Builder |
setTopic(String value)
Required.
|
Notification.Builder |
setTopicBytes(com.google.protobuf.ByteString value)
Required.
|
Notification.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Notification build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Notification buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Notification.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Notification.Builder>public Notification.Builder mergeFrom(Notification other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public Notification.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Notification.Builder>IOExceptionpublic 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];getName in interface NotificationOrBuilderpublic com.google.protobuf.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];getNameBytes in interface NotificationOrBuilderpublic Notification.Builder setName(String value)
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];value - The name to set.public Notification.Builder clearName()
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];public Notification.Builder setNameBytes(com.google.protobuf.ByteString value)
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];value - The bytes for name to set.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];getTopic in interface NotificationOrBuilderpublic com.google.protobuf.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];getTopicBytes in interface NotificationOrBuilderpublic Notification.Builder setTopic(String value)
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];value - The topic to set.public Notification.Builder clearTopic()
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];public Notification.Builder setTopicBytes(com.google.protobuf.ByteString value)
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];value - The bytes for topic to set.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;getEtag in interface NotificationOrBuilderpublic com.google.protobuf.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;getEtagBytes in interface NotificationOrBuilderpublic Notification.Builder setEtag(String value)
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;value - The etag to set.public Notification.Builder clearEtag()
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;public Notification.Builder setEtagBytes(com.google.protobuf.ByteString value)
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;value - The bytes for etag to set.public com.google.protobuf.ProtocolStringList getEventTypesList()
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;getEventTypesList in interface NotificationOrBuilderpublic int getEventTypesCount()
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;getEventTypesCount in interface NotificationOrBuilderpublic 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;getEventTypes in interface NotificationOrBuilderindex - The index of the element to return.public com.google.protobuf.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;getEventTypesBytes in interface NotificationOrBuilderindex - The index of the value to return.public Notification.Builder setEventTypes(int index, String value)
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;index - The index to set the value at.value - The eventTypes to set.public Notification.Builder addEventTypes(String value)
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;value - The eventTypes to add.public Notification.Builder addAllEventTypes(Iterable<String> values)
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;values - The eventTypes to add.public Notification.Builder clearEventTypes()
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;public Notification.Builder addEventTypesBytes(com.google.protobuf.ByteString value)
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;value - The bytes of the eventTypes to add.public int getCustomAttributesCount()
NotificationOrBuilderA list of additional attributes to attach to each Pub/Sub message published for this notification subscription.
map<string, string> custom_attributes = 4;getCustomAttributesCount in interface NotificationOrBuilderpublic 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;containsCustomAttributes in interface NotificationOrBuilder@Deprecated public Map<String,String> getCustomAttributes()
getCustomAttributesMap() instead.getCustomAttributes in interface NotificationOrBuilderpublic 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;getCustomAttributesMap in interface NotificationOrBuilderpublic 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;getCustomAttributesOrDefault in interface NotificationOrBuilderpublic 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;getCustomAttributesOrThrow in interface NotificationOrBuilderpublic Notification.Builder clearCustomAttributes()
public Notification.Builder removeCustomAttributes(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;@Deprecated public Map<String,String> getMutableCustomAttributes()
public Notification.Builder putCustomAttributes(String key, String value)
A list of additional attributes to attach to each Pub/Sub message published for this notification subscription.
map<string, string> custom_attributes = 4;public Notification.Builder putAllCustomAttributes(Map<String,String> values)
A list of additional attributes to attach to each Pub/Sub message published for this notification subscription.
map<string, string> custom_attributes = 4;public String getObjectNamePrefix()
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;getObjectNamePrefix in interface NotificationOrBuilderpublic com.google.protobuf.ByteString getObjectNamePrefixBytes()
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;getObjectNamePrefixBytes in interface NotificationOrBuilderpublic Notification.Builder setObjectNamePrefix(String value)
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;value - The objectNamePrefix to set.public Notification.Builder clearObjectNamePrefix()
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;public Notification.Builder setObjectNamePrefixBytes(com.google.protobuf.ByteString value)
If present, only apply this notification config to object names that begin with this prefix.
string object_name_prefix = 5;value - The bytes for objectNamePrefix to set.public String getPayloadFormat()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];getPayloadFormat in interface NotificationOrBuilderpublic com.google.protobuf.ByteString getPayloadFormatBytes()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];getPayloadFormatBytes in interface NotificationOrBuilderpublic Notification.Builder setPayloadFormat(String value)
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];value - The payloadFormat to set.public Notification.Builder clearPayloadFormat()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];public Notification.Builder setPayloadFormatBytes(com.google.protobuf.ByteString value)
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];value - The bytes for payloadFormat to set.public final Notification.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>public final Notification.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Notification.Builder>Copyright © 2022 Google LLC. All rights reserved.