e5d5bbcffe082a3b3e1ee08f93789aa2069e62c8
[ric-plt/resource-status-manager.git] / RSM / enums / reporting_periodicity.go
1 package enums
2
3 import (
4         "strconv"
5 )
6
7 type ReportingPeriodicity int
8
9 var ReportingPeriodicityValues = map[int]ReportingPeriodicity{
10         1000:  ReportingPeriodicity_one_thousand_ms,
11         2000:  ReportingPeriodicity_two_thousand_ms,
12         5000:  ReportingPeriodicity_five_thousand_ms,
13         10000: ReportingPeriodicity_ten_thousand_ms,
14 }
15
16 var ReportingPeriodicityNames = map[int]string{
17         1: "1000",
18         2: "2000",
19         3: "5000",
20         4: "10000",
21 }
22
23 const (
24         ReportingPeriodicity_one_thousand_ms ReportingPeriodicity = iota + 1
25         ReportingPeriodicity_two_thousand_ms
26         ReportingPeriodicity_five_thousand_ms
27         ReportingPeriodicity_ten_thousand_ms
28 )
29
30 func (x ReportingPeriodicity) String() string {
31         s, ok := ReportingPeriodicityNames[int(x)]
32
33         if ok {
34                 return s
35         }
36
37         return strconv.Itoa(int(x))
38 }
39
40 func GetReportingPeriodicityValuesAsKeys() []int {
41         keys := make([]int, len(ReportingPeriodicityValues))
42
43         i := 0
44         for k := range ReportingPeriodicityValues {
45                 keys[i] = k
46                 i++
47         }
48
49         return keys
50 }
51