| 1 | package Google::Cloud::Support::V2beta::Case::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 'ProductLine', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'Case', | ||
| 14 | as InstanceOf['Google::Cloud::Support::V2beta::Case::Case']; | ||
| 15 | |||
| 16 | coerce 'Case', | ||
| 17 | from HashRef, via { 'Google::Cloud::Support::V2beta::Case::Case'->new($_) }; | ||
| 18 | |||
| 19 | declare 'RepeatedCase', | ||
| 20 | as ArrayRef[Case()]; | ||
| 21 | |||
| 22 | coerce 'RepeatedCase', | ||
| 23 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Support::V2beta::Case::Case'->new($_) } @$_ ] }; | ||
| 24 | |||
| 25 | declare 'MapStringCase', | ||
| 26 | as HashRef[Case()]; | ||
| 27 | |||
| 28 | declare 'State', | ||
| 29 | as (Int | Str); | ||
| 30 | |||
| 31 | declare 'Priority', | ||
| 32 | as (Int | Str); | ||
| 33 | |||
| 34 | declare 'CaseClassification', | ||
| 35 | as InstanceOf['Google::Cloud::Support::V2beta::Case::CaseClassification']; | ||
| 36 | |||
| 37 | coerce 'CaseClassification', | ||
| 38 | from HashRef, via { 'Google::Cloud::Support::V2beta::Case::CaseClassification'->new($_) }; | ||
| 39 | |||
| 40 | declare 'RepeatedCaseClassification', | ||
| 41 | as ArrayRef[CaseClassification()]; | ||
| 42 | |||
| 43 | coerce 'RepeatedCaseClassification', | ||
| 44 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Support::V2beta::Case::CaseClassification'->new($_) } @$_ ] }; | ||
| 45 | |||
| 46 | declare 'MapStringCaseClassification', | ||
| 47 | as HashRef[CaseClassification()]; | ||
| 48 | |||
| 49 | declare 'Product', | ||
| 50 | as InstanceOf['Google::Cloud::Support::V2beta::Case::Product']; | ||
| 51 | |||
| 52 | coerce 'Product', | ||
| 53 | from HashRef, via { 'Google::Cloud::Support::V2beta::Case::Product'->new($_) }; | ||
| 54 | |||
| 55 | declare 'RepeatedProduct', | ||
| 56 | as ArrayRef[Product()]; | ||
| 57 | |||
| 58 | coerce 'RepeatedProduct', | ||
| 59 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Support::V2beta::Case::Product'->new($_) } @$_ ] }; | ||
| 60 | |||
| 61 | declare 'MapStringProduct', | ||
| 62 | as HashRef[Product()]; | ||
| 63 | |||
| 64 | 1; | ||
| 65 | |||
| 66 | __END__ |