networking_metrics_registry/
networking_metrics_registry.rs

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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
// This file was generated by Cobalt's Registry parser based on the registry YAML
// in the cobalt_config repository. Edit the YAML there to make changes.
pub mod networking_metrics_registry {
pub const CUSTOMER_NAME: &str = "fuchsia";
pub const CUSTOMER_ID: u32 = 1;
pub const PROJECT_NAME: &str = "networking";
pub const PROJECT_ID: u32 = 1;

// Exponential bucket constants for socket_count_max socket_count_max
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for socket_count_max socket_count_per_device_max
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const SOCKET_COUNT_MAX_SOCKET_COUNT_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for tcp_connections_established_total tcp_connections_established_total
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_INT_BUCKETS_FLOOR: i64 = 0;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for tcp_connections_established_total tcp_connections_established_total_per_device_max
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_TCP_CONNECTIONS_ESTABLISHED_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for sockets_created sockets_created_per_device_max
pub const SOCKETS_CREATED_SOCKETS_CREATED_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const SOCKETS_CREATED_SOCKETS_CREATED_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const SOCKETS_CREATED_SOCKETS_CREATED_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const SOCKETS_CREATED_SOCKETS_CREATED_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for sockets_destroyed sockets_destroyed_per_device_max
pub const SOCKETS_DESTROYED_SOCKETS_DESTROYED_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const SOCKETS_DESTROYED_SOCKETS_DESTROYED_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const SOCKETS_DESTROYED_SOCKETS_DESTROYED_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const SOCKETS_DESTROYED_SOCKETS_DESTROYED_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for packets_sent packets_sent
pub const PACKETS_SENT_PACKETS_SENT_INT_BUCKETS_FLOOR: i64 = 0;
pub const PACKETS_SENT_PACKETS_SENT_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const PACKETS_SENT_PACKETS_SENT_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const PACKETS_SENT_PACKETS_SENT_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for packets_received packets_received
pub const PACKETS_RECEIVED_PACKETS_RECEIVED_INT_BUCKETS_FLOOR: i64 = 0;
pub const PACKETS_RECEIVED_PACKETS_RECEIVED_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const PACKETS_RECEIVED_PACKETS_RECEIVED_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const PACKETS_RECEIVED_PACKETS_RECEIVED_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for bytes_sent bytes_sent
pub const BYTES_SENT_BYTES_SENT_INT_BUCKETS_FLOOR: i64 = 0;
pub const BYTES_SENT_BYTES_SENT_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const BYTES_SENT_BYTES_SENT_INT_BUCKETS_INITIAL_STEP: u32 = 100;
pub const BYTES_SENT_BYTES_SENT_INT_BUCKETS_STEP_MULTIPLIER: u32 = 10;

// Exponential bucket constants for bytes_received bytes_received
pub const BYTES_RECEIVED_BYTES_RECEIVED_INT_BUCKETS_FLOOR: i64 = 0;
pub const BYTES_RECEIVED_BYTES_RECEIVED_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const BYTES_RECEIVED_BYTES_RECEIVED_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const BYTES_RECEIVED_BYTES_RECEIVED_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for tcp_connections_closed tcp_connections_closed_per_device_max
pub const TCP_CONNECTIONS_CLOSED_TCP_CONNECTIONS_CLOSED_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const TCP_CONNECTIONS_CLOSED_TCP_CONNECTIONS_CLOSED_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const TCP_CONNECTIONS_CLOSED_TCP_CONNECTIONS_CLOSED_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const TCP_CONNECTIONS_CLOSED_TCP_CONNECTIONS_CLOSED_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for tcp_connections_reset tcp_connections_reset_per_device_max
pub const TCP_CONNECTIONS_RESET_TCP_CONNECTIONS_RESET_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const TCP_CONNECTIONS_RESET_TCP_CONNECTIONS_RESET_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const TCP_CONNECTIONS_RESET_TCP_CONNECTIONS_RESET_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const TCP_CONNECTIONS_RESET_TCP_CONNECTIONS_RESET_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for tcp_connections_timed_out tcp_connections_timed_out_per_device_max
pub const TCP_CONNECTIONS_TIMED_OUT_TCP_CONNECTIONS_TIMED_OUT_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
pub const TCP_CONNECTIONS_TIMED_OUT_TCP_CONNECTIONS_TIMED_OUT_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const TCP_CONNECTIONS_TIMED_OUT_TCP_CONNECTIONS_TIMED_OUT_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 25;
pub const TCP_CONNECTIONS_TIMED_OUT_TCP_CONNECTIONS_TIMED_OUT_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for socket_option_operation_max per_device_max
pub const SOCKET_OPTION_OPERATION_MAX_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 1;
pub const SOCKET_OPTION_OPERATION_MAX_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 8;
pub const SOCKET_OPTION_OPERATION_MAX_PER_DEVICE_MAX_INT_BUCKETS_INITIAL_STEP: u32 = 4;
pub const SOCKET_OPTION_OPERATION_MAX_PER_DEVICE_MAX_INT_BUCKETS_STEP_MULTIPLIER: u32 = 4;

// Exponential bucket constants for need_more_fragments per_device_histograms_1day
pub const NEED_MORE_FRAGMENTS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_FLOOR: i64 = 0;
pub const NEED_MORE_FRAGMENTS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const NEED_MORE_FRAGMENTS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const NEED_MORE_FRAGMENTS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for conntrack_num_connections per_device_histograms_1day
pub const CONNTRACK_NUM_CONNECTIONS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_FLOOR: i64 = 0;
pub const CONNTRACK_NUM_CONNECTIONS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const CONNTRACK_NUM_CONNECTIONS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const CONNTRACK_NUM_CONNECTIONS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for conntrack_table_limit_hits per_device_histograms_1day
pub const CONNTRACK_TABLE_LIMIT_HITS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_FLOOR: i64 = 0;
pub const CONNTRACK_TABLE_LIMIT_HITS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const CONNTRACK_TABLE_LIMIT_HITS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const CONNTRACK_TABLE_LIMIT_HITS_PER_DEVICE_HISTOGRAMS_1DAY_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Exponential bucket constants for conntrack_table_limit_drops device_histogram
pub const CONNTRACK_TABLE_LIMIT_DROPS_DEVICE_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
pub const CONNTRACK_TABLE_LIMIT_DROPS_DEVICE_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 16;
pub const CONNTRACK_TABLE_LIMIT_DROPS_DEVICE_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 10;
pub const CONNTRACK_TABLE_LIMIT_DROPS_DEVICE_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 2;

// Metric ID Constants
// socket_count_max
pub const SOCKET_COUNT_MAX_METRIC_ID: u32 = 15;
// tcp_connections_established_total
pub const TCP_CONNECTIONS_ESTABLISHED_TOTAL_METRIC_ID: u32 = 22;
// dhcp_v6_configuration
pub const DHCP_V6_CONFIGURATION_METRIC_ID: u32 = 26;
// sockets_created
pub const SOCKETS_CREATED_METRIC_ID: u32 = 28;
// sockets_destroyed
pub const SOCKETS_DESTROYED_METRIC_ID: u32 = 29;
// packets_sent
pub const PACKETS_SENT_METRIC_ID: u32 = 30;
// packets_received
pub const PACKETS_RECEIVED_METRIC_ID: u32 = 31;
// bytes_sent
pub const BYTES_SENT_METRIC_ID: u32 = 32;
// bytes_received
pub const BYTES_RECEIVED_METRIC_ID: u32 = 33;
// tcp_connections_closed
pub const TCP_CONNECTIONS_CLOSED_METRIC_ID: u32 = 34;
// tcp_connections_reset
pub const TCP_CONNECTIONS_RESET_METRIC_ID: u32 = 35;
// tcp_connections_timed_out
pub const TCP_CONNECTIONS_TIMED_OUT_METRIC_ID: u32 = 36;
// available_dynamic_ipv6_address_config
pub const AVAILABLE_DYNAMIC_IPV6_ADDRESS_CONFIG_METRIC_ID: u32 = 37;
// socket_option_operation_max
pub const SOCKET_OPTION_OPERATION_MAX_METRIC_ID: u32 = 38;
// need_more_fragments
pub const NEED_MORE_FRAGMENTS_METRIC_ID: u32 = 39;
// conntrack_num_connections
pub const CONNTRACK_NUM_CONNECTIONS_METRIC_ID: u32 = 40;
// conntrack_table_limit_hits
pub const CONNTRACK_TABLE_LIMIT_HITS_METRIC_ID: u32 = 41;
// conntrack_table_limit_drops
pub const CONNTRACK_TABLE_LIMIT_DROPS_METRIC_ID: u32 = 42;
// stack_migration_user_setting
pub const STACK_MIGRATION_USER_SETTING_METRIC_ID: u32 = 500;
// stack_migration_automated_setting
pub const STACK_MIGRATION_AUTOMATED_SETTING_METRIC_ID: u32 = 501;
// stack_migration_current_boot
pub const STACK_MIGRATION_CURRENT_BOOT_METRIC_ID: u32 = 502;

// Enum for networking (Metric Dimension configuration_from_ndpra)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum NetworkingMetricDimensionConfigurationFromNdpra {
  NoConfiguration = 0,
  ManagedAddress = 1,
  OtherConfigurations = 2,
}

impl cobalt_client::traits::AsEventCode for NetworkingMetricDimensionConfigurationFromNdpra {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for dhcp_v6_configuration (Metric Dimension configuration_from_ndpra) which has the same event codes
pub use NetworkingMetricDimensionConfigurationFromNdpra as DhcpV6ConfigurationMetricDimensionConfigurationFromNdpra;

// Enum for networking (Metric Dimension dynamic_ipv6_address_source)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum NetworkingMetricDimensionDynamicIpv6AddressSource {
  NoGlobalSlaacOrDhcpv6ManagedAddress = 0,
  GlobalSlaacOnly = 1,
  Dhcpv6ManagedAddressOnly = 2,
  GlobalSlaacAndDhcpv6ManagedAddress = 3,
}

impl cobalt_client::traits::AsEventCode for NetworkingMetricDimensionDynamicIpv6AddressSource {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for available_dynamic_ipv6_address_config (Metric Dimension dynamic_ipv6_address_source) which has the same event codes
pub use NetworkingMetricDimensionDynamicIpv6AddressSource as AvailableDynamicIpv6AddressConfigMetricDimensionDynamicIpv6AddressSource;

// Enum for networking (Metric Dimension operation)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum NetworkingMetricDimensionOperation {
  Unknown = 0,
  Get = 1,
  Set = 2,
}

impl cobalt_client::traits::AsEventCode for NetworkingMetricDimensionOperation {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for socket_option_operation_max (Metric Dimension operation) which has the same event codes
pub use NetworkingMetricDimensionOperation as SocketOptionOperationMaxMetricDimensionOperation;

// Enum for networking (Metric Dimension socket_option)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum NetworkingMetricDimensionSocketOption {
  Unknown = 0,
  AcceptConn = 1,
  AddIpMembership = 2,
  AddIpv6membership = 3,
  BindToDevice = 4,
  Broadcast = 5,
  DropIpMembership = 6,
  DropIpv6Membership = 7,
  Error = 8,
  IpMulticastInterface = 9,
  IpMulticastLoopback = 10,
  IpMulticastTtl = 11,
  IpPacketInfo = 12,
  IpReceiveTtl = 13,
  IpReceiveTypeOfService = 14,
  IpTtl = 15,
  IpTypeOfService = 16,
  Ipv6MulticastHops = 17,
  Ipv6MulticastInterface = 18,
  Ipv6MulticastLoopback = 19,
  Ipv6Only = 20,
  Ipv6ReceiveHopLimit = 21,
  Ipv6ReceivePacketInfo = 22,
  Ipv6ReceiveTrafficClass = 23,
  Ipv6TrafficClass = 24,
  Ipv6UnicastHops = 25,
  KeepAlive = 26,
  Linger = 27,
  NoCheck = 28,
  OutOfBandInline = 29,
  ReceiveBuffer = 30,
  ReuseAddress = 31,
  ReusePort = 32,
  SendBuffer = 33,
  TcpCongestion = 34,
  TcpCork = 35,
  TcpDeferAccept = 36,
  TcpInfo = 37,
  TcpKeepAliveCount = 38,
  TcpKeepAliveIdle = 39,
  TcpKeepAliveInterval = 40,
  TcpLinger = 41,
  TcpMaxSegment = 42,
  TcpNoDelay = 43,
  TcpQuickAck = 44,
  TcpSynCount = 45,
  TcpUserTimeout = 46,
  TcpWindowClamp = 47,
  Timestamp = 48,
}

