@@ -10,17 +10,22 @@ export default class CxLearnMoreDescriptions {
1010 generalRecommendations : string ;
1111 samples : CxLearnMoreSamples [ ] ;
1212
13- static parseLearnMoreDescriptionsResponse ( result : any ) : CxLearnMoreDescriptions {
14- const cxLearnMoreDescriptions = new CxLearnMoreDescriptions ( ) ;
15- cxLearnMoreDescriptions . queryId = result . queryId ;
16- cxLearnMoreDescriptions . queryName = result . queryName ;
17- cxLearnMoreDescriptions . queryDescriptionId = result . queryDescriptionId ;
18- cxLearnMoreDescriptions . resultDescription = result . resultDescription ;
19- cxLearnMoreDescriptions . risk = result . risk ;
20- cxLearnMoreDescriptions . cause = result . cause ;
21- cxLearnMoreDescriptions . generalRecommendations = result . generalRecommendations ;
22- cxLearnMoreDescriptions . samples = result . samples ;
23- return cxLearnMoreDescriptions ;
13+ static parseLearnMoreDescriptionsResponse ( resultObject : any [ ] ) : CxLearnMoreDescriptions [ ] {
14+ let learnMoreDescriptionsArray :CxLearnMoreDescriptions [ ] = [ ]
15+ learnMoreDescriptionsArray = resultObject . map ( ( result : any ) => {
16+ const cxLearnMoreDescriptions = new CxLearnMoreDescriptions ( ) ;
17+ cxLearnMoreDescriptions . queryId = result . queryId ;
18+ cxLearnMoreDescriptions . queryName = result . queryName ;
19+ cxLearnMoreDescriptions . queryDescriptionId = result . queryDescriptionId ;
20+ cxLearnMoreDescriptions . resultDescription = result . resultDescription ;
21+ cxLearnMoreDescriptions . risk = result . risk ;
22+ cxLearnMoreDescriptions . cause = result . cause ;
23+ cxLearnMoreDescriptions . generalRecommendations = result . generalRecommendations ;
24+ cxLearnMoreDescriptions . samples = result . samples ;
25+ return cxLearnMoreDescriptions ;
26+ } ) ;
27+
28+ return learnMoreDescriptionsArray ;
2429 }
2530
2631}
0 commit comments