GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
show_datasink.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_DATASINK_H__
7 #define __SHOW_DATASINK_H__
8 
9 namespace gpudb
10 {
11 
21  {
22 
28  name(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
44  ShowDatasinkRequest(const std::string& name_, const std::map<std::string, std::string>& options_):
45  name( name_ ),
46  options( options_ )
47  {
48  }
49 
50  std::string name;
51  std::map<std::string, std::string> options;
52  };
53 }
54 
55 namespace avro
56 {
57  template<> struct codec_traits<gpudb::ShowDatasinkRequest>
58  {
59  static void encode(Encoder& e, const gpudb::ShowDatasinkRequest& v)
60  {
61  ::avro::encode(e, v.name);
62  ::avro::encode(e, v.options);
63  }
64 
65  static void decode(Decoder& d, gpudb::ShowDatasinkRequest& v)
66  {
67  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
68  {
69  const std::vector<size_t> fo = rd->fieldOrder();
70 
71  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
72  {
73  switch (*it)
74  {
75  case 0:
76  ::avro::decode(d, v.name);
77  break;
78 
79  case 1:
80  ::avro::decode(d, v.options);
81  break;
82 
83  default:
84  break;
85  }
86  }
87  }
88  else
89  {
90  ::avro::decode(d, v.name);
91  ::avro::decode(d, v.options);
92  }
93  }
94  };
95 }
96 
97 namespace gpudb
98 {
99 
109  {
110 
116  datasinkNames(std::vector<std::string>()),
117  destinationTypes(std::vector<std::string>()),
118  additionalInfo(std::vector<std::map<std::string, std::string> >()),
119  info(std::map<std::string, std::string>())
120  {
121  }
122 
123  std::vector<std::string> datasinkNames;
124  std::vector<std::string> destinationTypes;
125  std::vector<std::map<std::string, std::string> > additionalInfo;
126  std::map<std::string, std::string> info;
127  };
128 }
129 
130 namespace avro
131 {
132  template<> struct codec_traits<gpudb::ShowDatasinkResponse>
133  {
134  static void encode(Encoder& e, const gpudb::ShowDatasinkResponse& v)
135  {
136  ::avro::encode(e, v.datasinkNames);
137  ::avro::encode(e, v.destinationTypes);
138  ::avro::encode(e, v.additionalInfo);
139  ::avro::encode(e, v.info);
140  }
141 
142  static void decode(Decoder& d, gpudb::ShowDatasinkResponse& v)
143  {
144  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
145  {
146  const std::vector<size_t> fo = rd->fieldOrder();
147 
148  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
149  {
150  switch (*it)
151  {
152  case 0:
153  ::avro::decode(d, v.datasinkNames);
154  break;
155 
156  case 1:
157  ::avro::decode(d, v.destinationTypes);
158  break;
159 
160  case 2:
161  ::avro::decode(d, v.additionalInfo);
162  break;
163 
164  case 3:
165  ::avro::decode(d, v.info);
166  break;
167 
168  default:
169  break;
170  }
171  }
172  }
173  else
174  {
175  ::avro::decode(d, v.datasinkNames);
176  ::avro::decode(d, v.destinationTypes);
177  ::avro::decode(d, v.additionalInfo);
178  ::avro::decode(d, v.info);
179  }
180  }
181  };
182 }
183 
184 #endif
ShowDatasinkRequest(const std::string &name_, const std::map< std::string, std::string > &options_)
Constructs a ShowDatasinkRequest object with the specified parameters.
Definition: show_datasink.h:44
ShowDatasinkResponse()
Constructs a ShowDatasinkResponse object with default parameter values.
std::vector< std::string > destinationTypes
std::vector< std::string > datasinkNames
A set of input parameters for const.
Definition: show_datasink.h:20
ShowDatasinkRequest()
Constructs a ShowDatasinkRequest object with default parameter values.
Definition: show_datasink.h:27
std::map< std::string, std::string > info
std::vector< std::map< std::string, std::string > > additionalInfo
std::map< std::string, std::string > options
Definition: show_datasink.h:51
A set of output parameters for const.