| 1 | package Google::Api::Billing::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 'Billing', | ||
| 11 | as InstanceOf['Google::Api::Billing::Billing']; | ||
| 12 | |||
| 13 | coerce 'Billing', | ||
| 14 | from HashRef, via { 'Google::Api::Billing::Billing'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedBilling', | ||
| 17 | as ArrayRef[Billing()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedBilling', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Billing::Billing'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringBilling', | ||
| 23 | as HashRef[Billing()]; | ||
| 24 | |||
| 25 | declare 'BillingDestination', | ||
| 26 | as InstanceOf['Google::Api::Billing::Billing::BillingDestination']; | ||
| 27 | |||
| 28 | coerce 'BillingDestination', | ||
| 29 | from HashRef, via { 'Google::Api::Billing::Billing::BillingDestination'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedBillingDestination', | ||
| 32 | as ArrayRef[BillingDestination()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedBillingDestination', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Billing::Billing::BillingDestination'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringBillingDestination', | ||
| 38 | as HashRef[BillingDestination()]; | ||
| 39 | |||
| 40 | 1; | ||
| 41 | |||
| 42 | __END__ |