| 1 | package Grafeas::V1::Compliance::Types; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Type::Library -base; | ||
| 7 | use Type::Utils -all; | ||
| 8 | use Types::Standard -types; | ||
| 9 | |||
| 10 | declare 'ComplianceNote', | ||
| 11 | as InstanceOf['Grafeas::V1::Compliance::ComplianceNote']; | ||
| 12 | |||
| 13 | coerce 'ComplianceNote', | ||
| 14 | from HashRef, via { 'Grafeas::V1::Compliance::ComplianceNote'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedComplianceNote', | ||
| 17 | as ArrayRef[ComplianceNote()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedComplianceNote', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Compliance::ComplianceNote'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringComplianceNote', | ||
| 23 | as HashRef[ComplianceNote()]; | ||
| 24 | |||
| 25 | declare 'CisBenchmark', | ||
| 26 | as InstanceOf['Grafeas::V1::Compliance::ComplianceNote::CisBenchmark']; | ||
| 27 | |||
| 28 | coerce 'CisBenchmark', | ||
| 29 | from HashRef, via { 'Grafeas::V1::Compliance::ComplianceNote::CisBenchmark'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedCisBenchmark', | ||
| 32 | as ArrayRef[CisBenchmark()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedCisBenchmark', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Compliance::ComplianceNote::CisBenchmark'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringCisBenchmark', | ||
| 38 | as HashRef[CisBenchmark()]; | ||
| 39 | |||
| 40 | declare 'ComplianceVersion', | ||
| 41 | as InstanceOf['Grafeas::V1::Compliance::ComplianceVersion']; | ||
| 42 | |||
| 43 | coerce 'ComplianceVersion', | ||
| 44 | from HashRef, via { 'Grafeas::V1::Compliance::ComplianceVersion'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedComplianceVersion', | ||
| 47 | as ArrayRef[ComplianceVersion()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedComplianceVersion', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Compliance::ComplianceVersion'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringComplianceVersion', | ||
| 53 | as HashRef[ComplianceVersion()]; | ||
| 54 | |||
| 55 | declare 'ComplianceOccurrence', | ||
| 56 | as InstanceOf['Grafeas::V1::Compliance::ComplianceOccurrence']; | ||
| 57 | |||
| 58 | coerce 'ComplianceOccurrence', | ||
| 59 | from HashRef, via { 'Grafeas::V1::Compliance::ComplianceOccurrence'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedComplianceOccurrence', | ||
| 62 | as ArrayRef[ComplianceOccurrence()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedComplianceOccurrence', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Compliance::ComplianceOccurrence'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringComplianceOccurrence', | ||
| 68 | as HashRef[ComplianceOccurrence()]; | ||
| 69 | |||
| 70 | declare 'NonCompliantFile', | ||
| 71 | as InstanceOf['Grafeas::V1::Compliance::NonCompliantFile']; | ||
| 72 | |||
| 73 | coerce 'NonCompliantFile', | ||
| 74 | from HashRef, via { 'Grafeas::V1::Compliance::NonCompliantFile'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedNonCompliantFile', | ||
| 77 | as ArrayRef[NonCompliantFile()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedNonCompliantFile', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Compliance::NonCompliantFile'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringNonCompliantFile', | ||
| 83 | as HashRef[NonCompliantFile()]; | ||
| 84 | |||
| 85 | 1; | ||
| 86 | |||
| 87 | __END__ |