File Coverage

blib/lib/Cfn/Resource/AWS/Greengrass/FunctionDefinition.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::Greengrass::FunctionDefinition generated from spec 6.3.0
2 1     1   776 use Moose::Util::TypeConstraints;
  1         3  
  1         11  
3              
4             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::Greengrass::FunctionDefinition {
9 1     1   2126 use Moose;
  1         2  
  1         7  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'Arn','Id','LatestVersionArn','Name' ]
15             }
16             sub supported_regions {
17 1     1 0 1104 [ 'ap-northeast-1','ap-northeast-2','ap-south-1','ap-southeast-1','ap-southeast-2','cn-north-1','eu-central-1','eu-west-1','eu-west-2','us-east-1','us-east-2','us-gov-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::RunAs',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::RunAs',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::RunAsValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::RunAsValue {
37 1     1   8296 use Moose;
  1         4  
  1         5  
38 1     1   6630 use MooseX::StrictConstructor;
  1         3  
  1         10  
39             extends 'Cfn::Value::TypedValue';
40            
41             has Gid => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
42             has Uid => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
43             }
44             subtype 'ArrayOfCfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicy',
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::Greengrass::FunctionDefinition::ResourceAccessPolicy',
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::Greengrass::FunctionDefinition::ResourceAccessPolicy')->coerce($_)
63             } @$_
64             ]);
65             };
66              
67             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicy',
68             as 'Cfn::Value';
69              
70             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicy',
71             from 'HashRef',
72             via {
73             if (my $f = Cfn::TypeLibrary::try_function($_)) {
74             return $f
75             } else {
76             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicyValue->new( %$_ );
77             }
78             };
79              
80             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicyValue {
81 1     1   3819 use Moose;
  1         3  
  1         4  
82 1     1   6509 use MooseX::StrictConstructor;
  1         3  
  1         6  
83             extends 'Cfn::Value::TypedValue';
84            
85             has Permission => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
86             has ResourceId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
87             }
88              
89             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Execution',
90             as 'Cfn::Value';
91              
92             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Execution',
93             from 'HashRef',
94             via {
95             if (my $f = Cfn::TypeLibrary::try_function($_)) {
96             return $f
97             } else {
98             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ExecutionValue->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ExecutionValue {
103 1     1   3387 use Moose;
  1         3  
  1         5  
104 1     1   6588 use MooseX::StrictConstructor;
  1         2  
  1         6  
105             extends 'Cfn::Value::TypedValue';
106            
107             has IsolationMode => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
108             has RunAs => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::RunAs', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
109             }
110              
111             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Environment',
112             as 'Cfn::Value';
113              
114             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Environment',
115             from 'HashRef',
116             via {
117             if (my $f = Cfn::TypeLibrary::try_function($_)) {
118             return $f
119             } else {
120             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::EnvironmentValue->new( %$_ );
121             }
122             };
123              
124             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::EnvironmentValue {
125 1     1   3335 use Moose;
  1         3  
  1         20  
126 1     1   6644 use MooseX::StrictConstructor;
  1         3  
  1         6  
127             extends 'Cfn::Value::TypedValue';
128            
129             has AccessSysfs => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
130             has Execution => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Execution', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
131             has ResourceAccessPolicies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::ResourceAccessPolicy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
132             has Variables => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
133             }
134              
135             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionConfiguration',
136             as 'Cfn::Value';
137              
138             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionConfiguration',
139             from 'HashRef',
140             via {
141             if (my $f = Cfn::TypeLibrary::try_function($_)) {
142             return $f
143             } else {
144             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionConfigurationValue->new( %$_ );
145             }
146             };
147              
148             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionConfigurationValue {
149 1     1   3359 use Moose;
  1         4  
  1         5  
150 1     1   6481 use MooseX::StrictConstructor;
  1         3  
  1         5  
151             extends 'Cfn::Value::TypedValue';
152            
153             has EncodingType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
154             has Environment => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Environment', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
155             has ExecArgs => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
156             has Executable => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
157             has MemorySize => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
158             has Pinned => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
159             has Timeout => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
160             }
161             subtype 'ArrayOfCfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Function',
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::Greengrass::FunctionDefinition::Function',
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::Greengrass::FunctionDefinition::Function')->coerce($_)
180             } @$_
181             ]);
182             };
183              
184             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Function',
185             as 'Cfn::Value';
186              
187             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Function',
188             from 'HashRef',
189             via {
190             if (my $f = Cfn::TypeLibrary::try_function($_)) {
191             return $f
192             } else {
193             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionValue->new( %$_ );
194             }
195             };
196              
197             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionValue {
198 1     1   3669 use Moose;
  1         3  
  1         6  
199 1     1   6530 use MooseX::StrictConstructor;
  1         3  
  1         5  
200             extends 'Cfn::Value::TypedValue';
201            
202             has FunctionArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
203             has FunctionConfiguration => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionConfiguration', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
204             has Id => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
205             }
206              
207             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::DefaultConfig',
208             as 'Cfn::Value';
209              
210             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::DefaultConfig',
211             from 'HashRef',
212             via {
213             if (my $f = Cfn::TypeLibrary::try_function($_)) {
214             return $f
215             } else {
216             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::DefaultConfigValue->new( %$_ );
217             }
218             };
219              
220             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::DefaultConfigValue {
221 1     1   3375 use Moose;
  1         2  
  1         6  
222 1     1   6577 use MooseX::StrictConstructor;
  1         3  
  1         6  
223             extends 'Cfn::Value::TypedValue';
224            
225             has Execution => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Execution', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
226             }
227              
228             subtype 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionDefinitionVersion',
229             as 'Cfn::Value';
230              
231             coerce 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionDefinitionVersion',
232             from 'HashRef',
233             via {
234             if (my $f = Cfn::TypeLibrary::try_function($_)) {
235             return $f
236             } else {
237             return Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionDefinitionVersionValue->new( %$_ );
238             }
239             };
240              
241             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionDefinitionVersionValue {
242 1     1   3369 use Moose;
  1         3  
  1         5  
243 1     1   6547 use MooseX::StrictConstructor;
  1         3  
  1         4  
244             extends 'Cfn::Value::TypedValue';
245            
246             has DefaultConfig => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::DefaultConfig', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
247             has Functions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::Function', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
248             }
249              
250             package Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition {
251 1     1   3272 use Moose;
  1         3  
  1         7  
252 1     1   6541 use MooseX::StrictConstructor;
  1         5  
  1         8  
253             extends 'Cfn::Resource::Properties';
254            
255             has InitialVersion => (isa => 'Cfn::Resource::Properties::AWS::Greengrass::FunctionDefinition::FunctionDefinitionVersion', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
256             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
257             has Tags => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
258             }
259              
260             1;