Class TransferTypes.NotificationConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, TransferTypes.NotificationConfigOrBuilder, Cloneable
Enclosing class:
TransferTypes.NotificationConfig

public static final class TransferTypes.NotificationConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder> implements TransferTypes.NotificationConfigOrBuilder
 Specification to configure notifications published to Pub/Sub.
 Notifications are published to the customer-provided topic using the
 following `PubsubMessage.attributes`:

 * `"eventType"`: one of the
 [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values
 * `"payloadFormat"`: one of the
 [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat]
 values
 * `"projectId"`: the
 [project_id][google.storagetransfer.v1.TransferOperation.project_id] of the
 `TransferOperation`
 * `"transferJobName"`: the
 [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name]
 of the `TransferOperation`
 * `"transferOperationName"`: the
 [name][google.storagetransfer.v1.TransferOperation.name] of the
 `TransferOperation`

 The `PubsubMessage.data` contains a
 [TransferOperation][google.storagetransfer.v1.TransferOperation] resource
 formatted according to the specified `PayloadFormat`.
 
Protobuf type google.storagetransfer.v1.NotificationConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TransferTypes.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.GeneratedMessage.Builder<TransferTypes.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.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TransferTypes.NotificationConfig.Builder>
    • mergeFrom

      public TransferTypes.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<TransferTypes.NotificationConfig.Builder>
      Throws:
      IOException
    • getPubsubTopic

      public String getPubsubTopic()
       Required. The `Topic.name` of the Pub/Sub topic to which to publish
       notifications. Must be of the format: `projects/{project}/topics/{topic}`.
       Not matching this format results in an
       [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
       
      string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPubsubTopic in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      The pubsubTopic.
    • getPubsubTopicBytes

      public com.google.protobuf.ByteString getPubsubTopicBytes()
       Required. The `Topic.name` of the Pub/Sub topic to which to publish
       notifications. Must be of the format: `projects/{project}/topics/{topic}`.
       Not matching this format results in an
       [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
       
      string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPubsubTopicBytes in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      The bytes for pubsubTopic.
    • setPubsubTopic

      public TransferTypes.NotificationConfig.Builder setPubsubTopic(String value)
       Required. The `Topic.name` of the Pub/Sub topic to which to publish
       notifications. Must be of the format: `projects/{project}/topics/{topic}`.
       Not matching this format results in an
       [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
       
      string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The pubsubTopic to set.
      Returns:
      This builder for chaining.
    • clearPubsubTopic

      public TransferTypes.NotificationConfig.Builder clearPubsubTopic()
       Required. The `Topic.name` of the Pub/Sub topic to which to publish
       notifications. Must be of the format: `projects/{project}/topics/{topic}`.
       Not matching this format results in an
       [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
       
      string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setPubsubTopicBytes

      public TransferTypes.NotificationConfig.Builder setPubsubTopicBytes(com.google.protobuf.ByteString value)
       Required. The `Topic.name` of the Pub/Sub topic to which to publish
       notifications. Must be of the format: `projects/{project}/topics/{topic}`.
       Not matching this format results in an
       [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
       
      string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for pubsubTopic to set.
      Returns:
      This builder for chaining.
    • getEventTypesList

      public List<TransferTypes.NotificationConfig.EventType> getEventTypesList()
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Specified by:
      getEventTypesList in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      A list containing the eventTypes.
    • getEventTypesCount

      public int getEventTypesCount()
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Specified by:
      getEventTypesCount in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      The count of eventTypes.
    • getEventTypes

      public TransferTypes.NotificationConfig.EventType getEventTypes(int index)
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Specified by:
      getEventTypes in interface TransferTypes.NotificationConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The eventTypes at the given index.
    • setEventTypes

       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The eventTypes to set.
      Returns:
      This builder for chaining.
    • addEventTypes

       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      value - The eventTypes to add.
      Returns:
      This builder for chaining.
    • addAllEventTypes

       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      values - The eventTypes to add.
      Returns:
      This builder for chaining.
    • clearEventTypes

      public TransferTypes.NotificationConfig.Builder clearEventTypes()
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Returns:
      This builder for chaining.
    • getEventTypesValueList

      public List<Integer> getEventTypesValueList()
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Specified by:
      getEventTypesValueList in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for eventTypes.
    • getEventTypesValue

      public int getEventTypesValue(int index)
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Specified by:
      getEventTypesValue in interface TransferTypes.NotificationConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of eventTypes at the given index.
    • setEventTypesValue

      public TransferTypes.NotificationConfig.Builder setEventTypesValue(int index, int value)
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for eventTypes to set.
      Returns:
      This builder for chaining.
    • addEventTypesValue

      public TransferTypes.NotificationConfig.Builder addEventTypesValue(int value)
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      value - The enum numeric value on the wire for eventTypes to add.
      Returns:
      This builder for chaining.
    • addAllEventTypesValue

      public TransferTypes.NotificationConfig.Builder addAllEventTypesValue(Iterable<Integer> values)
       Event types for which a notification is desired. If empty, send
       notifications for all event types.
       
      repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2;
      Parameters:
      values - The enum numeric values on the wire for eventTypes to add.
      Returns:
      This builder for chaining.
    • getPayloadFormatValue

      public int getPayloadFormatValue()
       Required. The desired format of the notification message payloads.
       
      .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPayloadFormatValue in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      The enum numeric value on the wire for payloadFormat.
    • setPayloadFormatValue

      public TransferTypes.NotificationConfig.Builder setPayloadFormatValue(int value)
       Required. The desired format of the notification message payloads.
       
      .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for payloadFormat to set.
      Returns:
      This builder for chaining.
    • getPayloadFormat

       Required. The desired format of the notification message payloads.
       
      .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPayloadFormat in interface TransferTypes.NotificationConfigOrBuilder
      Returns:
      The payloadFormat.
    • setPayloadFormat

       Required. The desired format of the notification message payloads.
       
      .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The payloadFormat to set.
      Returns:
      This builder for chaining.
    • clearPayloadFormat

      public TransferTypes.NotificationConfig.Builder clearPayloadFormat()
       Required. The desired format of the notification message payloads.
       
      .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.