1package VM::EC2::DB::Engine::Version;
2
3=head1 NAME
4
5VM::EC2::DB::Engine::Version - An RDS Database Engine Version
6
7=head1 SYNOPSIS
8
9 use VM::EC2;
10 $ec2 = VM::EC2->new(...);
11 @versions = $ec2->describe_db_engine_versions;
12 print $_,"\n" foreach grep { $_->Engine eq 'mysql' } @versions;
13
14=head1 DESCRIPTION
15
16This object represents a DB Engine Version, returned from a call to
17VM::EC2->describe_db_engine_versions().
18
19=head1 STRING OVERLOADING
20
21In string context, this object return the DBEngineVersionDescription.
22
23=head1 SEE ALSO
24
25L<VM::EC2>
26L<VM::EC2::Generic>
27L<VM::EC2::DB::Instance>
28
29=head1 AUTHOR
30
31Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
32
33Copyright (c) 2013 Loyalty Methods, Inc.
34
35This package and its accompanying libraries is free software; you can
36redistribute it and/or modify it under the terms of the GPL (either
37version 1, or at your option, any later version) or the Artistic
38License 2.0.  Refer to LICENSE for the full license text. In addition,
39please see DISCLAIMER.txt for disclaimers of warranty.
40
41=cut
42
43use strict;
44use base 'VM::EC2::Generic';
45use VM::EC2::DB::CharacterSet;
46
47use overload '""' => sub { shift->DBEngineVersionDescription },
48    fallback => 1;
49
50
51sub valid_fields {
52    my $self = shift;
53    return qw(DBEngineDescription DBEngineVersionDescription DBParameterGroupFamily
54              DefaultCharacterSet Engine EngineVersion SupportedCharacterSets);
55}
56
57sub DefaultCharacterSet {
58    my $self = shift;
59    my $charset = $self->SUPER::DefaultCharacterSet;
60    return VM::EC2::DB::CharacterSet->new($charset,$self->aws);
61}
62
63sub SupportedCharacterSets {
64    my $self = shift;
65    my $charsets = $self->SUPER::SupportedCharacterSets;
66    return map { VM::EC2::DB::CharacterSet->new($_,$self->aws) } @{$charsets->{CharacterSet}};
67}
68
69sub engine_description { shift->DBEngineDescription }
70
71sub description { shift->DBEngineVersionDescription }
72
73sub param_group_family { shift->DBParameterGroupFamily }
74
75sub default_charset { shift->DefaultCharacterSet }
76
77sub supported_charsets { shift->SupportedCharacterSets }
78
791;
80