File Coverage

blib/lib/Cfn/Resource/AWS/ElasticLoadBalancingV2/LoadBalancer.pm
Criterion Covered Total %
statement 26 26 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 0 2 0.0
total 36 38 94.7


line stmt bran cond sub pod time code
1             # AWS::ElasticLoadBalancingV2::LoadBalancer generated from spec 20.1.0
2 4     4   3174 use Moose::Util::TypeConstraints;
  4         14  
  4         46  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ElasticLoadBalancingV2::LoadBalancer {
9 4     4   9632 use Moose;
  4         15  
  4         34  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 6 [ 'CanonicalHostedZoneID','DNSName','LoadBalancerFullName','LoadBalancerName','SecurityGroups' ]
15             }
16             sub supported_regions {
17 1     1 0 1134 [ '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             subtype 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping',
23             as 'Cfn::Value',
24             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
25             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
26              
27             coerce 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping',
28             from 'HashRef',
29             via {
30             if (my $f = Cfn::TypeLibrary::try_function($_)) {
31             return $f
32             } else {
33             die 'Only accepts functions';
34             }
35             },
36             from 'ArrayRef',
37             via {
38             Cfn::Value::Array->new(Value => [
39             map {
40             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping')->coerce($_)
41             } @$_
42             ]);
43             };
44              
45             subtype 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::Object::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping {
59 4     4   31962 use Moose;
  4         14  
  4         21  
60 4     4   27575 use MooseX::StrictConstructor;
  4         11  
  4         39  
61             extends 'Cfn::Value::TypedValue';
62            
63             has AllocationId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has IPv6Address => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             has PrivateIPv4Address => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
66             has SubnetId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
67             }
68             subtype 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute',
69             as 'Cfn::Value',
70             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
71             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
72              
73             coerce 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute',
74             from 'HashRef',
75             via {
76             if (my $f = Cfn::TypeLibrary::try_function($_)) {
77             return $f
78             } else {
79             die 'Only accepts functions';
80             }
81             },
82             from 'ArrayRef',
83             via {
84             Cfn::Value::Array->new(Value => [
85             map {
86             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute')->coerce($_)
87             } @$_
88             ]);
89             };
90              
91             subtype 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute',
92             as 'Cfn::Value';
93              
94             coerce 'Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute',
95             from 'HashRef',
96             via {
97             if (my $f = Cfn::TypeLibrary::try_function($_)) {
98             return $f
99             } else {
100             return Cfn::Resource::Properties::Object::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute->new( %$_ );
101             }
102             };
103              
104             package Cfn::Resource::Properties::Object::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute {
105 4     4   15670 use Moose;
  4         11  
  4         38  
106 4     4   27088 use MooseX::StrictConstructor;
  4         20  
  4         26  
107             extends 'Cfn::Value::TypedValue';
108            
109             has Key => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             has Value => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111             }
112              
113             package Cfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer {
114 4     4   13776 use Moose;
  4         13  
  4         24  
115 4     4   26747 use MooseX::StrictConstructor;
  4         19  
  4         26  
116             extends 'Cfn::Resource::Properties';
117            
118             has IpAddressType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
119             has LoadBalancerAttributes => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::LoadBalancerAttribute', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
120             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
121             has Scheme => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
122             has SecurityGroups => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
123             has SubnetMappings => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ElasticLoadBalancingV2::LoadBalancer::SubnetMapping', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
124             has Subnets => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
125             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
126             has Type => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
127             }
128              
129             1;
130             ### main pod documentation begin ###
131              
132             =encoding UTF-8
133              
134             =head1 NAME
135              
136             Cfn::Resource::AWS::ElasticLoadBalancingV2::LoadBalancer - Cfn resource for AWS::ElasticLoadBalancingV2::LoadBalancer
137              
138             =head1 DESCRIPTION
139              
140             This module implements a Perl module that represents the CloudFormation object AWS::ElasticLoadBalancingV2::LoadBalancer.
141              
142             See L<Cfn> for more information on how to use it.
143              
144             =head1 AUTHOR
145              
146             Jose Luis Martinez
147             CAPSiDE
148             jlmartinez@capside.com
149              
150             =head1 COPYRIGHT and LICENSE
151              
152             Copyright (c) 2013 by CAPSiDE
153             This code is distributed under the Apache 2 License. The full text of the
154             license can be found in the LICENSE file included with this module.
155              
156             =cut