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