src/app/streams/model/stream-history.ts
Represents a deployment history of a stream definition
Properties |
|
Methods |
|
constructor(stream: string, version: number, firstDeployed: Date, statusCode: string, description: string, platformName: string)
|
Defined in src/app/streams/model/stream-history.ts:18
|
Static fromJSON | ||||||||
fromJSON(input: )
|
||||||||
Defined in src/app/streams/model/stream-history.ts:29
|
||||||||
Parameters :
Returns :
StreamHistory
|
Static listFromJSON | ||||||||
listFromJSON(input: )
|
||||||||
Defined in src/app/streams/model/stream-history.ts:48
|
||||||||
Create an Array
Parameters :
Returns :
Array<StreamHistory>
|
Public description |
description:
|
Type : string
|
Defined in src/app/streams/model/stream-history.ts:16
|
Public firstDeployed |
firstDeployed:
|
Type : Date
|
Defined in src/app/streams/model/stream-history.ts:12
|
Public platformName |
platformName:
|
Type : string
|
Defined in src/app/streams/model/stream-history.ts:18
|
Public statusCode |
statusCode:
|
Type : string
|
Defined in src/app/streams/model/stream-history.ts:14
|
Public stream |
stream:
|
Type : string
|
Defined in src/app/streams/model/stream-history.ts:8
|
Public version |
version:
|
Type : number
|
Defined in src/app/streams/model/stream-history.ts:10
|
export class StreamHistory {
public stream: string;
public version: number;
public firstDeployed: Date;
public statusCode: string;
public description: string;
public platformName: string;
constructor(stream: string, version: number, firstDeployed: Date, statusCode: string, description: string, platformName: string) {
this.stream = stream;
this.version = version;
this.firstDeployed = firstDeployed;
this.statusCode = statusCode;
this.description = description;
this.platformName = platformName;
}
static fromJSON(input) {
let firstDeployed;
let statusCode;
let description;
if (input['info']) {
description = input.info.description;
firstDeployed = input.info.firstDeployed;
if (input.info['status'] && input.info.status['statusCode']) {
statusCode = input.info.status.statusCode;
}
}
return new StreamHistory(input.name, input.version, firstDeployed, statusCode, description, input.platformName);
}
/**
* Create an Array<StreamHistory> from a json
* @param input
* @returns {Array<StreamHistory>}
*/
static listFromJSON(input): Array<StreamHistory> {
if (input && Array.isArray(input)) {
return input.map(StreamHistory.fromJSON);
}
return [];
}
}