SYNOPSIS
my $@lc_name@ = @class@->new( $parameters );
END_OF_POD
$synopsis = render_template( $synopsis, \%parameters );
}
$parameters{ to_template_var('synopsis') } = $synopsis // $EMPTY;
my $pod = render_template( $shape_template, \%parameters );
return $pod;
}
1;
__DATA__
######################################################################## package @class@; ########################################################################
# Autogenerated on @timestamp@
use parent qw(Amazon::API::Botocore::Shape);
use strict; use warnings;
use JSON qw(decode_json);
our $SHAPE = <<'SHAPE'; @shape@ SHAPE
our $SHAPE_DEFINITION = decode_json($SHAPE);
######################################################################## sub new { ######################################################################## my ($class, @args ) = @_;
my $options = $SHAPE_DEFINITION;
my $type = $options->{type};
my $value;
# We may have to initialize other types (list?) as well although I
# think this is only valid for a Botocore request object. We want to
# avoid calling _init_value in the parent class during construction
# if the value is undefined which it will be when we instantiate a
# shape when creating a response object
if ( @args && ! $args[0] && $type eq 'structure' ) {
$value = {};
}
elsif (@args) {
$value = $args[0];
}
$options->{_value} = $value;
$options->{service} = '@service@';
my $self = $class->SUPER::new($options);
return $self;
}
1;
NAME
@class@
@synopsis@
DESCRIPTION
@description@
PARAMETERS
@members@
NOTE
You almost never need to actually instantiate these objects manually if you are using the APIs that are built using Botocore support. Data structures required for each API are created automatically for you from simple Perl objects. For example to create an SQS queue the Botocore documentation states that you need to pass the QueueName
, Attribute
and Tag
values.
my $result = $sqs->CreateQueue(
{
QueueName => 'foo',
Tag => [ { Name => 'foo' }, { Env => 'dev' } ],
Attribute => [ { VisibilityTimeout => 40 }, { DelaySeconds => 60 } ]
});
Each of these parameters is described in the Botocore metadata as one of several different shapes which ultimately are mapped to one of the data types below.
map
A map generally corresponds to an array of hashes which represent key/value pairs.
list
A list corresponds to an array. Lists can have a minimum or maximum length.
string
A string corresponds to a SCALAR containing a character string. The string may be constrained by a pattern or can be an enumeration.
integer
An integer corresponds to a SCALAR containing an integer value. The integer may have a max and minimum value.
boolean
A boolean values corresponds to a SCALAR containing the values 'true' or 'false'
Amazon::API::Botocore::Shape handles converting Perl data structures into shapes and eventually back into Perl data structures which can be properly serialized as input to the APIs.
SEE ALSO
Amazon::API, Amazon::API::Botocore::Shape @see_also@
AUTHOR
Autogenerated by @program_name@ on @timestamp@