GPUdb C++ API  Version 6.2.0.3
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 
74  InsertSymbolRequest(const std::string& symbolId_, const std::string& symbolFormat_, const std::vector<uint8_t>& symbolData_, const std::map<std::string, std::string>& options_):
75  symbolId( symbolId_ ),
76  symbolFormat( symbolFormat_ ),
77  symbolData( symbolData_ ),
78  options( options_ )
79  {
80  }
81 
82  std::string symbolId;
83  std::string symbolFormat;
84  std::vector<uint8_t> symbolData;
85  std::map<std::string, std::string> options;
86  };
87 }
88 
89 namespace avro
90 {
91  template<> struct codec_traits<gpudb::InsertSymbolRequest>
92  {
93  static void encode(Encoder& e, const gpudb::InsertSymbolRequest& v)
94  {
95  ::avro::encode(e, v.symbolId);
96  ::avro::encode(e, v.symbolFormat);
97  ::avro::encode(e, v.symbolData);
98  ::avro::encode(e, v.options);
99  }
100 
101  static void decode(Decoder& d, gpudb::InsertSymbolRequest& v)
102  {
103  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
104  {
105  const std::vector<size_t> fo = rd->fieldOrder();
106 
107  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
108  {
109  switch (*it)
110  {
111  case 0:
112  ::avro::decode(d, v.symbolId);
113  break;
114 
115  case 1:
116  ::avro::decode(d, v.symbolFormat);
117  break;
118 
119  case 2:
120  ::avro::decode(d, v.symbolData);
121  break;
122 
123  case 3:
124  ::avro::decode(d, v.options);
125  break;
126 
127  default:
128  break;
129  }
130  }
131  }
132  else
133  {
134  ::avro::decode(d, v.symbolId);
135  ::avro::decode(d, v.symbolFormat);
136  ::avro::decode(d, v.symbolData);
137  ::avro::decode(d, v.options);
138  }
139  }
140  };
141 }
142 
143 namespace gpudb
144 {
145 
162  {
163 
169  symbolId(std::string())
170  {
171  }
172 
173  std::string symbolId;
174  };
175 }
176 
177 namespace avro
178 {
179  template<> struct codec_traits<gpudb::InsertSymbolResponse>
180  {
181  static void encode(Encoder& e, const gpudb::InsertSymbolResponse& v)
182  {
183  ::avro::encode(e, v.symbolId);
184  }
185 
186  static void decode(Decoder& d, gpudb::InsertSymbolResponse& 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.symbolId);
198  break;
199 
200  default:
201  break;
202  }
203  }
204  }
205  else
206  {
207  ::avro::decode(d, v.symbolId);
208  }
209  }
210  };
211 }
212 
213 #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
std::vector< uint8_t > symbolData
Definition: insert_symbol.h:84
InsertSymbolResponse()
Constructs an InsertSymbolResponse object with default parameter values.
std::map< std::string, std::string > options
Definition: insert_symbol.h:85
InsertSymbolRequest()
Constructs an InsertSymbolRequest object with default parameter values.
Definition: insert_symbol.h:34
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:74