File Coverage

blib/lib/Cfn/Resource/AWS/Budgets/Budget.pm
Criterion Covered Total %
statement 56 56 100.0
branch n/a
condition n/a
subroutine 20 20 100.0
pod 0 2 0.0
total 76 78 97.4


line stmt bran cond sub pod time code
1             # AWS::Budgets::Budget generated from spec 6.3.0
2 1     1   740 use Moose::Util::TypeConstraints;
  1         4  
  1         11  
3              
4             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::Budgets::Budget->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::Budgets::Budget {
9 1     1   2149 use Moose;
  1         2  
  1         8  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 3 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1610 [ 'ap-northeast-1','ap-northeast-2','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','eu-central-1','eu-west-1','eu-west-2','sa-east-1','us-east-1','us-east-2','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::TimePeriod',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::TimePeriod',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::Budgets::Budget::TimePeriodValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::Budgets::Budget::TimePeriodValue {
37 1     1   7334 use Moose;
  1         2  
  1         4  
38 1     1   6541 use MooseX::StrictConstructor;
  1         3  
  1         10  
39             extends 'Cfn::Value::TypedValue';
40            
41             has End => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has Start => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44             subtype 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::Subscriber',
45             as 'Cfn::Value',
46             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
47             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
48              
49             coerce 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::Subscriber',
50             from 'HashRef',
51             via {
52             if (my $f = Cfn::TypeLibrary::try_function($_)) {
53             return $f
54             } else {
55             die 'Only accepts functions';
56             }
57             },
58             from 'ArrayRef',
59             via {
60             Cfn::Value::Array->new(Value => [
61             map {
62             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::Budgets::Budget::Subscriber')->coerce($_)
63             } @$_
64             ]);
65             };
66              
67             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::Subscriber',
68             as 'Cfn::Value';
69              
70             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::Subscriber',
71             from 'HashRef',
72             via {
73             if (my $f = Cfn::TypeLibrary::try_function($_)) {
74             return $f
75             } else {
76             return Cfn::Resource::Properties::AWS::Budgets::Budget::SubscriberValue->new( %$_ );
77             }
78             };
79              
80             package Cfn::Resource::Properties::AWS::Budgets::Budget::SubscriberValue {
81 1     1   3866 use Moose;
  1         3  
  1         8  
82 1     1   6694 use MooseX::StrictConstructor;
  1         3  
  1         7  
83             extends 'Cfn::Value::TypedValue';
84            
85             has Address => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             has SubscriptionType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             }
88              
89             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::Spend',
90             as 'Cfn::Value';
91              
92             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::Spend',
93             from 'HashRef',
94             via {
95             if (my $f = Cfn::TypeLibrary::try_function($_)) {
96             return $f
97             } else {
98             return Cfn::Resource::Properties::AWS::Budgets::Budget::SpendValue->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::AWS::Budgets::Budget::SpendValue {
103 1     1   3477 use Moose;
  1         2  
  1         7  
104 1     1   6600 use MooseX::StrictConstructor;
  1         3  
  1         4  
105             extends 'Cfn::Value::TypedValue';
106            
107             has Amount => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108             has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             }
110              
111             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::Notification',
112             as 'Cfn::Value';
113              
114             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::Notification',
115             from 'HashRef',
116             via {
117             if (my $f = Cfn::TypeLibrary::try_function($_)) {
118             return $f
119             } else {
120             return Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationValue->new( %$_ );
121             }
122             };
123              
124             package Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationValue {
125 1     1   3318 use Moose;
  1         6  
  1         5  
126 1     1   6485 use MooseX::StrictConstructor;
  1         3  
  1         5  
127             extends 'Cfn::Value::TypedValue';
128            
129             has ComparisonOperator => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
130             has NotificationType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
131             has Threshold => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
132             has ThresholdType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             }
134              
135             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::CostTypes',
136             as 'Cfn::Value';
137              
138             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::CostTypes',
139             from 'HashRef',
140             via {
141             if (my $f = Cfn::TypeLibrary::try_function($_)) {
142             return $f
143             } else {
144             return Cfn::Resource::Properties::AWS::Budgets::Budget::CostTypesValue->new( %$_ );
145             }
146             };
147              
148             package Cfn::Resource::Properties::AWS::Budgets::Budget::CostTypesValue {
149 1     1   3424 use Moose;
  1         3  
  1         15  
150 1     1   6415 use MooseX::StrictConstructor;
  1         2  
  1         8  
151             extends 'Cfn::Value::TypedValue';
152            
153             has IncludeCredit => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
154             has IncludeDiscount => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
155             has IncludeOtherSubscription => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
156             has IncludeRecurring => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
157             has IncludeRefund => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
158             has IncludeSubscription => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
159             has IncludeSupport => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
160             has IncludeTax => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
161             has IncludeUpfront => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
162             has UseAmortized => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
163             has UseBlended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
164             }
165             subtype 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers',
166             as 'Cfn::Value',
167             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
168             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
169              
170             coerce 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers',
171             from 'HashRef',
172             via {
173             if (my $f = Cfn::TypeLibrary::try_function($_)) {
174             return $f
175             } else {
176             die 'Only accepts functions';
177             }
178             },
179             from 'ArrayRef',
180             via {
181             Cfn::Value::Array->new(Value => [
182             map {
183             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers')->coerce($_)
184             } @$_
185             ]);
186             };
187              
188             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers',
189             as 'Cfn::Value';
190              
191             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers',
192             from 'HashRef',
193             via {
194             if (my $f = Cfn::TypeLibrary::try_function($_)) {
195             return $f
196             } else {
197             return Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribersValue->new( %$_ );
198             }
199             };
200              
201             package Cfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribersValue {
202 1     1   3666 use Moose;
  1         16  
  1         6  
203 1     1   6659 use MooseX::StrictConstructor;
  1         5  
  1         6  
204             extends 'Cfn::Value::TypedValue';
205            
206             has Notification => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget::Notification', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
207             has Subscribers => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::Subscriber', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
208             }
209              
210             subtype 'Cfn::Resource::Properties::AWS::Budgets::Budget::BudgetData',
211             as 'Cfn::Value';
212              
213             coerce 'Cfn::Resource::Properties::AWS::Budgets::Budget::BudgetData',
214             from 'HashRef',
215             via {
216             if (my $f = Cfn::TypeLibrary::try_function($_)) {
217             return $f
218             } else {
219             return Cfn::Resource::Properties::AWS::Budgets::Budget::BudgetDataValue->new( %$_ );
220             }
221             };
222              
223             package Cfn::Resource::Properties::AWS::Budgets::Budget::BudgetDataValue {
224 1     1   3348 use Moose;
  1         2  
  1         5  
225 1     1   6403 use MooseX::StrictConstructor;
  1         4  
  1         4  
226             extends 'Cfn::Value::TypedValue';
227            
228             has BudgetLimit => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget::Spend', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
229             has BudgetName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
230             has BudgetType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
231             has CostFilters => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
232             has CostTypes => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget::CostTypes', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
233             has PlannedBudgetLimits => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
234             has TimePeriod => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget::TimePeriod', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
235             has TimeUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
236             }
237              
238             package Cfn::Resource::Properties::AWS::Budgets::Budget {
239 1     1   3322 use Moose;
  1         3  
  1         5  
240 1     1   6470 use MooseX::StrictConstructor;
  1         4  
  1         5  
241             extends 'Cfn::Resource::Properties';
242            
243             has Budget => (isa => 'Cfn::Resource::Properties::AWS::Budgets::Budget::BudgetData', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
244             has NotificationsWithSubscribers => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Budgets::Budget::NotificationWithSubscribers', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
245             }
246              
247             1;