Interface GoogleCloudPubSubDestination

All Superinterfaces:
Destination

public interface GoogleCloudPubSubDestination extends Destination

Destination for Google Cloud Pub/Sub that can be used for Pull subscriptions as well as for Push subscriptions. The topic must give the pubsub.topics.publish permission to the service account subscriptions@commercetools-platform.iam.gserviceaccount.com. If used with the CloudEventsFormat, the notification conforms to the PubSub Protocol Binding of the Structured Content Mode.


Example to create an instance using the builder pattern

     GoogleCloudPubSubDestination googleCloudPubSubDestination = GoogleCloudPubSubDestination.builder()
             .projectId("{projectId}")
             .topic("{topic}")
             .build()
 
  • Field Details

    • GOOGLE_CLOUD_PUB_SUB

      static final String GOOGLE_CLOUD_PUB_SUB
      discriminator value for GoogleCloudPubSubDestination
      See Also:
  • Method Details

    • getProjectId

      @NotNull @NotNull String getProjectId()

      ID of the Google Cloud project that contains the Pub/Sub topic.

      Returns:
      projectId
    • getTopic

      @NotNull @NotNull String getTopic()

      Name of the topic.

      Returns:
      topic
    • setProjectId

      void setProjectId(String projectId)

      ID of the Google Cloud project that contains the Pub/Sub topic.

      Parameters:
      projectId - value to be set
    • setTopic

      void setTopic(String topic)

      Name of the topic.

      Parameters:
      topic - value to be set
    • of

      factory method
      Returns:
      instance of GoogleCloudPubSubDestination
    • of

      factory method to create a shallow copy GoogleCloudPubSubDestination
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of GoogleCloudPubSubDestination
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for GoogleCloudPubSubDestination
      Returns:
      builder
    • builder

      create builder for GoogleCloudPubSubDestination instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGoogleCloudPubSubDestination

      default <T> T withGoogleCloudPubSubDestination(Function<GoogleCloudPubSubDestination,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<GoogleCloudPubSubDestination> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference