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