GPUdb C++ API  Version 7.2.2.4
show_resource_statistics.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_RESOURCE_STATISTICS_H__
7 #define __SHOW_RESOURCE_STATISTICS_H__
8 
9 namespace gpudb
10 {
21  {
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
38  ShowResourceStatisticsRequest(const std::map<std::string, std::string>& options_):
39  options( options_ )
40  {
41  }
42 
46  std::map<std::string, std::string> options;
47  };
48 } // end namespace gpudb
49 
50 namespace avro
51 {
52  template<> struct codec_traits<gpudb::ShowResourceStatisticsRequest>
53  {
54  static void encode(Encoder& e, const gpudb::ShowResourceStatisticsRequest& v)
55  {
56  ::avro::encode(e, v.options);
57  }
58 
59  static void decode(Decoder& d, gpudb::ShowResourceStatisticsRequest& v)
60  {
61  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
62  {
63  const std::vector<size_t> fo = rd->fieldOrder();
64 
65  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
66  {
67  switch (*it)
68  {
69  case 0:
70  ::avro::decode(d, v.options);
71  break;
72 
73  default:
74  break;
75  }
76  }
77  }
78  else
79  {
80  ::avro::decode(d, v.options);
81  }
82  }
83  };
84 } // end namespace avro
85 
86 namespace gpudb
87 {
94  {
100  statisticsMap(std::map<std::string, std::string>()),
101  info(std::map<std::string, std::string>())
102  {
103  }
104 
108  std::map<std::string, std::string> statisticsMap;
109 
113  std::map<std::string, std::string> info;
114  };
115 } // end namespace gpudb
116 
117 namespace avro
118 {
119  template<> struct codec_traits<gpudb::ShowResourceStatisticsResponse>
120  {
121  static void encode(Encoder& e, const gpudb::ShowResourceStatisticsResponse& v)
122  {
123  ::avro::encode(e, v.statisticsMap);
124  ::avro::encode(e, v.info);
125  }
126 
127  static void decode(Decoder& d, gpudb::ShowResourceStatisticsResponse& v)
128  {
129  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
130  {
131  const std::vector<size_t> fo = rd->fieldOrder();
132 
133  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
134  {
135  switch (*it)
136  {
137  case 0:
138  ::avro::decode(d, v.statisticsMap);
139  break;
140 
141  case 1:
142  ::avro::decode(d, v.info);
143  break;
144 
145  default:
146  break;
147  }
148  }
149  }
150  else
151  {
152  ::avro::decode(d, v.statisticsMap);
153  ::avro::decode(d, v.info);
154  }
155  }
156  };
157 } // end namespace avro
158 
159 #endif // __SHOW_RESOURCE_STATISTICS_H__
A set of parameters for GPUdb::showResourceStatistics.
std::map< std::string, std::string > options
Optional parameters.
ShowResourceStatisticsRequest(const std::map< std::string, std::string > &options_)
Constructs a ShowResourceStatisticsRequest object with the specified parameters.
ShowResourceStatisticsResponse()
Constructs a ShowResourceStatisticsResponse object with default parameters.
std::map< std::string, std::string > statisticsMap
Map of resource statistics.
std::map< std::string, std::string > info
Additional information.
ShowResourceStatisticsRequest()
Constructs a ShowResourceStatisticsRequest object with default parameters.
A set of results returned by GPUdb::showResourceStatistics.