lib/Amazon/SQS/Model/GetQueueAttributesResponse.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
getGetQueueAttributesResult
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::GetQueueAttributesResponse;
23  
24 use base qw (Amazon::SQS::Model);
25  
26
27  
28 #
29 # Amazon::SQS::Model::GetQueueAttributesResponse
30 #
31 # Properties:
32 #
33 #
34 # GetQueueAttributesResult: Amazon::SQS::Model::GetQueueAttributesResult
35 # ResponseMetadata: Amazon::SQS::Model::ResponseMetadata
36 #
37 #
38 #
39 sub new {
40 my ($class, $data) = @_;
41 my $self = {};
42 $self->{_fields} = {
43
44 GetQueueAttributesResult => {FieldValue => undef, FieldType => "Amazon::SQS::Model::GetQueueAttributesResult"},
45 ResponseMetadata => {FieldValue => undef, FieldType => "Amazon::SQS::Model::ResponseMetadata"},
46 };
47  
48 bless ($self, $class);
49 if (defined $data) {
50 $self->_fromHashRef($data);
51 }
52
53 return $self;
54 }
55  
56
57 #
58 # Construct Amazon::SQS::Model::GetQueueAttributesResponse from XML string
59 #
60 sub fromXML {
61 my ($self, $xml) = @_;
62 eval "use XML::Simple";
63 my $tree = XML::Simple::XMLin ($xml);
64
65 # TODO: check valid XML (is this a response XML?)
66
67 return new Amazon::SQS::Model::GetQueueAttributesResponse($tree);
68
69 }
70
71 sub getGetQueueAttributesResult {
72 return shift->{_fields}->{GetQueueAttributesResult}->{FieldValue};
73 }
74  
75  
76 sub setGetQueueAttributesResult {
77 my ($self, $value) = @_;
78 $self->{_fields}->{GetQueueAttributesResult}->{FieldValue} = $value;
79 }
80  
81  
82 sub withGetQueueAttributesResult {
83 my ($self, $value) = @_;
84 $self->setGetQueueAttributesResult($value);
85 return $self;
86 }
87  
88  
89 sub isSetGetQueueAttributesResult {
90 return defined (shift->{_fields}->{GetQueueAttributesResult}->{FieldValue});
91  
92 }
93  
94 sub getResponseMetadata {
95 return shift->{_fields}->{ResponseMetadata}->{FieldValue};
96 }
97  
98  
99 sub setResponseMetadata {
100 my ($self, $value) = @_;
101 $self->{_fields}->{ResponseMetadata}->{FieldValue} = $value;
102 }
103  
104  
105 sub withResponseMetadata {
106 my ($self, $value) = @_;
107 $self->setResponseMetadata($value);
108 return $self;
109 }
110  
111  
112 sub isSetResponseMetadata {
113 return defined (shift->{_fields}->{ResponseMetadata}->{FieldValue});
114  
115 }
116  
117  
118  
119 #
120 # XML Representation for this object
121 #
122 # Returns string XML for this object
123 #
124 sub toXML {
125 my $self = shift;
126 my $xml = "";
127 $xml .= "<GetQueueAttributesResponse xmlns=\"http://queue.amazonaws.com/doc/2009-02-01/\">";
128 $xml .= $self->_toXMLFragment();
129 $xml .= "</GetQueueAttributesResponse>";
130 return $xml;
131 }
132  
133  
134 1;