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