| 1 | package Google::Cloud::Databasecenter::V1beta::Product::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 'Engine', | ||
| 11 | as (Int | Str); | ||
| 12 | |||
| 13 | declare 'ProductType', | ||
| 14 | as (Int | Str); | ||
| 15 | |||
| 16 | declare 'Product', | ||
| 17 | as InstanceOf['Google::Cloud::Databasecenter::V1beta::Product::Product']; | ||
| 18 | |||
| 19 | coerce 'Product', | ||
| 20 | from HashRef, via { 'Google::Cloud::Databasecenter::V1beta::Product::Product'->new($_) }; | ||
| 21 | |||
| 22 | declare 'RepeatedProduct', | ||
| 23 | as ArrayRef[Product()]; | ||
| 24 | |||
| 25 | coerce 'RepeatedProduct', | ||
| 26 | from ArrayRef[HashRef], via { [ map { 'Google::Cloud::Databasecenter::V1beta::Product::Product'->new($_) } @$_ ] }; | ||
| 27 | |||
| 28 | declare 'MapStringProduct', | ||
| 29 | as HashRef[Product()]; | ||
| 30 | |||
| 31 | 1; | ||
| 32 | |||
| 33 | __END__ |