« lib/Amazon/SQS/Model/ReceiveMessageResult.pm
↑ Summary
lib/Amazon/SQS/Model/DeleteMessageBatchRequest.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::ChangeMessageVisibilityBatchRequest; | ||
| 31 | |||
| 32 | use base qw (Amazon::SQS::Model); | ||
| 33 | |||
| 34 | # | ||
| 35 | # Amazon::SQS::Model::ChangeMessageVisibilityBatchRequest | ||
| 36 | # | ||
| 37 | # Properties: | ||
| 38 | # | ||
| 39 | # | ||
| 40 | # QueueUrl: string | ||
| 41 | # BatchRequest: Amazon::SQS::Model::ChangeMessageVisibilityBatchRequestEntry | ||
| 42 | # | ||
| 43 | # | ||
| 44 | sub new { | ||
| 45 | my ($class, $data) = @_; | ||
| 46 | my $self = {}; | ||
| 47 | $self->{_fields} = { | ||
| 48 | QueueUrl => { FieldValue => undef, FieldType => "string"}, | ||
| 49 | BatchRequest => {FieldValue => [], FieldType => ["Amazon::SQS::Model::ChangeMessageVisibilityBatchRequestEntry"]}, | ||
| 50 | }; | ||
| 51 | |||
| 52 | bless ($self, $class); | ||
| 53 | if (defined $data) { | ||
| 54 | $self->_fromHashRef($data); | ||
| 55 | } | ||
| 56 | |||
| 57 | return $self; | ||
| 58 | } | ||
| 59 | |||
| 60 | sub getQueueUrl { | ||
| 61 | return shift->{_fields}->{QueueUrl}->{FieldValue}; | ||
| 62 | } | ||
| 63 | |||
| 64 | |||
| 65 | sub setQueueUrl { | ||
| 66 | my ($self, $value) = @_; | ||
| 67 | |||
| 68 | $self->{_fields}->{QueueUrl}->{FieldValue} = $value; | ||
| 69 | return $self; | ||
| 70 | } | ||
| 71 | |||
| 72 | |||
| 73 | sub withQueueUrl { | ||
| 74 | my ($self, $value) = @_; | ||
| 75 | $self->setQueueUrl($value); | ||
| 76 | return $self; | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | sub isSetQueueUrl { | ||
| 81 | return defined (shift->{_fields}->{QueueUrl}->{FieldValue}); | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | |||
| 86 | sub getBatchRequest { | ||
| 87 | return shift->{_fields}->{BatchRequest}->{FieldValue}; | ||
| 88 | } | ||
| 89 | |||
| 90 | sub setBatchRequest { | ||
| 91 | my $self = shift; | ||
| 92 | foreach my $attribute (@_) { | ||
| 93 | if (not $self->_isArrayRef($attribute)) { | ||
| 94 | $attribute = [$attribute]; | ||
| 95 | } | ||
| 96 | $self->{_fields}->{BatchRequest}->{FieldValue} = $attribute; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | |||
| 100 | sub withBatchRequest { | ||
| 101 | my ($self, $attributeArgs) = @_; | ||
| 102 | foreach my $attribute (@$attributeArgs) { | ||
| 103 | $self->{_fields}->{BatchRequest}->{FieldValue} = $attribute; | ||
| 104 | } | ||
| 105 | return $self; | ||
| 106 | } | ||
| 107 | |||
| 108 | |||
| 109 | sub isSetBatchRequest { | ||
| 110 | return scalar (@{shift->{_fields}->{BatchRequest}->{FieldValue}}) > 0; | ||
| 111 | } | ||
| 112 | |||
| 113 | 1; |