| 1 | package Google::Api::Quota::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 'Quota', | ||
| 11 | as InstanceOf['Google::Api::Quota::Quota']; | ||
| 12 | |||
| 13 | coerce 'Quota', | ||
| 14 | from HashRef, via { 'Google::Api::Quota::Quota'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedQuota', | ||
| 17 | as ArrayRef[Quota()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedQuota', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Quota::Quota'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringQuota', | ||
| 23 | as HashRef[Quota()]; | ||
| 24 | |||
| 25 | declare 'MetricRule', | ||
| 26 | as InstanceOf['Google::Api::Quota::MetricRule']; | ||
| 27 | |||
| 28 | coerce 'MetricRule', | ||
| 29 | from HashRef, via { 'Google::Api::Quota::MetricRule'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedMetricRule', | ||
| 32 | as ArrayRef[MetricRule()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedMetricRule', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Quota::MetricRule'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringMetricRule', | ||
| 38 | as HashRef[MetricRule()]; | ||
| 39 | |||
| 40 | declare 'MetricCostsEntry', | ||
| 41 | as InstanceOf['Google::Api::Quota::MetricRule::MetricCostsEntry']; | ||
| 42 | |||
| 43 | coerce 'MetricCostsEntry', | ||
| 44 | from HashRef, via { 'Google::Api::Quota::MetricRule::MetricCostsEntry'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedMetricCostsEntry', | ||
| 47 | as ArrayRef[MetricCostsEntry()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedMetricCostsEntry', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Quota::MetricRule::MetricCostsEntry'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringMetricCostsEntry', | ||
| 53 | as HashRef[MetricCostsEntry()]; | ||
| 54 | |||
| 55 | declare 'QuotaLimit', | ||
| 56 | as InstanceOf['Google::Api::Quota::QuotaLimit']; | ||
| 57 | |||
| 58 | coerce 'QuotaLimit', | ||
| 59 | from HashRef, via { 'Google::Api::Quota::QuotaLimit'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedQuotaLimit', | ||
| 62 | as ArrayRef[QuotaLimit()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedQuotaLimit', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Quota::QuotaLimit'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringQuotaLimit', | ||
| 68 | as HashRef[QuotaLimit()]; | ||
| 69 | |||
| 70 | declare 'ValuesEntry', | ||
| 71 | as InstanceOf['Google::Api::Quota::QuotaLimit::ValuesEntry']; | ||
| 72 | |||
| 73 | coerce 'ValuesEntry', | ||
| 74 | from HashRef, via { 'Google::Api::Quota::QuotaLimit::ValuesEntry'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedValuesEntry', | ||
| 77 | as ArrayRef[ValuesEntry()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedValuesEntry', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Google::Api::Quota::QuotaLimit::ValuesEntry'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringValuesEntry', | ||
| 83 | as HashRef[ValuesEntry()]; | ||
| 84 | |||
| 85 | 1; | ||
| 86 | |||
| 87 | __END__ |