GPUdb C++ API  Version 7.2.2.4
admin_offline.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_OFFLINE_H__
7 #define __ADMIN_OFFLINE_H__
8 
9 namespace gpudb
10 {
20  {
25  offline(bool()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
55  AdminOfflineRequest(const bool offline_, const std::map<std::string, std::string>& options_):
56  offline( offline_ ),
57  options( options_ )
58  {
59  }
60 
69  bool offline;
70 
86  std::map<std::string, std::string> options;
87  };
88 } // end namespace gpudb
89 
90 namespace avro
91 {
92  template<> struct codec_traits<gpudb::AdminOfflineRequest>
93  {
94  static void encode(Encoder& e, const gpudb::AdminOfflineRequest& v)
95  {
96  ::avro::encode(e, v.offline);
97  ::avro::encode(e, v.options);
98  }
99 
100  static void decode(Decoder& d, gpudb::AdminOfflineRequest& v)
101  {
102  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
103  {
104  const std::vector<size_t> fo = rd->fieldOrder();
105 
106  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
107  {
108  switch (*it)
109  {
110  case 0:
111  ::avro::decode(d, v.offline);
112  break;
113 
114  case 1:
115  ::avro::decode(d, v.options);
116  break;
117 
118  default:
119  break;
120  }
121  }
122  }
123  else
124  {
125  ::avro::decode(d, v.offline);
126  ::avro::decode(d, v.options);
127  }
128  }
129  };
130 } // end namespace avro
131 
132 namespace gpudb
133 {
140  {
145  isOffline(bool()),
146  info(std::map<std::string, std::string>())
147  {
148  }
149 
153  bool isOffline;
154 
158  std::map<std::string, std::string> info;
159  };
160 } // end namespace gpudb
161 
162 namespace avro
163 {
164  template<> struct codec_traits<gpudb::AdminOfflineResponse>
165  {
166  static void encode(Encoder& e, const gpudb::AdminOfflineResponse& v)
167  {
168  ::avro::encode(e, v.isOffline);
169  ::avro::encode(e, v.info);
170  }
171 
172  static void decode(Decoder& d, gpudb::AdminOfflineResponse& v)
173  {
174  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
175  {
176  const std::vector<size_t> fo = rd->fieldOrder();
177 
178  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
179  {
180  switch (*it)
181  {
182  case 0:
183  ::avro::decode(d, v.isOffline);
184  break;
185 
186  case 1:
187  ::avro::decode(d, v.info);
188  break;
189 
190  default:
191  break;
192  }
193  }
194  }
195  else
196  {
197  ::avro::decode(d, v.isOffline);
198  ::avro::decode(d, v.info);
199  }
200  }
201  };
202 } // end namespace avro
203 
204 #endif // __ADMIN_OFFLINE_H__
AdminOfflineRequest()
Constructs an AdminOfflineRequest object with default parameters.
Definition: admin_offline.h:24
AdminOfflineResponse()
Constructs an AdminOfflineResponse object with default parameters.
std::map< std::string, std::string > info
Additional information.
bool isOffline
Returns true if the system is offline, or false otherwise.
A set of results returned by GPUdb::adminOffline.
std::map< std::string, std::string > options
Optional parameters.
Definition: admin_offline.h:86
AdminOfflineRequest(const bool offline_, const std::map< std::string, std::string > &options_)
Constructs an AdminOfflineRequest object with the specified parameters.
Definition: admin_offline.h:55
A set of parameters for GPUdb::adminOffline.
Definition: admin_offline.h:19
bool offline
Set to true if desired state is offline.
Definition: admin_offline.h:69