src/app/models/color.ts
Color model
Properties |
Methods |
|
constructor(id: number, name: string, conditions: Array
|
Defined in src/app/models/color.ts:13
|
animation |
animation:
|
Type : string
|
Defined in src/app/models/color.ts:13
|
conditions |
conditions:
|
Type : Array<string>
|
Defined in src/app/models/color.ts:11
|
id |
id:
|
Type : number
|
Defined in src/app/models/color.ts:9
|
imageSrc |
imageSrc:
|
Type : string
|
Defined in src/app/models/color.ts:12
|
name |
name:
|
Type : string
|
Defined in src/app/models/color.ts:10
|
Public deserialize | ||||||
deserialize(input: any)
|
||||||
Defined in src/app/models/color.ts:36
|
||||||
Deserialize Color model
Parameters :
Returns :
Color
|
import {Deserializable} from '../deserializable';
/**
* Color model
* @class Color
* @implements Deserializable<Color>
*/
export class Color implements Deserializable<Color> {
id: number;
name: string;
conditions: Array<string>;
imageSrc: string;
animation: string;
/**
* @constructor
* @param {id} id
* @param {name} name
* @param {conditions} conditions
* @param {imageSrc} imageSrc
* @param {animation} animation
*/
constructor(id: number, name: string, conditions: Array<string>, imageSrc: string, animation: string) {
this.id = id;
this.name = name;
this.conditions = conditions;
this.imageSrc = imageSrc;
this.animation = animation;
}
/**
* Deserialize Color model
* @param {input} any
* @returns {this}
*/
public deserialize(input: any): Color {
Object.assign(this, input);
return this;
}
}