impl cobalt_client::traits::AsEventCode for NetworkingMetricDimensionSocketOption {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for socket_option_operation_max (Metric Dimension socket_option) which has the same event codes
pub use NetworkingMetricDimensionSocketOption as SocketOptionOperationMaxMetricDimensionSocketOption;

// Enum for networking (Metric Dimension ip_version)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum NetworkingMetricDimensionIpVersion {
  Ipv4 = 4,
  Ipv6 = 6,
}

impl cobalt_client::traits::AsEventCode for NetworkingMetricDimensionIpVersion {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}
// Alias for need_more_fragments (Metric Dimension ip_version) which has the same event codes
pub use NetworkingMetricDimensionIpVersion as NeedMoreFragmentsMetricDimensionIpVersion;

// Alias for conntrack_num_connections (Metric Dimension ip_version) which has the same event codes
pub use NetworkingMetricDimensionIpVersion as ConntrackNumConnectionsMetricDimensionIpVersion;

// Alias for conntrack_table_limit_hits (Metric Dimension ip_version) which has the same event codes
pub use NetworkingMetricDimensionIpVersion as ConntrackTableLimitHitsMetricDimensionIpVersion;

// Alias for conntrack_table_limit_drops (Metric Dimension ip_version) which has the same event codes
pub use NetworkingMetricDimensionIpVersion as ConntrackTableLimitDropsMetricDimensionIpVersion;

// Enum for stack_migration_user_setting (Metric Dimension netstack_version)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum StackMigrationUserSettingMetricDimensionNetstackVersion {
  NoSelection = 1,
  Netstack2 = 2,
  Netstack3 = 3,
}

impl cobalt_client::traits::AsEventCode for StackMigrationUserSettingMetricDimensionNetstackVersion {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

// Alias for stack_migration_automated_setting (Metric Dimension netstack_version) which has the same event codes
pub use StackMigrationUserSettingMetricDimensionNetstackVersion as StackMigrationAutomatedSettingMetricDimensionNetstackVersion;

// Enum for stack_migration_current_boot (Metric Dimension netstack_version)
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum StackMigrationCurrentBootMetricDimensionNetstackVersion {
  Netstack2 = 2,
  Netstack3 = 3,
}

impl cobalt_client::traits::AsEventCode for StackMigrationCurrentBootMetricDimensionNetstackVersion {
  fn as_event_code(&self) -> u32 {
    *self as u32
  }
}

#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct SocketOptionOperationMaxEventCodes {
  pub operation: SocketOptionOperationMaxMetricDimensionOperation,
  pub socket_option: SocketOptionOperationMaxMetricDimensionSocketOption,
}

impl cobalt_client::traits::AsEventCodes for SocketOptionOperationMaxEventCodes {
  fn as_event_codes(&self) -> Vec<u32> {
    use cobalt_client::traits::AsEventCode;
    vec![
      self.operation.as_event_code(),
      self.socket_option.as_event_code(),
    ]
  }
}

}