import { IntentDetails, intentDetailsFromJson } from './IntentDetails'; import { IntentMethods, intentMethodsFromJson } from './IntentMethods'; export class IntentResult { methods?: IntentMethods | null; details?: IntentDetails | null; constructor(params: { methods?: IntentMethods | null; details?: IntentDetails | null; }) { this.methods = params.methods; this.details = params.details; } } export function intentResultFromJson(json: { [key: string]: any; }): IntentResult { return new IntentResult({ methods: json.intentMethods ? intentMethodsFromJson(json.intentMethods) : null, details: json.intentDetails ? intentDetailsFromJson(json.intentDetails) : null, }); }