-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathAnnotationType.php
More file actions
75 lines (67 loc) · 1.96 KB
/
AnnotationType.php
File metadata and controls
75 lines (67 loc) · 1.96 KB
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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/chat/v1/annotation.proto
namespace Google\Apps\Chat\V1;
use UnexpectedValueException;
/**
* Type of the annotation.
*
* Protobuf type <code>google.chat.v1.AnnotationType</code>
*/
class AnnotationType
{
/**
* Default value for the enum. Don't use.
*
* Generated from protobuf enum <code>ANNOTATION_TYPE_UNSPECIFIED = 0;</code>
*/
const ANNOTATION_TYPE_UNSPECIFIED = 0;
/**
* A user is mentioned.
*
* Generated from protobuf enum <code>USER_MENTION = 1;</code>
*/
const USER_MENTION = 1;
/**
* A slash command is invoked.
*
* Generated from protobuf enum <code>SLASH_COMMAND = 2;</code>
*/
const SLASH_COMMAND = 2;
/**
* A rich link annotation.
*
* Generated from protobuf enum <code>RICH_LINK = 3;</code>
*/
const RICH_LINK = 3;
/**
* A custom emoji annotation.
*
* Generated from protobuf enum <code>CUSTOM_EMOJI = 4;</code>
*/
const CUSTOM_EMOJI = 4;
private static $valueToName = [
self::ANNOTATION_TYPE_UNSPECIFIED => 'ANNOTATION_TYPE_UNSPECIFIED',
self::USER_MENTION => 'USER_MENTION',
self::SLASH_COMMAND => 'SLASH_COMMAND',
self::RICH_LINK => 'RICH_LINK',
self::CUSTOM_EMOJI => 'CUSTOM_EMOJI',
];
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);
}
}