import { PresentationExchangeSchemaModel , PresentationExchangeIssuanceModel , PresentationExchangeConstraintsModel } from '../../index' ; /**
 * Class to model the preseninput_descriptors as defined by Presentation Exchange.
 * Input Descriptors are objects that describe what type of input data/credential, or sub-fields thereof, is required for submission to the Verifier.
 */ export class PresentationExchangeInputDescriptorModel { param id param schema param issuance param constraints constructor ( public id ? , public schema ? , public issuance ? , public constraints ? ) { } param input public populateFrom ( input ) { this . id = input . id ; if ( input . schema ) { const objectToPopulate = new PresentationExchangeSchemaModel ( ) ; this . schema = objectToPopulate . populateFrom ( input . schema ) ; } if ( input . issuance ) { this . issuance = [ ] ; const objectToPopulate = new PresentationExchangeIssuanceModel ( ) ; for ( let inx = 0 ; inx < input . issuance . length ; inx ++ ) { const item = input . issuance [ inx ] ; this . issuance . push ( objectToPopulate . populateFrom ( item ) ) ; } } else { delete this . issuance ; } return this ; } }