G
G
Golem SDK
Search
⌃K

Class: ComLinear

yajsapi / Exports / props/com / ComLinear

Class: ComLinear

props/com.ComLinear

Hierarchy

  • Com
    ComLinear

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ComLinear()
Inherited from
Defined in

Properties

fixed_price

fixed_price: number
Defined in

price_for

price_for: Object
Defined in

price_model

price_model: Field
Inherited from
Defined in

scheme

scheme: Field
Inherited from
Com.scheme
Defined in

Methods

_custom_mapping

_custom_mapping(props, data): void
Parameters
Name
Type
props
any
data
any
Returns
void
Overrides
Defined in

fields

fields(cls): Field[]
Parameters
Name
Type
cls
any
Returns
Field[]
Inherited from
Com.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
Defined in

keys

keys(): any
example
import { props } from "yajsapi"
const { Field, Model } = props;
export class NodeInfo extends Model {
name: Field = new Field({ metadata: { key: "golem.node.id.name" } });
subnet_tag: Field = new Field({
metadata: { key: "golem.node.debug.subnet" },
});
}
new NodeInfo().keys().name()
// Output: 'golem.node.id.name'
Returns
any
a mapping between the model's field names and the property keys
Inherited from
Com.keys
Defined in