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

filter: Statementstmt 0.0% 0 / 34 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 11 totaltotal 0.0% 0 / 59 CC 2 SCAR 9.6
CC
2
Cov
0%
new
6.0
fromXML
2.0
getListQueuesResult
2.0
CRAP 2.6
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  
22 package Amazon::SQS::Model::ListQueuesResponse;
23  
24 use base qw (Amazon::SQS::Model);
25  
26 =pod
27  
28 =head1 NAME
29  
30 C<Amazon::SQS::Model::ListQueuesResponse>
31  
32 =head1 SYNOPSIS
33  
34 my $response = new Amazon::SQS::Model::ListQueuesResponse( { ListQueuesResult => $result,
35 ResponseMetadata => $response_metadata
36 }
37 );
38  
39 =head1 DESCRIPTION
40  
41 Implements a class that contains the response from a C<ListQueues> request.
42  
43 =head1 METHODS
44  
45 =head2 new
46  
47 new( options )
48  
49 =head2 isSetListQueuesResult
50  
51 Returns true if a C<Amazon::SQS::Model::ListQueuesResult> object is set in the response,
52 false otherwise.
53  
54 =head2 isSetResponseMetadata
55  
56 Returns true if a C<Amazon::SQS::Model::ResponseMetadata> object is set in the response,
57 false otherwise.
58  
59 =head2 getListQueuesResult
60  
61 Returns the C<Amazon::SQS::Model::ListQueuesResult> object.
62  
63 =head2 getResponseMetadata
64  
65 Returns the C<Amazon::SQS::Model::ResponseMetadata> object.
66  
67 =cut
68  
69 sub new {
70 my ($class, $data) = @_;
71  
72 my $self = {};
73  
74 $self->{_fields} = {
75 ListQueuesResult => {
76 FieldValue => undef,
77 FieldType => "Amazon::SQS::Model::ListQueuesResult"
78 },
79  
80 ResponseMetadata => {
81 FieldValue => undef,
82 FieldType => "Amazon::SQS::Model::ResponseMetadata"
83 },
84 };
85  
86 bless ($self, $class);
87  
88 if (defined $data) {
89 $self->_fromHashRef($data);
90 }
91
92 return $self;
93 }
94  
95
96 #
97 # Construct Amazon::SQS::Model::ListQueuesResponse from XML string
98 #
99 sub fromXML {
100 my ($self, $xml) = @_;
101 eval "use XML::Simple";
102 my $tree = XML::Simple::XMLin ($xml);
103
104 # TODO: check valid XML (is this a response XML?)
105
106 return new Amazon::SQS::Model::ListQueuesResponse($tree);
107
108 }
109
110 sub getListQueuesResult {
111 return shift->{_fields}->{ListQueuesResult}->{FieldValue};
112 }
113  
114  
115 sub setListQueuesResult {
116 my ($self, $value) = @_;
117 $self->{_fields}->{ListQueuesResult}->{FieldValue} = $value;
118 }
119  
120  
121 sub withListQueuesResult {
122 my ($self, $value) = @_;
123 $self->setListQueuesResult($value);
124 return $self;
125 }
126  
127  
128 sub isSetListQueuesResult {
129 return defined (shift->{_fields}->{ListQueuesResult}->{FieldValue});
130  
131 }
132  
133 sub getResponseMetadata {
134 return shift->{_fields}->{ResponseMetadata}->{FieldValue};
135 }
136  
137  
138 sub setResponseMetadata {
139 my ($self, $value) = @_;
140 $self->{_fields}->{ResponseMetadata}->{FieldValue} = $value;
141 }
142  
143  
144 sub withResponseMetadata {
145 my ($self, $value) = @_;
146 $self->setResponseMetadata($value);
147 return $self;
148 }
149  
150  
151 sub isSetResponseMetadata {
152 return defined (shift->{_fields}->{ResponseMetadata}->{FieldValue});
153  
154 }
155  
156  
157  
158 #
159 # XML Representation for this object
160 #
161 # Returns string XML for this object
162 #
163 sub toXML {
164 my $self = shift;
165 my $xml = "";
166 $xml .= "<ListQueuesResponse xmlns=\"http://queue.amazonaws.com/doc/2009-02-01/\">";
167 $xml .= $self->_toXMLFragment();
168 $xml .= "</ListQueuesResponse>";
169 return $xml;
170 }
171  
172 =pod
173  
174 =head1 SEE OTHER
175  
176 C<Amazon::SQS::Client>, C<Amazon::SQS::ListQueuesResult>
177  
178 =head1 AUTHOR
179  
180 Elena@AWS
181  
182 =cut
183  
184 1;