File

src/app/streams/model/stream-history.ts

Description

Represents a deployment history of a stream definition

Example

Index

Properties
Methods

Constructor

constructor(stream: string, version: number, firstDeployed: Date, statusCode: string, description: string, platformName: string)
Parameters :
Name Type Optional Description
stream string
version number
firstDeployed Date
statusCode string
description string
platformName string

Methods

Static fromJSON
fromJSON(input: )
Parameters :
Name Type Optional Description
input
Returns : StreamHistory
Static listFromJSON
listFromJSON(input: )

Create an Array from a json

Parameters :
Name Type Optional Description
input

Properties

Public description
description: string
Type : string
Public firstDeployed
firstDeployed: Date
Type : Date
Public platformName
platformName: string
Type : string
Public statusCode
statusCode: string
Type : string
Public stream
stream: string
Type : string
Public version
version: number
Type : number
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 [];
  }

}

results matching ""

    No results matching ""