« lib/Amazon/SQS/Model/CreateQueueRequest.pm
↑ Summary
lib/Amazon/SQS/Model/ChangeMessageVisibilityResponse.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::AddPermissionResponse; | ||
| 23 | |||
| 24 | use base qw (Amazon::SQS::Model); | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | # | ||
| 29 | # Amazon::SQS::Model::AddPermissionResponse | ||
| 30 | # | ||
| 31 | # Properties: | ||
| 32 | # | ||
| 33 | # | ||
| 34 | # ResponseMetadata: Amazon::SQS::Model::ResponseMetadata | ||
| 35 | # | ||
| 36 | # | ||
| 37 | # | ||
| 38 | sub new { | ||
| 39 | my ($class, $data) = @_; | ||
| 40 | my $self = {}; | ||
| 41 | $self->{_fields} = { | ||
| 42 | |||
| 43 | ResponseMetadata => {FieldValue => undef, FieldType => "Amazon::SQS::Model::ResponseMetadata"}, | ||
| 44 | }; | ||
| 45 | |||
| 46 | bless ($self, $class); | ||
| 47 | if (defined $data) { | ||
| 48 | $self->_fromHashRef($data); | ||
| 49 | } | ||
| 50 | |||
| 51 | return $self; | ||
| 52 | } | ||
| 53 | |||
| 54 | |||
| 55 | # | ||
| 56 | # Construct Amazon::SQS::Model::AddPermissionResponse from XML string | ||
| 57 | # | ||
| 58 | sub fromXML { | ||
| 59 | my ($self, $xml) = @_; | ||
| 60 | eval "use XML::Simple"; | ||
| 61 | my $tree = XML::Simple::XMLin ($xml); | ||
| 62 | |||
| 63 | # TODO: check valid XML (is this a response XML?) | ||
| 64 | |||
| 65 | return new Amazon::SQS::Model::AddPermissionResponse($tree); | ||
| 66 | |||
| 67 | } | ||
| 68 | |||
| 69 | sub getResponseMetadata { | ||
| 70 | return shift->{_fields}->{ResponseMetadata}->{FieldValue}; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | sub setResponseMetadata { | ||
| 75 | my ($self, $value) = @_; | ||
| 76 | $self->{_fields}->{ResponseMetadata}->{FieldValue} = $value; | ||
| 77 | } | ||
| 78 | |||
| 79 | |||
| 80 | sub withResponseMetadata { | ||
| 81 | my ($self, $value) = @_; | ||
| 82 | $self->setResponseMetadata($value); | ||
| 83 | return $self; | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | sub isSetResponseMetadata { | ||
| 88 | return defined (shift->{_fields}->{ResponseMetadata}->{FieldValue}); | ||
| 89 | |||
| 90 | } | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | # | ||
| 95 | # XML Representation for this object | ||
| 96 | # | ||
| 97 | # Returns string XML for this object | ||
| 98 | # | ||
| 99 | sub toXML { | ||
| 100 | my $self = shift; | ||
| 101 | my $xml = ""; | ||
| 102 | $xml .= "<AddPermissionResponse xmlns=\"http://queue.amazonaws.com/doc/2009-02-01/\">"; | ||
| 103 | $xml .= $self->_toXMLFragment(); | ||
| 104 | $xml .= "</AddPermissionResponse>"; | ||
| 105 | return $xml; | ||
| 106 | } | ||
| 107 | |||
| 108 | |||
| 109 | 1; |