GPUdb C++ API  Version 5.2.0.0
insert_symbol.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 __INSERT_SYMBOL_H__
7 #define __INSERT_SYMBOL_H__
8 
9 namespace gpudb
10 {
11 
28  {
29 
35  symbolId(std::string()),
36  symbolFormat(std::string()),
37  symbolData(std::vector<uint8_t>()),
38  options(std::map<std::string, std::string>())
39  {
40  }
41 
71  InsertSymbolRequest(const std::string& symbolId, const std::string& symbolFormat, const std::vector<uint8_t>& symbolData, const std::map<std::string, std::string>& options):
72  symbolId(symbolId),
73  symbolFormat(symbolFormat),
74  symbolData(symbolData),
75  options(options)
76  {
77  }
78 
79  std::string symbolId;
80  std::string symbolFormat;
81  std::vector<uint8_t> symbolData;
82  std::map<std::string, std::string> options;
83  };
84 }
85 
86 namespace avro
87 {
88  template<> struct codec_traits<gpudb::InsertSymbolRequest>
89  {
90  static void encode(Encoder& e, const gpudb::InsertSymbolRequest& v)
91  {
92  ::avro::encode(e, v.symbolId);
93  ::avro::encode(e, v.symbolFormat);
94  ::avro::encode(e, v.symbolData);
95  ::avro::encode(e, v.options);
96  }
97 
98  static void decode(Decoder& d, gpudb::InsertSymbolRequest& v)
99  {
100  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
101  {
102  const std::vector<size_t> fo = rd->fieldOrder();
103 
104  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
105  {
106  switch (*it)
107  {
108  case 0:
109  ::avro::decode(d, v.symbolId);
110  break;
111 
112  case 1:
113  ::avro::decode(d, v.symbolFormat);
114  break;
115 
116  case 2:
117  ::avro::decode(d, v.symbolData);
118  break;
119 
120  case 3:
121  ::avro::decode(d, v.options);
122  break;
123 
124  default:
125  break;
126  }
127  }
128  }
129  else
130  {
131  ::avro::decode(d, v.symbolId);
132  ::avro::decode(d, v.symbolFormat);
133  ::avro::decode(d, v.symbolData);
134  ::avro::decode(d, v.options);
135  }
136  }
137  };
138 }
139 
140 namespace gpudb
141 {
142 
159  {
160 
166  symbolId(std::string())
167  {
168  }
169 
170  std::string symbolId;
171  };
172 }
173 
174 namespace avro
175 {
176  template<> struct codec_traits<gpudb::InsertSymbolResponse>
177  {
178  static void encode(Encoder& e, const gpudb::InsertSymbolResponse& v)
179  {
180  ::avro::encode(e, v.symbolId);
181  }
182 
183  static void decode(Decoder& d, gpudb::InsertSymbolResponse& v)
184  {
185  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
186  {
187  const std::vector<size_t> fo = rd->fieldOrder();
188 
189  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
190  {
191  switch (*it)
192  {
193  case 0:
194  ::avro::decode(d, v.symbolId);
195  break;
196 
197  default:
198  break;
199  }
200  }
201  }
202  else
203  {
204  ::avro::decode(d, v.symbolId);
205  }
206  }
207  };
208 }
209 
210 #endif
A set of output parameters for insertSymbol(const InsertSymbolRequest&) const.
A set of input parameters for insertSymbol(const InsertSymbolRequest&) const.
Definition: insert_symbol.h:27
InsertSymbolRequest(const std::string &symbolId, const std::string &symbolFormat, const std::vector< uint8_t > &symbolData, const std::map< std::string, std::string > &options)
Constructs an InsertSymbolRequest object with the specified parameters.
Definition: insert_symbol.h:71
std::vector< uint8_t > symbolData
Definition: insert_symbol.h:81
InsertSymbolResponse()
Constructs an InsertSymbolResponse object with default parameter values.
std::map< std::string, std::string > options
Definition: insert_symbol.h:82
InsertSymbolRequest()
Constructs an InsertSymbolRequest object with default parameter values.
Definition: insert_symbol.h:34