update indentation, remove export

This commit is contained in:
William Cheng 2015-06-18 02:40:15 +08:00
parent 82baa7ce4b
commit 64b46c2e15
4 changed files with 276 additions and 281 deletions

View File

@ -22,14 +22,14 @@ use WWW::{{moduleName}}::Configuration;
sub new
{
my $class = shift;
my (%args) = (
'ua' => LWP::UserAgent->new,
'base_url' => '{{basePath}}',
@_
);
return bless \%args, $class;
my $class = shift;
my (%args) = (
'ua' => LWP::UserAgent->new,
'base_url' => '{{basePath}}',
@_
);
return bless \%args, $class;
}
# Set the user agent of the API client
@ -37,8 +37,8 @@ sub new
# @param string $user_agent The user agent of the API client
#
sub set_user_agent {
my ($self, $user_agent) = @_;
$self->{http_user_agent}= $user_agent;
my ($self, $user_agent) = @_;
$self->{http_user_agent}= $user_agent;
}
# Set timeout
@ -46,11 +46,11 @@ sub set_user_agent {
# @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
#
sub set_timeout {
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
my ($self, $seconds) = @_;
if (!looks_like_number($seconds)) {
croak('Timeout variable must be numeric.');
}
$self->{http_timeout} = $seconds;
}
# make the HTTP request
@ -61,71 +61,71 @@ sub set_timeout {
# @param array $headerParams parameters to be place in request header
# @return mixed
sub call_api {
my $self = shift;
my ($resource_path, $method, $query_params, $post_params, $header_params, $body_data, $auth_settings) = @_;
# update parameters based on authentication settings
$self->update_params_for_auth($header_params, $query_params, $auth_settings);
my $_url = $self->{base_url} . $resource_path;
# build query
if (%$query_params) {
$_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify });
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = %$post_params ? $post_params : $body_data;
# Make the HTTP request
my $_request;
if ($method eq 'POST') {
# multipart
$header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ?
'form-data' : $header_params->{'Content-Type'};
$_request = POST($_url, %$header_params, Content => $_body_data);
}
elsif ($method eq 'PUT') {
# multipart
$header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ?
'form-data' : $header_params->{'Content-Type'};
$_request = PUT($_url, %$header_params, Content => $_body_data);
}
elsif ($method eq 'GET') {
my $headers = HTTP::Headers->new(%$header_params);
$_request = GET($_url, %$header_params);
}
elsif ($method eq 'HEAD') {
my $headers = HTTP::Headers->new(%$header_params);
$_request = HEAD($_url,%$header_params);
}
elsif ($method eq 'DELETE') { #TODO support form data
my $headers = HTTP::Headers->new(%$header_params);
$_request = DELETE($_url, %$headers);
}
elsif ($method eq 'PATCH') { #TODO
}
else {
}
$self->{ua}->timeout($self->{http_timeout} || $WWW::{{moduleName}}::Configuration::http_timeout);
$self->{ua}->agent($self->{http_user_agent} || $WWW::{{moduleName}}::Configuration::http_user_agent);
my $self = shift;
my ($resource_path, $method, $query_params, $post_params, $header_params, $body_data, $auth_settings) = @_;
# update parameters based on authentication settings
$self->update_params_for_auth($header_params, $query_params, $auth_settings);
my $_url = $self->{base_url} . $resource_path;
# build query
if (%$query_params) {
$_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify });
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = %$post_params ? $post_params : $body_data;
# Make the HTTP request
my $_request;
if ($method eq 'POST') {
# multipart
$header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ?
'form-data' : $header_params->{'Content-Type'};
$_request = POST($_url, %$header_params, Content => $_body_data);
}
elsif ($method eq 'PUT') {
# multipart
$header_params->{'Content-Type'} = lc $header_params->{'Content-Type'} eq 'multipart/form' ?
'form-data' : $header_params->{'Content-Type'};
$_request = PUT($_url, %$header_params, Content => $_body_data);
}
elsif ($method eq 'GET') {
my $headers = HTTP::Headers->new(%$header_params);
$_request = GET($_url, %$header_params);
}
elsif ($method eq 'HEAD') {
my $headers = HTTP::Headers->new(%$header_params);
$_request = HEAD($_url,%$header_params);
}
elsif ($method eq 'DELETE') { #TODO support form data
my $headers = HTTP::Headers->new(%$header_params);
$_request = DELETE($_url, %$headers);
}
elsif ($method eq 'PATCH') { #TODO
}
else {
}
$self->{ua}->timeout($self->{http_timeout} || $WWW::{{moduleName}}::Configuration::http_timeout);
$self->{ua}->agent($self->{http_user_agent} || $WWW::{{moduleName}}::Configuration::http_user_agent);
my $_response = $self->{ua}->request($_request);
unless ($_response->is_success) {
croak("API Exception(".$_response->code."): ".$_response->message);
}
return $_response->content;
my $_response = $self->{ua}->request($_request);
unless ($_response->is_success) {
croak("API Exception(".$_response->code."): ".$_response->message);
}
return $_response->content;
}
# Take value and turn it into a string suitable for inclusion in
@ -180,13 +180,13 @@ sub to_form_value {
# @param string $value the value of the parameter
# @return string the header string
sub to_string {
my ($self, $value) = @_;
if (ref($value) eq "DateTime") { # datetime in ISO8601 format
return $value->datetime();
}
else {
return $value;
}
my ($self, $value) = @_;
if (ref($value) eq "DateTime") { # datetime in ISO8601 format
return $value->datetime();
}
else {
return $value;
}
}
# Deserialize a JSON string into an object
@ -196,55 +196,55 @@ sub to_string {
# @return object an instance of $class
sub deserialize
{
my ($self, $class, $data) = @_;
$log->debugf("deserializing %s for %s", $data, $class);
if (not defined $data) {
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
my ($self, $class, $data) = @_;
$log->debugf("deserializing %s for %s", $data, $class);
if (not defined $data) {
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
#TODO log error
}
} elsif ( (substr($class, 0, 6)) eq 'ARRAY[' ) { # array of data
return $data if $data eq '[]'; # return if empty array
my $_sub_class = substr($class, 6, -1);
my $_json_data = decode_json $data;
my @_values = ();
foreach my $_value (@$_json_data) {
if (ref $_value eq 'ARRAY') {
push @_values, $self->deserialize($_sub_class, encode_json $_value);
} else {
push @_values, $self->deserialize($_sub_class, $_value);
}
}
return \@_values;
} elsif ($class eq 'DateTime') {
return DateTime->from_epoch(epoch => str2time($data));
} elsif (grep /^$class$/, ('string', 'int', 'float', 'bool', 'object')) {
return $data;
} else { # model
my $_instance = use_module("WWW::{{moduleName}}::Object::$class")->new;
if (ref $data eq "HASH") {
return $_instance->from_hash($data);
} else { # string, need to json decode first
return $_instance->from_hash(decode_json $data);
}
}
return \%hash;
} else {
#TODO log error
}
} elsif ( (substr($class, 0, 6)) eq 'ARRAY[' ) { # array of data
return $data if $data eq '[]'; # return if empty array
my $_sub_class = substr($class, 6, -1);
my $_json_data = decode_json $data;
my @_values = ();
foreach my $_value (@$_json_data) {
if (ref $_value eq 'ARRAY') {
push @_values, $self->deserialize($_sub_class, encode_json $_value);
} else {
push @_values, $self->deserialize($_sub_class, $_value);
}
}
return \@_values;
} elsif ($class eq 'DateTime') {
return DateTime->from_epoch(epoch => str2time($data));
} elsif (grep /^$class$/, ('string', 'int', 'float', 'bool', 'object')) {
return $data;
} else { # model
my $_instance = use_module("WWW::{{moduleName}}::Object::$class")->new;
if (ref $data eq "HASH") {
return $_instance->from_hash($data);
} else { # string, need to json decode first
return $_instance->from_hash(decode_json $data);
}
}
}
# return 'Accept' based on an array of accept provided
@ -252,16 +252,16 @@ sub deserialize
# @return String Accept (e.g. application/json)
sub select_header_accept
{
my ($self, @header) = @_;
if (@header == 0 || (@header == 1 && $header[0] eq '')) {
return undef;
} elsif (grep(/^application\/json$/i, @header)) {
return 'application/json';
} else {
return join(',', @header);
}
my ($self, @header) = @_;
if (@header == 0 || (@header == 1 && $header[0] eq '')) {
return undef;
} elsif (grep(/^application\/json$/i, @header)) {
return 'application/json';
} else {
return join(',', @header);
}
}
# return the content type based on an array of content-type provided
@ -269,16 +269,16 @@ sub select_header_accept
# @return String Content-Type (e.g. application/json)
sub select_header_content_type
{
my ($self, @header) = @_;
if (@header == 0 || (@header == 1 && $header[0] eq '')) {
return 'application/json'; # default to application/json
} elsif (grep(/^application\/json$/i, @header)) {
return 'application/json';
} else {
return join(',', @header);
}
my ($self, @header) = @_;
if (@header == 0 || (@header == 1 && $header[0] eq '')) {
return 'application/json'; # default to application/json
} elsif (grep(/^application\/json$/i, @header)) {
return 'application/json';
} else {
return join(',', @header);
}
}
# Get API key (with prefix if set)
@ -288,9 +288,9 @@ sub get_api_key_with_prefix
{
my ($self, $api_key) = @_;
if ($WWW::{{moduleName}}::Configuration::api_key_prefix->{$api_key}) {
return $WWW::{{moduleName}}::Configuration::api_key_prefix->{$api_key}." ".$WWW::{{moduleName}}::Configuration::api_key->{$api_key};
return $WWW::{{moduleName}}::Configuration::api_key_prefix->{$api_key}." ".$WWW::{{moduleName}}::Configuration::api_key->{$api_key};
} else {
return $WWW::{{moduleName}}::Configuration::api_key->{$api_key};
return $WWW::{{moduleName}}::Configuration::api_key->{$api_key};
}
}
@ -300,24 +300,24 @@ sub get_api_key_with_prefix
# @param array $queryParams query parameters (by ref)
# @param array $authSettings array of authentication scheme (e.g ['api_key'])
sub update_params_for_auth {
my ($self, $header_params, $query_params, $auth_settings) = @_;
return if (!defined($auth_settings) || scalar(@$auth_settings) == 0);
# one endpoint can have more than 1 auth settings
foreach my $auth (@$auth_settings) {
# determine which one to use
if (!defined($auth)) {
my ($self, $header_params, $query_params, $auth_settings) = @_;
return if (!defined($auth_settings) || scalar(@$auth_settings) == 0);
# one endpoint can have more than 1 auth settings
foreach my $auth (@$auth_settings) {
# determine which one to use
if (!defined($auth)) {
}
{{#authMethods}}elsif ($auth eq '{{name}}') {
{{#isApiKey}}{{#isKeyInHeader}}$header_params->{'{{keyParamName}}'} = $self->get_api_key_with_prefix('{{keyParamName}}');{{/isKeyInHeader}}{{#isKeyInQuery}}$query_params->{'{{keyParamName}}'} = $self->get_api_key_with_prefix('{{keyParamName}}');{{/isKeyInQuery}}{{/isApiKey}}{{#isBasic}}$header_params->{'Authorization'} = 'Basic '.encode_base64($WWW::{{moduleName}}::Configuration::username.":".$WWW::{{moduleName}}::Configuration::password);{{/isBasic}}
{{#isOAuth}}# TODO support oauth{{/isOAuth}}
}
{{/authMethods}}
else {
# TODO show warning about security definition not found
}
}
{{#authMethods}}elsif ($auth eq '{{name}}') {
{{#isApiKey}}{{#isKeyInHeader}}$header_params->{'{{keyParamName}}'} = $self->get_api_key_with_prefix('{{keyParamName}}');{{/isKeyInHeader}}{{#isKeyInQuery}}$query_params->{'{{keyParamName}}'} = $self->get_api_key_with_prefix('{{keyParamName}}');{{/isKeyInQuery}}{{/isApiKey}}{{#isBasic}}$header_params->{'Authorization'} = 'Basic '.encode_base64($WWW::{{moduleName}}::Configuration::username.":".$WWW::{{moduleName}}::Configuration::password);{{/isBasic}}
{{#isOAuth}}# TODO support oauth{{/isOAuth}}
}
{{/authMethods}}
else {
# TODO show warning about security definition not found
}
}
}

View File

@ -21,56 +21,56 @@ use DateTime;
# return json string
sub to_hash {
return decode_json(JSON->new->convert_blessed->encode( shift ));
return decode_json(JSON->new->convert_blessed->encode( shift ));
}
# used by JSON for serialization
sub TO_JSON {
my $self = shift;
my $_data = {};
foreach my $_key (keys $self->get_attribute_map) {
if (defined $self->{$_key}) {
$_data->{$self->get_attribute_map->{$_key}} = $self->{$_key};
my $self = shift;
my $_data = {};
foreach my $_key (keys $self->get_attribute_map) {
if (defined $self->{$_key}) {
$_data->{$self->get_attribute_map->{$_key}} = $self->{$_key};
}
}
}
return $_data;
return $_data;
}
# from json string
sub from_hash {
my ($self, $hash) = @_;
# loop through attributes and use swagger_types to deserialize the data
while ( my ($_key, $_type) = each $self->get_swagger_types ) {
if ($_type =~ /^array\[/i) { # array
my $_subclass = substr($_type, 6, -1);
my @_array = ();
foreach my $_element (@{$hash->{$self->get_attribute_map->{$_key}}}) {
push @_array, $self->_deserialize($_subclass, $_element);
}
$self->{$_key} = \@_array;
} elsif (defined $hash->{$_key}) { #hash(model), primitive, datetime
$self->{$_key} = $self->_deserialize($_type, $hash->{$_key});
} else {
$log->debugf("warning: %s not defined\n", $_key);
my ($self, $hash) = @_;
# loop through attributes and use swagger_types to deserialize the data
while ( my ($_key, $_type) = each $self->get_swagger_types ) {
if ($_type =~ /^array\[/i) { # array
my $_subclass = substr($_type, 6, -1);
my @_array = ();
foreach my $_element (@{$hash->{$self->get_attribute_map->{$_key}}}) {
push @_array, $self->_deserialize($_subclass, $_element);
}
$self->{$_key} = \@_array;
} elsif (defined $hash->{$_key}) { #hash(model), primitive, datetime
$self->{$_key} = $self->_deserialize($_type, $hash->{$_key});
} else {
$log->debugf("warning: %s not defined\n", $_key);
}
}
}
return $self;
return $self;
}
# deserialize non-array data
sub _deserialize {
my ($self, $type, $data) = @_;
$log->debugf("deserializing %s with %s",Dumper($data), $type);
if ($type eq 'DateTime') {
return DateTime->from_epoch(epoch => str2time($data));
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::{{moduleName}}::Object::$type->new()";
return $_instance->from_hash($data);
}
my ($self, $type, $data) = @_;
$log->debugf("deserializing %s with %s",Dumper($data), $type);
if ($type eq 'DateTime') {
return DateTime->from_epoch(epoch => str2time($data));
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::{{moduleName}}::Object::$type->new()";
return $_instance->from_hash($data);
}
}
1;

View File

@ -30,12 +30,6 @@ use Log::Any qw($log);
use WWW::{{moduleName}}::ApiClient;
use WWW::{{moduleName}}::Configuration;
{{#operations}}
our @EXPORT_OK = qw(
{{#operation}}{{{nickname}}}
{{/operation}}
);
sub new {
my $class = shift;
my $default_api_client = $WWW::{{moduleName}}::Configuration::api_client ? $WWW::{{moduleName}}::Configuration::api_client : WWW::{{moduleName}}::ApiClient->new;
@ -52,89 +46,90 @@ sub new {
bless \%self, $class;
}
{{#operations}}
{{#operation}}
#
# {{{nickname}}}
#
# {{{summary}}}
#
{{#allParams}} # @param {{dataType}} ${{paramName}} {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
{{/allParams}} # @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
#
sub {{nickname}} {
my ($self, %args) = @_;
{{#operation}}
#
# {{{nickname}}}
#
# {{{summary}}}
#
{{#allParams}}# @param {{dataType}} ${{paramName}} {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
{{/allParams}}# @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
#
sub {{nickname}} {
my ($self, %args) = @_;
{{#allParams}}{{#required}}
# verify the required parameter '{{paramName}}' is set
unless (exists $args{'{{paramName}}'}) {
croak("Missing the required parameter '{{paramName}}' when calling {{nickname}}");
}
{{/required}}{{/allParams}}
{{#allParams}}{{#required}}
# verify the required parameter '{{paramName}}' is set
unless (exists $args{'{{paramName}}'}) {
croak("Missing the required parameter '{{paramName}}' when calling {{nickname}}");
}
{{/required}}{{/allParams}}
# parse inputs
my $_resource_path = '{{path}}';
$_resource_path =~ s/{format}/json/; # default format to json
# parse inputs
my $_resource_path = '{{path}}';
$_resource_path =~ s/{format}/json/; # default format to json
my $_method = '{{httpMethod}}';
my $query_params = {};
my $header_params = {};
my $form_params = {};
my $_method = '{{httpMethod}}';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept({{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}});
if ($_header_accept) {
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept({{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}});
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type({{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}});
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type({{#consumes}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/consumes}});
{{#queryParams}}# query params
if ( exists $args{'{{paramName}}'}) {
{{#queryParams}}# query params
if ( exists $args{'{{paramName}}'}) {
$query_params->{'{{baseName}}'} = $self->{api_client}->to_query_value($args{'{{paramName}}'});
}{{/queryParams}}
{{#headerParams}}# header params
if ( exists $args{'{{paramName}}'}) {
}{{/queryParams}}
{{#headerParams}}# header params
if ( exists $args{'{{paramName}}'}) {
$header_params->{'{{baseName}}'} = $self->{api_client}->to_header_value($args{'{{paramName}}'});
}{{/headerParams}}
{{#pathParams}}# path params
if ( exists $args{'{{paramName}}'}) {
}{{/headerParams}}
{{#pathParams}}# path params
if ( exists $args{'{{paramName}}'}) {
my $_base_variable = "{" . "{{baseName}}" . "}";
my $_base_value = $self->{api_client}->to_path_value($args{'{{paramName}}'});
$_resource_path =~ s/$_base_variable/$_base_value/g;
}{{/pathParams}}
{{#formParams}}# form params
if ( exists $args{'{{paramName}}'} ) {
}{{/pathParams}}
{{#formParams}}# form params
if ( exists $args{'{{paramName}}'} ) {
{{#isFile}}$form_params->{'{{baseName}}'} = [] unless defined $form_params->{'{{baseName}}'};
push $form_params->{'{{baseName}}'}, $args{'{{paramName}}'};
{{/isFile}}
{{^isFile}}$form_params->{'{{baseName}}'} = $self->{api_client}->to_form_value($args{'{{paramName}}'});
{{/isFile}}
}{{/formParams}}
my $_body_data;
{{#bodyParams}}# body params
if ( exists $args{'{{paramName}}'}) {
}{{/formParams}}
my $_body_data;
{{#bodyParams}}# body params
if ( exists $args{'{{paramName}}'}) {
$_body_data = $args{'{{paramName}}'};
}{{/bodyParams}}
}{{/bodyParams}}
# authentication setting, if any
my $auth_settings = [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}];
# authentication setting, if any
my $auth_settings = [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}];
# make the API Call
{{#returnType}}my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
# make the API Call
{{#returnType}}my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('{{returnType}}', $response);
return $_response_object;{{/returnType}}
{{^returnType}}$self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
{{/returnType}}
}
{{/operation}}
}
my $_response_object = $self->{api_client}->deserialize('{{returnType}}', $response);
return $_response_object;{{/returnType}}
{{^returnType}}$self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
{{/returnType}}
}
{{/operation}}
{{newline}}
{{/operations}}

View File

@ -22,13 +22,13 @@ use base "WWW::{{moduleName}}::Object::BaseObject";
#
my $swagger_types = {
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
};
my $attribute_map = {
{{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
{{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}},
{{/hasMore}}{{/vars}}
};
# new object
@ -45,12 +45,12 @@ sub new {
# get swagger type of the attribute
sub get_swagger_types {
return $swagger_types;
return $swagger_types;
}
# get attribute mappping
sub get_attribute_map {
return $attribute_map;
return $attribute_map;
}
1;