GPUdb C++ API  Version 7.2.2.4
insert_symbol.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 __INSERT_SYMBOL_H__
7 #define __INSERT_SYMBOL_H__
8 
9 namespace gpudb
10 {
28  {
33  symbolId(std::string()),
34  symbolFormat(std::string()),
35  symbolData(std::vector<uint8_t>()),
36  options(std::map<std::string, std::string>())
37  {
38  }
39 
77  InsertSymbolRequest(const std::string& symbolId_, const std::string& symbolFormat_, const std::vector<uint8_t>& symbolData_, const std::map<std::string, std::string>& options_):
78  symbolId( symbolId_ ),
79  symbolFormat( symbolFormat_ ),
80  symbolData( symbolData_ ),
81  options( options_ )
82  {
83  }
84 
89  std::string symbolId;
90 
99  std::string symbolFormat;
100 
107  std::vector<uint8_t> symbolData;
108 
121  std::map<std::string, std::string> options;
122  };
123 } // end namespace gpudb
124 
125 namespace avro
126 {
127  template<> struct codec_traits<gpudb::InsertSymbolRequest>
128  {
129  static void encode(Encoder& e, const gpudb::InsertSymbolRequest& v)
130  {
131  ::avro::encode(e, v.symbolId);
132  ::avro::encode(e, v.symbolFormat);
133  ::avro::encode(e, v.symbolData);
134  ::avro::encode(e, v.options);
135  }
136 
137  static void decode(Decoder& d, gpudb::InsertSymbolRequest& v)
138  {
139  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
140  {
141  const std::vector<size_t> fo = rd->fieldOrder();
142 
143  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
144  {
145  switch (*it)
146  {
147  case 0:
148  ::avro::decode(d, v.symbolId);
149  break;
150 
151  case 1:
152  ::avro::decode(d, v.symbolFormat);
153  break;
154 
155  case 2:
156  ::avro::decode(d, v.symbolData);
157  break;
158 
159  case 3:
160  ::avro::decode(d, v.options);
161  break;
162 
163  default:
164  break;
165  }
166  }
167  }
168  else
169  {
170  ::avro::decode(d, v.symbolId);
171  ::avro::decode(d, v.symbolFormat);
172  ::avro::decode(d, v.symbolData);
173  ::avro::decode(d, v.options);
174  }
175  }
176  };
177 } // end namespace avro
178 
179 namespace gpudb
180 {
187  {
192  symbolId(std::string()),
193  info(std::map<std::string, std::string>())
194  {
195  }
196 
200  std::string symbolId;
201 
205  std::map<std::string, std::string> info;
206  };
207 } // end namespace gpudb
208 
209 namespace avro
210 {
211  template<> struct codec_traits<gpudb::InsertSymbolResponse>
212  {
213  static void encode(Encoder& e, const gpudb::InsertSymbolResponse& v)
214  {
215  ::avro::encode(e, v.symbolId);
216  ::avro::encode(e, v.info);
217  }
218 
219  static void decode(Decoder& d, gpudb::InsertSymbolResponse& v)
220  {
221  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
222  {
223  const std::vector<size_t> fo = rd->fieldOrder();
224 
225  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
226  {
227  switch (*it)
228  {
229  case 0:
230  ::avro::decode(d, v.symbolId);
231  break;
232 
233  case 1:
234  ::avro::decode(d, v.info);
235  break;
236 
237  default:
238  break;
239  }
240  }
241  }
242  else
243  {
244  ::avro::decode(d, v.symbolId);
245  ::avro::decode(d, v.info);
246  }
247  }
248  };
249 } // end namespace avro
250 
251 #endif // __INSERT_SYMBOL_H__
std::string symbolId
Value of symbolId.
std::string symbolId
The id of the symbol being added.
Definition: insert_symbol.h:89
A set of results returned by GPUdb::insertSymbol.
std::string symbolFormat
Specifies the symbol format.
Definition: insert_symbol.h:99
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::insertSymbol.
Definition: insert_symbol.h:27
std::vector< uint8_t > symbolData
The actual symbol data.
InsertSymbolResponse()
Constructs an InsertSymbolResponse object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
InsertSymbolRequest()
Constructs an InsertSymbolRequest object with default parameters.
Definition: insert_symbol.h:32
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:77