File Coverage

blib/lib/Cfn/Resource/AWS/Lambda/EventSourceMapping.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 12 12 100.0
pod 0 2 0.0
total 44 46 95.6


line stmt bran cond sub pod time code
1             # AWS::Lambda::EventSourceMapping generated from spec 21.0.0
2 2     2   1403 use Moose::Util::TypeConstraints;
  2         7  
  2         24  
3              
4             coerce 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::Lambda::EventSourceMapping {
9 2     2   4397 use Moose;
  2         6  
  2         14  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 6 [ 'Id' ]
15             }
16             sub supported_regions {
17 1     1 0 1115 [ 'af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-1','eu-central-1','eu-north-1','eu-south-1','eu-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-gov-east-1','us-gov-west-1','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::OnFailure',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::OnFailure',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::OnFailure->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::OnFailure {
37 2     2   14902 use Moose;
  2         7  
  2         23  
38 2     2   13874 use MooseX::StrictConstructor;
  2         6  
  2         24  
39             extends 'Cfn::Value::TypedValue';
40            
41             has Destination => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             }
43             subtype 'ArrayOfCfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration',
44             as 'Cfn::Value',
45             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
46             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
47              
48             coerce 'ArrayOfCfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             die 'Only accepts functions';
55             }
56             },
57             from 'ArrayRef',
58             via {
59             Cfn::Value::Array->new(Value => [
60             map {
61             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration')->coerce($_)
62             } @$_
63             ]);
64             };
65              
66             subtype 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration',
67             as 'Cfn::Value';
68              
69             coerce 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration',
70             from 'HashRef',
71             via {
72             if (my $f = Cfn::TypeLibrary::try_function($_)) {
73             return $f
74             } else {
75             return Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration->new( %$_ );
76             }
77             };
78              
79             package Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration {
80 2     2   8264 use Moose;
  2         5  
  2         13  
81 2     2   14243 use MooseX::StrictConstructor;
  2         19  
  2         15  
82             extends 'Cfn::Value::TypedValue';
83            
84             has Type => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
85             has URI => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             }
87              
88             subtype 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::DestinationConfig',
89             as 'Cfn::Value';
90              
91             coerce 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::DestinationConfig',
92             from 'HashRef',
93             via {
94             if (my $f = Cfn::TypeLibrary::try_function($_)) {
95             return $f
96             } else {
97             return Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::DestinationConfig->new( %$_ );
98             }
99             };
100              
101             package Cfn::Resource::Properties::Object::AWS::Lambda::EventSourceMapping::DestinationConfig {
102 2     2   7123 use Moose;
  2         8  
  2         11  
103 2     2   13433 use MooseX::StrictConstructor;
  2         5  
  2         11  
104             extends 'Cfn::Value::TypedValue';
105            
106             has OnFailure => (isa => 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::OnFailure', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
107             }
108              
109             package Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping {
110 2     2   6661 use Moose;
  2         6  
  2         13  
111 2     2   13431 use MooseX::StrictConstructor;
  2         7  
  2         10  
112             extends 'Cfn::Resource::Properties';
113            
114             has BatchSize => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
115             has BisectBatchOnFunctionError => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
116             has DestinationConfig => (isa => 'Cfn::Resource::Properties::AWS::Lambda::EventSourceMapping::DestinationConfig', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
117             has Enabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
118             has EventSourceArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
119             has FunctionName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
120             has MaximumBatchingWindowInSeconds => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has MaximumRecordAgeInSeconds => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has MaximumRetryAttempts => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
123             has ParallelizationFactor => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
124             has PartialBatchResponse => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
125             has Queues => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
126             has SourceAccessConfigurations => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Lambda::EventSourceMapping::SourceAccessConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
127             has StartingPosition => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
128             has Topics => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
129             has TumblingWindowInSeconds => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
130             }
131              
132             1;
133             ### main pod documentation begin ###
134              
135             =encoding UTF-8
136              
137             =head1 NAME
138              
139             Cfn::Resource::AWS::Lambda::EventSourceMapping - Cfn resource for AWS::Lambda::EventSourceMapping
140              
141             =head1 DESCRIPTION
142              
143             This module implements a Perl module that represents the CloudFormation object AWS::Lambda::EventSourceMapping.
144              
145             See L<Cfn> for more information on how to use it.
146              
147             =head1 AUTHOR
148              
149             Jose Luis Martinez
150             CAPSiDE
151             jlmartinez@capside.com
152              
153             =head1 COPYRIGHT and LICENSE
154              
155             Copyright (c) 2013 by CAPSiDE
156             This code is distributed under the Apache 2 License. The full text of the
157             license can be found in the LICENSE file included with this module.
158              
159             =cut