public final class TypeDraftBuilder extends Base
Modifier and Type | Method and Description |
---|---|
TypeDraftDsl |
build()
Creates a new instance of
TypeDraftDsl with the values of this builder. |
T |
description(LocalizedString description)
Sets the
description property of this builder. |
T |
fieldDefinitions(List<FieldDefinition> fieldDefinitions)
Sets the
fieldDefinitions property of this builder. |
LocalizedString |
getDescription() |
List<FieldDefinition> |
getFieldDefinitions() |
String |
getKey() |
LocalizedString |
getName() |
Set<String> |
getResourceTypeIds() |
T |
key(String key)
Sets the
key property of this builder. |
T |
name(LocalizedString name)
Sets the
name property of this builder. |
static TypeDraftBuilder |
of(String key,
LocalizedString name,
ResourceTypeIdsSetBuilder resourceTypeIdsSetBuilder) |
static TypeDraftBuilder |
of(String key,
LocalizedString name,
Set<String> resourceTypeIds)
Creates a new object initialized with the given values.
|
static TypeDraftBuilder |
of(TypeDraft template)
Creates a new object initialized with the fields of the template parameter.
|
T |
plusFieldDefinitions(FieldDefinition fieldDefinitions)
Adds
fieldDefinitions parameter to the fieldDefinitions list property of this builder. |
T |
plusFieldDefinitions(List<FieldDefinition> fieldDefinitions)
Concatenate
fieldDefinitions parameter to the fieldDefinitions list property of this builder. |
T |
plusResourceTypeIds(Set<String> resourceTypeIds)
Concatenate
resourceTypeIds parameter to the resourceTypeIds set property of this builder. |
T |
plusResourceTypeIds(String resourceTypeIds)
Adds
resourceTypeIds parameter to the resourceTypeIds set property of this builder. |
T |
resourceTypeIds(Set<String> resourceTypeIds)
Sets the
resourceTypeIds property of this builder. |
public static TypeDraftBuilder of(String key, LocalizedString name, ResourceTypeIdsSetBuilder resourceTypeIdsSetBuilder)
public T description(@Nullable LocalizedString description)
description
property of this builder.description
- the value for TypeDraft.getDescription()
public T fieldDefinitions(@Nullable List<FieldDefinition> fieldDefinitions)
fieldDefinitions
property of this builder.fieldDefinitions
- the value for TypeDraft.getFieldDefinitions()
public T key(String key)
key
property of this builder.key
- the value for TypeDraft.getKey()
public T name(LocalizedString name)
name
property of this builder.name
- the value for TypeDraft.getName()
public T resourceTypeIds(Set<String> resourceTypeIds)
resourceTypeIds
property of this builder.resourceTypeIds
- the value for TypeDraft.getResourceTypeIds()
@Nullable public LocalizedString getDescription()
@Nullable public List<FieldDefinition> getFieldDefinitions()
public LocalizedString getName()
public T plusFieldDefinitions(List<FieldDefinition> fieldDefinitions)
fieldDefinitions
parameter to the fieldDefinitions
list property of this builder.fieldDefinitions
- the value for TypeDraft.getFieldDefinitions()
public T plusFieldDefinitions(FieldDefinition fieldDefinitions)
fieldDefinitions
parameter to the fieldDefinitions
list property of this builder.fieldDefinitions
- the value of the element to add to TypeDraft.getFieldDefinitions()
public T plusResourceTypeIds(Set<String> resourceTypeIds)
resourceTypeIds
parameter to the resourceTypeIds
set property of this builder.resourceTypeIds
- the value for TypeDraft.getResourceTypeIds()
public T plusResourceTypeIds(String resourceTypeIds)
resourceTypeIds
parameter to the resourceTypeIds
set property of this builder.resourceTypeIds
- the value of the element to add to TypeDraft.getResourceTypeIds()
public TypeDraftDsl build()
TypeDraftDsl
with the values of this builder.build
in interface Builder<TypeDraftDsl>
public static TypeDraftBuilder of(String key, LocalizedString name, Set<String> resourceTypeIds)
key
- initial value for the TypeDraft.getKey()
propertyname
- initial value for the TypeDraft.getName()
propertyresourceTypeIds
- initial value for the TypeDraft.getResourceTypeIds()
propertypublic static TypeDraftBuilder of(TypeDraft template)
template
- the template