File Coverage

blib/lib/Cfn/Resource/AWS/DLM/LifecyclePolicy.pm
Criterion Covered Total %
statement 62 62 100.0
branch n/a
condition n/a
subroutine 22 22 100.0
pod 0 2 0.0
total 84 86 97.6


line stmt bran cond sub pod time code
1             # AWS::DLM::LifecyclePolicy generated from spec 10.2.0
2 1     1   662 use Moose::Util::TypeConstraints;
  1         4  
  1         9  
3              
4             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::DLM::LifecyclePolicy {
9 1     1   2069 use Moose;
  1         3  
  1         5  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'Arn' ]
15             }
16             sub supported_regions {
17 1     1 0 1124 [ '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::DLM::LifecyclePolicy::CrossRegionCopyRetainRule',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRetainRule',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRetainRuleValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRetainRuleValue {
37 1     1   7084 use Moose;
  1         6  
  1         6  
38 1     1   6522 use MooseX::StrictConstructor;
  1         4  
  1         8  
39             extends 'Cfn::Value::TypedValue';
40            
41             has Interval => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has IntervalUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44              
45             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRule',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRule',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRuleValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRuleValue {
59 1     1   3470 use Moose;
  1         3  
  1         7  
60 1     1   6590 use MooseX::StrictConstructor;
  1         3  
  1         5  
61             extends 'Cfn::Value::TypedValue';
62            
63             has Count => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has Interval => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             has IntervalUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
66             }
67              
68             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule',
69             as 'Cfn::Value';
70              
71             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule',
72             from 'HashRef',
73             via {
74             if (my $f = Cfn::TypeLibrary::try_function($_)) {
75             return $f
76             } else {
77             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRuleValue->new( %$_ );
78             }
79             };
80              
81             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRuleValue {
82 1     1   3388 use Moose;
  1         3  
  1         7  
83 1     1   6604 use MooseX::StrictConstructor;
  1         5  
  1         8  
84             extends 'Cfn::Value::TypedValue';
85            
86             has AvailabilityZones => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             has Count => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88             has Interval => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
89             has IntervalUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
90             }
91             subtype 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule',
92             as 'Cfn::Value',
93             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
94             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
95              
96             coerce 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule',
97             from 'HashRef',
98             via {
99             if (my $f = Cfn::TypeLibrary::try_function($_)) {
100             return $f
101             } else {
102             die 'Only accepts functions';
103             }
104             },
105             from 'ArrayRef',
106             via {
107             Cfn::Value::Array->new(Value => [
108             map {
109             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule')->coerce($_)
110             } @$_
111             ]);
112             };
113              
114             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule',
115             as 'Cfn::Value';
116              
117             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule',
118             from 'HashRef',
119             via {
120             if (my $f = Cfn::TypeLibrary::try_function($_)) {
121             return $f
122             } else {
123             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRuleValue->new( %$_ );
124             }
125             };
126              
127             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRuleValue {
128 1     1   3697 use Moose;
  1         4  
  1         7  
129 1     1   6632 use MooseX::StrictConstructor;
  1         3  
  1         5  
130             extends 'Cfn::Value::TypedValue';
131            
132             has CmkArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             has CopyTags => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             has Encrypted => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135             has RetainRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRetainRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
136             has TargetRegion => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
137             }
138              
139             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule',
140             as 'Cfn::Value';
141              
142             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule',
143             from 'HashRef',
144             via {
145             if (my $f = Cfn::TypeLibrary::try_function($_)) {
146             return $f
147             } else {
148             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRuleValue->new( %$_ );
149             }
150             };
151              
152             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRuleValue {
153 1     1   3477 use Moose;
  1         2  
  1         6  
154 1     1   6620 use MooseX::StrictConstructor;
  1         2  
  1         25  
155             extends 'Cfn::Value::TypedValue';
156            
157             has Interval => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
158             has IntervalUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
159             has Times => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
160             }
161             subtype 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
162             as 'Cfn::Value',
163             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
164             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
165              
166             coerce 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
167             from 'HashRef',
168             via {
169             if (my $f = Cfn::TypeLibrary::try_function($_)) {
170             return $f
171             } else {
172             die 'Only accepts functions';
173             }
174             },
175             from 'ArrayRef',
176             via {
177             Cfn::Value::Array->new(Value => [
178             map {
179             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule')->coerce($_)
180             } @$_
181             ]);
182             };
183              
184             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
185             as 'Cfn::Value';
186              
187             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
188             from 'HashRef',
189             via {
190             if (my $f = Cfn::TypeLibrary::try_function($_)) {
191             return $f
192             } else {
193             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ScheduleValue->new( %$_ );
194             }
195             };
196              
197             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ScheduleValue {
198 1     1   3555 use Moose;
  1         2  
  1         8  
199 1     1   6699 use MooseX::StrictConstructor;
  1         2  
  1         5  
200             extends 'Cfn::Value::TypedValue';
201            
202             has CopyTags => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
203             has CreateRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
204             has CrossRegionCopyRules => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CrossRegionCopyRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
205             has FastRestoreRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
206             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
207             has RetainRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
208             has TagsToAdd => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
209             has VariableTags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
210             }
211              
212             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters',
213             as 'Cfn::Value';
214              
215             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters',
216             from 'HashRef',
217             via {
218             if (my $f = Cfn::TypeLibrary::try_function($_)) {
219             return $f
220             } else {
221             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ParametersValue->new( %$_ );
222             }
223             };
224              
225             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ParametersValue {
226 1     1   3470 use Moose;
  1         8  
  1         6  
227 1     1   6537 use MooseX::StrictConstructor;
  1         3  
  1         7  
228             extends 'Cfn::Value::TypedValue';
229            
230             has ExcludeBootVolume => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
231             }
232              
233             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails',
234             as 'Cfn::Value';
235              
236             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails',
237             from 'HashRef',
238             via {
239             if (my $f = Cfn::TypeLibrary::try_function($_)) {
240             return $f
241             } else {
242             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetailsValue->new( %$_ );
243             }
244             };
245              
246             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetailsValue {
247 1     1   3253 use Moose;
  1         2  
  1         10  
248 1     1   6595 use MooseX::StrictConstructor;
  1         3  
  1         18  
249             extends 'Cfn::Value::TypedValue';
250            
251             has Parameters => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
252             has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
253             has ResourceTypes => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
254             has Schedules => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
255             has TargetTags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
256             }
257              
258             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy {
259 1     1   3296 use Moose;
  1         2  
  1         8  
260 1     1   6527 use MooseX::StrictConstructor;
  1         2  
  1         8  
261             extends 'Cfn::Resource::Properties';
262            
263             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
264             has ExecutionRoleArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
265             has PolicyDetails => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
266             has State => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
267             }
268              
269             1;