GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
admin_delete_node.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __ADMIN_DELETE_NODE_H__
7 #define __ADMIN_DELETE_NODE_H__
8 
13 namespace gpudb
14 {
15 
22  struct AdminDeleteNodeRequest
23  {
24 
30  AdminDeleteNodeRequest() :
31  rank(int32_t()),
32  authorization(std::string()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
47  AdminDeleteNodeRequest(const int32_t rank_, const std::string& authorization_, const std::map<std::string, std::string>& options_):
48  rank( rank_ ),
49  authorization( authorization_ ),
50  options( options_ )
51  {
52  }
53 
58  int32_t rank;
59  std::string authorization;
60  std::map<std::string, std::string> options;
61  };
62 }
63 
68 namespace avro
69 {
70  template<> struct codec_traits<gpudb::AdminDeleteNodeRequest>
71  {
72  static void encode(Encoder& e, const gpudb::AdminDeleteNodeRequest& v)
73  {
74  ::avro::encode(e, v.rank);
75  ::avro::encode(e, v.authorization);
76  ::avro::encode(e, v.options);
77  }
78 
79  static void decode(Decoder& d, gpudb::AdminDeleteNodeRequest& v)
80  {
81  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
82  {
83  const std::vector<size_t> fo = rd->fieldOrder();
84 
85  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
86  {
87  switch (*it)
88  {
89  case 0:
90  ::avro::decode(d, v.rank);
91  break;
92 
93  case 1:
94  ::avro::decode(d, v.authorization);
95  break;
96 
97  case 2:
98  ::avro::decode(d, v.options);
99  break;
100 
101  default:
102  break;
103  }
104  }
105  }
106  else
107  {
108  ::avro::decode(d, v.rank);
109  ::avro::decode(d, v.authorization);
110  ::avro::decode(d, v.options);
111  }
112  }
113  };
114 }
115 
120 namespace gpudb
121 {
122 
129  struct AdminDeleteNodeResponse
130  {
131 
137  AdminDeleteNodeResponse() :
138  rank(int32_t()),
139  message(std::vector<std::string>())
140  {
141  }
142 
147  int32_t rank;
148  std::vector<std::string> message;
149  };
150 }
151 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::AdminDeleteNodeResponse>
159  {
160  static void encode(Encoder& e, const gpudb::AdminDeleteNodeResponse& v)
161  {
162  ::avro::encode(e, v.rank);
163  ::avro::encode(e, v.message);
164  }
165 
166  static void decode(Decoder& d, gpudb::AdminDeleteNodeResponse& v)
167  {
168  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
169  {
170  const std::vector<size_t> fo = rd->fieldOrder();
171 
172  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
173  {
174  switch (*it)
175  {
176  case 0:
177  ::avro::decode(d, v.rank);
178  break;
179 
180  case 1:
181  ::avro::decode(d, v.message);
182  break;
183 
184  default:
185  break;
186  }
187  }
188  }
189  else
190  {
191  ::avro::decode(d, v.rank);
192  ::avro::decode(d, v.message);
193  }
194  }
195  };
196 }
197 
198 #endif