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 CustomFieldsBuilder
builder()
builder factory method for CustomFieldsstatic CustomFieldsBuilder
builder
(CustomFields template) create builder for CustomFields instancestatic CustomFields
deepCopy
(CustomFields template) factory method to create a deep copy of CustomFields@NotNull @Valid FieldContainer
Object containing the Custom Fields for the customized resource or data type.@NotNull @Valid TypeReference
getType()
Reference to the Type that holds the FieldDefinitions for the Custom Fields.static CustomFields
of()
factory methodstatic CustomFields
of
(CustomFields template) factory method to create a shallow copy CustomFieldsvoid
setFields
(FieldContainer fields) Object containing the Custom Fields for the customized resource or data type.void
setType
(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> T
withCustomFields
(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:
getType
in interfaceCustomFieldsMixin
- Returns:
- type
-
getFields
Object containing the Custom Fields for the customized resource or data type.
- Specified by:
getFields
in 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
-
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
-