Class ContainerAndKeyBuilder

java.lang.Object
com.commercetools.api.models.message.ContainerAndKeyBuilder
All Implemented Interfaces:
Builder<ContainerAndKey>

public class ContainerAndKeyBuilder extends Object implements Builder<ContainerAndKey>
ContainerAndKeyBuilder
Example to create an instance using the builder pattern

     ContainerAndKey containerAndKey = ContainerAndKey.builder()
             .key("{key}")
             .container("{container}")
             .build()
 
  • Constructor Details

    • ContainerAndKeyBuilder

      public ContainerAndKeyBuilder()
  • Method Details

    • key

      public ContainerAndKeyBuilder key(String key)

      User-defined identifier that is unique within the given container.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • container

      public ContainerAndKeyBuilder container(String container)

      Namespace to group Custom Objects.

      Parameters:
      container - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()

      User-defined identifier that is unique within the given container.

      Returns:
      key
    • getContainer

      public String getContainer()

      Namespace to group Custom Objects.

      Returns:
      container
    • build

      public ContainerAndKey build()
      builds ContainerAndKey with checking for non-null required values
      Specified by:
      build in interface Builder<ContainerAndKey>
      Returns:
      ContainerAndKey
    • buildUnchecked

      public ContainerAndKey buildUnchecked()
      builds ContainerAndKey without checking for non-null required values
      Returns:
      ContainerAndKey
    • of

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

      public static ContainerAndKeyBuilder of(ContainerAndKey template)
      create builder for ContainerAndKey instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder