/
NoteKind.php
124 lines (116 loc) · 3.5 KB
/
NoteKind.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: grafeas/v1/common.proto
namespace Grafeas\V1;
use UnexpectedValueException;
/**
* Kind represents the kinds of notes supported.
*
* Protobuf type <code>grafeas.v1.NoteKind</code>
*/
class NoteKind
{
/**
* Default value. This value is unused.
*
* Generated from protobuf enum <code>NOTE_KIND_UNSPECIFIED = 0;</code>
*/
const NOTE_KIND_UNSPECIFIED = 0;
/**
* The note and occurrence represent a package vulnerability.
*
* Generated from protobuf enum <code>VULNERABILITY = 1;</code>
*/
const VULNERABILITY = 1;
/**
* The note and occurrence assert build provenance.
*
* Generated from protobuf enum <code>BUILD = 2;</code>
*/
const BUILD = 2;
/**
* This represents an image basis relationship.
*
* Generated from protobuf enum <code>IMAGE = 3;</code>
*/
const IMAGE = 3;
/**
* This represents a package installed via a package manager.
*
* Generated from protobuf enum <code>PACKAGE = 4;</code>
*/
const PACKAGE = 4;
/**
* The note and occurrence track deployment events.
*
* Generated from protobuf enum <code>DEPLOYMENT = 5;</code>
*/
const DEPLOYMENT = 5;
/**
* The note and occurrence track the initial discovery status of a resource.
*
* Generated from protobuf enum <code>DISCOVERY = 6;</code>
*/
const DISCOVERY = 6;
/**
* This represents a logical "role" that can attest to artifacts.
*
* Generated from protobuf enum <code>ATTESTATION = 7;</code>
*/
const ATTESTATION = 7;
/**
* This represents an available package upgrade.
*
* Generated from protobuf enum <code>UPGRADE = 8;</code>
*/
const UPGRADE = 8;
/**
* This represents a Compliance Note
*
* Generated from protobuf enum <code>COMPLIANCE = 9;</code>
*/
const COMPLIANCE = 9;
/**
* This represents a DSSE attestation Note
*
* Generated from protobuf enum <code>DSSE_ATTESTATION = 10;</code>
*/
const DSSE_ATTESTATION = 10;
/**
* This represents a Vulnerability Assessment.
*
* Generated from protobuf enum <code>VULNERABILITY_ASSESSMENT = 11;</code>
*/
const VULNERABILITY_ASSESSMENT = 11;
private static $valueToName = [
self::NOTE_KIND_UNSPECIFIED => 'NOTE_KIND_UNSPECIFIED',
self::VULNERABILITY => 'VULNERABILITY',
self::BUILD => 'BUILD',
self::IMAGE => 'IMAGE',
self::PACKAGE => 'PACKAGE',
self::DEPLOYMENT => 'DEPLOYMENT',
self::DISCOVERY => 'DISCOVERY',
self::ATTESTATION => 'ATTESTATION',
self::UPGRADE => 'UPGRADE',
self::COMPLIANCE => 'COMPLIANCE',
self::DSSE_ATTESTATION => 'DSSE_ATTESTATION',
self::VULNERABILITY_ASSESSMENT => 'VULNERABILITY_ASSESSMENT',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}