Class MessageSubscriptionBuilder

java.lang.Object
com.commercetools.api.models.subscription.MessageSubscriptionBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<MessageSubscription>

public class MessageSubscriptionBuilder extends Object implements io.vrap.rmf.base.client.Builder<MessageSubscription>
MessageSubscriptionBuilder
Example to create an instance using the builder pattern

     MessageSubscription messageSubscription = MessageSubscription.builder()
             .resourceTypeId(MessageSubscriptionResourceTypeId.ASSOCIATE_ROLE)
             .build()
 
  • Constructor Details

  • Method Details

    • resourceTypeId

      Unique identifier for the type of resource, for example, order.

      Parameters:
      resourceTypeId - value to be set
      Returns:
      Builder
    • types

      Must contain valid message types for the resource. For example, for resource type product the message type ProductPublished is valid. If no types of messages are given, the Subscription will receive all messages for this resource.

      Parameters:
      types - value to be set
      Returns:
      Builder
    • types

      Must contain valid message types for the resource. For example, for resource type product the message type ProductPublished is valid. If no types of messages are given, the Subscription will receive all messages for this resource.

      Parameters:
      types - value to be set
      Returns:
      Builder
    • plusTypes

      Must contain valid message types for the resource. For example, for resource type product the message type ProductPublished is valid. If no types of messages are given, the Subscription will receive all messages for this resource.

      Parameters:
      types - value to be set
      Returns:
      Builder
    • getResourceTypeId

      Unique identifier for the type of resource, for example, order.

      Returns:
      resourceTypeId
    • getTypes

      Must contain valid message types for the resource. For example, for resource type product the message type ProductPublished is valid. If no types of messages are given, the Subscription will receive all messages for this resource.

      Returns:
      types
    • build

      builds MessageSubscription with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<MessageSubscription>
      Returns:
      MessageSubscription
    • buildUnchecked

      builds MessageSubscription without checking for non-null required values
      Returns:
      MessageSubscription
    • of

      public static MessageSubscriptionBuilder of()
      factory method for an instance of MessageSubscriptionBuilder
      Returns:
      builder
    • of

      create builder for MessageSubscription instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder