File Coverage

blib/lib/Cfn/Resource/AWS/ApplicationAutoScaling/ScalableTarget.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 12 12 100.0
pod 0 2 0.0
total 44 46 95.6


line stmt bran cond sub pod time code
1             # AWS::ApplicationAutoScaling::ScalableTarget generated from spec 6.0.0
2 2     2   1372 use Moose::Util::TypeConstraints;
  2         6  
  2         21  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ApplicationAutoScaling::ScalableTarget {
9 2     2   4326 use Moose;
  2         16  
  2         16  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 3 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1042 [ 'ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-1','eu-central-1','eu-north-1','eu-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-gov-east-1','us-gov-west-1','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetActionValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetActionValue {
37 2     2   14849 use Moose;
  2         7  
  2         11  
38 2     2   13081 use MooseX::StrictConstructor;
  2         7  
  2         21  
39             extends 'Cfn::Value::TypedValue';
40            
41             has MaxCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has MinCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44              
45             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedStateValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedStateValue {
59 2     2   7124 use Moose;
  2         7  
  2         10  
60 2     2   13449 use MooseX::StrictConstructor;
  2         5  
  2         9  
61             extends 'Cfn::Value::TypedValue';
62            
63             has DynamicScalingInSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has DynamicScalingOutSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             has ScheduledScalingSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
66             }
67             subtype 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
68             as 'Cfn::Value',
69             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
70             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
71              
72             coerce 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
73             from 'HashRef',
74             via {
75             if (my $f = Cfn::TypeLibrary::try_function($_)) {
76             return $f
77             } else {
78             die 'Only accepts functions';
79             }
80             },
81             from 'ArrayRef',
82             via {
83             Cfn::Value::Array->new(Value => [
84             map {
85             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction')->coerce($_)
86             } @$_
87             ]);
88             };
89              
90             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
91             as 'Cfn::Value';
92              
93             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
94             from 'HashRef',
95             via {
96             if (my $f = Cfn::TypeLibrary::try_function($_)) {
97             return $f
98             } else {
99             return Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledActionValue->new( %$_ );
100             }
101             };
102              
103             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledActionValue {
104 2     2   7065 use Moose;
  2         6  
  2         20  
105 2     2   12999 use MooseX::StrictConstructor;
  2         6  
  2         11  
106             extends 'Cfn::Value::TypedValue';
107            
108             has EndTime => (isa => 'Cfn::Value::Timestamp', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             has ScalableTargetAction => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             has Schedule => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111             has ScheduledActionName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112             has StartTime => (isa => 'Cfn::Value::Timestamp', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
113             }
114              
115             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget {
116 2     2   6674 use Moose;
  2         5  
  2         10  
117 2     2   12917 use MooseX::StrictConstructor;
  2         6  
  2         10  
118             extends 'Cfn::Resource::Properties';
119            
120             has MaxCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has MinCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has ResourceId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
123             has RoleARN => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
124             has ScalableDimension => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
125             has ScheduledActions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
126             has ServiceNamespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
127             has SuspendedState => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
128             }
129              
130             1;