import { PresentationExchangeInputDescriptorModel } from '../../index' ; /**
 * Class to model the presentation_definition as defined by Presentation Exchange.
 * See https://identity.foundation/presentation-exchange/#presentation-definition
 */ export class PresentationDefinitionModel { param PresentationExchangeInputDescriptorModel constructor ( /**
     * The resource MUST contain this property, and its value MUST be an array of Input Descriptor objects.
     */ public input_descriptors ? , /**
     * The resource MAY contain this property, and if present its value SHOULD be a human-friendly name that describes what the Presentation Definition pertains to.
     */ public name ? , /**
     * The resource MAY contain this property, and if present its value MUST be a string that describes the purpose for which the Presentation Definition’s inputs are being requested.
     */ public purpose ? ) { } param input public populateFrom ( input ) { this . name = input . name ; this . purpose = input . purpose ; this . input_descriptors = [ ] ; const objectToPopulate = new PresentationExchangeInputDescriptorModel ( ) ; for ( let inx = 0 ; input . input_descriptors && inx < input . input_descriptors . length ; inx ++ ) { const item = input . input_descriptors [ inx ] ; this . input_descriptors . push ( objectToPopulate . populateFrom ( item ) ) ; } return this ; } }