« lib/Amazon/SQS/Model/ChangeMessageVisibilityRequest.pm
↑ Summary
lib/Amazon/SQS/Model/DeleteMessageBatchRequestEntry.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::Attribute; | ||
| 22 | |||
| 23 | use base qw (Amazon::SQS::Model); | ||
| 24 | |||
| 25 | =pod | ||
| 26 | |||
| 27 | =head1 NAME | ||
| 28 | |||
| 29 | Amazon::SQS::Model::Attribute | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $attribute = new Amazon::SQS::Model::Attribute( | ||
| 34 | { | ||
| 35 | Name => 'VisibilityTimeout', | ||
| 36 | Value => '60' | ||
| 37 | } | ||
| 38 | ); | ||
| 39 | |||
| 40 | =head1 DESCRIPTION | ||
| 41 | |||
| 42 | Create an attribute object for use with various SQS API requests. | ||
| 43 | |||
| 44 | =head1 METHODS | ||
| 45 | |||
| 46 | =head2 new | ||
| 47 | |||
| 48 | new( options ) | ||
| 49 | |||
| 50 | C<options> is a hash reference that contains the attribute name and value. | ||
| 51 | |||
| 52 | =over 5 | ||
| 53 | |||
| 54 | =item Name | ||
| 55 | |||
| 56 | =item Value | ||
| 57 | |||
| 58 | =back | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | sub new { | ||
| 63 | my ($class, $data) = @_; | ||
| 64 | my $self = {}; | ||
| 65 | $self->{_fields} = { | ||
| 66 | |||
| 67 | Name => { FieldValue => undef, FieldType => "string"}, | ||
| 68 | Value => { FieldValue => undef, FieldType => "string"}, | ||
| 69 | }; | ||
| 70 | |||
| 71 | bless ($self, $class); | ||
| 72 | if (defined $data) { | ||
| 73 | $self->_fromHashRef($data); | ||
| 74 | } | ||
| 75 | |||
| 76 | return $self; | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | sub getName { | ||
| 81 | return shift->{_fields}->{Name}->{FieldValue}; | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | sub setName { | ||
| 86 | my ($self, $value) = @_; | ||
| 87 | |||
| 88 | $self->{_fields}->{Name}->{FieldValue} = $value; | ||
| 89 | return $self; | ||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 93 | sub withName { | ||
| 94 | my ($self, $value) = @_; | ||
| 95 | $self->setName($value); | ||
| 96 | return $self; | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | sub isSetName { | ||
| 101 | return defined (shift->{_fields}->{Name}->{FieldValue}); | ||
| 102 | } | ||
| 103 | |||
| 104 | |||
| 105 | sub getValue { | ||
| 106 | return shift->{_fields}->{Value}->{FieldValue}; | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
| 110 | sub setValue { | ||
| 111 | my ($self, $value) = @_; | ||
| 112 | |||
| 113 | $self->{_fields}->{Value}->{FieldValue} = $value; | ||
| 114 | return $self; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 118 | sub withValue { | ||
| 119 | my ($self, $value) = @_; | ||
| 120 | $self->setValue($value); | ||
| 121 | return $self; | ||
| 122 | } | ||
| 123 | |||
| 124 | |||
| 125 | sub isSetValue { | ||
| 126 | return defined (shift->{_fields}->{Value}->{FieldValue}); | ||
| 127 | } | ||
| 128 | |||
| 129 | |||
| 130 | =pod | ||
| 131 | |||
| 132 | =head1 SEE OTHER | ||
| 133 | |||
| 134 | C<Amazon::SQS::Client> | ||
| 135 | |||
| 136 | =head1 AUTHOR | ||
| 137 | |||
| 138 | Elena@AWS | ||
| 139 | |||
| 140 | =cut | ||
| 141 | |||
| 142 | |||
| 143 | 1; |