« lib/Amazon/SQS/Model/DeleteQueueRequest.pm
↑ Summary
lib/Amazon/SQS/Model/SetQueueAttributesRequest.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 | |||
| 22 | package Amazon::SQS::Model::ListQueuesRequest; | ||
| 23 | |||
| 24 | use base qw (Amazon::SQS::Model); | ||
| 25 | |||
| 26 | =pod | ||
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Amazon::SQS::Model::ListQueuesRequest | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | my $request = new Amazon::SQS::Model::ListQueuesRequest( | ||
| 35 | { | ||
| 36 | QueueNamePrefix => 'some-prefix' | ||
| 37 | } | ||
| 38 | ); | ||
| 39 | |||
| 40 | =head1 DESCRIPTION | ||
| 41 | |||
| 42 | The ListQueues action returns a list of your queues. The maximum | ||
| 43 | number of queues that can be returned is 1000. If you specify a value | ||
| 44 | for the optional C<QueueNamePrefix> parameter, only queues with a name | ||
| 45 | beginning with the specified value are returned. | ||
| 46 | |||
| 47 | =head1 METHODS | ||
| 48 | |||
| 49 | =head2 new | ||
| 50 | |||
| 51 | new( options ) | ||
| 52 | |||
| 53 | =over 5 | ||
| 54 | |||
| 55 | =item QueueNamePrefix | ||
| 56 | |||
| 57 | String to use for filtering the list results. Only those queues whose | ||
| 58 | name begins with the specified string are returned. | ||
| 59 | |||
| 60 | =item Attribute | ||
| 61 | |||
| 62 | C<Amazon::SQS::Model::Attribute> | ||
| 63 | |||
| 64 | This is undocumented on AmazonE<039>s documentation page, however this | ||
| 65 | perl API apparently sends the attributes implying that you might be | ||
| 66 | able to list all queues that have a prefix of "some-prefix" AND have | ||
| 67 | some attribute. | ||
| 68 | |||
| 69 | Queue attributes are set when the queue is created and are listed below. | ||
| 70 | |||
| 71 | =over 5 | ||
| 72 | |||
| 73 | =item * VisibilityTimeout | ||
| 74 | |||
| 75 | The length of time (in seconds) that a message | ||
| 76 | received from a queue will be invisible to other receiving components | ||
| 77 | when they ask to receive messages. For more information about | ||
| 78 | VisibilityTimeout, see Visibility Timeout in the Amazon SQS Developer | ||
| 79 | Guide. | ||
| 80 | |||
| 81 | =item * Policy | ||
| 82 | |||
| 83 | The formal description of the permissions for a resource. For more | ||
| 84 | information about Policy, see Basic Policy Structure in the Amazon SQS | ||
| 85 | Developer Guide. | ||
| 86 | |||
| 87 | =item * MaximumMessageSize | ||
| 88 | |||
| 89 | The limit of how many bytes a message can contain before Amazon SQS rejects it. | ||
| 90 | |||
| 91 | =item * MessageRetentionPeriod | ||
| 92 | |||
| 93 | The number of seconds Amazon SQS retains a message. | ||
| 94 | |||
| 95 | =item * DelaySeconds | ||
| 96 | |||
| 97 | The time in seconds that the delivery of all messages in the queue | ||
| 98 | will be delayed. | ||
| 99 | |||
| 100 | =back | ||
| 101 | |||
| 102 | =back | ||
| 103 | |||
| 104 | =cut | ||
| 105 | |||
| 106 | |||
| 107 | sub new { | ||
| 108 | my ($class, $data) = @_; | ||
| 109 | |||
| 110 | my $self = {}; | ||
| 111 | |||
| 112 | $self->{_fields} = { | ||
| 113 | QueueNamePrefix => { FieldValue => undef, FieldType => "string"}, | ||
| 114 | Attribute => {FieldValue => [], FieldType => ["Amazon::SQS::Model::Attribute"]}, | ||
| 115 | }; | ||
| 116 | |||
| 117 | bless ($self, $class); | ||
| 118 | |||
| 119 | if (defined $data) { | ||
| 120 | $self->_fromHashRef($data); | ||
| 121 | } | ||
| 122 | |||
| 123 | return $self; | ||
| 124 | } | ||
| 125 | |||
| 126 | |||
| 127 | sub getQueueNamePrefix { | ||
| 128 | return shift->{_fields}->{QueueNamePrefix}->{FieldValue}; | ||
| 129 | } | ||
| 130 | |||
| 131 | |||
| 132 | sub setQueueNamePrefix { | ||
| 133 | my ($self, $value) = @_; | ||
| 134 | |||
| 135 | $self->{_fields}->{QueueNamePrefix}->{FieldValue} = $value; | ||
| 136 | return $self; | ||
| 137 | } | ||
| 138 | |||
| 139 | |||
| 140 | sub withQueueNamePrefix { | ||
| 141 | my ($self, $value) = @_; | ||
| 142 | $self->setQueueNamePrefix($value); | ||
| 143 | return $self; | ||
| 144 | } | ||
| 145 | |||
| 146 | |||
| 147 | sub isSetQueueNamePrefix { | ||
| 148 | return defined (shift->{_fields}->{QueueNamePrefix}->{FieldValue}); | ||
| 149 | } | ||
| 150 | |||
| 151 | sub getAttribute { | ||
| 152 | return shift->{_fields}->{Attribute}->{FieldValue}; | ||
| 153 | } | ||
| 154 | |||
| 155 | sub setAttribute { | ||
| 156 | my $self = shift; | ||
| 157 | foreach my $attribute (@_) { | ||
| 158 | if (not $self->_isArrayRef($attribute)) { | ||
| 159 | $attribute = [$attribute]; | ||
| 160 | } | ||
| 161 | $self->{_fields}->{Attribute}->{FieldValue} = $attribute; | ||
| 162 | } | ||
| 163 | } | ||
| 164 | |||
| 165 | sub withAttribute { | ||
| 166 | my ($self, $attributeArgs) = @_; | ||
| 167 | foreach my $attribute (@$attributeArgs) { | ||
| 168 | $self->{_fields}->{Attribute}->{FieldValue} = $attribute; | ||
| 169 | } | ||
| 170 | return $self; | ||
| 171 | } | ||
| 172 | |||
| 173 | |||
| 174 | sub isSetAttribute { | ||
| 175 | return scalar (@{shift->{_fields}->{Attribute}->{FieldValue}}) > 0; | ||
| 176 | } | ||
| 177 | |||
| 178 | =pod | ||
| 179 | |||
| 180 | =head1 SEE OTHER | ||
| 181 | |||
| 182 | C<Amazon::SQS::Client> | ||
| 183 | |||
| 184 | =head1 AUTHOR | ||
| 185 | |||
| 186 | Elena@AWS | ||
| 187 | |||
| 188 | =cut | ||
| 189 | |||
| 190 | 1; |