Class ReferencedResourceNotFoundBuilder

java.lang.Object
com.commercetools.importapi.models.errors.ReferencedResourceNotFoundBuilder
All Implemented Interfaces:
Builder<ReferencedResourceNotFound>

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

     ReferencedResourceNotFound referencedResourceNotFound = ReferencedResourceNotFound.builder()
             .message("{message}")
             .typeId(ReferenceType.CART)
             .build()
 
  • Constructor Details

    • ReferencedResourceNotFoundBuilder

      public ReferencedResourceNotFoundBuilder()
  • Method Details

    • message

      public ReferencedResourceNotFoundBuilder message(String message)

      "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

      Parameters:
      message - value to be set
      Returns:
      Builder
    • typeId

      Type of referenced resource.

      Parameters:
      typeId - value to be set
      Returns:
      Builder
    • id

      Unique identifier of the referenced resource, if known.

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

      User-defined unique identifier of the referenced resource, if known.

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

      public String getMessage()

      "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

      Returns:
      message
    • getTypeId

      public ReferenceType getTypeId()

      Type of referenced resource.

      Returns:
      typeId
    • getId

      @Nullable public String getId()

      Unique identifier of the referenced resource, if known.

      Returns:
      id
    • getKey

      @Nullable public String getKey()

      User-defined unique identifier of the referenced resource, if known.

      Returns:
      key
    • build

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

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

      factory method for an instance of ReferencedResourceNotFoundBuilder
      Returns:
      builder
    • of

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