« lib/Amazon/SQS/Model/MessageAttributeValue.pm
↑ Summary
lib/Amazon/SQS/Model/MessageAttribute.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 | # Copyright 2016 Robert C. Lauer | ||
| 12 | # | ||
| 13 | # Note: The software contained in this distribution has been modified from the | ||
| 14 | # original. You may freely use and distribute this software under the | ||
| 15 | # terms of the original license. | ||
| 16 | # | ||
| 17 | ################################################################################ | ||
| 18 | # __ _ _ ___ | ||
| 19 | # ( )( \/\/ )/ __) | ||
| 20 | # /__\ \ / \__ \ | ||
| 21 | # (_)(_) \/\/ (___/ | ||
| 22 | # | ||
| 23 | # Amazon SQS Perl Library | ||
| 24 | # API Version: 2009-02-01 | ||
| 25 | # Generated: Thu Apr 09 01:13:11 PDT 2009 | ||
| 26 | # | ||
| 27 | |||
| 28 | # This work has been modified from the original Copyright 2016 Robert C. Lauer | ||
| 29 | |||
| 30 | package Amazon::SQS::Model::SendMessageRequest; | ||
| 31 | |||
| 32 | use strict; | ||
| 33 | use warnings; | ||
| 34 | |||
| 35 | use parent qw(Amazon::SQS::Model); | ||
| 36 | |||
| 37 | # | ||
| 38 | # Amazon::SQS::Model::SendMessageRequest | ||
| 39 | # | ||
| 40 | # Properties: | ||
| 41 | # | ||
| 42 | # | ||
| 43 | # QueueUrl: string | ||
| 44 | # MessageBody: string | ||
| 45 | # DelaySeconds: int | ||
| 46 | # MessageDuplicationId: string | ||
| 47 | # MessageGroupId: string | ||
| 48 | # MessageAttribute: Amazon::SQS::Model::MessageAttribute | ||
| 49 | # | ||
| 50 | # | ||
| 51 | sub new { | ||
| 52 | my ( $class, $data ) = @_; | ||
| 53 | my $self = {}; | ||
| 54 | |||
| 55 | $self->{_fields} = { | ||
| 56 | QueueUrl => { FieldValue => undef, FieldType => 'string' }, | ||
| 57 | MessageBody => { FieldValue => undef, FieldType => 'string' }, | ||
| 58 | DelaySeconds => { FieldValue => undef, FieldType => 'int' }, | ||
| 59 | MessageDuplicationId => { FieldValue => undef, FieldType => 'string' }, | ||
| 60 | MessageGroupId => { FieldValue => undef, FieldType => 'string' }, | ||
| 61 | MessageAttribute => { FieldValue => [], FieldType => ['Amazon::SQS::Model::MessageAttribute'] }, | ||
| 62 | }; | ||
| 63 | |||
| 64 | bless $self, $class; | ||
| 65 | if ( defined $data ) { | ||
| 66 | $self->_fromHashRef($data); | ||
| 67 | } | ||
| 68 | |||
| 69 | return $self; | ||
| 70 | } | ||
| 71 | |||
| 72 | sub getQueueUrl { | ||
| 73 | return shift->{_fields}->{QueueUrl}->{FieldValue}; | ||
| 74 | } | ||
| 75 | |||
| 76 | sub setQueueUrl { | ||
| 77 | my ( $self, $value ) = @_; | ||
| 78 | |||
| 79 | $self->{_fields}->{QueueUrl}->{FieldValue} = $value; | ||
| 80 | return $self; | ||
| 81 | } | ||
| 82 | |||
| 83 | sub withQueueUrl { | ||
| 84 | my ( $self, $value ) = @_; | ||
| 85 | $self->setQueueUrl($value); | ||
| 86 | return $self; | ||
| 87 | } | ||
| 88 | |||
| 89 | sub isSetQueueUrl { | ||
| 90 | return defined( shift->{_fields}->{QueueUrl}->{FieldValue} ); | ||
| 91 | } | ||
| 92 | |||
| 93 | sub getDelaySeconds { | ||
| 94 | return shift->{_fields}->{DelaySeconds}->{FieldValue}; | ||
| 95 | } | ||
| 96 | |||
| 97 | sub setDelaySeconds { | ||
| 98 | my ( $self, $value ) = @_; | ||
| 99 | |||
| 100 | $self->{_fields}->{DelaySeconds}->{FieldValue} = $value; | ||
| 101 | return $self; | ||
| 102 | } | ||
| 103 | |||
| 104 | sub withDelaySeconds { | ||
| 105 | my ( $self, $value ) = @_; | ||
| 106 | $self->setDelaySeconds($value); | ||
| 107 | return $self; | ||
| 108 | } | ||
| 109 | |||
| 110 | sub isSetDelaySeconds { | ||
| 111 | return defined( shift->{_fields}->{DelaySeconds}->{FieldValue} ); | ||
| 112 | } | ||
| 113 | |||
| 114 | sub getMessageDuplicationId { | ||
| 115 | return shift->{_fields}->{MessageDuplicationId}->{FieldValue}; | ||
| 116 | } | ||
| 117 | |||
| 118 | sub setMessageDuplicationId { | ||
| 119 | my ( $self, $value ) = @_; | ||
| 120 | |||
| 121 | $self->{_fields}->{MessageDuplicationId}->{FieldValue} = $value; | ||
| 122 | return $self; | ||
| 123 | } | ||
| 124 | |||
| 125 | sub withMessageDuplicationId { | ||
| 126 | my ( $self, $value ) = @_; | ||
| 127 | $self->setMessageDuplicationId($value); | ||
| 128 | return $self; | ||
| 129 | } | ||
| 130 | |||
| 131 | sub isSetMessageDuplicationId { | ||
| 132 | return defined( shift->{_fields}->{MessageDuplicationId}->{FieldValue} ); | ||
| 133 | } | ||
| 134 | |||
| 135 | sub getMessageGroupId { | ||
| 136 | return shift->{_fields}->{MessageGroupId}->{FieldValue}; | ||
| 137 | } | ||
| 138 | |||
| 139 | sub setMessageGroupId { | ||
| 140 | my ( $self, $value ) = @_; | ||
| 141 | |||
| 142 | $self->{_fields}->{MessageGroupId}->{FieldValue} = $value; | ||
| 143 | return $self; | ||
| 144 | } | ||
| 145 | |||
| 146 | sub withMessageGroupId { | ||
| 147 | my ( $self, $value ) = @_; | ||
| 148 | $self->setMessageGroupId($value); | ||
| 149 | return $self; | ||
| 150 | } | ||
| 151 | |||
| 152 | sub isSetMessageGroupId { | ||
| 153 | return defined( shift->{_fields}->{MessageGroupId}->{FieldValue} ); | ||
| 154 | } | ||
| 155 | |||
| 156 | sub getMessageBody { | ||
| 157 | return shift->{_fields}->{MessageBody}->{FieldValue}; | ||
| 158 | } | ||
| 159 | |||
| 160 | sub setMessageBody { | ||
| 161 | my ( $self, $value ) = @_; | ||
| 162 | |||
| 163 | $self->{_fields}->{MessageBody}->{FieldValue} = $value; | ||
| 164 | return $self; | ||
| 165 | } | ||
| 166 | |||
| 167 | sub withMessageBody { | ||
| 168 | my ( $self, $value ) = @_; | ||
| 169 | $self->setMessageBody($value); | ||
| 170 | return $self; | ||
| 171 | } | ||
| 172 | |||
| 173 | sub isSetMessageBody { | ||
| 174 | return defined( shift->{_fields}->{MessageBody}->{FieldValue} ); | ||
| 175 | } | ||
| 176 | |||
| 177 | sub getMessageAttribute { | ||
| 178 | return shift->{_fields}->{MessageAttribute}->{FieldValue}; | ||
| 179 | } | ||
| 180 | |||
| 181 | sub setMessageAttribute { | ||
| 182 | my ( $self, @args ) = @_; | ||
| 183 | |||
| 184 | foreach my $attribute (@args) { | ||
| 185 | if ( not $self->_isArrayRef($attribute) ) { | ||
| 186 | $attribute = [$attribute]; | ||
| 187 | } | ||
| 188 | |||
| 189 | $self->{_fields}->{MessageAttribute}->{FieldValue} = $attribute; | ||
| 190 | } | ||
| 191 | |||
| 192 | return; | ||
| 193 | } | ||
| 194 | |||
| 195 | sub withMessageAttribute { | ||
| 196 | my ( $self, $attributeArgs ) = @_; | ||
| 197 | |||
| 198 | foreach my $attribute ( @{$attributeArgs} ) { | ||
| 199 | $self->{_fields}->{MessageAttribute}->{FieldValue} = $attribute; | ||
| 200 | } | ||
| 201 | return $self; | ||
| 202 | } | ||
| 203 | |||
| 204 | sub isSetMessageAttribute { | ||
| 205 | return scalar( @{ shift->{_fields}->{MessageAttribute}->{FieldValue} } ) > 0; | ||
| 206 | } | ||
| 207 | |||
| 208 | 1; | ||
| 209 | |||
| 210 | __END__ |