GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grant_permission_system.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 __GRANT_PERMISSION_SYSTEM_H__
7 #define __GRANT_PERMISSION_SYSTEM_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  name(std::string()),
27  permission(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
58  GrantPermissionSystemRequest(const std::string& name_, const std::string& permission_, const std::map<std::string, std::string>& options_):
59  name( name_ ),
60  permission( permission_ ),
61  options( options_ )
62  {
63  }
64 
65  std::string name;
66  std::string permission;
67  std::map<std::string, std::string> options;
68  };
69 }
70 
71 namespace avro
72 {
73  template<> struct codec_traits<gpudb::GrantPermissionSystemRequest>
74  {
75  static void encode(Encoder& e, const gpudb::GrantPermissionSystemRequest& v)
76  {
77  ::avro::encode(e, v.name);
78  ::avro::encode(e, v.permission);
79  ::avro::encode(e, v.options);
80  }
81 
82  static void decode(Decoder& d, gpudb::GrantPermissionSystemRequest& v)
83  {
84  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
85  {
86  const std::vector<size_t> fo = rd->fieldOrder();
87 
88  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
89  {
90  switch (*it)
91  {
92  case 0:
93  ::avro::decode(d, v.name);
94  break;
95 
96  case 1:
97  ::avro::decode(d, v.permission);
98  break;
99 
100  case 2:
101  ::avro::decode(d, v.options);
102  break;
103 
104  default:
105  break;
106  }
107  }
108  }
109  else
110  {
111  ::avro::decode(d, v.name);
112  ::avro::decode(d, v.permission);
113  ::avro::decode(d, v.options);
114  }
115  }
116  };
117 }
118 
119 namespace gpudb
120 {
121 
129  {
130 
136  name(std::string()),
137  permission(std::string()),
138  info(std::map<std::string, std::string>())
139  {
140  }
141 
142  std::string name;
143  std::string permission;
144  std::map<std::string, std::string> info;
145  };
146 }
147 
148 namespace avro
149 {
150  template<> struct codec_traits<gpudb::GrantPermissionSystemResponse>
151  {
152  static void encode(Encoder& e, const gpudb::GrantPermissionSystemResponse& v)
153  {
154  ::avro::encode(e, v.name);
155  ::avro::encode(e, v.permission);
156  ::avro::encode(e, v.info);
157  }
158 
159  static void decode(Decoder& d, gpudb::GrantPermissionSystemResponse& v)
160  {
161  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
162  {
163  const std::vector<size_t> fo = rd->fieldOrder();
164 
165  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
166  {
167  switch (*it)
168  {
169  case 0:
170  ::avro::decode(d, v.name);
171  break;
172 
173  case 1:
174  ::avro::decode(d, v.permission);
175  break;
176 
177  case 2:
178  ::avro::decode(d, v.info);
179  break;
180 
181  default:
182  break;
183  }
184  }
185  }
186  else
187  {
188  ::avro::decode(d, v.name);
189  ::avro::decode(d, v.permission);
190  ::avro::decode(d, v.info);
191  }
192  }
193  };
194 }
195 
196 #endif
std::map< std::string, std::string > info
GrantPermissionSystemRequest(const std::string &name_, const std::string &permission_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionSystemRequest object with the specified parameters.
A set of input parameters for const.
std::map< std::string, std::string > options
GrantPermissionSystemRequest()
Constructs a GrantPermissionSystemRequest object with default parameter values.
A set of output parameters for const.
GrantPermissionSystemResponse()
Constructs a GrantPermissionSystemResponse object with default parameter values.