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 18.4.0
2 1     1   550 use Moose::Util::TypeConstraints;
  1         4  
  1         8  
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   1982 use Moose;
  1         3  
  1         6  
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 4 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1151 [ 'ap-northeast-1','ap-northeast-2','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-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::Object::AWS::Budgets::Budget::TimePeriod->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::TimePeriod {
37 1     1   6893 use Moose;
  1         3  
  1         7  
38 1     1   6635 use MooseX::StrictConstructor;
  1         2  
  1         9  
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::Object::AWS::Budgets::Budget::Subscriber->new( %$_ );
77             }
78             };
79              
80             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::Subscriber {
81 1     1   3671 use Moose;
  1         4  
  1         5  
82 1     1   6647 use MooseX::StrictConstructor;
  1         3  
  1         6  
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::Object::AWS::Budgets::Budget::Spend->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::Spend {
103 1     1   3553 use Moose;
  1         4  
  1         6  
104 1     1   6636 use MooseX::StrictConstructor;
  1         2  
  1         5  
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::Object::AWS::Budgets::Budget::Notification->new( %$_ );
121             }
122             };
123              
124             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::Notification {
125 1     1   3430 use Moose;
  1         3  
  1         6  
126 1     1   6648 use MooseX::StrictConstructor;
  1         2  
  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::Object::AWS::Budgets::Budget::CostTypes->new( %$_ );
145             }
146             };
147              
148             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::CostTypes {
149 1     1   3555 use Moose;
  1         3  
  1         6  
150 1     1   6619 use MooseX::StrictConstructor;
  1         4  
  1         4  
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::Object::AWS::Budgets::Budget::NotificationWithSubscribers->new( %$_ );
198             }
199             };
200              
201             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::NotificationWithSubscribers {
202 1     1   3718 use Moose;
  1         3  
  1         6  
203 1     1   6583 use MooseX::StrictConstructor;
  1         3  
  1         5  
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::Object::AWS::Budgets::Budget::BudgetData->new( %$_ );
220             }
221             };
222              
223             package Cfn::Resource::Properties::Object::AWS::Budgets::Budget::BudgetData {
224 1     1   3393 use Moose;
  1         19  
  1         7  
225 1     1   6632 use MooseX::StrictConstructor;
  1         3  
  1         6  
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   3400 use Moose;
  1         3  
  1         6  
240 1     1   6624 use MooseX::StrictConstructor;
  1         5  
  1         7  
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;
248             ### main pod documentation begin ###
249              
250             =encoding UTF-8
251              
252             =head1 NAME
253              
254             Cfn::Resource::AWS::Budgets::Budget - Cfn resource for AWS::Budgets::Budget
255              
256             =head1 DESCRIPTION
257              
258             This module implements a Perl module that represents the CloudFormation object AWS::Budgets::Budget.
259              
260             See L<Cfn> for more information on how to use it.
261              
262             =head1 AUTHOR
263              
264             Jose Luis Martinez
265             CAPSiDE
266             jlmartinez@capside.com
267              
268             =head1 COPYRIGHT and LICENSE
269              
270             Copyright (c) 2013 by CAPSiDE
271             This code is distributed under the Apache 2 License. The full text of the
272             license can be found in the LICENSE file included with this module.
273              
274             =cut