all files / src/model/ subject.model.ts

69.57% Statements 16/23
16.67% Branches 1/6
42.86% Functions 3/7
68.18% Lines 15/22
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84                1× 1×         1×         25×   25×           1×               1×                 1×                 1×   25×         25×   25×   25×             1×                     1×  
/*********************************************************************************************************************************
 This class has been automatically generated using KLTT-APIRestGenerator project, don't do manual file modifications.
 Thu Jul 19 12:37:49 CEST 2018
 
 "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements;
  and to You under the Apache License, Version 2.0. "
**********************************************************************************************************************************/
 
import {RandomValues} from '../utils/random-values.utils' ;
import {ParserValues} from '../utils/parser-values.utils' ;
 
/**
 * No description for the module
 */
export class Subject 
{
    /**
	 * Public constructor
	 */
	constructor(public subjectName: string)
	{
			this.subjectName = subjectName ;
	}
	
	/**
	 * @param subjectName the subjectName to set
	 */
	setSubjectName(subjectName)
	{
		this.subjectName = subjectName ;
	}
	
	/**
	 * @return the subjectName
	 */
	getSubjectName()
	{
		return this.subjectName ;
	}
		
 
	/**
	 * @return the object as string
	 */
	toString()
	{
		return JSON.stringify(this, null, 4) ;
	}
	
	/**
	 * @param pendingRecursiveCalls with the pending recursive calls
	 * @return a new instance of the class with a random values
	 */
	static generateRandomInstance(pendingRecursiveCalls: number)
	{
		Iif (pendingRecursiveCalls == 0)
		{
			return null ;
		}
		
		pendingRecursiveCalls -- ;
 
		var subjectName = RandomValues.generateRandomString() ;
 
		return new Subject(subjectName) ;
	}
	
	/**
	 * @param internalValueParseGenerator with the json to be parsed
	 * @return an instance of this class
	 */	
	static parse(internalValueParseGenerator)
	{
		var subjectName ;
		if (internalValueParseGenerator.subjectName != null && internalValueParseGenerator.subjectName != "undefined")
		{
			subjectName = ParserValues.stringParser(internalValueParseGenerator.subjectName) ;
		}
		
 
		return new Subject(subjectName) ;	
	}
};