| 1 | package Grafeas::V1::IntotoProvenance::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 'Recipe', | ||
| 11 | as InstanceOf['Grafeas::V1::IntotoProvenance::Recipe']; | ||
| 12 | |||
| 13 | coerce 'Recipe', | ||
| 14 | from HashRef, via { 'Grafeas::V1::IntotoProvenance::Recipe'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedRecipe', | ||
| 17 | as ArrayRef[Recipe()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedRecipe', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::IntotoProvenance::Recipe'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringRecipe', | ||
| 23 | as HashRef[Recipe()]; | ||
| 24 | |||
| 25 | declare 'Completeness', | ||
| 26 | as InstanceOf['Grafeas::V1::IntotoProvenance::Completeness']; | ||
| 27 | |||
| 28 | coerce 'Completeness', | ||
| 29 | from HashRef, via { 'Grafeas::V1::IntotoProvenance::Completeness'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedCompleteness', | ||
| 32 | as ArrayRef[Completeness()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedCompleteness', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::IntotoProvenance::Completeness'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringCompleteness', | ||
| 38 | as HashRef[Completeness()]; | ||
| 39 | |||
| 40 | declare 'Metadata', | ||
| 41 | as InstanceOf['Grafeas::V1::IntotoProvenance::Metadata']; | ||
| 42 | |||
| 43 | coerce 'Metadata', | ||
| 44 | from HashRef, via { 'Grafeas::V1::IntotoProvenance::Metadata'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedMetadata', | ||
| 47 | as ArrayRef[Metadata()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedMetadata', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::IntotoProvenance::Metadata'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringMetadata', | ||
| 53 | as HashRef[Metadata()]; | ||
| 54 | |||
| 55 | declare 'BuilderConfig', | ||
| 56 | as InstanceOf['Grafeas::V1::IntotoProvenance::BuilderConfig']; | ||
| 57 | |||
| 58 | coerce 'BuilderConfig', | ||
| 59 | from HashRef, via { 'Grafeas::V1::IntotoProvenance::BuilderConfig'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedBuilderConfig', | ||
| 62 | as ArrayRef[BuilderConfig()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedBuilderConfig', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::IntotoProvenance::BuilderConfig'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringBuilderConfig', | ||
| 68 | as HashRef[BuilderConfig()]; | ||
| 69 | |||
| 70 | declare 'InTotoProvenance', | ||
| 71 | as InstanceOf['Grafeas::V1::IntotoProvenance::InTotoProvenance']; | ||
| 72 | |||
| 73 | coerce 'InTotoProvenance', | ||
| 74 | from HashRef, via { 'Grafeas::V1::IntotoProvenance::InTotoProvenance'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedInTotoProvenance', | ||
| 77 | as ArrayRef[InTotoProvenance()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedInTotoProvenance', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::IntotoProvenance::InTotoProvenance'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringInTotoProvenance', | ||
| 83 | as HashRef[InTotoProvenance()]; | ||
| 84 | |||
| 85 | 1; | ||
| 86 | |||
| 87 | __END__ |