Interface ImportContainer


public interface ImportContainer

Contains the resources to be imported. Unless resourceType is specified, the ImportContainer can import all of the supported ImportResourceTypes.

If the container was created without a retentionPolicy, it expires 72 hours after createdAt. If a TimeToLiveRetentionPolicy was set, expiry follows the configured timeToLive (between the minimum and maximum allowed values). The expiresAt field holds the calculated deletion time.


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()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier of the ImportContainer.

      Returns:
      key
    • getResourceType

      ImportResourceType getResourceType()

      The resource type the ImportContainer supports. If not present, the ImportContainer can import all of the supported ImportResourceTypes.

      Returns:
      resourceType
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the ImportContainer.

      Returns:
      version
    • getRetentionPolicy

      @Valid @Valid RetentionPolicy getRetentionPolicy()

      Retention policy for this ImportContainer. If not set, the ImportContainer will expire 72 hours after creation.

      Returns:
      retentionPolicy
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the ImportContainer was initially created.

      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the ImportContainer was last updated.

      Returns:
      lastModifiedAt
    • getExpiresAt

      ZonedDateTime getExpiresAt()

      Date and time (UTC) when the ImportContainer is automatically deleted. If no retentionPolicy was set at creation, this is 72 hours after createdAt. If a TimeToLiveRetentionPolicy was set, it is derived from timeToLive.

      Returns:
      expiresAt
    • setKey

      void setKey(String key)

      User-defined unique identifier of the ImportContainer.

      Parameters:
      key - value to be set
    • setResourceType

      void setResourceType(ImportResourceType resourceType)

      The resource type the ImportContainer supports. If not present, the ImportContainer can import all of the supported ImportResourceTypes.

      Parameters:
      resourceType - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the ImportContainer.

      Parameters:
      version - value to be set
    • setRetentionPolicy

      void setRetentionPolicy(RetentionPolicy retentionPolicy)

      Retention policy for this ImportContainer. If not set, the ImportContainer will expire 72 hours after creation.

      Parameters:
      retentionPolicy - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the ImportContainer was initially created.

      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the ImportContainer was last updated.

      Parameters:
      lastModifiedAt - value to be set
    • setExpiresAt

      void setExpiresAt(ZonedDateTime expiresAt)

      Date and time (UTC) when the ImportContainer is automatically deleted. If no retentionPolicy was set at creation, this is 72 hours after createdAt. If a TimeToLiveRetentionPolicy was set, it is derived from timeToLive.

      Parameters:
      expiresAt - value to be set
    • of

      static ImportContainer of()
      factory method
      Returns:
      instance of ImportContainer
    • of

      static ImportContainer of(ImportContainer template)
      factory method to create a shallow copy ImportContainer
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      ImportContainer copyDeep()
    • deepCopy

      @Nullable static ImportContainer deepCopy(@Nullable ImportContainer template)
      factory method to create a deep copy of ImportContainer
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ImportContainerBuilder builder()
      builder factory method for ImportContainer
      Returns:
      builder
    • builder

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

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

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