File Coverage

blib/lib/Cfn/Resource/AWS/IoTSiteWise/AssetModel.pm
Criterion Covered Total %
statement 74 74 100.0
branch n/a
condition n/a
subroutine 26 26 100.0
pod 0 2 0.0
total 100 102 98.0


line stmt bran cond sub pod time code
1             # AWS::IoTSiteWise::AssetModel generated from spec 20.1.0
2 1     1   793 use Moose::Util::TypeConstraints;
  1         4  
  1         11  
3              
4             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::IoTSiteWise::AssetModel {
9 1     1   2225 use Moose;
  1         3  
  1         8  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'AssetModelArn','AssetModelId' ]
15             }
16             sub supported_regions {
17 1     1 0 1155 [ 'ap-southeast-1','ap-southeast-2','eu-central-1','eu-west-1','us-east-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::VariableValue',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::VariableValue',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::VariableValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::VariableValue {
37 1     1   7772 use Moose;
  1         3  
  1         6  
38 1     1   8024 use MooseX::StrictConstructor;
  1         2  
  1         11  
39             extends 'Cfn::Value::TypedValue';
40            
41             has HierarchyLogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has PropertyLogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44              
45             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::TumblingWindow',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::TumblingWindow',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::TumblingWindow->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::TumblingWindow {
59 1     1   3869 use Moose;
  1         3  
  1         7  
60 1     1   7435 use MooseX::StrictConstructor;
  1         3  
  1         8  
61             extends 'Cfn::Value::TypedValue';
62            
63             has Interval => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             }
65              
66             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::MetricWindow',
67             as 'Cfn::Value';
68              
69             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::MetricWindow',
70             from 'HashRef',
71             via {
72             if (my $f = Cfn::TypeLibrary::try_function($_)) {
73             return $f
74             } else {
75             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::MetricWindow->new( %$_ );
76             }
77             };
78              
79             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::MetricWindow {
80 1     1   3768 use Moose;
  1         3  
  1         8  
81 1     1   7129 use MooseX::StrictConstructor;
  1         3  
  1         7  
82             extends 'Cfn::Value::TypedValue';
83            
84             has Tumbling => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::TumblingWindow', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85             }
86             subtype 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable',
87             as 'Cfn::Value',
88             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
89             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
90              
91             coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable',
92             from 'HashRef',
93             via {
94             if (my $f = Cfn::TypeLibrary::try_function($_)) {
95             return $f
96             } else {
97             die 'Only accepts functions';
98             }
99             },
100             from 'ArrayRef',
101             via {
102             Cfn::Value::Array->new(Value => [
103             map {
104             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable')->coerce($_)
105             } @$_
106             ]);
107             };
108              
109             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable',
110             as 'Cfn::Value';
111              
112             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable',
113             from 'HashRef',
114             via {
115             if (my $f = Cfn::TypeLibrary::try_function($_)) {
116             return $f
117             } else {
118             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::ExpressionVariable->new( %$_ );
119             }
120             };
121              
122             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::ExpressionVariable {
123 1     1   3992 use Moose;
  1         3  
  1         6  
124 1     1   7749 use MooseX::StrictConstructor;
  1         4  
  1         11  
125             extends 'Cfn::Value::TypedValue';
126            
127             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
128             has Value => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::VariableValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
129             }
130              
131             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Transform',
132             as 'Cfn::Value';
133              
134             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Transform',
135             from 'HashRef',
136             via {
137             if (my $f = Cfn::TypeLibrary::try_function($_)) {
138             return $f
139             } else {
140             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Transform->new( %$_ );
141             }
142             };
143              
144             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Transform {
145 1     1   4207 use Moose;
  1         2  
  1         7  
146 1     1   7325 use MooseX::StrictConstructor;
  1         3  
  1         8  
147             extends 'Cfn::Value::TypedValue';
148            
149             has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
150             has Variables => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
151             }
152              
153             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Metric',
154             as 'Cfn::Value';
155              
156             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Metric',
157             from 'HashRef',
158             via {
159             if (my $f = Cfn::TypeLibrary::try_function($_)) {
160             return $f
161             } else {
162             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Metric->new( %$_ );
163             }
164             };
165              
166             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Metric {
167 1     1   3853 use Moose;
  1         4  
  1         5  
168 1     1   7112 use MooseX::StrictConstructor;
  1         2  
  1         7  
169             extends 'Cfn::Value::TypedValue';
170            
171             has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
172             has Variables => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
173             has Window => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::MetricWindow', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
174             }
175              
176             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Attribute',
177             as 'Cfn::Value';
178              
179             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Attribute',
180             from 'HashRef',
181             via {
182             if (my $f = Cfn::TypeLibrary::try_function($_)) {
183             return $f
184             } else {
185             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Attribute->new( %$_ );
186             }
187             };
188              
189             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Attribute {
190 1     1   3607 use Moose;
  1         5  
  1         6  
191 1     1   6818 use MooseX::StrictConstructor;
  1         3  
  1         5  
192             extends 'Cfn::Value::TypedValue';
193            
194             has DefaultValue => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
195             }
196              
197             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::PropertyType',
198             as 'Cfn::Value';
199              
200             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::PropertyType',
201             from 'HashRef',
202             via {
203             if (my $f = Cfn::TypeLibrary::try_function($_)) {
204             return $f
205             } else {
206             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::PropertyType->new( %$_ );
207             }
208             };
209              
210             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::PropertyType {
211 1     1   3691 use Moose;
  1         3  
  1         7  
212 1     1   6983 use MooseX::StrictConstructor;
  1         2  
  1         6  
213             extends 'Cfn::Value::TypedValue';
214            
215             has Attribute => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Attribute', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
216             has Metric => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Metric', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
217             has Transform => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Transform', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
218             has TypeName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
219             }
220             subtype 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty',
221             as 'Cfn::Value',
222             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
223             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
224              
225             coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty',
226             from 'HashRef',
227             via {
228             if (my $f = Cfn::TypeLibrary::try_function($_)) {
229             return $f
230             } else {
231             die 'Only accepts functions';
232             }
233             },
234             from 'ArrayRef',
235             via {
236             Cfn::Value::Array->new(Value => [
237             map {
238             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty')->coerce($_)
239             } @$_
240             ]);
241             };
242              
243             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty',
244             as 'Cfn::Value';
245              
246             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty',
247             from 'HashRef',
248             via {
249             if (my $f = Cfn::TypeLibrary::try_function($_)) {
250             return $f
251             } else {
252             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelProperty->new( %$_ );
253             }
254             };
255              
256             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelProperty {
257 1     1   3784 use Moose;
  1         3  
  1         7  
258 1     1   6855 use MooseX::StrictConstructor;
  1         3  
  1         6  
259             extends 'Cfn::Value::TypedValue';
260            
261             has DataType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
262             has LogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
263             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
264             has Type => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::PropertyType', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
265             has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
266             }
267             subtype 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy',
268             as 'Cfn::Value',
269             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
270             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
271              
272             coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy',
273             from 'HashRef',
274             via {
275             if (my $f = Cfn::TypeLibrary::try_function($_)) {
276             return $f
277             } else {
278             die 'Only accepts functions';
279             }
280             },
281             from 'ArrayRef',
282             via {
283             Cfn::Value::Array->new(Value => [
284             map {
285             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy')->coerce($_)
286             } @$_
287             ]);
288             };
289              
290             subtype 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy',
291             as 'Cfn::Value';
292              
293             coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy',
294             from 'HashRef',
295             via {
296             if (my $f = Cfn::TypeLibrary::try_function($_)) {
297             return $f
298             } else {
299             return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy->new( %$_ );
300             }
301             };
302              
303             package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy {
304 1     1   3913 use Moose;
  1         5  
  1         6  
305 1     1   7151 use MooseX::StrictConstructor;
  1         5  
  1         7  
306             extends 'Cfn::Value::TypedValue';
307            
308             has ChildAssetModelId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
309             has LogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
310             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
311             }
312              
313             package Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel {
314 1     1   3907 use Moose;
  1         5  
  1         8  
315 1     1   7651 use MooseX::StrictConstructor;
  1         3  
  1         8  
316             extends 'Cfn::Resource::Properties';
317            
318             has AssetModelDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
319             has AssetModelHierarchies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
320             has AssetModelName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
321             has AssetModelProperties => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
322             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
323             }
324              
325             1;
326             ### main pod documentation begin ###
327              
328             =encoding UTF-8
329              
330             =head1 NAME
331              
332             Cfn::Resource::AWS::IoTSiteWise::AssetModel - Cfn resource for AWS::IoTSiteWise::AssetModel
333              
334             =head1 DESCRIPTION
335              
336             This module implements a Perl module that represents the CloudFormation object AWS::IoTSiteWise::AssetModel.
337              
338             See L<Cfn> for more information on how to use it.
339              
340             =head1 AUTHOR
341              
342             Jose Luis Martinez
343             CAPSiDE
344             jlmartinez@capside.com
345              
346             =head1 COPYRIGHT and LICENSE
347              
348             Copyright (c) 2013 by CAPSiDE
349             This code is distributed under the Apache 2 License. The full text of the
350             license can be found in the LICENSE file included with this module.
351              
352             =cut