GPUdb C++ API  Version 7.2.2.4
admin_show_alerts.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __ADMIN_SHOW_ALERTS_H__
7 #define __ADMIN_SHOW_ALERTS_H__
8 
9 namespace gpudb
10 {
20  {
25  numAlerts(int32_t()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
42  AdminShowAlertsRequest(const int32_t numAlerts_, const std::map<std::string, std::string>& options_):
43  numAlerts( numAlerts_ ),
44  options( options_ )
45  {
46  }
47 
53  int32_t numAlerts;
54 
58  std::map<std::string, std::string> options;
59  };
60 } // end namespace gpudb
61 
62 namespace avro
63 {
64  template<> struct codec_traits<gpudb::AdminShowAlertsRequest>
65  {
66  static void encode(Encoder& e, const gpudb::AdminShowAlertsRequest& v)
67  {
68  ::avro::encode(e, v.numAlerts);
69  ::avro::encode(e, v.options);
70  }
71 
72  static void decode(Decoder& d, gpudb::AdminShowAlertsRequest& v)
73  {
74  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
75  {
76  const std::vector<size_t> fo = rd->fieldOrder();
77 
78  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
79  {
80  switch (*it)
81  {
82  case 0:
83  ::avro::decode(d, v.numAlerts);
84  break;
85 
86  case 1:
87  ::avro::decode(d, v.options);
88  break;
89 
90  default:
91  break;
92  }
93  }
94  }
95  else
96  {
97  ::avro::decode(d, v.numAlerts);
98  ::avro::decode(d, v.options);
99  }
100  }
101  };
102 } // end namespace avro
103 
104 namespace gpudb
105 {
112  {
118  timestamps(std::vector<std::string>()),
119  types(std::vector<std::string>()),
120  params(std::vector<std::map<std::string, std::string> >()),
121  info(std::map<std::string, std::string>())
122  {
123  }
124 
130  std::vector<std::string> timestamps;
131 
137  std::vector<std::string> types;
138 
144  std::vector<std::map<std::string, std::string> > params;
145 
149  std::map<std::string, std::string> info;
150  };
151 } // end namespace gpudb
152 
153 namespace avro
154 {
155  template<> struct codec_traits<gpudb::AdminShowAlertsResponse>
156  {
157  static void encode(Encoder& e, const gpudb::AdminShowAlertsResponse& v)
158  {
159  ::avro::encode(e, v.timestamps);
160  ::avro::encode(e, v.types);
161  ::avro::encode(e, v.params);
162  ::avro::encode(e, v.info);
163  }
164 
165  static void decode(Decoder& d, gpudb::AdminShowAlertsResponse& v)
166  {
167  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
168  {
169  const std::vector<size_t> fo = rd->fieldOrder();
170 
171  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
172  {
173  switch (*it)
174  {
175  case 0:
176  ::avro::decode(d, v.timestamps);
177  break;
178 
179  case 1:
180  ::avro::decode(d, v.types);
181  break;
182 
183  case 2:
184  ::avro::decode(d, v.params);
185  break;
186 
187  case 3:
188  ::avro::decode(d, v.info);
189  break;
190 
191  default:
192  break;
193  }
194  }
195  }
196  else
197  {
198  ::avro::decode(d, v.timestamps);
199  ::avro::decode(d, v.types);
200  ::avro::decode(d, v.params);
201  ::avro::decode(d, v.info);
202  }
203  }
204  };
205 } // end namespace avro
206 
207 #endif // __ADMIN_SHOW_ALERTS_H__
std::map< std::string, std::string > options
Optional parameters.
AdminShowAlertsRequest(const int32_t numAlerts_, const std::map< std::string, std::string > &options_)
Constructs an AdminShowAlertsRequest object with the specified parameters.
std::vector< std::string > timestamps
Timestamp for when the alert occurred, sorted from most recent to least recent.
std::vector< std::string > types
Type of system alert, sorted from most recent to least recent.
int32_t numAlerts
Number of most recent alerts to request.
std::map< std::string, std::string > info
Additional information.
AdminShowAlertsResponse()
Constructs an AdminShowAlertsResponse object with default parameters.
std::vector< std::map< std::string, std::string > > params
Parameters for each alert, sorted from most recent to least recent.
AdminShowAlertsRequest()
Constructs an AdminShowAlertsRequest object with default parameters.
A set of parameters for GPUdb::adminShowAlerts.
A set of results returned by GPUdb::adminShowAlerts.