Class NotificationConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.storage.v2.NotificationConfig
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, NotificationConfigOrBuilder, Serializable

public final class NotificationConfig extends com.google.protobuf.GeneratedMessageV3 implements NotificationConfigOrBuilder
 A directive to publish Pub/Sub notifications upon changes to a bucket.
 
Protobuf type google.storage.v2.NotificationConfig
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • TOPIC_FIELD_NUMBER

      public static final int TOPIC_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
    • EVENT_TYPES_FIELD_NUMBER

      public static final int EVENT_TYPES_FIELD_NUMBER
      See Also:
    • CUSTOM_ATTRIBUTES_FIELD_NUMBER

      public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER
      See Also:
    • OBJECT_NAME_PREFIX_FIELD_NUMBER

      public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER
      See Also:
    • PAYLOAD_FORMAT_FIELD_NUMBER

      public static final int PAYLOAD_FORMAT_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • 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.
    • 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.
    • 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.
    • 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.
    • 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
    • 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.
    • 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.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static NotificationConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static NotificationConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NotificationConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static NotificationConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static NotificationConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NotificationConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static NotificationConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static NotificationConfig.Builder newBuilder()
    • newBuilder

      public static NotificationConfig.Builder newBuilder(NotificationConfig prototype)
    • toBuilder

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

      protected NotificationConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static NotificationConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<NotificationConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<NotificationConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

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