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) Optional.addEventTypes(String value) Optional.addEventTypesBytes(com.google.protobuf.ByteString value) Optional.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Optional.Optional.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Required.Optional.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Required.Required.clone()booleanOptional.Deprecated.intOptional.Optional.getCustomAttributesOrDefault(String key, String defaultValue) Optional.Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetEtag()Optional.com.google.protobuf.ByteStringOptional.getEventTypes(int index) Optional.com.google.protobuf.ByteStringgetEventTypesBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.Deprecated.getName()Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.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) Optional.putCustomAttributes(String key, String value) Optional.Optional.Optional.setEtagBytes(com.google.protobuf.ByteString value) Optional.setEventTypes(int index, String value) Optional.Required.setNameBytes(com.google.protobuf.ByteString value) Required.setObjectNamePrefix(String value) Optional.setObjectNamePrefixBytes(com.google.protobuf.ByteString value) Optional.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
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEtagin interfaceNotificationConfigOrBuilder- Returns:
- The etag.
-
getEtagBytes
public com.google.protobuf.ByteString getEtagBytes()Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEtagBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for etag.
-
setEtag
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setEtagBytes
Optional. 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 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for etag to set.- Returns:
- This builder for chaining.
-
getEventTypesList
public com.google.protobuf.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];- Specified by:
getEventTypesListin interfaceNotificationConfigOrBuilder- Returns:
- A list containing the eventTypes.
-
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];- Specified by:
getEventTypesCountin interfaceNotificationConfigOrBuilder- Returns:
- The count of eventTypes.
-
getEventTypes
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];- 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) 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];- Specified by:
getEventTypesBytesin interfaceNotificationConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the eventTypes at the given index.
-
setEventTypes
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];- Parameters:
index- The index to set the value at.value- The eventTypes to set.- Returns:
- This builder for chaining.
-
addEventTypes
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];- Parameters:
value- The eventTypes to add.- Returns:
- This builder for chaining.
-
addAllEventTypes
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];- Parameters:
values- The eventTypes to add.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
addEventTypesBytes
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];- Parameters:
value- The bytes of the eventTypes to add.- Returns:
- This builder for chaining.
-
getCustomAttributesCount
public int getCustomAttributesCount()Description copied from interface:NotificationConfigOrBuilderOptional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCustomAttributesCountin interfaceNotificationConfigOrBuilder
-
containsCustomAttributes
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsCustomAttributesin interfaceNotificationConfigOrBuilder
-
getCustomAttributes
Deprecated.UsegetCustomAttributesMap()instead.- Specified by:
getCustomAttributesin interfaceNotificationConfigOrBuilder
-
getCustomAttributesMap
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCustomAttributesMapin interfaceNotificationConfigOrBuilder
-
getCustomAttributesOrDefault
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCustomAttributesOrDefaultin interfaceNotificationConfigOrBuilder
-
getCustomAttributesOrThrow
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getCustomAttributesOrThrowin interfaceNotificationConfigOrBuilder
-
clearCustomAttributes
-
removeCustomAttributes
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableCustomAttributes
Deprecated.Use alternate mutation accessors instead. -
putCustomAttributes
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; -
putAllCustomAttributes
Optional. A list of additional attributes to attach to each Pub/Sub message published for this NotificationConfig.
map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; -
getObjectNamePrefix
Optional. If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getObjectNamePrefixin interfaceNotificationConfigOrBuilder- Returns:
- The objectNamePrefix.
-
getObjectNamePrefixBytes
public com.google.protobuf.ByteString getObjectNamePrefixBytes()Optional. If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getObjectNamePrefixBytesin interfaceNotificationConfigOrBuilder- Returns:
- The bytes for objectNamePrefix.
-
setObjectNamePrefix
Optional. If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The objectNamePrefix to set.- Returns:
- This builder for chaining.
-
clearObjectNamePrefix
Optional. If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setObjectNamePrefixBytes
Optional. If present, only apply this NotificationConfig to object names that begin with this prefix.
string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL];- 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>
-