Skip to content

TypeScript Function APIDocs


TypeScript Function API / asset_builder / AssetBuilder

Class: AssetBuilder

Represents a builder for creating System Initiative Asset Schemas.

Example

ts
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

AssetBuilder

Defined in

asset_builder.ts:1056

Properties

asset

asset: Asset

Defined in

asset_builder.ts:1054

Methods

addProp()

addProp(prop): AssetBuilder

Adds a prop to the asset.

Parameters

prop: PropDefinition

The prop definition to add

Returns

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addProp

Defined in

asset_builder.ts:1066


addSecretProp()

addSecretProp(prop): AssetBuilder

Adds a secret prop to the asset.

Parameters

prop: SecretPropDefinition

The secret prop definition to add

Returns

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addSecretProp

Defined in

asset_builder.ts:1080


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

IAssetBuilder.defineSecret

Defined in

asset_builder.ts:1118


addResourceProp()

addResourceProp(prop): AssetBuilder

Adds a resource prop to the asset.

Parameters

prop: PropDefinition

The prop definition to add

Returns

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addResourceProp

Defined in

asset_builder.ts:1158


addInputSocket()

addInputSocket(socket): AssetBuilder

Adds an input socket to the asset.

Parameters

socket: SocketDefinition

The socket definition to add

Returns

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addInputSocket

Defined in

asset_builder.ts:1172


addOutputSocket()

addOutputSocket(socket): AssetBuilder

Adds an output socket to the asset.

Parameters

socket: SocketDefinition

The socket definition to add

Returns

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addOutputSocket

Defined in

asset_builder.ts:1186


addSiPropValueFrom()

addSiPropValueFrom(siPropValueFrom): this

Parameters

siPropValueFrom: SiPropValueFromDefinition

Returns

this

Implementation of

IAssetBuilder.addSiPropValueFrom

Defined in

asset_builder.ts:1194


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

AssetBuilder

This AssetBuilder instance for method chaining

Implementation of

IAssetBuilder.addDocLink

Defined in

asset_builder.ts:1209


build()

build(): Asset

Returns

Asset

Implementation of

IAssetBuilder.build

Defined in

asset_builder.ts:1217