blib/lib/Paws/IoTSiteWise/CreateAssetModel.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IoTSiteWise::CreateAssetModel;
3 use Moose;
4 has AssetModelCompositeModels => (is => 'ro', isa => 'ArrayRef[Paws::IoTSiteWise::AssetModelCompositeModelDefinition]', traits => ['NameInRequest'], request_name => 'assetModelCompositeModels');
5 has AssetModelDescription => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'assetModelDescription');
6 has AssetModelHierarchies => (is => 'ro', isa => 'ArrayRef[Paws::IoTSiteWise::AssetModelHierarchyDefinition]', traits => ['NameInRequest'], request_name => 'assetModelHierarchies');
7 has AssetModelName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'assetModelName', required => 1);
8 has AssetModelProperties => (is => 'ro', isa => 'ArrayRef[Paws::IoTSiteWise::AssetModelPropertyDefinition]', traits => ['NameInRequest'], request_name => 'assetModelProperties');
9 has ClientToken => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientToken');
10 has Tags => (is => 'ro', isa => 'Paws::IoTSiteWise::TagMap', traits => ['NameInRequest'], request_name => 'tags');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAssetModel');
15 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/asset-models');
16 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IoTSiteWise::CreateAssetModelResponse');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::IoTSiteWise::CreateAssetModel - Arguments for method CreateAssetModel on L<Paws::IoTSiteWise>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method CreateAssetModel on the
29 L<AWS IoT SiteWise|Paws::IoTSiteWise> service. Use the attributes of this class
30 as arguments to method CreateAssetModel.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAssetModel.
33  
34 =head1 SYNOPSIS
35  
36 my $iotsitewise = Paws->service('IoTSiteWise');
37 my $CreateAssetModelResponse = $iotsitewise->CreateAssetModel(
38 AssetModelName => 'MyName',
39 AssetModelCompositeModels => [
40 {
41 Name => 'MyName', # min: 1, max: 256
42 Type => 'MyName', # min: 1, max: 256
43 Description => 'MyDescription', # min: 1, max: 2048; OPTIONAL
44 Properties => [
45 {
46 DataType =>
47 'STRING', # values: STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
48 Name => 'MyName', # min: 1, max: 256
49 Type => {
50 Attribute => {
51 DefaultValue =>
52 'MyDefaultValue', # min: 1, max: 1024; OPTIONAL
53 }, # OPTIONAL
54 Measurement => {
55  
56 }, # OPTIONAL
57 Metric => {
58 Expression => 'MyExpression', # min: 1, max: 1024
59 Variables => [
60 {
61 Name => 'MyVariableName', # min: 1, max: 64
62 Value => {
63 PropertyId => 'MyMacro', # min: 1, max: 256
64 HierarchyId => 'MyMacro', # min: 1, max: 256
65 },
66  
67 },
68 ...
69 ],
70 Window => {
71 Tumbling => {
72 Interval => 'MyInterval', # min: 2, max: 3
73  
74 }, # OPTIONAL
75 },
76  
77 }, # OPTIONAL
78 Transform => {
79 Expression => 'MyExpression', # min: 1, max: 1024
80 Variables => [
81 {
82 Name => 'MyVariableName', # min: 1, max: 64
83 Value => {
84 PropertyId => 'MyMacro', # min: 1, max: 256
85 HierarchyId => 'MyMacro', # min: 1, max: 256
86 },
87  
88 },
89 ...
90 ],
91  
92 }, # OPTIONAL
93 },
94 DataTypeSpec => 'MyName', # min: 1, max: 256
95 Unit => 'MyPropertyUnit', # min: 1, max: 256; OPTIONAL
96 },
97 ...
98 ], # OPTIONAL
99 },
100 ...
101 ], # OPTIONAL
102 AssetModelDescription => 'MyDescription', # OPTIONAL
103 AssetModelHierarchies => [
104 {
105 ChildAssetModelId => 'MyID', # min: 36, max: 36
106 Name => 'MyName', # min: 1, max: 256
107  
108 },
109 ...
110 ], # OPTIONAL
111 AssetModelProperties => [
112 {
113 DataType =>
114 'STRING', # values: STRING, INTEGER, DOUBLE, BOOLEAN, STRUCT
115 Name => 'MyName', # min: 1, max: 256
116 Type => {
117 Attribute => {
118 DefaultValue => 'MyDefaultValue', # min: 1, max: 1024; OPTIONAL
119 }, # OPTIONAL
120 Measurement => {
121  
122 }, # OPTIONAL
123 Metric => {
124 Expression => 'MyExpression', # min: 1, max: 1024
125 Variables => [
126 {
127 Name => 'MyVariableName', # min: 1, max: 64
128 Value => {
129 PropertyId => 'MyMacro', # min: 1, max: 256
130 HierarchyId => 'MyMacro', # min: 1, max: 256
131 },
132  
133 },
134 ...
135 ],
136 Window => {
137 Tumbling => {
138 Interval => 'MyInterval', # min: 2, max: 3
139  
140 }, # OPTIONAL
141 },
142  
143 }, # OPTIONAL
144 Transform => {
145 Expression => 'MyExpression', # min: 1, max: 1024
146 Variables => [
147 {
148 Name => 'MyVariableName', # min: 1, max: 64
149 Value => {
150 PropertyId => 'MyMacro', # min: 1, max: 256
151 HierarchyId => 'MyMacro', # min: 1, max: 256
152 },
153  
154 },
155 ...
156 ],
157  
158 }, # OPTIONAL
159 },
160 DataTypeSpec => 'MyName', # min: 1, max: 256
161 Unit => 'MyPropertyUnit', # min: 1, max: 256; OPTIONAL
162 },
163 ...
164 ], # OPTIONAL
165 ClientToken => 'MyClientToken', # OPTIONAL
166 Tags => {
167 'MyTagKey' => 'MyTagValue', # key: min: 1, max: 128, value: max: 256
168 }, # OPTIONAL
169 );
170  
171 # Results:
172 my $AssetModelArn = $CreateAssetModelResponse->AssetModelArn;
173 my $AssetModelId = $CreateAssetModelResponse->AssetModelId;
174 my $AssetModelStatus = $CreateAssetModelResponse->AssetModelStatus;
175  
176 # Returns a L<Paws::IoTSiteWise::CreateAssetModelResponse> object.
177  
178 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
179 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iotsitewise/CreateAssetModel>
180  
181 =head1 ATTRIBUTES
182  
183  
184 =head2 AssetModelCompositeModels => ArrayRef[L<Paws::IoTSiteWise::AssetModelCompositeModelDefinition>]
185  
186 The composite asset models that are part of this asset model. Composite
187 asset models are asset models that contain specific properties. Each
188 composite model has a type that defines the properties that the
189 composite model supports. Use composite asset models to define alarms
190 on this asset model.
191  
192  
193  
194 =head2 AssetModelDescription => Str
195  
196 A description for the asset model.
197  
198  
199  
200 =head2 AssetModelHierarchies => ArrayRef[L<Paws::IoTSiteWise::AssetModelHierarchyDefinition>]
201  
202 The hierarchy definitions of the asset model. Each hierarchy specifies
203 an asset model whose assets can be children of any other assets created
204 from this asset model. For more information, see Asset hierarchies
205 (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html)
206 in the I<AWS IoT SiteWise User Guide>.
207  
208 You can specify up to 10 hierarchies per asset model. For more
209 information, see Quotas
210 (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
211 in the I<AWS IoT SiteWise User Guide>.
212  
213  
214  
215 =head2 B<REQUIRED> AssetModelName => Str
216  
217 A unique, friendly name for the asset model.
218  
219  
220  
221 =head2 AssetModelProperties => ArrayRef[L<Paws::IoTSiteWise::AssetModelPropertyDefinition>]
222  
223 The property definitions of the asset model. For more information, see
224 Asset properties
225 (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html)
226 in the I<AWS IoT SiteWise User Guide>.
227  
228 You can specify up to 200 properties per asset model. For more
229 information, see Quotas
230 (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html)
231 in the I<AWS IoT SiteWise User Guide>.
232  
233  
234  
235 =head2 ClientToken => Str
236  
237 A unique case-sensitive identifier that you can provide to ensure the
238 idempotency of the request. Don't reuse this client token if a new
239 idempotent request is required.
240  
241  
242  
243 =head2 Tags => L<Paws::IoTSiteWise::TagMap>
244  
245 A list of key-value pairs that contain metadata for the asset model.
246 For more information, see Tagging your AWS IoT SiteWise resources
247 (https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html)
248 in the I<AWS IoT SiteWise User Guide>.
249  
250  
251  
252  
253 =head1 SEE ALSO
254  
255 This class forms part of L<Paws>, documenting arguments for method CreateAssetModel in L<Paws::IoTSiteWise>
256  
257 =head1 BUGS and CONTRIBUTIONS
258  
259 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
260  
261 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
262  
263 =cut
264