lib/Amazon/SQS/Model/ChangeMessageVisibilityResponse.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 7 totaltotal 0.0% 0 / 44 CC 2 SCAR 10.6
CC
2
Cov
0%
new
6.0
fromXML
2.0
getResponseMetadata
2.0
CRAP 2.9
1 ################################################################################
2 # Copyright 2008 Amazon Technologies, Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 #
5 # You may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
7 # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
8 # CONDITIONS OF ANY KIND, either express or implied. See the License for the
9 # specific language governing permissions and limitations under the License.
10 ################################################################################
11 # __ _ _ ___
12 # ( )( \/\/ )/ __)
13 # /__\ \ / \__ \
14 # (_)(_) \/\/ (___/
15 #
16 # Amazon SQS Perl Library
17 # API Version: 2009-02-01
18 # Generated: Thu Apr 09 01:13:11 PDT 2009
19 #
20  
21 package Amazon::SQS::Model::ChangeMessageVisibilityResponse;
22  
23 use base qw (Amazon::SQS::Model);
24  
25 #
26 # Amazon::SQS::Model::ChangeMessageVisibilityResponse
27 #
28 # Properties:
29 #
30 #
31 # ResponseMetadata: Amazon::SQS::Model::ResponseMetadata
32 #
33 #
34 #
35 sub new {
36 my ($class, $data) = @_;
37 my $self = {};
38 $self->{_fields} = {
39 ResponseMetadata => {FieldValue => undef, FieldType => "Amazon::SQS::Model::ResponseMetadata"},
40 };
41
42 bless ($self, $class);
43 if (defined $data) {
44 $self->_fromHashRef($data);
45 }
46
47 return $self;
48 }
49  
50
51 #
52 # Construct Amazon::SQS::Model::ChangeMessageVisibilityResponse from XML string
53 #
54 sub fromXML {
55 my ($self, $xml) = @_;
56 eval "use XML::Simple";
57 my $tree = XML::Simple::XMLin ($xml);
58
59 # TODO: check valid XML (is this a response XML?)
60
61 return new Amazon::SQS::Model::ChangeMessageVisibilityResponse($tree);
62
63 }
64
65 sub getResponseMetadata {
66 return shift->{_fields}->{ResponseMetadata}->{FieldValue};
67 }
68  
69  
70 sub setResponseMetadata {
71 my ($self, $value) = @_;
72 $self->{_fields}->{ResponseMetadata}->{FieldValue} = $value;
73 }
74  
75  
76 sub withResponseMetadata {
77 my ($self, $value) = @_;
78 $self->setResponseMetadata($value);
79 return $self;
80 }
81  
82  
83 sub isSetResponseMetadata {
84 return defined (shift->{_fields}->{ResponseMetadata}->{FieldValue});
85  
86 }
87  
88  
89  
90 #
91 # XML Representation for this object
92 #
93 # Returns string XML for this object
94 #
95 sub toXML {
96 my $self = shift;
97 my $xml = "";
98 $xml .= "<ChangeMessageVisibilityResponse xmlns=\"http://queue.amazonaws.com/doc/2009-02-01/\">";
99 $xml .= $self->_toXMLFragment();
100 $xml .= "</ChangeMessageVisibilityResponse>";
101 return $xml;
102
103 }
104  
105  
106 1;