GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
admin_add_host.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_ADD_HOST_H__
7 #define __ADMIN_ADD_HOST_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  hostAddress(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
96  AdminAddHostRequest(const std::string& hostAddress_, const std::map<std::string, std::string>& options_):
97  hostAddress( hostAddress_ ),
98  options( options_ )
99  {
100  }
101 
102  std::string hostAddress;
103  std::map<std::string, std::string> options;
104  };
105 }
106 
107 namespace avro
108 {
109  template<> struct codec_traits<gpudb::AdminAddHostRequest>
110  {
111  static void encode(Encoder& e, const gpudb::AdminAddHostRequest& v)
112  {
113  ::avro::encode(e, v.hostAddress);
114  ::avro::encode(e, v.options);
115  }
116 
117  static void decode(Decoder& d, gpudb::AdminAddHostRequest& v)
118  {
119  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
120  {
121  const std::vector<size_t> fo = rd->fieldOrder();
122 
123  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
124  {
125  switch (*it)
126  {
127  case 0:
128  ::avro::decode(d, v.hostAddress);
129  break;
130 
131  case 1:
132  ::avro::decode(d, v.options);
133  break;
134 
135  default:
136  break;
137  }
138  }
139  }
140  else
141  {
142  ::avro::decode(d, v.hostAddress);
143  ::avro::decode(d, v.options);
144  }
145  }
146  };
147 }
148 
149 namespace gpudb
150 {
151 
159  {
160 
166  addedHost(std::string()),
167  info(std::map<std::string, std::string>())
168  {
169  }
170 
171  std::string addedHost;
172  std::map<std::string, std::string> info;
173  };
174 }
175 
176 namespace avro
177 {
178  template<> struct codec_traits<gpudb::AdminAddHostResponse>
179  {
180  static void encode(Encoder& e, const gpudb::AdminAddHostResponse& v)
181  {
182  ::avro::encode(e, v.addedHost);
183  ::avro::encode(e, v.info);
184  }
185 
186  static void decode(Decoder& d, gpudb::AdminAddHostResponse& v)
187  {
188  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
189  {
190  const std::vector<size_t> fo = rd->fieldOrder();
191 
192  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
193  {
194  switch (*it)
195  {
196  case 0:
197  ::avro::decode(d, v.addedHost);
198  break;
199 
200  case 1:
201  ::avro::decode(d, v.info);
202  break;
203 
204  default:
205  break;
206  }
207  }
208  }
209  else
210  {
211  ::avro::decode(d, v.addedHost);
212  ::avro::decode(d, v.info);
213  }
214  }
215  };
216 }
217 
218 #endif
std::map< std::string, std::string > info
std::map< std::string, std::string > options
AdminAddHostRequest()
Constructs an AdminAddHostRequest object with default parameter values.
AdminAddHostResponse()
Constructs an AdminAddHostResponse object with default parameter values.
A set of input parameters for const.
AdminAddHostRequest(const std::string &hostAddress_, const std::map< std::string, std::string > &options_)
Constructs an AdminAddHostRequest object with the specified parameters.
A set of output parameters for const.