File Coverage

blib/lib/Cfn/Resource/AWS/DLM/LifecyclePolicy.pm
Criterion Covered Total %
statement 50 50 100.0
branch n/a
condition n/a
subroutine 18 18 100.0
pod 0 2 0.0
total 68 70 97.1


line stmt bran cond sub pod time code
1             # AWS::DLM::LifecyclePolicy generated from spec 9.1.0
2 1     1   703 use Moose::Util::TypeConstraints;
  1         4  
  1         12  
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   2273 use Moose;
  1         2  
  1         9  
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 4 [ 'Arn' ]
15             }
16             sub supported_regions {
17 1     1 0 1518 [ '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::RetainRule',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRule',
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::RetainRuleValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRuleValue {
37 1     1   7237 use Moose;
  1         3  
  1         5  
38 1     1   6606 use MooseX::StrictConstructor;
  1         4  
  1         10  
39             extends 'Cfn::Value::TypedValue';
40            
41             has Count => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             }
43              
44             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule',
45             as 'Cfn::Value';
46              
47             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule',
48             from 'HashRef',
49             via {
50             if (my $f = Cfn::TypeLibrary::try_function($_)) {
51             return $f
52             } else {
53             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRuleValue->new( %$_ );
54             }
55             };
56              
57             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRuleValue {
58 1     1   3612 use Moose;
  1         3  
  1         5  
59 1     1   6811 use MooseX::StrictConstructor;
  1         3  
  1         7  
60             extends 'Cfn::Value::TypedValue';
61            
62             has AvailabilityZones => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
63             has Count => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             }
65              
66             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule',
67             as 'Cfn::Value';
68              
69             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule',
70             from 'HashRef',
71             via {
72             if (my $f = Cfn::TypeLibrary::try_function($_)) {
73             return $f
74             } else {
75             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRuleValue->new( %$_ );
76             }
77             };
78              
79             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRuleValue {
80 1     1   3500 use Moose;
  1         3  
  1         7  
81 1     1   6501 use MooseX::StrictConstructor;
  1         3  
  1         7  
82             extends 'Cfn::Value::TypedValue';
83            
84             has Interval => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85             has IntervalUnit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             has Times => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             }
88             subtype 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
89             as 'Cfn::Value',
90             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
91             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
92              
93             coerce 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
94             from 'HashRef',
95             via {
96             if (my $f = Cfn::TypeLibrary::try_function($_)) {
97             return $f
98             } else {
99             die 'Only accepts functions';
100             }
101             },
102             from 'ArrayRef',
103             via {
104             Cfn::Value::Array->new(Value => [
105             map {
106             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule')->coerce($_)
107             } @$_
108             ]);
109             };
110              
111             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
112             as 'Cfn::Value';
113              
114             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule',
115             from 'HashRef',
116             via {
117             if (my $f = Cfn::TypeLibrary::try_function($_)) {
118             return $f
119             } else {
120             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ScheduleValue->new( %$_ );
121             }
122             };
123              
124             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ScheduleValue {
125 1     1   3581 use Moose;
  1         4  
  1         6  
126 1     1   6524 use MooseX::StrictConstructor;
  1         2  
  1         7  
127             extends 'Cfn::Value::TypedValue';
128            
129             has CopyTags => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
130             has CreateRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::CreateRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
131             has FastRestoreRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::FastRestoreRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
132             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             has RetainRule => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::RetainRule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             has TagsToAdd => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135             has VariableTags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
136             }
137              
138             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters',
139             as 'Cfn::Value';
140              
141             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters',
142             from 'HashRef',
143             via {
144             if (my $f = Cfn::TypeLibrary::try_function($_)) {
145             return $f
146             } else {
147             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ParametersValue->new( %$_ );
148             }
149             };
150              
151             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::ParametersValue {
152 1     1   3431 use Moose;
  1         4  
  1         5  
153 1     1   6490 use MooseX::StrictConstructor;
  1         2  
  1         6  
154             extends 'Cfn::Value::TypedValue';
155            
156             has ExcludeBootVolume => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
157             }
158              
159             subtype 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails',
160             as 'Cfn::Value';
161              
162             coerce 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails',
163             from 'HashRef',
164             via {
165             if (my $f = Cfn::TypeLibrary::try_function($_)) {
166             return $f
167             } else {
168             return Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetailsValue->new( %$_ );
169             }
170             };
171              
172             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetailsValue {
173 1     1   3338 use Moose;
  1         2  
  1         7  
174 1     1   6518 use MooseX::StrictConstructor;
  1         6  
  1         7  
175             extends 'Cfn::Value::TypedValue';
176            
177             has Parameters => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Parameters', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
178             has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179             has ResourceTypes => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180             has Schedules => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DLM::LifecyclePolicy::Schedule', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181             has TargetTags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
182             }
183              
184             package Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy {
185 1     1   3349 use Moose;
  1         2  
  1         5  
186 1     1   6472 use MooseX::StrictConstructor;
  1         5  
  1         5  
187             extends 'Cfn::Resource::Properties';
188            
189             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
190             has ExecutionRoleArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
191             has PolicyDetails => (isa => 'Cfn::Resource::Properties::AWS::DLM::LifecyclePolicy::PolicyDetails', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
192             has State => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
193             }
194              
195             1;