GPUdb C++ API  Version 5.2.0.0
admin_shutdown.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_SHUTDOWN_H__
7 #define __ADMIN_SHUTDOWN_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  exitType(std::string()),
27  authorization(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
44  AdminShutdownRequest(const std::string& exitType, const std::string& authorization, const std::map<std::string, std::string>& options):
45  exitType(exitType),
46  authorization(authorization),
47  options(options)
48  {
49  }
50 
51  std::string exitType;
52  std::string authorization;
53  std::map<std::string, std::string> options;
54  };
55 }
56 
57 namespace avro
58 {
59  template<> struct codec_traits<gpudb::AdminShutdownRequest>
60  {
61  static void encode(Encoder& e, const gpudb::AdminShutdownRequest& v)
62  {
63  ::avro::encode(e, v.exitType);
64  ::avro::encode(e, v.authorization);
65  ::avro::encode(e, v.options);
66  }
67 
68  static void decode(Decoder& d, gpudb::AdminShutdownRequest& v)
69  {
70  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
71  {
72  const std::vector<size_t> fo = rd->fieldOrder();
73 
74  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
75  {
76  switch (*it)
77  {
78  case 0:
79  ::avro::decode(d, v.exitType);
80  break;
81 
82  case 1:
83  ::avro::decode(d, v.authorization);
84  break;
85 
86  case 2:
87  ::avro::decode(d, v.options);
88  break;
89 
90  default:
91  break;
92  }
93  }
94  }
95  else
96  {
97  ::avro::decode(d, v.exitType);
98  ::avro::decode(d, v.authorization);
99  ::avro::decode(d, v.options);
100  }
101  }
102  };
103 }
104 
105 namespace gpudb
106 {
107 
115  {
116 
122  exitStatus(std::string())
123  {
124  }
125 
126  std::string exitStatus;
127  };
128 }
129 
130 namespace avro
131 {
132  template<> struct codec_traits<gpudb::AdminShutdownResponse>
133  {
134  static void encode(Encoder& e, const gpudb::AdminShutdownResponse& v)
135  {
136  ::avro::encode(e, v.exitStatus);
137  }
138 
139  static void decode(Decoder& d, gpudb::AdminShutdownResponse& v)
140  {
141  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
142  {
143  const std::vector<size_t> fo = rd->fieldOrder();
144 
145  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
146  {
147  switch (*it)
148  {
149  case 0:
150  ::avro::decode(d, v.exitStatus);
151  break;
152 
153  default:
154  break;
155  }
156  }
157  }
158  else
159  {
160  ::avro::decode(d, v.exitStatus);
161  }
162  }
163  };
164 }
165 
166 #endif
std::map< std::string, std::string > options
AdminShutdownRequest()
Constructs an AdminShutdownRequest object with default parameter values.
AdminShutdownResponse()
Constructs an AdminShutdownResponse object with default parameter values.
A set of output parameters for adminShutdown(const AdminShutdownRequest&) const.
A set of input parameters for adminShutdown(const AdminShutdownRequest&) const.
AdminShutdownRequest(const std::string &exitType, const std::string &authorization, const std::map< std::string, std::string > &options)
Constructs an AdminShutdownRequest object with the specified parameters.