| 1 | # AWS::IoTSiteWise::AssetModel generated from spec 20.1.0 | ||||||||||
| 2 | 1 | ▶ | use Moose::Util::TypeConstraints; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | coerce 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel', | ||||||||||
| 5 | from 'HashRef', | ||||||||||
| 6 | 0 | ▶ | via { Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel->new( %$_ ) }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | package Cfn::Resource::AWS::IoTSiteWise::AssetModel { | |||||||||
| 9 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | extends 'Cfn::Resource'; | |||||||||
| 11 | 1 | has Properties => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel', is => 'rw', coerce => 1); | |||||||||
| 12 | |||||||||||
| 13 | sub AttributeList { | ||||||||||
| 14 | 1 | ▶ | [ 'AssetModelArn','AssetModelId' ] | ||||||||
|
Subroutine
AttributeList: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 15 | } | ||||||||||
| 16 | sub supported_regions { | ||||||||||
| 17 | 1 | ▶ | [ 'ap-southeast-1','ap-southeast-2','eu-central-1','eu-west-1','us-east-1','us-west-2' ] | ||||||||
|
Subroutine
supported_regions: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 30 | 0 | return $f | |||||||||
| 31 | } else { | ||||||||||
| 32 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::VariableValue->new( %$_ ); | |||||||||
| 33 | } | ||||||||||
| 34 | 1 | }; | |||||||||
| 35 | |||||||||||
| 36 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::VariableValue { | |||||||||
| 37 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 38 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 39 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 40 | |||||||||||
| 41 | 1 | has HierarchyLogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 42 | 1 | has PropertyLogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 52 | 0 | return $f | |||||||||
| 53 | } else { | ||||||||||
| 54 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::TumblingWindow->new( %$_ ); | |||||||||
| 55 | } | ||||||||||
| 56 | 1 | }; | |||||||||
| 57 | |||||||||||
| 58 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::TumblingWindow { | |||||||||
| 59 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 60 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 61 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 62 | |||||||||||
| 63 | 1 | has Interval => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 64 | } | ||||||||||
| 65 | |||||||||||
| 66 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 73 | 0 | return $f | |||||||||
| 74 | } else { | ||||||||||
| 75 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::MetricWindow->new( %$_ ); | |||||||||
| 76 | } | ||||||||||
| 77 | 1 | }; | |||||||||
| 78 | |||||||||||
| 79 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::MetricWindow { | |||||||||
| 80 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 81 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 82 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 83 | |||||||||||
| 84 | 1 | 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 | 0 | ▶ | where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 89 | 0 | ▶ | message { "$_ is not a Cfn::Value or a Cfn::Value::Function" }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 90 | |||||||||||
| 91 | coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable', | ||||||||||
| 92 | from 'HashRef', | ||||||||||
| 93 | via { | ||||||||||
| 94 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 95 | 0 | return $f | |||||||||
| 96 | } else { | ||||||||||
| 97 | 0 | die 'Only accepts functions'; | |||||||||
| 98 | } | ||||||||||
| 99 | }, | ||||||||||
| 100 | from 'ArrayRef', | ||||||||||
| 101 | via { | ||||||||||
| 102 | Cfn::Value::Array->new(Value => [ | ||||||||||
| 103 | map { | ||||||||||
| 104 | 0 | ▶ | Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable')->coerce($_) | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 105 | } @$_ | ||||||||||
| 106 | ]); | ||||||||||
| 107 | 1 | }; | |||||||||
| 108 | |||||||||||
| 109 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 116 | 0 | return $f | |||||||||
| 117 | } else { | ||||||||||
| 118 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::ExpressionVariable->new( %$_ ); | |||||||||
| 119 | } | ||||||||||
| 120 | 1 | }; | |||||||||
| 121 | |||||||||||
| 122 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::ExpressionVariable { | |||||||||
| 123 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 124 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 125 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 126 | |||||||||||
| 127 | 1 | has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 128 | 1 | has Value => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::VariableValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 129 | } | ||||||||||
| 130 | |||||||||||
| 131 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 138 | 0 | return $f | |||||||||
| 139 | } else { | ||||||||||
| 140 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Transform->new( %$_ ); | |||||||||
| 141 | } | ||||||||||
| 142 | 1 | }; | |||||||||
| 143 | |||||||||||
| 144 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Transform { | |||||||||
| 145 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 146 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 147 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 148 | |||||||||||
| 149 | 1 | has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 150 | 1 | has Variables => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 151 | } | ||||||||||
| 152 | |||||||||||
| 153 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 160 | 0 | return $f | |||||||||
| 161 | } else { | ||||||||||
| 162 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Metric->new( %$_ ); | |||||||||
| 163 | } | ||||||||||
| 164 | 1 | }; | |||||||||
| 165 | |||||||||||
| 166 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Metric { | |||||||||
| 167 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 168 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 169 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 170 | |||||||||||
| 171 | 1 | has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 172 | 1 | has Variables => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::ExpressionVariable', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 173 | 1 | has Window => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::MetricWindow', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 174 | } | ||||||||||
| 175 | |||||||||||
| 176 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 183 | 0 | return $f | |||||||||
| 184 | } else { | ||||||||||
| 185 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Attribute->new( %$_ ); | |||||||||
| 186 | } | ||||||||||
| 187 | 1 | }; | |||||||||
| 188 | |||||||||||
| 189 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::Attribute { | |||||||||
| 190 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 191 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 192 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 193 | |||||||||||
| 194 | 1 | has DefaultValue => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 195 | } | ||||||||||
| 196 | |||||||||||
| 197 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 204 | 0 | return $f | |||||||||
| 205 | } else { | ||||||||||
| 206 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::PropertyType->new( %$_ ); | |||||||||
| 207 | } | ||||||||||
| 208 | 1 | }; | |||||||||
| 209 | |||||||||||
| 210 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::PropertyType { | |||||||||
| 211 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 212 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 213 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 214 | |||||||||||
| 215 | 1 | has Attribute => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Attribute', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 216 | 1 | has Metric => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Metric', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 217 | 1 | has Transform => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::Transform', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 218 | 1 | 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 | 0 | ▶ | where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 223 | 0 | ▶ | message { "$_ is not a Cfn::Value or a Cfn::Value::Function" }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 224 | |||||||||||
| 225 | coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty', | ||||||||||
| 226 | from 'HashRef', | ||||||||||
| 227 | via { | ||||||||||
| 228 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 229 | 0 | return $f | |||||||||
| 230 | } else { | ||||||||||
| 231 | 0 | die 'Only accepts functions'; | |||||||||
| 232 | } | ||||||||||
| 233 | }, | ||||||||||
| 234 | from 'ArrayRef', | ||||||||||
| 235 | via { | ||||||||||
| 236 | Cfn::Value::Array->new(Value => [ | ||||||||||
| 237 | map { | ||||||||||
| 238 | 0 | ▶ | Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty')->coerce($_) | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 239 | } @$_ | ||||||||||
| 240 | ]); | ||||||||||
| 241 | 1 | }; | |||||||||
| 242 | |||||||||||
| 243 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 250 | 0 | return $f | |||||||||
| 251 | } else { | ||||||||||
| 252 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelProperty->new( %$_ ); | |||||||||
| 253 | } | ||||||||||
| 254 | 1 | }; | |||||||||
| 255 | |||||||||||
| 256 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelProperty { | |||||||||
| 257 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 258 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 259 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 260 | |||||||||||
| 261 | 1 | has DataType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 262 | 1 | has LogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 263 | 1 | has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 264 | 1 | has Type => (isa => 'Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::PropertyType', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 265 | 1 | 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 | 0 | ▶ | where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 270 | 0 | ▶ | message { "$_ is not a Cfn::Value or a Cfn::Value::Function" }; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 271 | |||||||||||
| 272 | coerce 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy', | ||||||||||
| 273 | from 'HashRef', | ||||||||||
| 274 | via { | ||||||||||
| 275 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 276 | 0 | return $f | |||||||||
| 277 | } else { | ||||||||||
| 278 | 0 | die 'Only accepts functions'; | |||||||||
| 279 | } | ||||||||||
| 280 | }, | ||||||||||
| 281 | from 'ArrayRef', | ||||||||||
| 282 | via { | ||||||||||
| 283 | Cfn::Value::Array->new(Value => [ | ||||||||||
| 284 | map { | ||||||||||
| 285 | 0 | ▶ | Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy')->coerce($_) | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 286 | } @$_ | ||||||||||
| 287 | ]); | ||||||||||
| 288 | 1 | }; | |||||||||
| 289 | |||||||||||
| 290 | 1 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 297 | 0 | return $f | |||||||||
| 298 | } else { | ||||||||||
| 299 | 0 | return Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy->new( %$_ ); | |||||||||
| 300 | } | ||||||||||
| 301 | 1 | }; | |||||||||
| 302 | |||||||||||
| 303 | 1 | package Cfn::Resource::Properties::Object::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy { | |||||||||
| 304 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 305 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 306 | 1 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 307 | |||||||||||
| 308 | 1 | has ChildAssetModelId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 309 | 1 | has LogicalId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 310 | 1 | has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 311 | } | ||||||||||
| 312 | |||||||||||
| 313 | 1 | package Cfn::Resource::Properties::AWS::IoTSiteWise::AssetModel { | |||||||||
| 314 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 315 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 316 | 1 | extends 'Cfn::Resource::Properties'; | |||||||||
| 317 | |||||||||||
| 318 | 1 | has AssetModelDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 319 | 1 | has AssetModelHierarchies => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelHierarchy', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 320 | 1 | has AssetModelName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 321 | 1 | has AssetModelProperties => (isa => 'ArrayOfCfn::Resource::Properties::AWS::IoTSiteWise::AssetModel::AssetModelProperty', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 322 | 1 | has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 323 | } | ||||||||||
| 324 | |||||||||||
| 325 | 1 | 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 | ||||||||||