GPUdb C++ API  Version 6.0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
admin_offline.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 __ADMIN_OFFLINE_H__
7 #define __ADMIN_OFFLINE_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  offline(bool()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
44  AdminOfflineRequest(const bool offline_, const std::map<std::string, std::string>& options_):
45  offline( offline_ ),
46  options( options_ )
47  {
48  }
49 
50  bool offline;
51  std::map<std::string, std::string> options;
52  };
53 }
54 
55 namespace avro
56 {
57  template<> struct codec_traits<gpudb::AdminOfflineRequest>
58  {
59  static void encode(Encoder& e, const gpudb::AdminOfflineRequest& v)
60  {
61  ::avro::encode(e, v.offline);
62  ::avro::encode(e, v.options);
63  }
64 
65  static void decode(Decoder& d, gpudb::AdminOfflineRequest& v)
66  {
67  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
68  {
69  const std::vector<size_t> fo = rd->fieldOrder();
70 
71  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
72  {
73  switch (*it)
74  {
75  case 0:
76  ::avro::decode(d, v.offline);
77  break;
78 
79  case 1:
80  ::avro::decode(d, v.options);
81  break;
82 
83  default:
84  break;
85  }
86  }
87  }
88  else
89  {
90  ::avro::decode(d, v.offline);
91  ::avro::decode(d, v.options);
92  }
93  }
94  };
95 }
96 
97 namespace gpudb
98 {
99 
108  {
109 
115  isOffline(bool())
116  {
117  }
118 
119  bool isOffline;
120  };
121 }
122 
123 namespace avro
124 {
125  template<> struct codec_traits<gpudb::AdminOfflineResponse>
126  {
127  static void encode(Encoder& e, const gpudb::AdminOfflineResponse& v)
128  {
129  ::avro::encode(e, v.isOffline);
130  }
131 
132  static void decode(Decoder& d, gpudb::AdminOfflineResponse& v)
133  {
134  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
135  {
136  const std::vector<size_t> fo = rd->fieldOrder();
137 
138  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
139  {
140  switch (*it)
141  {
142  case 0:
143  ::avro::decode(d, v.isOffline);
144  break;
145 
146  default:
147  break;
148  }
149  }
150  }
151  else
152  {
153  ::avro::decode(d, v.isOffline);
154  }
155  }
156  };
157 }
158 
159 #endif
AdminOfflineRequest()
Constructs an AdminOfflineRequest object with default parameter values.
Definition: admin_offline.h:26
AdminOfflineResponse()
Constructs an AdminOfflineResponse object with default parameter values.
A set of output parameters for const.
std::map< std::string, std::string > options
Definition: admin_offline.h:51
AdminOfflineRequest(const bool offline_, const std::map< std::string, std::string > &options_)
Constructs an AdminOfflineRequest object with the specified parameters.
Definition: admin_offline.h:44
A set of input parameters for const.
Definition: admin_offline.h:19