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

filter: Statementstmt 0.0% 0 / 32 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 55 CC 3 SCAR 12.0
CC
3
Cov
0%
new
6.0
setAttribute
6.0
getQueueUrl
2.0
CRAP 3.3
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::SetQueueAttributesRequest;
23  
24 use base qw (Amazon::SQS::Model);
25  
26
27  
28 #
29 # Amazon::SQS::Model::SetQueueAttributesRequest
30 #
31 # Properties:
32 #
33 #
34 # QueueUrl: string
35 # Attribute: Amazon::SQS::Model::Attribute
36 #
37 #
38 #
39 sub new {
40 my ($class, $data) = @_;
41 my $self = {};
42 $self->{_fields} = {
43
44 QueueUrl => { FieldValue => undef, FieldType => "string"},
45 Attribute => {FieldValue => [], FieldType => ["Amazon::SQS::Model::Attribute"]},
46 };
47  
48 bless ($self, $class);
49 if (defined $data) {
50 $self->_fromHashRef($data);
51 }
52
53 return $self;
54 }
55  
56
57 sub getQueueUrl {
58 return shift->{_fields}->{QueueUrl}->{FieldValue};
59 }
60  
61  
62 sub setQueueUrl {
63 my ($self, $value) = @_;
64  
65 $self->{_fields}->{QueueUrl}->{FieldValue} = $value;
66 return $self;
67 }
68  
69  
70 sub withQueueUrl {
71 my ($self, $value) = @_;
72 $self->setQueueUrl($value);
73 return $self;
74 }
75  
76  
77 sub isSetQueueUrl {
78 return defined (shift->{_fields}->{QueueUrl}->{FieldValue});
79 }
80  
81 sub getAttribute {
82 return shift->{_fields}->{Attribute}->{FieldValue};
83 }
84  
85 sub setAttribute {
86 my $self = shift;
87 foreach my $attribute (@_) {
88 if (not $self->_isArrayRef($attribute)) {
89 $attribute = [$attribute];
90 }
91 $self->{_fields}->{Attribute}->{FieldValue} = $attribute;
92 }
93 }
94  
95  
96 sub withAttribute {
97 my ($self, $attributeArgs) = @_;
98 foreach my $attribute (@$attributeArgs) {
99 $self->{_fields}->{Attribute}->{FieldValue} = $attribute;
100 }
101 return $self;
102 }
103  
104  
105 sub isSetAttribute {
106 return scalar (@{shift->{_fields}->{Attribute}->{FieldValue}}) > 0;
107 }
108  
109  
110  
111  
112  
113 1;