| 1 | package Grafeas::V1::Provenance::Types; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Type::Library -base; | ||
| 7 | use Type::Utils -all; | ||
| 8 | use Types::Standard -types; | ||
| 9 | |||
| 10 | declare 'BuildProvenance', | ||
| 11 | as InstanceOf['Grafeas::V1::Provenance::BuildProvenance']; | ||
| 12 | |||
| 13 | coerce 'BuildProvenance', | ||
| 14 | from HashRef, via { 'Grafeas::V1::Provenance::BuildProvenance'->new($_) }; | ||
| 15 | |||
| 16 | declare 'RepeatedBuildProvenance', | ||
| 17 | as ArrayRef[BuildProvenance()]; | ||
| 18 | |||
| 19 | coerce 'RepeatedBuildProvenance', | ||
| 20 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::BuildProvenance'->new($_) } @$_ ] }; | ||
| 21 | |||
| 22 | declare 'MapStringBuildProvenance', | ||
| 23 | as HashRef[BuildProvenance()]; | ||
| 24 | |||
| 25 | declare 'BuildOptionsEntry', | ||
| 26 | as InstanceOf['Grafeas::V1::Provenance::BuildProvenance::BuildOptionsEntry']; | ||
| 27 | |||
| 28 | coerce 'BuildOptionsEntry', | ||
| 29 | from HashRef, via { 'Grafeas::V1::Provenance::BuildProvenance::BuildOptionsEntry'->new($_) }; | ||
| 30 | |||
| 31 | declare 'RepeatedBuildOptionsEntry', | ||
| 32 | as ArrayRef[BuildOptionsEntry()]; | ||
| 33 | |||
| 34 | coerce 'RepeatedBuildOptionsEntry', | ||
| 35 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::BuildProvenance::BuildOptionsEntry'->new($_) } @$_ ] }; | ||
| 36 | |||
| 37 | declare 'MapStringBuildOptionsEntry', | ||
| 38 | as HashRef[BuildOptionsEntry()]; | ||
| 39 | |||
| 40 | declare 'Source', | ||
| 41 | as InstanceOf['Grafeas::V1::Provenance::Source']; | ||
| 42 | |||
| 43 | coerce 'Source', | ||
| 44 | from HashRef, via { 'Grafeas::V1::Provenance::Source'->new($_) }; | ||
| 45 | |||
| 46 | declare 'RepeatedSource', | ||
| 47 | as ArrayRef[Source()]; | ||
| 48 | |||
| 49 | coerce 'RepeatedSource', | ||
| 50 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::Source'->new($_) } @$_ ] }; | ||
| 51 | |||
| 52 | declare 'MapStringSource', | ||
| 53 | as HashRef[Source()]; | ||
| 54 | |||
| 55 | declare 'FileHashesEntry', | ||
| 56 | as InstanceOf['Grafeas::V1::Provenance::Source::FileHashesEntry']; | ||
| 57 | |||
| 58 | coerce 'FileHashesEntry', | ||
| 59 | from HashRef, via { 'Grafeas::V1::Provenance::Source::FileHashesEntry'->new($_) }; | ||
| 60 | |||
| 61 | declare 'RepeatedFileHashesEntry', | ||
| 62 | as ArrayRef[FileHashesEntry()]; | ||
| 63 | |||
| 64 | coerce 'RepeatedFileHashesEntry', | ||
| 65 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::Source::FileHashesEntry'->new($_) } @$_ ] }; | ||
| 66 | |||
| 67 | declare 'MapStringFileHashesEntry', | ||
| 68 | as HashRef[FileHashesEntry()]; | ||
| 69 | |||
| 70 | declare 'FileHashes', | ||
| 71 | as InstanceOf['Grafeas::V1::Provenance::FileHashes']; | ||
| 72 | |||
| 73 | coerce 'FileHashes', | ||
| 74 | from HashRef, via { 'Grafeas::V1::Provenance::FileHashes'->new($_) }; | ||
| 75 | |||
| 76 | declare 'RepeatedFileHashes', | ||
| 77 | as ArrayRef[FileHashes()]; | ||
| 78 | |||
| 79 | coerce 'RepeatedFileHashes', | ||
| 80 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::FileHashes'->new($_) } @$_ ] }; | ||
| 81 | |||
| 82 | declare 'MapStringFileHashes', | ||
| 83 | as HashRef[FileHashes()]; | ||
| 84 | |||
| 85 | declare 'Hash', | ||
| 86 | as InstanceOf['Grafeas::V1::Provenance::Hash']; | ||
| 87 | |||
| 88 | coerce 'Hash', | ||
| 89 | from HashRef, via { 'Grafeas::V1::Provenance::Hash'->new($_) }; | ||
| 90 | |||
| 91 | declare 'RepeatedHash', | ||
| 92 | as ArrayRef[Hash()]; | ||
| 93 | |||
| 94 | coerce 'RepeatedHash', | ||
| 95 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::Hash'->new($_) } @$_ ] }; | ||
| 96 | |||
| 97 | declare 'MapStringHash', | ||
| 98 | as HashRef[Hash()]; | ||
| 99 | |||
| 100 | declare 'Command', | ||
| 101 | as InstanceOf['Grafeas::V1::Provenance::Command']; | ||
| 102 | |||
| 103 | coerce 'Command', | ||
| 104 | from HashRef, via { 'Grafeas::V1::Provenance::Command'->new($_) }; | ||
| 105 | |||
| 106 | declare 'RepeatedCommand', | ||
| 107 | as ArrayRef[Command()]; | ||
| 108 | |||
| 109 | coerce 'RepeatedCommand', | ||
| 110 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::Command'->new($_) } @$_ ] }; | ||
| 111 | |||
| 112 | declare 'MapStringCommand', | ||
| 113 | as HashRef[Command()]; | ||
| 114 | |||
| 115 | declare 'Artifact', | ||
| 116 | as InstanceOf['Grafeas::V1::Provenance::Artifact']; | ||
| 117 | |||
| 118 | coerce 'Artifact', | ||
| 119 | from HashRef, via { 'Grafeas::V1::Provenance::Artifact'->new($_) }; | ||
| 120 | |||
| 121 | declare 'RepeatedArtifact', | ||
| 122 | as ArrayRef[Artifact()]; | ||
| 123 | |||
| 124 | coerce 'RepeatedArtifact', | ||
| 125 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::Artifact'->new($_) } @$_ ] }; | ||
| 126 | |||
| 127 | declare 'MapStringArtifact', | ||
| 128 | as HashRef[Artifact()]; | ||
| 129 | |||
| 130 | declare 'SourceContext', | ||
| 131 | as InstanceOf['Grafeas::V1::Provenance::SourceContext']; | ||
| 132 | |||
| 133 | coerce 'SourceContext', | ||
| 134 | from HashRef, via { 'Grafeas::V1::Provenance::SourceContext'->new($_) }; | ||
| 135 | |||
| 136 | declare 'RepeatedSourceContext', | ||
| 137 | as ArrayRef[SourceContext()]; | ||
| 138 | |||
| 139 | coerce 'RepeatedSourceContext', | ||
| 140 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::SourceContext'->new($_) } @$_ ] }; | ||
| 141 | |||
| 142 | declare 'MapStringSourceContext', | ||
| 143 | as HashRef[SourceContext()]; | ||
| 144 | |||
| 145 | declare 'LabelsEntry', | ||
| 146 | as InstanceOf['Grafeas::V1::Provenance::SourceContext::LabelsEntry']; | ||
| 147 | |||
| 148 | coerce 'LabelsEntry', | ||
| 149 | from HashRef, via { 'Grafeas::V1::Provenance::SourceContext::LabelsEntry'->new($_) }; | ||
| 150 | |||
| 151 | declare 'RepeatedLabelsEntry', | ||
| 152 | as ArrayRef[LabelsEntry()]; | ||
| 153 | |||
| 154 | coerce 'RepeatedLabelsEntry', | ||
| 155 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::SourceContext::LabelsEntry'->new($_) } @$_ ] }; | ||
| 156 | |||
| 157 | declare 'MapStringLabelsEntry', | ||
| 158 | as HashRef[LabelsEntry()]; | ||
| 159 | |||
| 160 | declare 'AliasContext', | ||
| 161 | as InstanceOf['Grafeas::V1::Provenance::AliasContext']; | ||
| 162 | |||
| 163 | coerce 'AliasContext', | ||
| 164 | from HashRef, via { 'Grafeas::V1::Provenance::AliasContext'->new($_) }; | ||
| 165 | |||
| 166 | declare 'RepeatedAliasContext', | ||
| 167 | as ArrayRef[AliasContext()]; | ||
| 168 | |||
| 169 | coerce 'RepeatedAliasContext', | ||
| 170 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::AliasContext'->new($_) } @$_ ] }; | ||
| 171 | |||
| 172 | declare 'MapStringAliasContext', | ||
| 173 | as HashRef[AliasContext()]; | ||
| 174 | |||
| 175 | declare 'Kind', | ||
| 176 | as (Int | Str); | ||
| 177 | |||
| 178 | declare 'CloudRepoSourceContext', | ||
| 179 | as InstanceOf['Grafeas::V1::Provenance::CloudRepoSourceContext']; | ||
| 180 | |||
| 181 | coerce 'CloudRepoSourceContext', | ||
| 182 | from HashRef, via { 'Grafeas::V1::Provenance::CloudRepoSourceContext'->new($_) }; | ||
| 183 | |||
| 184 | declare 'RepeatedCloudRepoSourceContext', | ||
| 185 | as ArrayRef[CloudRepoSourceContext()]; | ||
| 186 | |||
| 187 | coerce 'RepeatedCloudRepoSourceContext', | ||
| 188 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::CloudRepoSourceContext'->new($_) } @$_ ] }; | ||
| 189 | |||
| 190 | declare 'MapStringCloudRepoSourceContext', | ||
| 191 | as HashRef[CloudRepoSourceContext()]; | ||
| 192 | |||
| 193 | declare 'GerritSourceContext', | ||
| 194 | as InstanceOf['Grafeas::V1::Provenance::GerritSourceContext']; | ||
| 195 | |||
| 196 | coerce 'GerritSourceContext', | ||
| 197 | from HashRef, via { 'Grafeas::V1::Provenance::GerritSourceContext'->new($_) }; | ||
| 198 | |||
| 199 | declare 'RepeatedGerritSourceContext', | ||
| 200 | as ArrayRef[GerritSourceContext()]; | ||
| 201 | |||
| 202 | coerce 'RepeatedGerritSourceContext', | ||
| 203 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::GerritSourceContext'->new($_) } @$_ ] }; | ||
| 204 | |||
| 205 | declare 'MapStringGerritSourceContext', | ||
| 206 | as HashRef[GerritSourceContext()]; | ||
| 207 | |||
| 208 | declare 'GitSourceContext', | ||
| 209 | as InstanceOf['Grafeas::V1::Provenance::GitSourceContext']; | ||
| 210 | |||
| 211 | coerce 'GitSourceContext', | ||
| 212 | from HashRef, via { 'Grafeas::V1::Provenance::GitSourceContext'->new($_) }; | ||
| 213 | |||
| 214 | declare 'RepeatedGitSourceContext', | ||
| 215 | as ArrayRef[GitSourceContext()]; | ||
| 216 | |||
| 217 | coerce 'RepeatedGitSourceContext', | ||
| 218 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::GitSourceContext'->new($_) } @$_ ] }; | ||
| 219 | |||
| 220 | declare 'MapStringGitSourceContext', | ||
| 221 | as HashRef[GitSourceContext()]; | ||
| 222 | |||
| 223 | declare 'RepoId', | ||
| 224 | as InstanceOf['Grafeas::V1::Provenance::RepoId']; | ||
| 225 | |||
| 226 | coerce 'RepoId', | ||
| 227 | from HashRef, via { 'Grafeas::V1::Provenance::RepoId'->new($_) }; | ||
| 228 | |||
| 229 | declare 'RepeatedRepoId', | ||
| 230 | as ArrayRef[RepoId()]; | ||
| 231 | |||
| 232 | coerce 'RepeatedRepoId', | ||
| 233 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::RepoId'->new($_) } @$_ ] }; | ||
| 234 | |||
| 235 | declare 'MapStringRepoId', | ||
| 236 | as HashRef[RepoId()]; | ||
| 237 | |||
| 238 | declare 'ProjectRepoId', | ||
| 239 | as InstanceOf['Grafeas::V1::Provenance::ProjectRepoId']; | ||
| 240 | |||
| 241 | coerce 'ProjectRepoId', | ||
| 242 | from HashRef, via { 'Grafeas::V1::Provenance::ProjectRepoId'->new($_) }; | ||
| 243 | |||
| 244 | declare 'RepeatedProjectRepoId', | ||
| 245 | as ArrayRef[ProjectRepoId()]; | ||
| 246 | |||
| 247 | coerce 'RepeatedProjectRepoId', | ||
| 248 | from ArrayRef[HashRef], via { [ map { 'Grafeas::V1::Provenance::ProjectRepoId'->new($_) } @$_ ] }; | ||
| 249 | |||
| 250 | declare 'MapStringProjectRepoId', | ||
| 251 | as HashRef[ProjectRepoId()]; | ||
| 252 | |||
| 253 | 1; | ||
| 254 | |||
| 255 | __END__ |