- Name: %s
-
- Type
-
%s
- Description
-
%s
push @members, sprintf $item, $m, $type, $description; } } my @limits; foreach (qw( max min pattern )) { if ( $shape->{$_} ) { push @limits, sprintf "=item %s: %s\n", $_, $shape->{$_}; } } my $lc_name = snake_case $shape_name; my %parameters = ( to_template_var('see_also') => join( "$COMMA ", @see_also ), to_template_var('lc_name') => $lc_name, to_template_var('package_name') => $shape_name, to_template_var('program_name') => $PROGRAM_NAME, to_template_var('timestamp') => scalar(localtime), to_template_var('class') => $shape_class, to_template_var('shape') => JSON->new->pretty->encode($shape), to_template_var('service') => $service, to_template_var('description') => $description, to_template_var('type') => $type, to_template_var('required') => $required, to_template_var('members') => join( "\n", @members ) . "\n", to_template_var('limits') => join( "\n", @limits ) . "\n", ); my $synopsis; if ( !$shape->{members}->{message} ) { $synopsis = <<'END_OF_POD'; =head1 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@
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 360:
'=item' outside of any '=over'
- Around line 372:
=back doesn't take any parameters, but you said =back END_OF_ITEM
- Around line 484:
You forgot a '=back' before '=head1'