File Coverage

blib/lib/Cfn/Resource/AWS/ApiGateway/UsagePlan.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::ApiGateway::UsagePlan generated from spec 7.4.0
2 2     2   1370 use Moose::Util::TypeConstraints;
  2         6  
  2         25  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ApiGateway::UsagePlan {
9 2     2   4457 use Moose;
  2         5  
  2         17  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1044 [ '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 'MapOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings',
24             as 'Cfn::Value',
25             where { $_->isa('Cfn::Value::Hash') or $_->isa('Cfn::Value::Function') },
26             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
27              
28             coerce 'MapOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings',
29             from 'HashRef',
30             via {
31             my $arg = $_;
32             if (my $f = Cfn::TypeLibrary::try_function($arg)) {
33             return $f
34             } else {
35             Cfn::Value::Hash->new(Value => {
36             map { $_ => Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings')->coerce($arg->{$_}) } keys %$arg
37             });
38             }
39             };
40              
41             subtype 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings',
42             as 'Cfn::Value';
43              
44             coerce 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings',
45             from 'HashRef',
46             via {
47             if (my $f = Cfn::TypeLibrary::try_function($_)) {
48             return $f
49             } else {
50             return Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettingsValue->new( %$_ );
51             }
52             };
53              
54             package Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettingsValue {
55 2     2   15165 use Moose;
  2         6  
  2         21  
56 2     2   13051 use MooseX::StrictConstructor;
  2         5  
  2         20  
57             extends 'Cfn::Value::TypedValue';
58            
59             has BurstLimit => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
60             has RateLimit => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
61             }
62              
63             subtype 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::QuotaSettings',
64             as 'Cfn::Value';
65              
66             coerce 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::QuotaSettings',
67             from 'HashRef',
68             via {
69             if (my $f = Cfn::TypeLibrary::try_function($_)) {
70             return $f
71             } else {
72             return Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::QuotaSettingsValue->new( %$_ );
73             }
74             };
75              
76             package Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::QuotaSettingsValue {
77 2     2   7113 use Moose;
  2         5  
  2         12  
78 2     2   12985 use MooseX::StrictConstructor;
  2         6  
  2         10  
79             extends 'Cfn::Value::TypedValue';
80            
81             has Limit => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
82             has Offset => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
83             has Period => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
84             }
85             subtype 'ArrayOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage',
86             as 'Cfn::Value',
87             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
88             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
89              
90             coerce 'ArrayOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage',
91             from 'HashRef',
92             via {
93             if (my $f = Cfn::TypeLibrary::try_function($_)) {
94             return $f
95             } else {
96             die 'Only accepts functions';
97             }
98             },
99             from 'ArrayRef',
100             via {
101             Cfn::Value::Array->new(Value => [
102             map {
103             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage')->coerce($_)
104             } @$_
105             ]);
106             };
107              
108             subtype 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage',
109             as 'Cfn::Value';
110              
111             coerce 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage',
112             from 'HashRef',
113             via {
114             if (my $f = Cfn::TypeLibrary::try_function($_)) {
115             return $f
116             } else {
117             return Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStageValue->new( %$_ );
118             }
119             };
120              
121             package Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStageValue {
122 2     2   7273 use Moose;
  2         6  
  2         11  
123 2     2   13357 use MooseX::StrictConstructor;
  2         5  
  2         12  
124             extends 'Cfn::Value::TypedValue';
125            
126             has ApiId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
127             has Stage => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
128             has Throttle => (isa => 'MapOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
129             }
130              
131             package Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan {
132 2     2   6713 use Moose;
  2         5  
  2         12  
133 2     2   13177 use MooseX::StrictConstructor;
  2         4  
  2         10  
134             extends 'Cfn::Resource::Properties';
135            
136             has ApiStages => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ApiStage', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
137             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
138             has Quota => (isa => 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::QuotaSettings', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
139             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
140             has Throttle => (isa => 'Cfn::Resource::Properties::AWS::ApiGateway::UsagePlan::ThrottleSettings', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
141             has UsagePlanName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
142             }
143              
144             1;