blib/lib/VM/EC2/ReservedInstance/Modification.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 31 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
modificationResult
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::ReservedInstance::Modification;
2  
3 =head1 NAME
4  
5 VM::EC2::ReservedInstance::Modification - Object describing an Amazon EC2
6 reserved instance listing modification
7  
8 =head1 SYNOPSIS
9  
10 use VM::EC2;
11  
12 $ec2 = VM::EC2->new(...);
13 @mods = $ec2->describe_reserved_instances_modifications();
14 for my $m (@mods) {
15 print $m->reservedInstancesModificationId,"\n";
16 print $m->createDate,"\n";
17 print $m->status,"\n";
18 }
19  
20 =head1 DESCRIPTION
21  
22 This object represents an Amazon EC2 reserved instance modification, as
23 returned by VM::EC2->describe_reserved_instances_modifications().
24  
25 =head1 METHODS
26  
27 These object methods are supported:
28  
29 reservedInstancesModificationId -- ID of this modification
30  
31 clientToken -- The idempotency token you provided when you
32 created the listing
33  
34 reservedInstancesId -- The ID of the Reserved Instance
35
36 modificationResult -- Contains target configurations along with
37 their corresponding new Reserved Instance
38 IDs
39  
40 createDate -- The time when the modification request was
41 created
42  
43 updateDate -- Time when the modification request was last
44 updated
45  
46 effectiveDate -- Time for the modification to become
47 effective
48  
49 status -- The status of the Reserved Instances
50 modification request
51 Valid values:
52 processing | fulfilled | failed
53  
54 statusMessage -- The reason for the current status
55
56 =head1 STRING OVERLOADING
57  
58 When used in a string context, this object will interpolate the
59 reservedInstancesModificationId
60  
61 =head1 SEE ALSO
62  
63 L<VM::EC2>
64 L<VM::EC2::Generic>
65  
66 =head1 AUTHOR
67  
68 Lance Kinley E<lt>lkinley@loyaltymethods.com<gt>.
69  
70 Copyright (c) 2014 Loyalty Methods, Inc.
71  
72 This package and its accompanying libraries is free software; you can
73 redistribute it and/or modify it under the terms of the GPL (either
74 version 1, or at your option, any later version) or the Artistic
75 License 2.0. Refer to LICENSE for the full license text. In addition,
76 please see DISCLAIMER.txt for disclaimers of warranty.
77  
78 =cut
79  
80 use strict;
81 use base 'VM::EC2::Generic';
82 use VM::EC2::ReservedInstance::Modification::Result;
83  
84 use overload
85 '""' => sub {
86 my $self = shift;
87 return $self->reservedInstancesModificationId},
88 fallback => 1;
89  
90 sub valid_fields {
91 my $self = shift;
92 return qw(reservedInstancesModificationId reservedInstancesId createDate
93 modificationResult updateDate status statusMessage effectiveDate
94 clientToken);
95 }
96  
97 sub modificationResult {
98 my $self = shift;
99 my $result = $self->SUPER::modificationResult or return;
100  
101 return map { VM::EC2::ReservedInstance::Modification::Result->new($_,$self->aws,$self->xmlns,$self->requestId) }
102 @{$result->{item}};
103 }
104  
105 1;