Class AttributeGroupDraftBuilder
java.lang.Object
com.commercetools.api.models.attribute_group.AttributeGroupDraftBuilder
- All Implemented Interfaces:
Builder<AttributeGroupDraft>
AttributeGroupDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AttributeGroupDraft attributeGroupDraft = AttributeGroupDraft.builder()
.name(nameBuilder -> nameBuilder)
.plusAttributes(attributesBuilder -> attributesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAttributes with unique values.attributes
(AttributeReference... attributes) Attributes with unique values.attributes
(List<AttributeReference> attributes) Attributes with unique values.build()
builds AttributeGroupDraft with checking for non-null required valuesbuilds AttributeGroupDraft without checking for non-null required valuesdescription
(LocalizedString description) Description of the AttributeGroup.Description of the AttributeGroup.Attributes with unique values.Description of the AttributeGroup.getKey()
User-defined unique identifier for the AttributeGroup.getName()
Name of the AttributeGroup.User-defined unique identifier for the AttributeGroup.name
(LocalizedString name) Name of the AttributeGroup.Name of the AttributeGroup.static AttributeGroupDraftBuilder
of()
factory method for an instance of AttributeGroupDraftBuilderstatic AttributeGroupDraftBuilder
of
(AttributeGroupDraft template) create builder for AttributeGroupDraft instanceplusAttributes
(AttributeReference... attributes) Attributes with unique values.Attributes with unique values.Attributes with unique values.Attributes with unique values.Description of the AttributeGroup.Name of the AttributeGroup.
-
Constructor Details
-
AttributeGroupDraftBuilder
public AttributeGroupDraftBuilder()
-
-
Method Details
-
name
public AttributeGroupDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the AttributeGroup.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public AttributeGroupDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the AttributeGroup.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the AttributeGroup.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
public AttributeGroupDraftBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the AttributeGroup.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public AttributeGroupDraftBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the AttributeGroup.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the AttributeGroup.
- Parameters:
description
- value to be set- Returns:
- Builder
-
attributes
Attributes with unique values.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
attributes
Attributes with unique values.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
Attributes with unique values.
- Parameters:
attributes
- value to be set- Returns:
- Builder
-
plusAttributes
public AttributeGroupDraftBuilder plusAttributes(Function<AttributeReferenceBuilder, AttributeReferenceBuilder> builder) Attributes with unique values.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
withAttributes
public AttributeGroupDraftBuilder withAttributes(Function<AttributeReferenceBuilder, AttributeReferenceBuilder> builder) Attributes with unique values.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
addAttributes
public AttributeGroupDraftBuilder addAttributes(Function<AttributeReferenceBuilder, AttributeReference> builder) Attributes with unique values.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
setAttributes
public AttributeGroupDraftBuilder setAttributes(Function<AttributeReferenceBuilder, AttributeReference> builder) Attributes with unique values.
- Parameters:
builder
- function to build the attributes value- Returns:
- Builder
-
key
User-defined unique identifier for the AttributeGroup.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getName
Name of the AttributeGroup.
- Returns:
- name
-
getDescription
Description of the AttributeGroup.
- Returns:
- description
-
getAttributes
Attributes with unique values.
- Returns:
- attributes
-
getKey
User-defined unique identifier for the AttributeGroup.
- Returns:
- key
-
build
builds AttributeGroupDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<AttributeGroupDraft>
- Returns:
- AttributeGroupDraft
-
buildUnchecked
builds AttributeGroupDraft without checking for non-null required values- Returns:
- AttributeGroupDraft
-
of
factory method for an instance of AttributeGroupDraftBuilder- Returns:
- builder
-
of
create builder for AttributeGroupDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-