TypeScript Function API • Docs
TypeScript Function API / asset_builder / AssetBuilder
Class: AssetBuilder
Represents a builder for creating System Initiative Asset Schemas.
Example
const asset = new AssetBuilder();
const myProp = new PropBuilder().setName("myProp").setKind("string").build();
asset.addProp(myProp);
return asset.build();
Implements
Constructors
new AssetBuilder()
new AssetBuilder():
AssetBuilder
Returns
Defined in
Properties
asset
asset:
Asset
Defined in
Methods
addProp()
addProp(
prop
):AssetBuilder
Adds a prop to the asset.
Parameters
• prop: PropDefinition
The prop definition to add
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
addSecretProp()
addSecretProp(
prop
):AssetBuilder
Adds a secret prop to the asset.
Parameters
• prop: SecretPropDefinition
The secret prop definition to add
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
defineSecret()
defineSecret(
definition
):this
Adds a secret to the asset.
Parameters
• definition: SecretDefinition
The secret definition to add
Returns
this
This AssetBuilder instance for method chaining
Implementation of
Defined in
addResourceProp()
addResourceProp(
prop
):AssetBuilder
Adds a resource prop to the asset.
Parameters
• prop: PropDefinition
The prop definition to add
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
addInputSocket()
addInputSocket(
socket
):AssetBuilder
Adds an input socket to the asset.
Parameters
• socket: SocketDefinition
The socket definition to add
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
addOutputSocket()
addOutputSocket(
socket
):AssetBuilder
Adds an output socket to the asset.
Parameters
• socket: SocketDefinition
The socket definition to add
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
addSiPropValueFrom()
addSiPropValueFrom(
siPropValueFrom
):this
Parameters
• siPropValueFrom: SiPropValueFromDefinition
Returns
this
Implementation of
IAssetBuilder
.addSiPropValueFrom
Defined in
addDocLink()
addDocLink(
key
,value
):AssetBuilder
Adds a doc link to the asset.
Parameters
• key: string
the name of the doc link
• value: string
the value for the doc link
Returns
This AssetBuilder instance for method chaining
Implementation of
Defined in
build()
build():
Asset