| 1 | package Grafeas::V1::Upgrade::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 'UpgradeNote', | ||
| 11 | as InstanceOf['Grafeas::V1::Upgrade::UpgradeNote']; | ||
| 12 | |||
| 13 | coerce 'UpgradeNote', | ||
| 14 | from HashRef, via { 'Grafeas::V1::Upgrade::UpgradeNote'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedUpgradeNote', | ||
| 17 | as ArrayRef[UpgradeNote()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedUpgradeNote', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::UpgradeNote'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringUpgradeNote', | ||
| 23 | as HashRef[UpgradeNote()]; | ||
| 24 | |||
| 25 | declare 'UpgradeDistribution', | ||
| 26 | as InstanceOf['Grafeas::V1::Upgrade::UpgradeDistribution']; | ||
| 27 | |||
| 28 | coerce 'UpgradeDistribution', | ||
| 29 | from HashRef, via { 'Grafeas::V1::Upgrade::UpgradeDistribution'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedUpgradeDistribution', | ||
| 32 | as ArrayRef[UpgradeDistribution()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedUpgradeDistribution', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::UpgradeDistribution'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringUpgradeDistribution', | ||
| 38 | as HashRef[UpgradeDistribution()]; | ||
| 39 | |||
| 40 | declare 'WindowsUpdate', | ||
| 41 | as InstanceOf['Grafeas::V1::Upgrade::WindowsUpdate']; | ||
| 42 | |||
| 43 | coerce 'WindowsUpdate', | ||
| 44 | from HashRef, via { 'Grafeas::V1::Upgrade::WindowsUpdate'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedWindowsUpdate', | ||
| 47 | as ArrayRef[WindowsUpdate()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedWindowsUpdate', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::WindowsUpdate'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringWindowsUpdate', | ||
| 53 | as HashRef[WindowsUpdate()]; | ||
| 54 | |||
| 55 | declare 'Identity', | ||
| 56 | as InstanceOf['Grafeas::V1::Upgrade::WindowsUpdate::Identity']; | ||
| 57 | |||
| 58 | coerce 'Identity', | ||
| 59 | from HashRef, via { 'Grafeas::V1::Upgrade::WindowsUpdate::Identity'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedIdentity', | ||
| 62 | as ArrayRef[Identity()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedIdentity', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::WindowsUpdate::Identity'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringIdentity', | ||
| 68 | as HashRef[Identity()]; | ||
| 69 | |||
| 70 | declare 'Category', | ||
| 71 | as InstanceOf['Grafeas::V1::Upgrade::WindowsUpdate::Category']; | ||
| 72 | |||
| 73 | coerce 'Category', | ||
| 74 | from HashRef, via { 'Grafeas::V1::Upgrade::WindowsUpdate::Category'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedCategory', | ||
| 77 | as ArrayRef[Category()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedCategory', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::WindowsUpdate::Category'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringCategory', | ||
| 83 | as HashRef[Category()]; | ||
| 84 | |||
| 85 | declare 'UpgradeOccurrence', | ||
| 86 | as InstanceOf['Grafeas::V1::Upgrade::UpgradeOccurrence']; | ||
| 87 | |||
| 88 | coerce 'UpgradeOccurrence', | ||
| 89 | from HashRef, via { 'Grafeas::V1::Upgrade::UpgradeOccurrence'->new($_) }; | ||
| 90 | |||
| 91 | declare 'RepeatedUpgradeOccurrence', | ||
| 92 | as ArrayRef[UpgradeOccurrence()]; | ||
| 93 | |||
| 94 | coerce 'RepeatedUpgradeOccurrence', | ||
| 95 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Upgrade::UpgradeOccurrence'->new($_) } @$_ ] }; | ||
| 96 | |||
| 97 | declare 'MapStringUpgradeOccurrence', | ||
| 98 | as HashRef[UpgradeOccurrence()]; | ||
| 99 | |||
| 100 | 1; | ||
| 101 | |||
| 102 | __END__ |