Class TypeImportImpl

java.lang.Object
com.commercetools.importapi.models.types.TypeImportImpl
All Implemented Interfaces:
ImportResource, TypeImport, io.vrap.rmf.base.client.ModelBase

public class TypeImportImpl extends Object implements TypeImport, io.vrap.rmf.base.client.ModelBase

The data representation for a Type to be imported that is persisted as a Type in the Project.

  • Constructor Details

    • TypeImportImpl

      public TypeImportImpl()
      create empty instance
  • Method Details

    • getKey

      public String getKey()

      User-defined unique identifier for the Type. If a Type with this key exists, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Specified by:
      getKey in interface TypeImport
      Returns:
      key
    • getName

      public LocalizedString getName()

      Maps to Type.name.

      Specified by:
      getName in interface TypeImport
      Returns:
      name
    • getDescription

      public LocalizedString getDescription()

      Maps to Type.description.

      Specified by:
      getDescription in interface TypeImport
      Returns:
      description
    • getResourceTypeIds

      public List<ResourceTypeId> getResourceTypeIds()

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Specified by:
      getResourceTypeIds in interface TypeImport
      Returns:
      resourceTypeIds
    • getFieldDefinitions

      public List<FieldDefinition> getFieldDefinitions()

      Maps to Type.fieldDefinitions.

      Specified by:
      getFieldDefinitions in interface TypeImport
      Returns:
      fieldDefinitions
    • setKey

      public void setKey(String key)
      Description copied from interface: TypeImport

      User-defined unique identifier for the Type. If a Type with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Specified by:
      setKey in interface TypeImport
      Parameters:
      key - value to be set
    • setName

      public void setName(LocalizedString name)
      Description copied from interface: TypeImport

      Maps to Type.name.

      Specified by:
      setName in interface TypeImport
      Parameters:
      name - value to be set
    • setDescription

      public void setDescription(LocalizedString description)
      Description copied from interface: TypeImport

      Maps to Type.description.

      Specified by:
      setDescription in interface TypeImport
      Parameters:
      description - value to be set
    • setResourceTypeIds

      public void setResourceTypeIds(ResourceTypeId... resourceTypeIds)
      Description copied from interface: TypeImport

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Specified by:
      setResourceTypeIds in interface TypeImport
      Parameters:
      resourceTypeIds - values to be set
    • setResourceTypeIds

      public void setResourceTypeIds(List<ResourceTypeId> resourceTypeIds)
      Description copied from interface: TypeImport

      Maps to Type.resourceTypeIds. This value cannot be changed after the Type is imported.

      Specified by:
      setResourceTypeIds in interface TypeImport
      Parameters:
      resourceTypeIds - values to be set
    • setFieldDefinitions

      public void setFieldDefinitions(FieldDefinition... fieldDefinitions)
      Description copied from interface: TypeImport

      Maps to Type.fieldDefinitions.

      Specified by:
      setFieldDefinitions in interface TypeImport
      Parameters:
      fieldDefinitions - values to be set
    • setFieldDefinitions

      public void setFieldDefinitions(List<FieldDefinition> fieldDefinitions)
      Description copied from interface: TypeImport

      Maps to Type.fieldDefinitions.

      Specified by:
      setFieldDefinitions in interface TypeImport
      Parameters:
      fieldDefinitions - values to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object