Class TypeBuilder
Example to create an instance using the builder pattern
Type type = Type.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.name(nameBuilder -> nameBuilder)
.plusResourceTypeIds(resourceTypeIdsBuilder -> resourceTypeIdsBuilder)
.plusFieldDefinitions(fieldDefinitionsBuilder -> fieldDefinitionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDefines Custom Fields.build()
builds Type with checking for non-null required valuesbuilds Type without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Type was initially created.IDs and references that created the Type.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Type.description
(LocalizedString description) Description of the Type.Description of the Type.fieldDefinitions
(FieldDefinition... fieldDefinitions) Defines Custom Fields.fieldDefinitions
(List<FieldDefinition> fieldDefinitions) Defines Custom Fields.Date and time (UTC) the Type was initially created.IDs and references that created the Type.Description of the Type.Defines Custom Fields.getId()
Unique identifier of the Type.getKey()
User-defined unique identifier of the Type.Date and time (UTC) the Type was last updated.IDs and references that last modified the Type.getName()
Name of the Type.Resources and/or data types for which the Type is defined.Current version of the Type.Unique identifier of the Type.User-defined unique identifier of the Type.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Type was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Type.IDs and references that last modified the Type.name
(LocalizedString name) Name of the Type.Name of the Type.static TypeBuilder
of()
factory method for an instance of TypeBuilderstatic TypeBuilder
create builder for Type instanceplusFieldDefinitions
(FieldDefinition... fieldDefinitions) Defines Custom Fields.Defines Custom Fields.plusResourceTypeIds
(ResourceTypeId... resourceTypeIds) Resources and/or data types for which the Type is defined.resourceTypeIds
(ResourceTypeId... resourceTypeIds) Resources and/or data types for which the Type is defined.resourceTypeIds
(List<ResourceTypeId> resourceTypeIds) Resources and/or data types for which the Type is defined.Defines Custom Fields.Current version of the Type.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Type.Description of the Type.Defines Custom Fields.IDs and references that last modified the Type.Name of the Type.
-
Constructor Details
-
TypeBuilder
public TypeBuilder()
-
-
Method Details
-
id
Unique identifier of the Type.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Type.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Type was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Type was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Type.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Type.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Type.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Type.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Type.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Type.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Type.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Type.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the Type.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Type.
- Parameters:
name
- value to be set- Returns:
- Builder
-
description
Description of the Type.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
Description of the Type.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the Type.
- Parameters:
description
- value to be set- Returns:
- Builder
-
resourceTypeIds
Resources and/or data types for which the Type is defined.
- Parameters:
resourceTypeIds
- value to be set- Returns:
- Builder
-
resourceTypeIds
Resources and/or data types for which the Type is defined.
- Parameters:
resourceTypeIds
- value to be set- Returns:
- Builder
-
plusResourceTypeIds
Resources and/or data types for which the Type is defined.
- Parameters:
resourceTypeIds
- value to be set- Returns:
- Builder
-
fieldDefinitions
Defines Custom Fields.
- Parameters:
fieldDefinitions
- value to be set- Returns:
- Builder
-
fieldDefinitions
Defines Custom Fields.
- Parameters:
fieldDefinitions
- value to be set- Returns:
- Builder
-
plusFieldDefinitions
Defines Custom Fields.
- Parameters:
fieldDefinitions
- value to be set- Returns:
- Builder
-
plusFieldDefinitions
public TypeBuilder plusFieldDefinitions(Function<FieldDefinitionBuilder, FieldDefinitionBuilder> builder) Defines Custom Fields.
- Parameters:
builder
- function to build the fieldDefinitions value- Returns:
- Builder
-
withFieldDefinitions
public TypeBuilder withFieldDefinitions(Function<FieldDefinitionBuilder, FieldDefinitionBuilder> builder) Defines Custom Fields.
- Parameters:
builder
- function to build the fieldDefinitions value- Returns:
- Builder
-
addFieldDefinitions
Defines Custom Fields.
- Parameters:
builder
- function to build the fieldDefinitions value- Returns:
- Builder
-
setFieldDefinitions
Defines Custom Fields.
- Parameters:
builder
- function to build the fieldDefinitions value- Returns:
- Builder
-
getId
Unique identifier of the Type.
- Returns:
- id
-
getVersion
Current version of the Type.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Type was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Type was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Type.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Type.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the Type.
- Returns:
- key
-
getName
Name of the Type.
- Returns:
- name
-
getDescription
Description of the Type.
- Returns:
- description
-
getResourceTypeIds
Resources and/or data types for which the Type is defined.
- Returns:
- resourceTypeIds
-
getFieldDefinitions
Defines Custom Fields.
- Returns:
- fieldDefinitions
-
build
builds Type with checking for non-null required values -
buildUnchecked
builds Type without checking for non-null required values- Returns:
- Type
-
of
factory method for an instance of TypeBuilder- Returns:
- builder
-
of
create builder for Type instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-