| 1 | package Google::Cloud::Ces::V1beta::Schema::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 'Schema', | ||
| 11 | as InstanceOf['Google::Cloud::Ces::V1beta::Schema::Schema']; | ||
| 12 | |||
| 13 | coerce 'Schema', | ||
| 14 | from HashRef, via { 'Google::Cloud::Ces::V1beta::Schema::Schema'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedSchema', | ||
| 17 | as ArrayRef[Schema()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedSchema', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Ces::V1beta::Schema::Schema'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringSchema', | ||
| 23 | as HashRef[Schema()]; | ||
| 24 | |||
| 25 | declare 'Type', | ||
| 26 | as (Int | Str); | ||
| 27 | |||
| 28 | declare 'PropertiesEntry', | ||
| 29 | as InstanceOf['Google::Cloud::Ces::V1beta::Schema::Schema::PropertiesEntry']; | ||
| 30 | |||
| 31 | coerce 'PropertiesEntry', | ||
| 32 | from HashRef, via { 'Google::Cloud::Ces::V1beta::Schema::Schema::PropertiesEntry'->new($_) }; | ||
| 33 | |||
| 34 | declare 'RepeatedPropertiesEntry', | ||
| 35 | as ArrayRef[PropertiesEntry()]; | ||
| 36 | |||
| 37 | coerce 'RepeatedPropertiesEntry', | ||
| 38 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Ces::V1beta::Schema::Schema::PropertiesEntry'->new($_) } @$_ ] }; | ||
| 39 | |||
| 40 | declare 'MapStringPropertiesEntry', | ||
| 41 | as HashRef[PropertiesEntry()]; | ||
| 42 | |||
| 43 | declare 'DefsEntry', | ||
| 44 | as InstanceOf['Google::Cloud::Ces::V1beta::Schema::Schema::DefsEntry']; | ||
| 45 | |||
| 46 | coerce 'DefsEntry', | ||
| 47 | from HashRef, via { 'Google::Cloud::Ces::V1beta::Schema::Schema::DefsEntry'->new($_) }; | ||
| 48 | |||
| 49 | declare 'RepeatedDefsEntry', | ||
| 50 | as ArrayRef[DefsEntry()]; | ||
| 51 | |||
| 52 | coerce 'RepeatedDefsEntry', | ||
| 53 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Ces::V1beta::Schema::Schema::DefsEntry'->new($_) } @$_ ] }; | ||
| 54 | |||
| 55 | declare 'MapStringDefsEntry', | ||
| 56 | as HashRef[DefsEntry()]; | ||
| 57 | |||
| 58 | 1; | ||
| 59 | |||
| 60 | __END__ |