GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
admin_switchover.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_SWITCHOVER_H__
7 #define __ADMIN_SWITCHOVER_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  processes(std::vector<std::string>()),
28  destinations(std::vector<std::string>()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
80  AdminSwitchoverRequest(const std::vector<std::string>& processes_, const std::vector<std::string>& destinations_, const std::map<std::string, std::string>& options_):
81  processes( processes_ ),
82  destinations( destinations_ ),
83  options( options_ )
84  {
85  }
86 
87  std::vector<std::string> processes;
88  std::vector<std::string> destinations;
89  std::map<std::string, std::string> options;
90  };
91 }
92 
93 namespace avro
94 {
95  template<> struct codec_traits<gpudb::AdminSwitchoverRequest>
96  {
97  static void encode(Encoder& e, const gpudb::AdminSwitchoverRequest& v)
98  {
99  ::avro::encode(e, v.processes);
100  ::avro::encode(e, v.destinations);
101  ::avro::encode(e, v.options);
102  }
103 
104  static void decode(Decoder& d, gpudb::AdminSwitchoverRequest& v)
105  {
106  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
107  {
108  const std::vector<size_t> fo = rd->fieldOrder();
109 
110  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
111  {
112  switch (*it)
113  {
114  case 0:
115  ::avro::decode(d, v.processes);
116  break;
117 
118  case 1:
119  ::avro::decode(d, v.destinations);
120  break;
121 
122  case 2:
123  ::avro::decode(d, v.options);
124  break;
125 
126  default:
127  break;
128  }
129  }
130  }
131  else
132  {
133  ::avro::decode(d, v.processes);
134  ::avro::decode(d, v.destinations);
135  ::avro::decode(d, v.options);
136  }
137  }
138  };
139 }
140 
141 namespace gpudb
142 {
143 
152  {
153 
159  info(std::map<std::string, std::string>())
160  {
161  }
162 
163  std::map<std::string, std::string> info;
164  };
165 }
166 
167 namespace avro
168 {
169  template<> struct codec_traits<gpudb::AdminSwitchoverResponse>
170  {
171  static void encode(Encoder& e, const gpudb::AdminSwitchoverResponse& v)
172  {
173  ::avro::encode(e, v.info);
174  }
175 
176  static void decode(Decoder& d, gpudb::AdminSwitchoverResponse& v)
177  {
178  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
179  {
180  const std::vector<size_t> fo = rd->fieldOrder();
181 
182  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
183  {
184  switch (*it)
185  {
186  case 0:
187  ::avro::decode(d, v.info);
188  break;
189 
190  default:
191  break;
192  }
193  }
194  }
195  else
196  {
197  ::avro::decode(d, v.info);
198  }
199  }
200  };
201 }
202 
203 #endif
AdminSwitchoverRequest()
Constructs an AdminSwitchoverRequest object with default parameter values.
AdminSwitchoverResponse()
Constructs an AdminSwitchoverResponse object with default parameter values.
AdminSwitchoverRequest(const std::vector< std::string > &processes_, const std::vector< std::string > &destinations_, const std::map< std::string, std::string > &options_)
Constructs an AdminSwitchoverRequest object with the specified parameters.
std::map< std::string, std::string > options
std::vector< std::string > processes
A set of output parameters for const.
std::vector< std::string > destinations
A set of input parameters for const.
std::map< std::string, std::string > info