GPUdb C++ API  Version 7.2.2.4
show_functions.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 __SHOW_FUNCTIONS_H__
7 #define __SHOW_FUNCTIONS_H__
8 
9 namespace gpudb
10 {
12  struct ShowFunctionsRequest
13  {
14  ShowFunctionsRequest() :
15  names(std::vector<std::string>()),
16  options(std::map<std::string, std::string>())
17  {
18  }
19 
20  ShowFunctionsRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
21  names( names_ ),
22  options( options_ )
23  {
24  }
25 
26  std::vector<std::string> names;
27  std::map<std::string, std::string> options;
28  };
29 } // end namespace gpudb
30 
31 namespace avro
32 {
33  template<> struct codec_traits<gpudb::ShowFunctionsRequest>
34  {
35  static void encode(Encoder& e, const gpudb::ShowFunctionsRequest& v)
36  {
37  ::avro::encode(e, v.names);
38  ::avro::encode(e, v.options);
39  }
40 
41  static void decode(Decoder& d, gpudb::ShowFunctionsRequest& v)
42  {
43  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
44  {
45  const std::vector<size_t> fo = rd->fieldOrder();
46 
47  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
48  {
49  switch (*it)
50  {
51  case 0:
52  ::avro::decode(d, v.names);
53  break;
54 
55  case 1:
56  ::avro::decode(d, v.options);
57  break;
58 
59  default:
60  break;
61  }
62  }
63  }
64  else
65  {
66  ::avro::decode(d, v.names);
67  ::avro::decode(d, v.options);
68  }
69  }
70  };
71 } // end namespace avro
72 
73 namespace gpudb
74 {
76  struct ShowFunctionsResponse
77  {
78  ShowFunctionsResponse() :
79  functionNames(std::vector<std::string>()),
80  returnTypes(std::vector<std::string>()),
81  parameters(std::vector<std::vector<std::string> >()),
82  optionalParameterCount(std::vector<int32_t>()),
83  flags(std::vector<int32_t>()),
84  typeSchemas(std::vector<std::string>()),
85  properties(std::vector<std::map<std::string, std::vector<std::string> > >()),
86  info(std::map<std::string, std::string>())
87  {
88  }
89 
90  std::vector<std::string> functionNames;
91  std::vector<std::string> returnTypes;
92  std::vector<std::vector<std::string> > parameters;
93  std::vector<int32_t> optionalParameterCount;
94  std::vector<int32_t> flags;
95  std::vector<std::string> typeSchemas;
96  std::vector<std::map<std::string, std::vector<std::string> > > properties;
97  std::map<std::string, std::string> info;
98  };
99 } // end namespace gpudb
100 
101 namespace avro
102 {
103  template<> struct codec_traits<gpudb::ShowFunctionsResponse>
104  {
105  static void encode(Encoder& e, const gpudb::ShowFunctionsResponse& v)
106  {
107  ::avro::encode(e, v.functionNames);
108  ::avro::encode(e, v.returnTypes);
109  ::avro::encode(e, v.parameters);
110  ::avro::encode(e, v.optionalParameterCount);
111  ::avro::encode(e, v.flags);
112  ::avro::encode(e, v.typeSchemas);
113  ::avro::encode(e, v.properties);
114  ::avro::encode(e, v.info);
115  }
116 
117  static void decode(Decoder& d, gpudb::ShowFunctionsResponse& v)
118  {
119  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
120  {
121  const std::vector<size_t> fo = rd->fieldOrder();
122 
123  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
124  {
125  switch (*it)
126  {
127  case 0:
128  ::avro::decode(d, v.functionNames);
129  break;
130 
131  case 1:
132  ::avro::decode(d, v.returnTypes);
133  break;
134 
135  case 2:
136  ::avro::decode(d, v.parameters);
137  break;
138 
139  case 3:
140  ::avro::decode(d, v.optionalParameterCount);
141  break;
142 
143  case 4:
144  ::avro::decode(d, v.flags);
145  break;
146 
147  case 5:
148  ::avro::decode(d, v.typeSchemas);
149  break;
150 
151  case 6:
152  ::avro::decode(d, v.properties);
153  break;
154 
155  case 7:
156  ::avro::decode(d, v.info);
157  break;
158 
159  default:
160  break;
161  }
162  }
163  }
164  else
165  {
166  ::avro::decode(d, v.functionNames);
167  ::avro::decode(d, v.returnTypes);
168  ::avro::decode(d, v.parameters);
169  ::avro::decode(d, v.optionalParameterCount);
170  ::avro::decode(d, v.flags);
171  ::avro::decode(d, v.typeSchemas);
172  ::avro::decode(d, v.properties);
173  ::avro::decode(d, v.info);
174  }
175  }
176  };
177 } // end namespace avro
178 
179 #endif // __SHOW_FUNCTIONS_H__