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

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 39 CC 3 SCAR 13.9
CC
3
Cov
0%
new
6.0
setMessage
6.0
getMessage
2.0
CRAP 4.0
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::ReceiveMessageResult;
23  
24 use base qw (Amazon::SQS::Model);
25  
26
27  
28 #
29 # Amazon::SQS::Model::ReceiveMessageResult
30 #
31 # Properties:
32 #
33 #
34 # Message: Amazon::SQS::Model::Message
35 #
36 #
37 #
38 sub new {
39 my ($class, $data) = @_;
40 my $self = {};
41 $self->{_fields} = {
42
43 Message => {FieldValue => [], FieldType => ["Amazon::SQS::Model::Message"]},
44 };
45  
46 bless ($self, $class);
47 if (defined $data) {
48 $self->_fromHashRef($data);
49 }
50
51 return $self;
52 }
53  
54 sub getMessage {
55 return shift->{_fields}->{Message}->{FieldValue};
56 }
57  
58 sub setMessage {
59 my $self = shift;
60 foreach my $message (@_) {
61 if (not $self->_isArrayRef($message)) {
62 $message = [$message];
63 }
64 $self->{_fields}->{Message}->{FieldValue} = $message;
65 }
66 }
67  
68  
69 sub withMessage {
70 my ($self, $messageArgs) = @_;
71 foreach my $message (@$messageArgs) {
72 $self->{_fields}->{Message}->{FieldValue} = $message;
73 }
74 return $self;
75 }
76  
77  
78 sub isSetMessage {
79 return scalar (@{shift->{_fields}->{Message}->{FieldValue}}) > 0;
80 }
81  
82  
83  
84  
85  
86 1;