Interface CustomFields
- All Superinterfaces:
CustomFieldsMixin
Serves as value of the custom field on a resource or data type customized with a Type.
Example to create an instance using the builder pattern
CustomFields customFields = CustomFields.builder()
.type(typeBuilder -> typeBuilder)
.fields(fieldsBuilder -> fieldsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomFieldsBuilderbuilder()builder factory method for CustomFieldsstatic CustomFieldsBuilderbuilder(CustomFields template) create builder for CustomFields instancecopyDeep()static CustomFieldsdeepCopy(CustomFields template) factory method to create a deep copy of CustomFields@NotNull @Valid FieldContainerObject containing the Custom Fields for the customized resource or data type.@NotNull @Valid TypeReferencegetType()Reference to the Type that holds the FieldDefinitions for the Custom Fields.static CustomFieldsof()factory methodstatic CustomFieldsof(CustomFields template) factory method to create a shallow copy CustomFieldsvoidsetFields(FieldContainer fields) Object containing the Custom Fields for the customized resource or data type.voidsetType(TypeReference type) Reference to the Type that holds the FieldDefinitions for the Custom Fields.static com.fasterxml.jackson.core.type.TypeReference<CustomFields>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomFields(Function<CustomFields, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.type.CustomFieldsMixin
toDraft, toDraftBuilder
-
Method Details
-
getType
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Specified by:
getTypein interfaceCustomFieldsMixin- Returns:
- type
-
getFields
Object containing the Custom Fields for the customized resource or data type.
- Specified by:
getFieldsin interfaceCustomFieldsMixin- Returns:
- fields
-
setType
Reference to the Type that holds the FieldDefinitions for the Custom Fields.
- Parameters:
type- value to be set
-
setFields
Object containing the Custom Fields for the customized resource or data type.
- Parameters:
fields- value to be set
-
of
factory method- Returns:
- instance of CustomFields
-
of
factory method to create a shallow copy CustomFields- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CustomFields copyDeep() -
deepCopy
factory method to create a deep copy of CustomFields- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomFields- Returns:
- builder
-
builder
create builder for CustomFields instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCustomFields
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-