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 18.4.0
2 2     2   1433 use Moose::Util::TypeConstraints;
  2         5  
  2         23  
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   4470 use Moose;
  2         5  
  2         15  
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 7 [ 'Arn','CloneUrlHttp','CloneUrlSsh','Name' ]
15             }
16             sub supported_regions {
17 1     1 0 1151 [ '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::Object::AWS::CodeCommit::Repository::S3->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::CodeCommit::Repository::S3 {
37 2     2   14560 use Moose;
  2         6  
  2         9  
38 2     2   13150 use MooseX::StrictConstructor;
  2         6  
  2         20  
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::Object::AWS::CodeCommit::Repository::RepositoryTrigger->new( %$_ );
78             }
79             };
80              
81             package Cfn::Resource::Properties::Object::AWS::CodeCommit::Repository::RepositoryTrigger {
82 2     2   7682 use Moose;
  2         6  
  2         20  
83 2     2   13348 use MooseX::StrictConstructor;
  2         4  
  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::Object::AWS::CodeCommit::Repository::Code->new( %$_ );
103             }
104             };
105              
106             package Cfn::Resource::Properties::Object::AWS::CodeCommit::Repository::Code {
107 2     2   6827 use Moose;
  2         5  
  2         10  
108 2     2   13221 use MooseX::StrictConstructor;
  2         6  
  2         11  
109             extends 'Cfn::Value::TypedValue';
110            
111             has BranchName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
112             has S3 => (isa => 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::S3', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
113             }
114              
115             package Cfn::Resource::Properties::AWS::CodeCommit::Repository {
116 2     2   6636 use Moose;
  2         7  
  2         12  
117 2     2   13144 use MooseX::StrictConstructor;
  2         5  
  2         11  
118             extends 'Cfn::Resource::Properties';
119            
120             has Code => (isa => 'Cfn::Resource::Properties::AWS::CodeCommit::Repository::Code', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has RepositoryDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has RepositoryName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
123             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
124             has Triggers => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CodeCommit::Repository::RepositoryTrigger', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Conditional');
125             }
126              
127             1;
128             ### main pod documentation begin ###
129              
130             =encoding UTF-8
131              
132             =head1 NAME
133              
134             Cfn::Resource::AWS::CodeCommit::Repository - Cfn resource for AWS::CodeCommit::Repository
135              
136             =head1 DESCRIPTION
137              
138             This module implements a Perl module that represents the CloudFormation object AWS::CodeCommit::Repository.
139              
140             See L<Cfn> for more information on how to use it.
141              
142             =head1 AUTHOR
143              
144             Jose Luis Martinez
145             CAPSiDE
146             jlmartinez@capside.com
147              
148             =head1 COPYRIGHT and LICENSE
149              
150             Copyright (c) 2013 by CAPSiDE
151             This code is distributed under the Apache 2 License. The full text of the
152             license can be found in the LICENSE file included with this module.
153              
154             =cut