public static final class Notification.Builder extends GeneratedMessageV3.Builder<Notification.Builder> implements NotificationOrBuilder
A directive to publish Pub/Sub notifications upon changes to a bucket.
Protobuf type google.storage.v2.Notification
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Notification.BuilderImplements
NotificationOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllEventTypes(Iterable<String> values)
public Notification.Builder addAllEventTypes(Iterable<String> values)
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];
Name | Description |
values | Iterable<String> The eventTypes to add. |
Type | Description |
Notification.Builder | This builder for chaining. |
addEventTypes(String value)
public Notification.Builder addEventTypes(String value)
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];
Name | Description |
value | String The eventTypes to add. |
Type | Description |
Notification.Builder | This builder for chaining. |
addEventTypesBytes(ByteString value)
public Notification.Builder addEventTypesBytes(ByteString value)
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];
Name | Description |
value | ByteString The bytes of the eventTypes to add. |
Type | Description |
Notification.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Notification.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Notification.Builder |
build()
public Notification build()
Type | Description |
Notification |
buildPartial()
public Notification buildPartial()
Type | Description |
Notification |
clear()
public Notification.Builder clear()
Type | Description |
Notification.Builder |
clearCustomAttributes()
public Notification.Builder clearCustomAttributes()
Type | Description |
Notification.Builder |
clearEtag()
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;
Type | Description |
Notification.Builder | This builder for chaining. |
clearEventTypes()
public Notification.Builder clearEventTypes()
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];
Type | Description |
Notification.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Notification.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Notification.Builder |
clearName()
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];
Type | Description |
Notification.Builder | This builder for chaining. |
clearObjectNamePrefix()
public Notification.Builder clearObjectNamePrefix()
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];
Type | Description |
Notification.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Notification.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Notification.Builder |
clearPayloadFormat()
public Notification.Builder clearPayloadFormat()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
Notification.Builder | This builder for chaining. |
clearTopic()
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];
Type | Description |
Notification.Builder | This builder for chaining. |
clone()
public Notification.Builder clone()
Type | Description |
Notification.Builder |
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];
Name | Description |
key | String |
Type | Description |
boolean |
getCustomAttributes()
public Map<String,String> getCustomAttributes()
Use #getCustomAttributesMap() instead.
Type | Description |
Map<String,String> |
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];
Type | Description |
int |
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];
Type | Description |
Map<String,String> |
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];
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
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];
Name | Description |
key | String |
Type | Description |
String |
getDefaultInstanceForType()
public Notification getDefaultInstanceForType()
Type | Description |
Notification |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getEtag()
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;
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;
Type | Description |
ByteString | The bytes for etag. |
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];
Name | Description |
index | int The index of the element to return. |
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];
Name | Description |
index | int The index of the value to return. |
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];
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];
Type | Description |
ProtocolStringList | A list containing the eventTypes. |
getMutableCustomAttributes()
public Map<String,String> getMutableCustomAttributes()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
getName()
public 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];
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];
Type | Description |
ByteString | The bytes for name. |
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];
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];
Type | Description |
ByteString | The bytes for objectNamePrefix. |
getPayloadFormat()
public String getPayloadFormat()
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
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];
Type | Description |
ByteString | The bytes for payloadFormat. |
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];
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];
Type | Description |
ByteString | The bytes for topic. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Notification.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Notification.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Notification.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Notification.Builder |
mergeFrom(Notification other)
public Notification.Builder mergeFrom(Notification other)
Name | Description |
other | Notification |
Type | Description |
Notification.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Notification.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Notification.Builder |
putAllCustomAttributes(Map<String,String> values)
public Notification.Builder putAllCustomAttributes(Map<String,String> values)
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];
Name | Description |
values | Map<String,String> |
Type | Description |
Notification.Builder |
putCustomAttributes(String key, String value)
public Notification.Builder putCustomAttributes(String key, String value)
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];
Name | Description |
key | String |
value | String |
Type | Description |
Notification.Builder |
removeCustomAttributes(String key)
public Notification.Builder removeCustomAttributes(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];
Name | Description |
key | String |
Type | Description |
Notification.Builder |
setEtag(String value)
public 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;
Name | Description |
value | String The etag to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setEtagBytes(ByteString value)
public Notification.Builder setEtagBytes(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;
Name | Description |
value | ByteString The bytes for etag to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setEventTypes(int index, String value)
public Notification.Builder setEventTypes(int index, String value)
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];
Name | Description |
index | int The index to set the value at. |
value | String The eventTypes to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Notification.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Notification.Builder |
setName(String value)
public 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];
Name | Description |
value | String The name to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public Notification.Builder setNameBytes(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];
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setObjectNamePrefix(String value)
public Notification.Builder setObjectNamePrefix(String value)
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];
Name | Description |
value | String The objectNamePrefix to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setObjectNamePrefixBytes(ByteString value)
public Notification.Builder setObjectNamePrefixBytes(ByteString value)
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];
Name | Description |
value | ByteString The bytes for objectNamePrefix to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setPayloadFormat(String value)
public Notification.Builder setPayloadFormat(String value)
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The payloadFormat to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setPayloadFormatBytes(ByteString value)
public Notification.Builder setPayloadFormatBytes(ByteString value)
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for payloadFormat to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Notification.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Notification.Builder |
setTopic(String value)
public 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];
Name | Description |
value | String The topic to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setTopicBytes(ByteString value)
public Notification.Builder setTopicBytes(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];
Name | Description |
value | ByteString The bytes for topic to set. |
Type | Description |
Notification.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Notification.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Notification.Builder |