public class FirmwareBuilder extends AbstractResourceBuilder<FirmwareBuilder>
Constructor and Description |
---|
FirmwareBuilder() |
Modifier and Type | Method and Description |
---|---|
<T> void |
accept(T parentContext,
ResourceCollectionEntryGenerator<T> creator) |
FirmwareBuilder |
addAlias(ResourceReference alias)
Adds a new alias to the list of aliases.
|
FirmwareBuilder |
addDependency(ResourceReference dependency)
Adds a new dependency to the list of aliases.
|
FirmwareBuilder |
addExtension(int extenstionType,
byte[] extension)
Adds a new extension object.
|
FirmwareBuilder |
addPayload(FirmwarePayloadBuilder payload)
Adds a new payload to the list of payloads.
|
FirmwareBuilder |
blockDeviceIdentifier(String blockDeviceIdentifier)
Set the block device identifier.
|
static FirmwareBuilder |
create() |
FirmwareBuilder |
creationTimestamp(ZonedDateTime dateTime)
Set the creation timestamp of the firmware manifest.
|
FirmwareBuilder |
description(String description)
Set the version of the firmware manifest.
|
List<ResourceReference> |
getAliases()
Retrieve the aliases of the firmware manifest.
|
String |
getBlockDeviceIdentifier()
Retrieve the block device identifier for the firmware.
|
ZonedDateTime |
getCreationTimestamp()
Retrieve the identifier of the firmware manifest.
|
List<ResourceReference> |
getDependencies()
Retrieve the dependencies of the firmware manifest.
|
String |
getDescription()
Retrieve the description of the firmware manifest.
|
Map<Integer,byte[]> |
getExtensions()
Retrieve the firmware manifest extensions.
|
FirmwareIdentifier |
getId()
Retrieve the identifier of the firmware manifest.
|
byte[] |
getNonce()
Retrieve the nonce of the firmware manifest.
|
List<FirmwarePayloadBuilder> |
getPayloads()
Retrieve the firmware payloads of the firmware manifest.
|
DeviceIdentifier |
getTargetDeviceIdentifier()
Retrieve the target device identifier for the firmware manifest.
|
BigInteger |
getVersion()
Retrieve the version of the firmware manifest.
|
FirmwareBuilder |
id(FirmwareIdentifier id)
Set the id of the firmware manifest.
|
FirmwareBuilder |
nonce(byte[] nonce)
Set the nonce of the firmware manifest.
|
FirmwareBuilder |
targetDeviceIdentifier(DeviceIdentifier targetDeviceIdentifier)
Set the target device identifier.
|
void |
validate() |
FirmwareBuilder |
version(BigInteger version)
Set the version of the firmware manifest.
|
getLanguage, language, reset
isValid, validateNonEmpty, validateNonEmpty, validateNonEmpty, validateNonEmpty, validateNonNull, validatePatternMatch
public <T> void accept(T parentContext, ResourceCollectionEntryGenerator<T> creator)
public FirmwareIdentifier getId()
public FirmwareBuilder id(FirmwareIdentifier id)
id
- the firmware's identifierpublic ZonedDateTime getCreationTimestamp()
public FirmwareBuilder creationTimestamp(ZonedDateTime dateTime)
dateTime
- the creationTimestamp to setpublic BigInteger getVersion()
public FirmwareBuilder version(BigInteger version)
version
- the firmware's versionpublic String getDescription()
public FirmwareBuilder description(String description)
description
- the firmware's descriptionpublic byte[] getNonce()
public FirmwareBuilder nonce(byte[] nonce)
nonce
- the firmware's noncepublic List<ResourceReference> getAliases()
public FirmwareBuilder addAlias(ResourceReference alias)
alias
- the alias to addpublic List<ResourceReference> getDependencies()
public FirmwareBuilder addDependency(ResourceReference dependency)
dependency
- the dependency to addpublic String getBlockDeviceIdentifier()
public FirmwareBuilder blockDeviceIdentifier(String blockDeviceIdentifier)
blockDeviceIdentifier
- a non-null
block device identifierpublic DeviceIdentifier getTargetDeviceIdentifier()
public FirmwareBuilder targetDeviceIdentifier(DeviceIdentifier targetDeviceIdentifier)
targetDeviceIdentifier
- a non-null
target device identifierpublic List<FirmwarePayloadBuilder> getPayloads()
public FirmwareBuilder addPayload(FirmwarePayloadBuilder payload)
payload
- the payload to addpublic Map<Integer,byte[]> getExtensions()
public FirmwareBuilder addExtension(int extenstionType, byte[] extension)
extenstionType
- the extension type identifierextension
- the extension contentpublic void validate() throws ValidationException
validate
in interface Builder
validate
in class AbstractLanguageSpecificBuilder<FirmwareBuilder>
ValidationException
public static FirmwareBuilder create()
Copyright © 2020 National Institute of Standards and Technology. All rights reserved.