| 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::ChangeMessageVisibilityRequest; | ||
| 23 | |||
| 24 | use base qw (Amazon::SQS::Model); | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | # | ||
| 29 | # Amazon::SQS::Model::ChangeMessageVisibilityRequest | ||
| 30 | # | ||
| 31 | # Properties: | ||
| 32 | # | ||
| 33 | # | ||
| 34 | # QueueUrl: string | ||
| 35 | # ReceiptHandle: string | ||
| 36 | # VisibilityTimeout: int | ||
| 37 | # Attribute: Amazon::SQS::Model::Attribute | ||
| 38 | # | ||
| 39 | # | ||
| 40 | # | ||
| 41 | sub new { | ||
| 42 | my ($class, $data) = @_; | ||
| 43 | my $self = {}; | ||
| 44 | $self->{_fields} = { | ||
| 45 | |||
| 46 | QueueUrl => { FieldValue => undef, FieldType => "string"}, | ||
| 47 | ReceiptHandle => { FieldValue => undef, FieldType => "string"}, | ||
| 48 | VisibilityTimeout => { FieldValue => undef, FieldType => "int"}, | ||
| 49 | Attribute => {FieldValue => [], FieldType => ["Amazon::SQS::Model::Attribute"]}, | ||
| 50 | }; | ||
| 51 | |||
| 52 | bless ($self, $class); | ||
| 53 | if (defined $data) { | ||
| 54 | $self->_fromHashRef($data); | ||
| 55 | } | ||
| 56 | |||
| 57 | return $self; | ||
| 58 | } | ||
| 59 | |||
| 60 | |||
| 61 | sub getQueueUrl { | ||
| 62 | return shift->{_fields}->{QueueUrl}->{FieldValue}; | ||
| 63 | } | ||
| 64 | |||
| 65 | |||
| 66 | sub setQueueUrl { | ||
| 67 | my ($self, $value) = @_; | ||
| 68 | |||
| 69 | $self->{_fields}->{QueueUrl}->{FieldValue} = $value; | ||
| 70 | return $self; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | sub withQueueUrl { | ||
| 75 | my ($self, $value) = @_; | ||
| 76 | $self->setQueueUrl($value); | ||
| 77 | return $self; | ||
| 78 | } | ||
| 79 | |||
| 80 | |||
| 81 | sub isSetQueueUrl { | ||
| 82 | return defined (shift->{_fields}->{QueueUrl}->{FieldValue}); | ||
| 83 | } | ||
| 84 | |||
| 85 | |||
| 86 | sub getReceiptHandle { | ||
| 87 | return shift->{_fields}->{ReceiptHandle}->{FieldValue}; | ||
| 88 | } | ||
| 89 | |||
| 90 | |||
| 91 | sub setReceiptHandle { | ||
| 92 | my ($self, $value) = @_; | ||
| 93 | |||
| 94 | $self->{_fields}->{ReceiptHandle}->{FieldValue} = $value; | ||
| 95 | return $self; | ||
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | sub withReceiptHandle { | ||
| 100 | my ($self, $value) = @_; | ||
| 101 | $self->setReceiptHandle($value); | ||
| 102 | return $self; | ||
| 103 | } | ||
| 104 | |||
| 105 | |||
| 106 | sub isSetReceiptHandle { | ||
| 107 | return defined (shift->{_fields}->{ReceiptHandle}->{FieldValue}); | ||
| 108 | } | ||
| 109 | |||
| 110 | |||
| 111 | sub getVisibilityTimeout { | ||
| 112 | return shift->{_fields}->{VisibilityTimeout}->{FieldValue}; | ||
| 113 | } | ||
| 114 | |||
| 115 | |||
| 116 | sub setVisibilityTimeout { | ||
| 117 | my ($self, $value) = @_; | ||
| 118 | |||
| 119 | $self->{_fields}->{VisibilityTimeout}->{FieldValue} = $value; | ||
| 120 | return $self; | ||
| 121 | } | ||
| 122 | |||
| 123 | |||
| 124 | sub withVisibilityTimeout { | ||
| 125 | my ($self, $value) = @_; | ||
| 126 | $self->setVisibilityTimeout($value); | ||
| 127 | return $self; | ||
| 128 | } | ||
| 129 | |||
| 130 | |||
| 131 | sub isSetVisibilityTimeout { | ||
| 132 | return defined (shift->{_fields}->{VisibilityTimeout}->{FieldValue}); | ||
| 133 | } | ||
| 134 | |||
| 135 | sub getAttribute { | ||
| 136 | return shift->{_fields}->{Attribute}->{FieldValue}; | ||
| 137 | } | ||
| 138 | |||
| 139 | sub setAttribute { | ||
| 140 | my $self = shift; | ||
| 141 | foreach my $attribute (@_) { | ||
| 142 | if (not $self->_isArrayRef($attribute)) { | ||
| 143 | $attribute = [$attribute]; | ||
| 144 | } | ||
| 145 | $self->{_fields}->{Attribute}->{FieldValue} = $attribute; | ||
| 146 | } | ||
| 147 | } | ||
| 148 | |||
| 149 | sub withAttribute { | ||
| 150 | my ($self, $attributeArgs) = @_; | ||
| 151 | foreach my $attribute (@$attributeArgs) { | ||
| 152 | $self->{_fields}->{Attribute}->{FieldValue} = $attribute; | ||
| 153 | } | ||
| 154 | return $self; | ||
| 155 | } | ||
| 156 | |||
| 157 | sub isSetAttribute { | ||
| 158 | return scalar (@{shift->{_fields}->{Attribute}->{FieldValue}}) > 0; | ||
| 159 | } | ||
| 160 | |||
| 161 | 1; |