G
G
Golem SDK
Search…
yapapi - Python high-level API
yajsapi - JavaScript high-level API
Classes
Yagna Contributor Guide
Class: ExeUnitRequest
​yajsapi / Exports / props/inf / ExeUnitRequest

Class: ExeUnitRequest

​props/inf.ExeUnitRequest

Hierarchy

  • ​Model​
    ↳ ExeUnitRequest
    ↳↳ VmRequest​

Table of contents

Constructors

Properties

Methods

Constructors

constructor

• new ExeUnitRequest(package_url)
Parameters
Name
Type
package_url
any
Overrides
​Model.constructor​
Defined in
​yajsapi/props/inf.ts:56​

Properties

package_url

• package_url: Field​
Defined in
​yajsapi/props/inf.ts:54​

Methods

_custom_mapping

â–¸ _custom_mapping(props, data): void
Parameters
Name
Type
props
object
data
object
Returns
void
Inherited from
​Model._custom_mapping​
Defined in

fields

â–¸ fields(cls): Field[]
Parameters
Name
Type
cls
any
Returns
​Field[]
Inherited from
​Model.fields​
Defined in

from_properties

â–¸ from_properties(props): any
Initialize the model from an object representation.
description When provided with an object of properties, it will find the matching keys within it and fill the model fields with the values from the object.
It ignores non-matching keys - i.e. doesn't require filtering of the properties' object before the model is fed with the data. Thus, several models can be initialized from the same object and all models will only load their own data.
Parameters
Name
Type
props
object
Returns
any
Inherited from
​Model.from_properties​
Defined in

keys

â–¸ keys(): any
example
1
import { props } from "yajsapi"
2
const { Field, Model } = props;
3
export class NodeInfo extends Model {
4
name: Field = new Field({ metadata: { key: "golem.node.id.name" } });
5
subnet_tag: Field = new Field({
6
metadata: { key: "golem.node.debug.subnet" },
7
});
8
}
9
new NodeInfo().keys().name()
10
// Output: 'golem.node.id.name'
Copied!
Returns
any
a mapping between the model's field names and the property keys
Inherited from
​Model.keys​
Defined in