GPUdb C++ API  Version 7.2.2.4
show_datasink.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_DATASINK_H__
7 #define __SHOW_DATASINK_H__
8 
9 namespace gpudb
10 {
21  {
26  name(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
42  ShowDatasinkRequest(const std::string& name_, const std::map<std::string, std::string>& options_):
43  name( name_ ),
44  options( options_ )
45  {
46  }
47 
53  std::string name;
54 
58  std::map<std::string, std::string> options;
59  };
60 } // end namespace gpudb
61 
62 namespace avro
63 {
64  template<> struct codec_traits<gpudb::ShowDatasinkRequest>
65  {
66  static void encode(Encoder& e, const gpudb::ShowDatasinkRequest& v)
67  {
68  ::avro::encode(e, v.name);
69  ::avro::encode(e, v.options);
70  }
71 
72  static void decode(Decoder& d, gpudb::ShowDatasinkRequest& v)
73  {
74  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
75  {
76  const std::vector<size_t> fo = rd->fieldOrder();
77 
78  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
79  {
80  switch (*it)
81  {
82  case 0:
83  ::avro::decode(d, v.name);
84  break;
85 
86  case 1:
87  ::avro::decode(d, v.options);
88  break;
89 
90  default:
91  break;
92  }
93  }
94  }
95  else
96  {
97  ::avro::decode(d, v.name);
98  ::avro::decode(d, v.options);
99  }
100  }
101  };
102 } // end namespace avro
103 
104 namespace gpudb
105 {
112  {
117  datasinkNames(std::vector<std::string>()),
118  destinationTypes(std::vector<std::string>()),
119  additionalInfo(std::vector<std::map<std::string, std::string> >()),
120  info(std::map<std::string, std::string>())
121  {
122  }
123 
127  std::vector<std::string> datasinkNames;
128 
132  std::vector<std::string> destinationTypes;
133 
148  std::vector<std::map<std::string, std::string> > additionalInfo;
149 
153  std::map<std::string, std::string> info;
154  };
155 } // end namespace gpudb
156 
157 namespace avro
158 {
159  template<> struct codec_traits<gpudb::ShowDatasinkResponse>
160  {
161  static void encode(Encoder& e, const gpudb::ShowDatasinkResponse& v)
162  {
163  ::avro::encode(e, v.datasinkNames);
164  ::avro::encode(e, v.destinationTypes);
165  ::avro::encode(e, v.additionalInfo);
166  ::avro::encode(e, v.info);
167  }
168 
169  static void decode(Decoder& d, gpudb::ShowDatasinkResponse& v)
170  {
171  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
172  {
173  const std::vector<size_t> fo = rd->fieldOrder();
174 
175  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
176  {
177  switch (*it)
178  {
179  case 0:
180  ::avro::decode(d, v.datasinkNames);
181  break;
182 
183  case 1:
184  ::avro::decode(d, v.destinationTypes);
185  break;
186 
187  case 2:
188  ::avro::decode(d, v.additionalInfo);
189  break;
190 
191  case 3:
192  ::avro::decode(d, v.info);
193  break;
194 
195  default:
196  break;
197  }
198  }
199  }
200  else
201  {
202  ::avro::decode(d, v.datasinkNames);
203  ::avro::decode(d, v.destinationTypes);
204  ::avro::decode(d, v.additionalInfo);
205  ::avro::decode(d, v.info);
206  }
207  }
208  };
209 } // end namespace avro
210 
211 #endif // __SHOW_DATASINK_H__
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:42
ShowDatasinkResponse()
Constructs a ShowDatasinkResponse object with default parameters.
std::vector< std::string > destinationTypes
The destination type of the data sinks named in datasinkNames.
std::string name
Name of the data sink for which to retrieve information.
Definition: show_datasink.h:53
std::vector< std::string > datasinkNames
The data sink names.
A set of parameters for GPUdb::showDatasink.
Definition: show_datasink.h:20
ShowDatasinkRequest()
Constructs a ShowDatasinkRequest object with default parameters.
Definition: show_datasink.h:25
std::map< std::string, std::string > info
Additional information.
std::vector< std::map< std::string, std::string > > additionalInfo
Additional information about the respective data sinks in datasinkNames.
std::map< std::string, std::string > options
Optional parameters.
Definition: show_datasink.h:58
A set of results returned by GPUdb::showDatasink.