| 1 | package Google::Api::Consumer::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 'ProjectProperties', | ||
| 11 | as InstanceOf['Google::Api::Consumer::ProjectProperties']; | ||
| 12 | |||
| 13 | coerce 'ProjectProperties', | ||
| 14 | from HashRef, via { 'Google::Api::Consumer::ProjectProperties'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedProjectProperties', | ||
| 17 | as ArrayRef[ProjectProperties()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedProjectProperties', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Consumer::ProjectProperties'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringProjectProperties', | ||
| 23 | as HashRef[ProjectProperties()]; | ||
| 24 | |||
| 25 | declare 'Property', | ||
| 26 | as InstanceOf['Google::Api::Consumer::Property']; | ||
| 27 | |||
| 28 | coerce 'Property', | ||
| 29 | from HashRef, via { 'Google::Api::Consumer::Property'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedProperty', | ||
| 32 | as ArrayRef[Property()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedProperty', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Consumer::Property'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringProperty', | ||
| 38 | as HashRef[Property()]; | ||
| 39 | |||
| 40 | declare 'PropertyType', | ||
| 41 | as (Int | Str); | ||
| 42 | |||
| 43 | 1; | ||
| 44 | |||
| 45 | __END__ |