Class AssetBuilder<TResult, TBuilder>
Builder for the class Asset
Inheritance
System.Object
AssetBuilder<TResult, TBuilder>
Assembly: HuduAPI.dll
Syntax
public abstract class AssetBuilder<TResult, TBuilder>
where TResult : Asset where TBuilder : AssetBuilder<TResult, TBuilder>
Type Parameters
| Name |
Description |
| TResult |
|
| TBuilder |
|
Fields
_assetLayoutId
Declaration
protected int _assetLayoutId
Field Value
| Type |
Description |
| System.Int32 |
|
_companyId
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
_customFields
Declaration
protected AssetCustomField _customFields
Field Value
_name
Declaration
Field Value
| Type |
Description |
| System.String |
|
_primaryMail
Declaration
protected string _primaryMail
Field Value
| Type |
Description |
| System.String |
|
_primaryManufacturer
Declaration
protected string _primaryManufacturer
Field Value
| Type |
Description |
| System.String |
|
_primaryModel
Declaration
protected string _primaryModel
Field Value
| Type |
Description |
| System.String |
|
_primarySerial
Declaration
protected string _primarySerial
Field Value
| Type |
Description |
| System.String |
|
Methods
Build()
Declaration
public abstract TResult Build()
Returns
WithCustomField(String, String)
Add a new custom_field item to the asset.
Declaration
public TBuilder WithCustomField(string key, string value)
Parameters
| Type |
Name |
Description |
| System.String |
key |
The key must match the lable of a field for the destination asset_layout.
|
| System.String |
value |
The value to assign to the custom field.
|
Returns
| Type |
Description |
| TBuilder |
A generic Builder Object for type TBuilder
|
WithPrimaryMail(String)
Set a value for primaryMail
Declaration
public TBuilder WithPrimaryMail(string primaryMail)
Parameters
| Type |
Name |
Description |
| System.String |
primaryMail |
The primary mail.
|
Returns
| Type |
Description |
| TBuilder |
A generic Builder Object for type TBuilder
|
WithPrimaryManufacturer(String)
Set a value for primaryManufacturer
Declaration
public TBuilder WithPrimaryManufacturer(string primaryManufacturer)
Parameters
| Type |
Name |
Description |
| System.String |
primaryManufacturer |
The primary manufacturer.
|
Returns
| Type |
Description |
| TBuilder |
A generic Builder Object for type TBuilder
|
WithPrimaryModel(String)
Set a value for primaryModel
Declaration
public TBuilder WithPrimaryModel(string primaryModel)
Parameters
| Type |
Name |
Description |
| System.String |
primaryModel |
The primary model.
|
Returns
| Type |
Description |
| TBuilder |
A generic Builder Object for type TBuilder
|
WithPrimarySerial(String)
Set a value for primarySerial
Declaration
public TBuilder WithPrimarySerial(string primarySerial)
Parameters
| Type |
Name |
Description |
| System.String |
primarySerial |
The primary serial.
|
Returns
| Type |
Description |
| TBuilder |
A generic Builder Object for type TBuilder
|