import { BaseModel , Dict , integer , Integer , Optional , transformValue } from 'cfn-rpdk' ; import { Exclude , Expose , Type , Transform } from 'class-transformer' ; export class ResourceModel extends BaseModel { [ 'constructor' ] : typeof ResourceModel ; @ Exclude ( ) public static readonly TYPE_NAME : string = 'Community::SecurityHub::ActionTarget' ; @ Exclude ( ) protected readonly IDENTIFIER_KEY_ARN : string = '/properties/Arn' ; @ Expose ( { name : 'Arn' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'arn' , value , obj , [ ] ) , { toClassOnly : true , } ) arn ? : Optional < string > ; @ Expose ( { name : 'Id' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'id' , value , obj , [ ] ) , { toClassOnly : true , } ) id ? : Optional < string > ; @ Expose ( { name : 'Name' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'name' , value , obj , [ ] ) , { toClassOnly : true , } ) name ? : Optional < string > ; @ Expose ( { name : 'Description' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'description' , value , obj , [ ] ) , { toClassOnly : true , } ) description ? : Optional < string > ; @ Exclude ( ) public getPrimaryIdentifier ( ) { const identifier = { } ; if ( this . arn != null ) { identifier [ this . IDENTIFIER_KEY_ARN ] = this . arn ; } return Object . keys ( identifier ) . length === 1 ? identifier : null ; } @ Exclude ( ) public getAdditionalIdentifiers ( ) { const identifiers = new Array < Dict > ( ) ; return identifiers . length === 0 ? null : identifiers ; } }