« lib/Amazon/SQS/Model/ListQueuesResponse.pm
↑ Summary
lib/Amazon/SQS/Model/ChangeMessageVisibilityBatchResponse.pm »
| 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::Message; | ||
| 22 | |||
| 23 | use strict; | ||
| 24 | use warnings; | ||
| 25 | |||
| 26 | use base qw (Amazon::SQS::Model); | ||
| 27 | |||
| 28 | # | ||
| 29 | # Amazon::SQS::Model::Message | ||
| 30 | # | ||
| 31 | # Properties: | ||
| 32 | # | ||
| 33 | # | ||
| 34 | # MessageId: string | ||
| 35 | # ReceiptHandle: string | ||
| 36 | # MD5OfBody: string | ||
| 37 | # Body: string | ||
| 38 | # Attribute: Amazon::SQS::Model::Attribute | ||
| 39 | # | ||
| 40 | # | ||
| 41 | # | ||
| 42 | sub new { | ||
| 43 | my ( $class, $data ) = @_; | ||
| 44 | |||
| 45 | my $self = {}; | ||
| 46 | |||
| 47 | $self->{_fields} = { | ||
| 48 | |||
| 49 | MessageId => { FieldValue => undef, FieldType => 'string' }, | ||
| 50 | ReceiptHandle => { FieldValue => undef, FieldType => 'string' }, | ||
| 51 | MD5OfBody => { FieldValue => undef, FieldType => 'string' }, | ||
| 52 | Body => { FieldValue => undef, FieldType => 'string' }, | ||
| 53 | |||
| 54 | MessageAttribute => { FieldValue => [], FieldType => ['Amazon::SQS::Model::MessageAttribute'] }, | ||
| 55 | }; | ||
| 56 | |||
| 57 | bless $self, $class; | ||
| 58 | |||
| 59 | if ( defined $data ) { | ||
| 60 | $self->_fromHashRef($data); | ||
| 61 | } | ||
| 62 | |||
| 63 | return $self; | ||
| 64 | } | ||
| 65 | |||
| 66 | sub getMessageId { | ||
| 67 | return shift->{_fields}->{MessageId}->{FieldValue}; | ||
| 68 | } | ||
| 69 | |||
| 70 | sub setMessageId { | ||
| 71 | my ( $self, $value ) = @_; | ||
| 72 | |||
| 73 | $self->{_fields}->{MessageId}->{FieldValue} = $value; | ||
| 74 | return $self; | ||
| 75 | } | ||
| 76 | |||
| 77 | sub withMessageId { | ||
| 78 | my ( $self, $value ) = @_; | ||
| 79 | $self->setMessageId($value); | ||
| 80 | return $self; | ||
| 81 | } | ||
| 82 | |||
| 83 | sub isSetMessageId { | ||
| 84 | return defined( shift->{_fields}->{MessageId}->{FieldValue} ); | ||
| 85 | } | ||
| 86 | |||
| 87 | sub getReceiptHandle { | ||
| 88 | return shift->{_fields}->{ReceiptHandle}->{FieldValue}; | ||
| 89 | } | ||
| 90 | |||
| 91 | sub setReceiptHandle { | ||
| 92 | my ( $self, $value ) = @_; | ||
| 93 | |||
| 94 | $self->{_fields}->{ReceiptHandle}->{FieldValue} = $value; | ||
| 95 | return $self; | ||
| 96 | } | ||
| 97 | |||
| 98 | sub withReceiptHandle { | ||
| 99 | my ( $self, $value ) = @_; | ||
| 100 | $self->setReceiptHandle($value); | ||
| 101 | return $self; | ||
| 102 | } | ||
| 103 | |||
| 104 | sub isSetReceiptHandle { | ||
| 105 | return defined( shift->{_fields}->{ReceiptHandle}->{FieldValue} ); | ||
| 106 | } | ||
| 107 | |||
| 108 | sub getMD5OfBody { | ||
| 109 | return shift->{_fields}->{MD5OfBody}->{FieldValue}; | ||
| 110 | } | ||
| 111 | |||
| 112 | sub setMD5OfBody { | ||
| 113 | my ( $self, $value ) = @_; | ||
| 114 | |||
| 115 | $self->{_fields}->{MD5OfBody}->{FieldValue} = $value; | ||
| 116 | return $self; | ||
| 117 | } | ||
| 118 | |||
| 119 | sub withMD5OfBody { | ||
| 120 | my ( $self, $value ) = @_; | ||
| 121 | $self->setMD5OfBody($value); | ||
| 122 | return $self; | ||
| 123 | } | ||
| 124 | |||
| 125 | sub isSetMD5OfBody { | ||
| 126 | return defined( shift->{_fields}->{MD5OfBody}->{FieldValue} ); | ||
| 127 | } | ||
| 128 | |||
| 129 | sub getBody { | ||
| 130 | return shift->{_fields}->{Body}->{FieldValue}; | ||
| 131 | } | ||
| 132 | |||
| 133 | sub setBody { | ||
| 134 | my ( $self, $value ) = @_; | ||
| 135 | |||
| 136 | $self->{_fields}->{Body}->{FieldValue} = $value; | ||
| 137 | return $self; | ||
| 138 | } | ||
| 139 | |||
| 140 | sub withBody { | ||
| 141 | my ( $self, $value ) = @_; | ||
| 142 | $self->setBody($value); | ||
| 143 | return $self; | ||
| 144 | } | ||
| 145 | |||
| 146 | sub isSetBody { | ||
| 147 | return defined( shift->{_fields}->{Body}->{FieldValue} ); | ||
| 148 | } | ||
| 149 | |||
| 150 | sub getMessageAttribute { | ||
| 151 | return shift->{_fields}->{MessageAttribute}->{FieldValue}; | ||
| 152 | } | ||
| 153 | |||
| 154 | sub setMessageAttribute { | ||
| 155 | my ( $self, @args ) = @_; | ||
| 156 | |||
| 157 | foreach my $attribute (@args) { | ||
| 158 | if ( not $self->_isArrayRef($attribute) ) { | ||
| 159 | $attribute = [$attribute]; | ||
| 160 | } | ||
| 161 | $self->{_fields}->{MessageAttribute}->{FieldValue} = $attribute; | ||
| 162 | } | ||
| 163 | |||
| 164 | return; | ||
| 165 | } | ||
| 166 | |||
| 167 | sub withMessageAttribute { | ||
| 168 | my ( $self, $attributeArgs ) = @_; | ||
| 169 | |||
| 170 | foreach my $attribute ( @{$attributeArgs} ) { | ||
| 171 | $self->{_fields}->{MessageAttribute}->{FieldValue} = $attribute; | ||
| 172 | } | ||
| 173 | |||
| 174 | return $self; | ||
| 175 | } | ||
| 176 | |||
| 177 | sub isSetMessageAttribute { | ||
| 178 | return scalar( @{ shift->{_fields}->{MessageAttribute}->{FieldValue} } ) > 0; | ||
| 179 | } | ||
| 180 | |||
| 181 | 1; | ||
| 182 | |||
| 183 | __END__ |