1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Edm;
6:
7: /**
8: * All built-in primitive types defined by the OData Edm.
9: *
10: * These are the leaf types of the type system — they carry no
11: * further structure and are identified solely by their name.
12: * Every structural property whose type is not an EntityType,
13: * ComplexType, EnumType, or TypeDefinition resolves to one of
14: * these values.
15: *
16: * The string value of each case is the fully qualified Edm name
17: * as it appears in CSDL documents, e.g. "Edm.String".
18: *
19: * @see OData CSDL XML v4.01 §3.3 (Primitive Types)
20: */
21: enum EdmPrimitiveType: string
22: {
23: case Binary = 'Edm.Binary';
24: case Boolean = 'Edm.Boolean';
25: case Byte = 'Edm.Byte';
26: case Date = 'Edm.Date';
27: case DateTimeOffset = 'Edm.DateTimeOffset';
28: case Decimal = 'Edm.Decimal';
29: case Double = 'Edm.Double';
30: case Duration = 'Edm.Duration';
31: case Guid = 'Edm.Guid';
32: case Int16 = 'Edm.Int16';
33: case Int32 = 'Edm.Int32';
34: case Int64 = 'Edm.Int64';
35: case SByte = 'Edm.SByte';
36: case Single = 'Edm.Single';
37: case Stream = 'Edm.Stream';
38: case String = 'Edm.String';
39: case TimeOfDay = 'Edm.TimeOfDay';
40:
41: /**
42: * Geography types (spatial, WGS84 reference system by default).
43: *
44: * @see OData CSDL XML v4.01 §3.3
45: */
46: case Geography = 'Edm.Geography';
47: case GeographyPoint = 'Edm.GeographyPoint';
48: case GeographyLineString = 'Edm.GeographyLineString';
49: case GeographyPolygon = 'Edm.GeographyPolygon';
50: case GeographyMultiPoint = 'Edm.GeographyMultiPoint';
51: case GeographyMultiLineString = 'Edm.GeographyMultiLineString';
52: case GeographyMultiPolygon = 'Edm.GeographyMultiPolygon';
53: case GeographyCollection = 'Edm.GeographyCollection';
54:
55: /**
56: * Geometry types (spatial, flat-earth / arbitrary reference system).
57: *
58: * @see OData CSDL XML v4.01 §3.3
59: */
60: case Geometry = 'Edm.Geometry';
61: case GeometryPoint = 'Edm.GeometryPoint';
62: case GeometryLineString = 'Edm.GeometryLineString';
63: case GeometryPolygon = 'Edm.GeometryPolygon';
64: case GeometryMultiPoint = 'Edm.GeometryMultiPoint';
65: case GeometryMultiLineString = 'Edm.GeometryMultiLineString';
66: case GeometryMultiPolygon = 'Edm.GeometryMultiPolygon';
67: case GeometryCollection = 'Edm.GeometryCollection';
68: }
69: