-
Notifications
You must be signed in to change notification settings - Fork 2
/
asset.proto
127 lines (104 loc) · 4 KB
/
asset.proto
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
124
125
126
127
syntax = "proto3";
package hiber.asset;
import "google/protobuf/struct.proto";
import "base.proto";
import "file.proto";
import "health.proto";
import "tag.proto";
import "value.proto";
option java_multiple_files = false;
option java_package = "global.hiber.api.grpc.asset";
option java_outer_classname = "AssetApi";
option go_package = ".;hiber";
/* Assets are things that collect the data produced by devices.
* Devices are assigned to assets to handle data ownership.
* When a device is replaced, the data flow for the asset continues with the data from the new device.
* Multiple devices can be assigned to an asset, though it is advisable to only do so when they send
* different type of data (i.e. one sensor for pressure and one for flow).
*
* For example, if you have a Well, you might have assets for Annulus A and the tubing head.
*/
message Asset {
/* Predefined assets types that can be used to say something about the data.
* Currently a limited list, but more may be added in the future.
*/
enum Type {
UNKNOWN = 0;
WELL_ANNULUS_A = 1;
WELL_ANNULUS_B = 2;
WELL_ANNULUS_C = 3;
WELL_ANNULUS_D = 4;
WELL_HEAD = 15;
WELL_TUBING_HEAD = 5;
WELL_TUBING = 6;
WELL_FLOW_LINE = 7;
WELL_CASING = 8;
WELL_PRODUCTION_CASING_PRESSURE = 9;
WELL_INTERMITTENT_CASING_PRESSURE = 10;
PIPELINE = 11;
PRODUCTION_LINE = 12;
GAS_MANIFOLD = 13;
PRODUCTION_MANIFOLD = 14;
}
/* A device assigned to this asset.
* Non-operational values that the device produces will be linked to this asset
* (i.e. pressure, but not battery level).
*/
message AssignedDevice {
string number = 1;
repeated string identifiers = 2;
optional string name = 3;
optional string type = 4;
optional Timestamp last_message_sent_at = 5;
optional Timestamp last_message_received_at = 6;
optional TimeRange assignment_time_range = 7;
optional health.HealthLevel health = 8;
repeated value.Value.Numeric.Type numeric_value_types = 9;
}
string identifier = 1;
/* Name of the asset */
string name = 2;
/* Type of the asset, if any of the predefined types applies. */
optional Type type = 3;
/* Longer detailed description of the asset. */
optional string description = 4;
/* Multiline notes field that can be used to add additional information to an asset. */
optional string notes = 5;
/* Optional time zone for the asset.
* This can, for example, be used to calculate SLAs on a daily basis, adjusted by time zone.
*/
optional string time_zone = 6;
/* The expected transmission rate for this asset. */
optional value.Value.Numeric.Rate expected_transmission_rate = 7;
/* Metadata for the asset.
* This can be automatically populated from linked devices or manually added.
*/
google.protobuf.Struct metadata = 8;
/* Tags assigned to this asset */
repeated tag.Tag tags = 9;
/* Devices assigned to this asset */
repeated AssignedDevice devices = 10;
/* Devices that were assigned to this asset in the past */
repeated AssignedDevice inactive_devices = 12;
/* The organization that owns this asset.
* Typically only relevant if child organizations are included.
*/
string organization = 11;
/* Location for the asset. */
Location location = 13;
/* Files for this asset.
* Typically an image of a place. See the File.media_type for more information.
*/
repeated file.File files = 14;
}
/* Selection object for assets. */
message AssetSelection {
/* Select assets by identifier. */
repeated string identifiers = 1;
/* Search assets by (partial, case insensitive) identifier, name, description, notes and time zone. */
repeated string search = 2;
/* Select assets by type. */
repeated Asset.Type types = 3;
/* Select assets by tags */
optional hiber.tag.TagSelection filter_by_tags = 4;
}