Class CustomObjectBuilder
- All Implemented Interfaces:
Builder<CustomObject>
Example to create an instance using the builder pattern
CustomObject customObject = CustomObject.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.container("{container}")
.key("{key}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomObject with checking for non-null required valuesbuilds CustomObject without checking for non-null required valuesNamespace to group CustomObjects.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the CustomObject was initially created.IDs and references that created the CustomObject.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the CustomObject.Namespace to group CustomObjects.Date and time (UTC) the CustomObject was initially created.IDs and references that created the CustomObject.getId()
Unique identifier of the CustomObject.getKey()
User-defined unique identifier of the CustomObject within the definedcontainer
.Date and time (UTC) the CustomObject was last updated.IDs and references that last modified the CustomObject.getValue()
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.Current version of the CustomObject.Unique identifier of the CustomObject.User-defined unique identifier of the CustomObject within the definedcontainer
.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the CustomObject was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the CustomObject.IDs and references that last modified the CustomObject.static CustomObjectBuilder
of()
factory method for an instance of CustomObjectBuilderstatic CustomObjectBuilder
of
(CustomObject template) create builder for CustomObject instanceCan be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.Current version of the CustomObject.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the CustomObject.IDs and references that last modified the CustomObject.
-
Constructor Details
-
CustomObjectBuilder
public CustomObjectBuilder()
-
-
Method Details
-
id
Unique identifier of the CustomObject.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the CustomObject.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the CustomObject was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public CustomObjectBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the CustomObject.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public CustomObjectBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the CustomObject.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the CustomObject.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the CustomObject.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the CustomObject.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the CustomObject.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
container
Namespace to group CustomObjects.
- Parameters:
container
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the CustomObject within the defined
container
.- Parameters:
key
- value to be set- Returns:
- Builder
-
value
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
value
points to a non-existing object in such case.
- Parameters:
value
- value to be set- Returns:
- Builder
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
-
getId
Unique identifier of the CustomObject.
- Returns:
- id
-
getVersion
Current version of the CustomObject.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the CustomObject was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the CustomObject was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the CustomObject.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the CustomObject.
- Returns:
- createdBy
-
getContainer
Namespace to group CustomObjects.
- Returns:
- container
-
getKey
User-defined unique identifier of the CustomObject within the defined
container
.- Returns:
- key
-
getValue
Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
value
points to a non-existing object in such case.
- Returns:
- value
- For values of type Reference the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the
-
build
builds CustomObject with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomObject>
- Returns:
- CustomObject
-
buildUnchecked
builds CustomObject without checking for non-null required values- Returns:
- CustomObject
-
of
factory method for an instance of CustomObjectBuilder- Returns:
- builder
-
of
create builder for CustomObject instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-