Package com.google.storage.v2
Class NotificationConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
com.google.storage.v2.NotificationConfig.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,NotificationConfigOrBuilder,Cloneable
- Enclosing class:
- NotificationConfig
public static final class NotificationConfig.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
implements NotificationConfigOrBuilder
A directive to publish Pub/Sub notifications upon changes to a bucket.Protobuf type
google.storage.v2.NotificationConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllEventTypes(Iterable<String> values) If present, only send notifications about listed event types.addEventTypes(String value) If present, only send notifications about listed event types.addEventTypesBytes(com.google.protobuf.ByteString value) If present, only send notifications about listed event types.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The etag of the NotificationConfig.If present, only send notifications about listed event types.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Required.If present, only apply this NotificationConfig to object names that begin with this prefix.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Required.Required.clone()booleanA list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.Deprecated.intA list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.getCustomAttributesOrDefault(String key, String defaultValue) A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetEtag()The etag of the NotificationConfig.com.google.protobuf.ByteStringThe etag of the NotificationConfig.getEventTypes(int index) If present, only send notifications about listed event types.com.google.protobuf.ByteStringgetEventTypesBytes(int index) If present, only send notifications about listed event types.intIf present, only send notifications about listed event types.com.google.protobuf.ProtocolStringListIf present, only send notifications about listed event types.Deprecated.getName()Required.com.google.protobuf.ByteStringRequired.If present, only apply this NotificationConfig to object names that begin with this prefix.com.google.protobuf.ByteStringIf present, only apply this NotificationConfig to object names that begin with this prefix.Required.com.google.protobuf.ByteStringRequired.getTopic()Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(NotificationConfig other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) putAllCustomAttributes(Map<String, String> values) A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.putCustomAttributes(String key, String value) A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.The etag of the NotificationConfig.setEtagBytes(com.google.protobuf.ByteString value) The etag of the NotificationConfig.setEventTypes(int index, String value) If present, only send notifications about listed event types.Required.setNameBytes(com.google.protobuf.ByteString value) Required.setObjectNamePrefix(String value) If present, only apply this NotificationConfig to object names that begin with this prefix.setObjectNamePrefixBytes(com.google.protobuf.ByteString value) If present, only apply this NotificationConfig to object names that begin with this prefix.setPayloadFormat(String value) Required.setPayloadFormatBytes(com.google.protobuf.ByteString value) Required.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) Required.setTopicBytes(com.google.protobuf.ByteString value) Required.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
setField
public NotificationConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
setRepeatedField
public NotificationConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
addRepeatedField
public NotificationConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<NotificationConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
mergeFrom
public NotificationConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<NotificationConfig.Builder>- Throws:
IOException
-
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];- Specified by:
getNamein interfaceNotificationConfigOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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];- Specified by:
getNameBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for name.
-
setName
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];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
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:
- This builder for chaining.
-
setNameBytes
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];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getTopicin interfaceNotificationConfigOrBuilder- Returns:
- The topic.
-
getTopicBytes
public 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];- Specified by:
getTopicBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for topic.
-
setTopic
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];- Parameters:
value- The topic to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setTopicBytes
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];- Parameters:
value- The bytes for topic to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getEtagin interfaceNotificationConfigOrBuilder- Returns:
- The etag.
-
getEtagBytes
public com.google.protobuf.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;- Specified by:
getEtagBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for etag.
-
setEtag
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;- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
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:
- This builder for chaining.
-
setEtagBytes
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;- Parameters:
value- The bytes for etag to set.- Returns:
- This builder for chaining.
-
getEventTypesList
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;- Specified by:
getEventTypesListin interfaceNotificationConfigOrBuilder- Returns:
- A list containing the eventTypes.
-
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;- Specified by:
getEventTypesCountin interfaceNotificationConfigOrBuilder- Returns:
- The count of eventTypes.
-
getEventTypes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Specified by:
getEventTypesin interfaceNotificationConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The eventTypes at the given index.
-
getEventTypesBytes
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;- Specified by:
getEventTypesBytesin interfaceNotificationConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the eventTypes at the given index.
-
setEventTypes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Parameters:
index- The index to set the value at.value- The eventTypes to set.- Returns:
- This builder for chaining.
-
addEventTypes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Parameters:
value- The eventTypes to add.- Returns:
- This builder for chaining.
-
addAllEventTypes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Parameters:
values- The eventTypes to add.- Returns:
- This builder for chaining.
-
clearEventTypes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Returns:
- This builder for chaining.
-
addEventTypesBytes
If present, only send notifications about listed event types. If empty, sent notifications for all event types.
repeated string event_types = 3;- Parameters:
value- The bytes of the eventTypes to add.- Returns:
- This builder for chaining.
-
getCustomAttributesCount
public int getCustomAttributesCount()Description copied from interface:NotificationConfigOrBuilderA list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4;- Specified by:
getCustomAttributesCountin interfaceNotificationConfigOrBuilder
-
containsCustomAttributes
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4;- Specified by:
containsCustomAttributesin interfaceNotificationConfigOrBuilder
-
getCustomAttributes
Deprecated.UsegetCustomAttributesMap()instead.- Specified by:
getCustomAttributesin interfaceNotificationConfigOrBuilder
-
getCustomAttributesMap
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4;- Specified by:
getCustomAttributesMapin interfaceNotificationConfigOrBuilder
-
getCustomAttributesOrDefault
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4;- Specified by:
getCustomAttributesOrDefaultin interfaceNotificationConfigOrBuilder
-
getCustomAttributesOrThrow
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4;- Specified by:
getCustomAttributesOrThrowin interfaceNotificationConfigOrBuilder
-
clearCustomAttributes
-
removeCustomAttributes
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4; -
getMutableCustomAttributes
Deprecated.Use alternate mutation accessors instead. -
putCustomAttributes
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4; -
putAllCustomAttributes
A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4; -
getObjectNamePrefix
If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5;- Specified by:
getObjectNamePrefixin interfaceNotificationConfigOrBuilder- Returns:
- The objectNamePrefix.
-
getObjectNamePrefixBytes
public com.google.protobuf.ByteString getObjectNamePrefixBytes()If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5;- Specified by:
getObjectNamePrefixBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for objectNamePrefix.
-
setObjectNamePrefix
If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5;- Parameters:
value- The objectNamePrefix to set.- Returns:
- This builder for chaining.
-
clearObjectNamePrefix
If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5;- Returns:
- This builder for chaining.
-
setObjectNamePrefixBytes
If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5;- Parameters:
value- The bytes for objectNamePrefix to set.- Returns:
- This builder for chaining.
-
getPayloadFormat
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPayloadFormatin interfaceNotificationConfigOrBuilder- Returns:
- The payloadFormat.
-
getPayloadFormatBytes
public com.google.protobuf.ByteString getPayloadFormatBytes()Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPayloadFormatBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for payloadFormat.
-
setPayloadFormat
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The payloadFormat to set.- Returns:
- This builder for chaining.
-
clearPayloadFormat
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setPayloadFormatBytes
Required. The desired content of the Payload.
string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for payloadFormat to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final NotificationConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-
mergeUnknownFields
public final NotificationConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
-