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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapField

      protected com.google.protobuf.MapField internalGetMapField(int number)
      Overrides:
      internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • internalGetMutableMapField

      protected com.google.protobuf.MapField internalGetMutableMapField(int number)
      Overrides:
      internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • getDefaultInstanceForType

      public NotificationConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public NotificationConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public NotificationConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • setField

      public NotificationConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • clearField

      public NotificationConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • clearOneof

      public NotificationConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • setRepeatedField

      public NotificationConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • addRepeatedField

      public NotificationConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • mergeFrom

      public NotificationConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NotificationConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NotificationConfig.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getName in interface NotificationConfigOrBuilder
      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:
      getNameBytes in interface NotificationConfigOrBuilder
      Returns:
      The bytes for name.
    • setName

      public NotificationConfig.Builder setName(String value)
       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

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

      public NotificationConfig.Builder setNameBytes(com.google.protobuf.ByteString value)
       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

      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];
      Specified by:
      getTopic in interface NotificationConfigOrBuilder
      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:
      getTopicBytes in interface NotificationConfigOrBuilder
      Returns:
      The bytes for topic.
    • setTopic

      public NotificationConfig.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];
      Parameters:
      value - The topic to set.
      Returns:
      This builder for chaining.
    • clearTopic

      public NotificationConfig.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];
      Returns:
      This builder for chaining.
    • setTopicBytes

      public NotificationConfig.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];
      Parameters:
      value - The bytes for topic to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getEtag in interface NotificationConfigOrBuilder
      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:
      getEtagBytes in interface NotificationConfigOrBuilder
      Returns:
      The bytes for etag.
    • setEtag

      public NotificationConfig.Builder setEtag(String value)
       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

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

      public NotificationConfig.Builder setEtagBytes(com.google.protobuf.ByteString value)
       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:
      getEventTypesList in interface NotificationConfigOrBuilder
      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:
      getEventTypesCount in interface NotificationConfigOrBuilder
      Returns:
      The count of eventTypes.
    • getEventTypes

      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;
      Specified by:
      getEventTypes in interface NotificationConfigOrBuilder
      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:
      getEventTypesBytes in interface NotificationConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the eventTypes at the given index.
    • setEventTypes

      public NotificationConfig.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;
      Parameters:
      index - The index to set the value at.
      value - The eventTypes to set.
      Returns:
      This builder for chaining.
    • addEventTypes

      public NotificationConfig.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;
      Parameters:
      value - The eventTypes to add.
      Returns:
      This builder for chaining.
    • addAllEventTypes

      public NotificationConfig.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;
      Parameters:
      values - The eventTypes to add.
      Returns:
      This builder for chaining.
    • clearEventTypes

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

      public NotificationConfig.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;
      Parameters:
      value - The bytes of the eventTypes to add.
      Returns:
      This builder for chaining.
    • getCustomAttributesCount

      public int getCustomAttributesCount()
      Description copied from interface: NotificationConfigOrBuilder
       A list of additional attributes to attach to each Pub/Sub
       message published for this NotificationConfig.
       
      map<string, string> custom_attributes = 4;
      Specified by:
      getCustomAttributesCount in interface NotificationConfigOrBuilder
    • containsCustomAttributes

      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;
      Specified by:
      containsCustomAttributes in interface NotificationConfigOrBuilder
    • getCustomAttributes

      @Deprecated public Map<String,String> getCustomAttributes()
      Deprecated.
      Specified by:
      getCustomAttributes in interface NotificationConfigOrBuilder
    • 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;
      Specified by:
      getCustomAttributesMap in interface NotificationConfigOrBuilder
    • getCustomAttributesOrDefault

      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;
      Specified by:
      getCustomAttributesOrDefault in interface NotificationConfigOrBuilder
    • getCustomAttributesOrThrow

      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;
      Specified by:
      getCustomAttributesOrThrow in interface NotificationConfigOrBuilder
    • clearCustomAttributes

      public NotificationConfig.Builder clearCustomAttributes()
    • removeCustomAttributes

      public NotificationConfig.Builder removeCustomAttributes(String key)
       A list of additional attributes to attach to each Pub/Sub
       message published for this NotificationConfig.
       
      map<string, string> custom_attributes = 4;
    • getMutableCustomAttributes

      @Deprecated public Map<String,String> getMutableCustomAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putCustomAttributes

      public NotificationConfig.Builder putCustomAttributes(String key, String value)
       A list of additional attributes to attach to each Pub/Sub
       message published for this NotificationConfig.
       
      map<string, string> custom_attributes = 4;
    • putAllCustomAttributes

      public NotificationConfig.Builder putAllCustomAttributes(Map<String,String> values)
       A list of additional attributes to attach to each Pub/Sub
       message published for this NotificationConfig.
       
      map<string, string> custom_attributes = 4;
    • getObjectNamePrefix

      public String getObjectNamePrefix()
       If present, only apply this NotificationConfig to object names that
       begin with this prefix.
       
      string object_name_prefix = 5;
      Specified by:
      getObjectNamePrefix in interface NotificationConfigOrBuilder
      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:
      getObjectNamePrefixBytes in interface NotificationConfigOrBuilder
      Returns:
      The bytes for objectNamePrefix.
    • setObjectNamePrefix

      public NotificationConfig.Builder setObjectNamePrefix(String value)
       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

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

      public NotificationConfig.Builder setObjectNamePrefixBytes(com.google.protobuf.ByteString value)
       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

      public String getPayloadFormat()
       Required. The desired content of the Payload.
       
      string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPayloadFormat in interface NotificationConfigOrBuilder
      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:
      getPayloadFormatBytes in interface NotificationConfigOrBuilder
      Returns:
      The bytes for payloadFormat.
    • setPayloadFormat

      public NotificationConfig.Builder setPayloadFormat(String value)
       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

      public NotificationConfig.Builder clearPayloadFormat()
       Required. The desired content of the Payload.
       
      string payload_format = 6 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setPayloadFormatBytes

      public NotificationConfig.Builder setPayloadFormatBytes(com.google.protobuf.ByteString value)
       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:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>
    • mergeUnknownFields

      public final NotificationConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NotificationConfig.Builder>