GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
show_types.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 __SHOW_TYPES_H__
7 #define __SHOW_TYPES_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  typeId(std::string()),
29  label(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
54  ShowTypesRequest(const std::string& typeId_, const std::string& label_, const std::map<std::string, std::string>& options_):
55  typeId( typeId_ ),
56  label( label_ ),
57  options( options_ )
58  {
59  }
60 
61  std::string typeId;
62  std::string label;
63  std::map<std::string, std::string> options;
64  };
65 }
66 
67 namespace avro
68 {
69  template<> struct codec_traits<gpudb::ShowTypesRequest>
70  {
71  static void encode(Encoder& e, const gpudb::ShowTypesRequest& v)
72  {
73  ::avro::encode(e, v.typeId);
74  ::avro::encode(e, v.label);
75  ::avro::encode(e, v.options);
76  }
77 
78  static void decode(Decoder& d, gpudb::ShowTypesRequest& v)
79  {
80  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
81  {
82  const std::vector<size_t> fo = rd->fieldOrder();
83 
84  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
85  {
86  switch (*it)
87  {
88  case 0:
89  ::avro::decode(d, v.typeId);
90  break;
91 
92  case 1:
93  ::avro::decode(d, v.label);
94  break;
95 
96  case 2:
97  ::avro::decode(d, v.options);
98  break;
99 
100  default:
101  break;
102  }
103  }
104  }
105  else
106  {
107  ::avro::decode(d, v.typeId);
108  ::avro::decode(d, v.label);
109  ::avro::decode(d, v.options);
110  }
111  }
112  };
113 }
114 
115 namespace gpudb
116 {
117 
128  {
129 
134  typeIds(std::vector<std::string>()),
135  typeSchemas(std::vector<std::string>()),
136  labels(std::vector<std::string>()),
137  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
138  info(std::map<std::string, std::string>())
139  {
140  }
141 
142  std::vector<std::string> typeIds;
143  std::vector<std::string> typeSchemas;
144  std::vector<std::string> labels;
145  std::vector<std::map<std::string, std::vector<std::string> > > properties;
146  std::map<std::string, std::string> info;
147  };
148 }
149 
150 namespace avro
151 {
152  template<> struct codec_traits<gpudb::ShowTypesResponse>
153  {
154  static void encode(Encoder& e, const gpudb::ShowTypesResponse& v)
155  {
156  ::avro::encode(e, v.typeIds);
157  ::avro::encode(e, v.typeSchemas);
158  ::avro::encode(e, v.labels);
159  ::avro::encode(e, v.properties);
160  ::avro::encode(e, v.info);
161  }
162 
163  static void decode(Decoder& d, gpudb::ShowTypesResponse& v)
164  {
165  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
166  {
167  const std::vector<size_t> fo = rd->fieldOrder();
168 
169  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
170  {
171  switch (*it)
172  {
173  case 0:
174  ::avro::decode(d, v.typeIds);
175  break;
176 
177  case 1:
178  ::avro::decode(d, v.typeSchemas);
179  break;
180 
181  case 2:
182  ::avro::decode(d, v.labels);
183  break;
184 
185  case 3:
186  ::avro::decode(d, v.properties);
187  break;
188 
189  case 4:
190  ::avro::decode(d, v.info);
191  break;
192 
193  default:
194  break;
195  }
196  }
197  }
198  else
199  {
200  ::avro::decode(d, v.typeIds);
201  ::avro::decode(d, v.typeSchemas);
202  ::avro::decode(d, v.labels);
203  ::avro::decode(d, v.properties);
204  ::avro::decode(d, v.info);
205  }
206  }
207  };
208 }
209 
210 #endif
A set of output parameters for const.
Definition: show_types.h:127
std::map< std::string, std::string > options
Definition: show_types.h:63
ShowTypesResponse()
Constructs a ShowTypesResponse object with default parameter values.
Definition: show_types.h:133
std::vector< std::string > labels
Definition: show_types.h:144
ShowTypesRequest()
Constructs a ShowTypesRequest object with default parameter values.
Definition: show_types.h:27
ShowTypesRequest(const std::string &typeId_, const std::string &label_, const std::map< std::string, std::string > &options_)
Constructs a ShowTypesRequest object with the specified parameters.
Definition: show_types.h:54
std::vector< std::string > typeSchemas
Definition: show_types.h:143
A set of input parameters for const.
Definition: show_types.h:21
std::vector< std::string > typeIds
Definition: show_types.h:142
std::map< std::string, std::string > info
Definition: show_types.h:146
std::vector< std::map< std::string, std::vector< std::string > > > properties
Definition: show_types.h:145