Class ImportContainerBuilder

java.lang.Object
com.commercetools.importapi.models.importcontainers.ImportContainerBuilder
All Implemented Interfaces:
Builder<ImportContainer>

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

     ImportContainer importContainer = ImportContainer.builder()
             .key("{key}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Constructor Details

    • ImportContainerBuilder

      public ImportContainerBuilder()
  • Method Details

    • key

      public ImportContainerBuilder key(String key)

      User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).

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

      public ImportContainerBuilder resourceType(@Nullable ImportResourceType resourceType)

      The resource type the ImportContainer is able to handle. If not present, the ImportContainer is able to import all of the supported ImportResourceTypes.

      Parameters:
      resourceType - value to be set
      Returns:
      Builder
    • version

      public ImportContainerBuilder version(Long version)

      The version of the ImportContainer.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • createdAt

      public ImportContainerBuilder createdAt(ZonedDateTime createdAt)

      The time when the ImportContainer was created.

      Parameters:
      createdAt - value to be set
      Returns:
      Builder
    • lastModifiedAt

      public ImportContainerBuilder lastModifiedAt(ZonedDateTime lastModifiedAt)

      The last time when the ImportContainer was modified.

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

      public String getKey()

      User-defined unique identifier for the ImportContainer. Keys can only contain alphanumeric characters (a-Z, 0-9), underscores and hyphens (_, -).

      Returns:
      key
    • getResourceType

      @Nullable public ImportResourceType getResourceType()

      The resource type the ImportContainer is able to handle. If not present, the ImportContainer is able to import all of the supported ImportResourceTypes.

      Returns:
      resourceType
    • getVersion

      public Long getVersion()

      The version of the ImportContainer.

      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      The time when the ImportContainer was created.

      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      The last time when the ImportContainer was modified.

      Returns:
      lastModifiedAt
    • build

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

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

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

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