GPUdb C++ API  Version 7.2.2.4
show_files.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_FILES_H__
7 #define __SHOW_FILES_H__
8 
9 namespace gpudb
10 {
20  {
25  paths(std::vector<std::string>()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
43  ShowFilesRequest(const std::vector<std::string>& paths_, const std::map<std::string, std::string>& options_):
44  paths( paths_ ),
45  options( options_ )
46  {
47  }
48 
58  std::vector<std::string> paths;
59 
63  std::map<std::string, std::string> options;
64  };
65 } // end namespace gpudb
66 
67 namespace avro
68 {
69  template<> struct codec_traits<gpudb::ShowFilesRequest>
70  {
71  static void encode(Encoder& e, const gpudb::ShowFilesRequest& v)
72  {
73  ::avro::encode(e, v.paths);
74  ::avro::encode(e, v.options);
75  }
76 
77  static void decode(Decoder& d, gpudb::ShowFilesRequest& 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.paths);
89  break;
90 
91  case 1:
92  ::avro::decode(d, v.options);
93  break;
94 
95  default:
96  break;
97  }
98  }
99  }
100  else
101  {
102  ::avro::decode(d, v.paths);
103  ::avro::decode(d, v.options);
104  }
105  }
106  };
107 } // end namespace avro
108 
109 namespace gpudb
110 {
116  {
121  fileNames(std::vector<std::string>()),
122  sizes(std::vector<int64_t>()),
123  users(std::vector<std::string>()),
124  creationTimes(std::vector<int64_t>()),
125  info(std::map<std::string, std::string>())
126  {
127  }
128 
132  std::vector<std::string> fileNames;
133 
137  std::vector<int64_t> sizes;
138 
142  std::vector<std::string> users;
143 
147  std::vector<int64_t> creationTimes;
148 
157  std::map<std::string, std::string> info;
158  };
159 } // end namespace gpudb
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::ShowFilesResponse>
164  {
165  static void encode(Encoder& e, const gpudb::ShowFilesResponse& v)
166  {
167  ::avro::encode(e, v.fileNames);
168  ::avro::encode(e, v.sizes);
169  ::avro::encode(e, v.users);
170  ::avro::encode(e, v.creationTimes);
171  ::avro::encode(e, v.info);
172  }
173 
174  static void decode(Decoder& d, gpudb::ShowFilesResponse& v)
175  {
176  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
177  {
178  const std::vector<size_t> fo = rd->fieldOrder();
179 
180  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
181  {
182  switch (*it)
183  {
184  case 0:
185  ::avro::decode(d, v.fileNames);
186  break;
187 
188  case 1:
189  ::avro::decode(d, v.sizes);
190  break;
191 
192  case 2:
193  ::avro::decode(d, v.users);
194  break;
195 
196  case 3:
197  ::avro::decode(d, v.creationTimes);
198  break;
199 
200  case 4:
201  ::avro::decode(d, v.info);
202  break;
203 
204  default:
205  break;
206  }
207  }
208  }
209  else
210  {
211  ::avro::decode(d, v.fileNames);
212  ::avro::decode(d, v.sizes);
213  ::avro::decode(d, v.users);
214  ::avro::decode(d, v.creationTimes);
215  ::avro::decode(d, v.info);
216  }
217  }
218  };
219 } // end namespace avro
220 
221 #endif // __SHOW_FILES_H__
std::map< std::string, std::string > info
Additional information.
Definition: show_files.h:157
ShowFilesResponse()
Constructs a ShowFilesResponse object with default parameters.
Definition: show_files.h:120
std::map< std::string, std::string > options
Optional parameters.
Definition: show_files.h:63
std::vector< int64_t > sizes
Size of each file, in bytes.
Definition: show_files.h:137
A set of results returned by GPUdb::showFiles.
Definition: show_files.h:115
std::vector< std::string > paths
File paths to show.
Definition: show_files.h:58
std::vector< std::string > users
User that created the file.
Definition: show_files.h:142
A set of parameters for GPUdb::showFiles.
Definition: show_files.h:19
std::vector< std::string > fileNames
A listing of files in the paths specified.
Definition: show_files.h:132
ShowFilesRequest(const std::vector< std::string > &paths_, const std::map< std::string, std::string > &options_)
Constructs a ShowFilesRequest object with the specified parameters.
Definition: show_files.h:43
ShowFilesRequest()
Constructs a ShowFilesRequest object with default parameters.
Definition: show_files.h:24
std::vector< int64_t > creationTimes
Creation time for each file, in milliseconds since epoch.
Definition: show_files.h:147