import { BaseModel , Dict , integer , Integer , Optional , transformValue } from '@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib' ; import { Exclude , Expose , Type , Transform } from 'class-transformer' ; export class ResourceModel extends BaseModel { [ 'constructor' ] : typeof ResourceModel ; @ Exclude ( ) public static readonly TYPE_NAME : string = 'Community::Account::AlternateContact' ; @ Exclude ( ) protected readonly IDENTIFIER_KEY_ALTERNATECONTACTTYPE : string = '/properties/AlternateContactType' ; @ Expose ( { name : 'AlternateContactType' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'alternateContactType' , value , obj , [ ] ) , { toClassOnly : true , } ) alternateContactType ? : Optional < string > ; @ Expose ( { name : 'Name' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'name' , value , obj , [ ] ) , { toClassOnly : true , } ) name ? : Optional < string > ; @ Expose ( { name : 'EmailAddress' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'emailAddress' , value , obj , [ ] ) , { toClassOnly : true , } ) emailAddress ? : Optional < string > ; @ Expose ( { name : 'PhoneNumber' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'phoneNumber' , value , obj , [ ] ) , { toClassOnly : true , } ) phoneNumber ? : Optional < string > ; @ Expose ( { name : 'Title' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'title' , value , obj , [ ] ) , { toClassOnly : true , } ) title ? : Optional < string > ; @ Expose ( { name : 'AccountId' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'accountId' , value , obj , [ ] ) , { toClassOnly : true , } ) accountId ? : Optional < string > ; @ Exclude ( ) public getPrimaryIdentifier ( ) { const identifier = { } ; if ( this . alternateContactType != null ) { identifier [ this . IDENTIFIER_KEY_ALTERNATECONTACTTYPE ] = this . alternateContactType ; } return Object . keys ( identifier ) . length === 1 ? identifier : null ; } @ Exclude ( ) public getAdditionalIdentifiers ( ) { const identifiers = new Array < Dict > ( ) ; return identifiers . length === 0 ? null : identifiers ; } }