package WebService::ForecastIo::Alert;
use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Types::URI 'Uri';
class_type 'WebService::ForecastIo::Alert';
subtype 'WebService::ForecastIo::AlertArray',
as 'ArrayRef[WebService::ForecastIo::Alert]';
coerce 'WebService::ForecastIo::Alert', from 'HashRef',
via { WebService::ForecastIo::Alert->new($_) };
coerce 'WebService::ForecastIo::AlertArray', from 'ArrayRef[HashRef]',
via {
my $array = $_;
[ map { WebService::ForecastIo::Alert->new($_) }
@$array ]
};
has title => (
is => 'ro',
isa => 'Str',
);
has expires => (
is => 'ro',
isa => 'Int',
);
has uri => (
is => 'ro',
isa => Uri,
);
1;