GPUdb C++ API  Version 5.2.0.0
alter_table_metadata.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 __ALTER_TABLE_METADATA_H__
7 #define __ALTER_TABLE_METADATA_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  tableNames(std::vector<std::string>()),
30  metadataMap(std::map<std::string, std::string>()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
53  AlterTableMetadataRequest(const std::vector<std::string>& tableNames, const std::map<std::string, std::string>& metadataMap, const std::map<std::string, std::string>& options):
54  tableNames(tableNames),
55  metadataMap(metadataMap),
56  options(options)
57  {
58  }
59 
60  std::vector<std::string> tableNames;
61  std::map<std::string, std::string> metadataMap;
62  std::map<std::string, std::string> options;
63  };
64 }
65 
66 namespace avro
67 {
68  template<> struct codec_traits<gpudb::AlterTableMetadataRequest>
69  {
70  static void encode(Encoder& e, const gpudb::AlterTableMetadataRequest& v)
71  {
72  ::avro::encode(e, v.tableNames);
73  ::avro::encode(e, v.metadataMap);
74  ::avro::encode(e, v.options);
75  }
76 
77  static void decode(Decoder& d, gpudb::AlterTableMetadataRequest& v)
78  {
79  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
80  {
81  const std::vector<size_t> fo = rd->fieldOrder();
82 
83  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
84  {
85  switch (*it)
86  {
87  case 0:
88  ::avro::decode(d, v.tableNames);
89  break;
90 
91  case 1:
92  ::avro::decode(d, v.metadataMap);
93  break;
94 
95  case 2:
96  ::avro::decode(d, v.options);
97  break;
98 
99  default:
100  break;
101  }
102  }
103  }
104  else
105  {
106  ::avro::decode(d, v.tableNames);
107  ::avro::decode(d, v.metadataMap);
108  ::avro::decode(d, v.options);
109  }
110  }
111  };
112 }
113 
114 namespace gpudb
115 {
116 
127  {
128 
134  tableNames(std::vector<std::string>()),
135  metadataMap(std::map<std::string, std::string>())
136  {
137  }
138 
139  std::vector<std::string> tableNames;
140  std::map<std::string, std::string> metadataMap;
141  };
142 }
143 
144 namespace avro
145 {
146  template<> struct codec_traits<gpudb::AlterTableMetadataResponse>
147  {
148  static void encode(Encoder& e, const gpudb::AlterTableMetadataResponse& v)
149  {
150  ::avro::encode(e, v.tableNames);
151  ::avro::encode(e, v.metadataMap);
152  }
153 
154  static void decode(Decoder& d, gpudb::AlterTableMetadataResponse& v)
155  {
156  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
157  {
158  const std::vector<size_t> fo = rd->fieldOrder();
159 
160  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
161  {
162  switch (*it)
163  {
164  case 0:
165  ::avro::decode(d, v.tableNames);
166  break;
167 
168  case 1:
169  ::avro::decode(d, v.metadataMap);
170  break;
171 
172  default:
173  break;
174  }
175  }
176  }
177  else
178  {
179  ::avro::decode(d, v.tableNames);
180  ::avro::decode(d, v.metadataMap);
181  }
182  }
183  };
184 }
185 
186 #endif
AlterTableMetadataRequest()
Constructs an AlterTableMetadataRequest object with default parameter values.
AlterTableMetadataRequest(const std::vector< std::string > &tableNames, const std::map< std::string, std::string > &metadataMap, const std::map< std::string, std::string > &options)
Constructs an AlterTableMetadataRequest object with the specified parameters.
std::map< std::string, std::string > metadataMap
A set of input parameters for alterTableMetadata(const AlterTableMetadataRequest&) const...
AlterTableMetadataResponse()
Constructs an AlterTableMetadataResponse object with default parameter values.
A set of output parameters for alterTableMetadata(const AlterTableMetadataRequest&) const...
std::map< std::string, std::string > metadataMap
std::map< std::string, std::string > options
std::vector< std::string > tableNames
std::vector< std::string > tableNames