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::S3::PublicAccessBlock' ; @ Exclude ( ) protected readonly IDENTIFIER_KEY_RESOURCEID : string = '/properties/ResourceId' ; @ Expose ( { name : 'BlockPublicAcls' } ) @ Transform ( ( value , obj ) => transformValue ( Boolean , 'blockPublicAcls' , value , obj , [ ] ) , { toClassOnly : true , } ) blockPublicAcls ? : Optional < boolean > ; @ Expose ( { name : 'BlockPublicPolicy' } ) @ Transform ( ( value , obj ) => transformValue ( Boolean , 'blockPublicPolicy' , value , obj , [ ] ) , { toClassOnly : true , } ) blockPublicPolicy ? : Optional < boolean > ; @ Expose ( { name : 'IgnorePublicAcls' } ) @ Transform ( ( value , obj ) => transformValue ( Boolean , 'ignorePublicAcls' , value , obj , [ ] ) , { toClassOnly : true , } ) ignorePublicAcls ? : Optional < boolean > ; @ Expose ( { name : 'RestrictPublicBuckets' } ) @ Transform ( ( value , obj ) => transformValue ( Boolean , 'restrictPublicBuckets' , value , obj , [ ] ) , { toClassOnly : true , } ) restrictPublicBuckets ? : Optional < boolean > ; @ Expose ( { name : 'ResourceId' } ) @ Transform ( ( value , obj ) => transformValue ( String , 'resourceId' , value , obj , [ ] ) , { toClassOnly : true , } ) resourceId ? : Optional < string > ; @ Exclude ( ) public getPrimaryIdentifier ( ) { const identifier = { } ; if ( this . resourceId != null ) { identifier [ this . IDENTIFIER_KEY_RESOURCEID ] = this . resourceId ; } return Object . keys ( identifier ) . length === 1 ? identifier : null ; } @ Exclude ( ) public getAdditionalIdentifiers ( ) { const identifiers = new Array < Dict > ( ) ; return identifiers . length === 0 ? null : identifiers ; } }