GPUdb C++ API  Version 7.2.2.4
admin_send_alert.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_SEND_ALERT_H__
7 #define __ADMIN_SEND_ALERT_H__
8 
9 namespace gpudb
10 {
19  {
24  message(std::string()),
25  label(std::string()),
26  logLevel(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
55  AdminSendAlertRequest(const std::string& message_, const std::string& label_, const std::string& logLevel_, const std::map<std::string, std::string>& options_):
56  message( message_ ),
57  label( label_ ),
58  logLevel( logLevel_ ),
59  options( options_ )
60  {
61  }
62 
66  std::string message;
67 
71  std::string label;
72 
84  std::string logLevel;
85 
89  std::map<std::string, std::string> options;
90  };
91 } // end namespace gpudb
92 
93 namespace avro
94 {
95  template<> struct codec_traits<gpudb::AdminSendAlertRequest>
96  {
97  static void encode(Encoder& e, const gpudb::AdminSendAlertRequest& v)
98  {
99  ::avro::encode(e, v.message);
100  ::avro::encode(e, v.label);
101  ::avro::encode(e, v.logLevel);
102  ::avro::encode(e, v.options);
103  }
104 
105  static void decode(Decoder& d, gpudb::AdminSendAlertRequest& v)
106  {
107  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
108  {
109  const std::vector<size_t> fo = rd->fieldOrder();
110 
111  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
112  {
113  switch (*it)
114  {
115  case 0:
116  ::avro::decode(d, v.message);
117  break;
118 
119  case 1:
120  ::avro::decode(d, v.label);
121  break;
122 
123  case 2:
124  ::avro::decode(d, v.logLevel);
125  break;
126 
127  case 3:
128  ::avro::decode(d, v.options);
129  break;
130 
131  default:
132  break;
133  }
134  }
135  }
136  else
137  {
138  ::avro::decode(d, v.message);
139  ::avro::decode(d, v.label);
140  ::avro::decode(d, v.logLevel);
141  ::avro::decode(d, v.options);
142  }
143  }
144  };
145 } // end namespace avro
146 
147 namespace gpudb
148 {
155  {
160  info(std::map<std::string, std::string>())
161  {
162  }
163 
167  std::map<std::string, std::string> info;
168  };
169 } // end namespace gpudb
170 
171 namespace avro
172 {
173  template<> struct codec_traits<gpudb::AdminSendAlertResponse>
174  {
175  static void encode(Encoder& e, const gpudb::AdminSendAlertResponse& v)
176  {
177  ::avro::encode(e, v.info);
178  }
179 
180  static void decode(Decoder& d, gpudb::AdminSendAlertResponse& v)
181  {
182  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
183  {
184  const std::vector<size_t> fo = rd->fieldOrder();
185 
186  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
187  {
188  switch (*it)
189  {
190  case 0:
191  ::avro::decode(d, v.info);
192  break;
193 
194  default:
195  break;
196  }
197  }
198  }
199  else
200  {
201  ::avro::decode(d, v.info);
202  }
203  }
204  };
205 } // end namespace avro
206 
207 #endif // __ADMIN_SEND_ALERT_H__
A set of results returned by GPUdb::adminSendAlert.
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::adminSendAlert.
std::map< std::string, std::string > options
Optional parameters.
AdminSendAlertResponse()
Constructs an AdminSendAlertResponse object with default parameters.
std::string logLevel
Alert message logging criteria.
std::string label
Label to add to alert message.
std::string message
Alert message body.
AdminSendAlertRequest(const std::string &message_, const std::string &label_, const std::string &logLevel_, const std::map< std::string, std::string > &options_)
Constructs an AdminSendAlertRequest object with the specified parameters.
AdminSendAlertRequest()
Constructs an AdminSendAlertRequest object with default parameters.