File Coverage

blib/lib/Cfn/Resource/AWS/CodeCommit/Repository.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::CodeCommit::Repository generated from spec 5.3.0
2 2     2   1448 use Moose::Util::TypeConstraints;
  2         6  
  2         21  
3              
4             coerce 'Cfn::Resource::Properties::AWS::CodeCommit::Repository',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::CodeCommit::Repository->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::CodeCommit::Repository {
9 2     2   4554 use Moose;
  2         5  
  2         19  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::CodeCommit::Repository', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 6 [ 'Arn','CloneUrlHttp','CloneUrlSsh','Name' ]
15             }
16             sub supported_regions {
17 1     1 0 1107 [ 'eu-west-1','us-east-1','us-east-2','us-gov-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3Value->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3Value {
37 2     2   14727 use Moose;
  2         5  
  2         12  
38 2     2   13013 use MooseX::StrictConstructor;
  2         5  
  2         27  
39             extends 'Cfn::Value::TypedValue';
40            
41             has Bucket => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has Key => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             has ObjectVersion => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
44             }
45             subtype 'ArrayOfCfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger',
46             as 'Cfn::Value',
47             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
48             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
49              
50             coerce 'ArrayOfCfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger',
51             from 'HashRef',
52             via {
53             if (my $f = Cfn::TypeLibrary::try_function($_)) {
54             return $f
55             } else {
56             die 'Only accepts functions';
57             }
58             },
59             from 'ArrayRef',
60             via {
61             Cfn::Value::Array->new(Value => [
62             map {
63             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger')->coerce($_)
64             } @$_
65             ]);
66             };
67              
68             subtype 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger',
69             as 'Cfn::Value';
70              
71             coerce 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger',
72             from 'HashRef',
73             via {
74             if (my $f = Cfn::TypeLibrary::try_function($_)) {
75             return $f
76             } else {
77             return Cfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTriggerValue->new( %$_ );
78             }
79             };
80              
81             package Cfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTriggerValue {
82 2     2   7803 use Moose;
  2         8  
  2         22  
83 2     2   13067 use MooseX::StrictConstructor;
  2         5  
  2         11  
84             extends 'Cfn::Value::TypedValue';
85            
86             has Branches => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             has CustomData => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88             has DestinationArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
89             has Events => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
90             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
91             }
92              
93             subtype 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::Code',
94             as 'Cfn::Value';
95              
96             coerce 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::Code',
97             from 'HashRef',
98             via {
99             if (my $f = Cfn::TypeLibrary::try_function($_)) {
100             return $f
101             } else {
102             return Cfn::Resource::Properties::AWS::CodeCommit::Repository::CodeValue->new( %$_ );
103             }
104             };
105              
106             package Cfn::Resource::Properties::AWS::CodeCommit::Repository::CodeValue {
107 2     2   6758 use Moose;
  2         6  
  2         13  
108 2     2   13025 use MooseX::StrictConstructor;
  2         6  
  2         12  
109             extends 'Cfn::Value::TypedValue';
110            
111             has S3 => (isa => 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112             }
113              
114             package Cfn::Resource::Properties::AWS::CodeCommit::Repository {
115 2     2   6431 use Moose;
  2         5  
  2         13  
116 2     2   13340 use MooseX::StrictConstructor;
  2         6  
  2         10  
117             extends 'Cfn::Resource::Properties';
118            
119             has Code => (isa => 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::Code', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
120             has RepositoryDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has RepositoryName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
123             has Triggers => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Conditional');
124             }
125              
126             1;