GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grant_permission_directory.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_DIRECTORY_H__
7 #define __GRANT_PERMISSION_DIRECTORY_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  name(std::string()),
28  permission(std::string()),
29  directoryName(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
60  GrantPermissionDirectoryRequest(const std::string& name_, const std::string& permission_, const std::string& directoryName_, const std::map<std::string, std::string>& options_):
61  name( name_ ),
62  permission( permission_ ),
63  directoryName( directoryName_ ),
64  options( options_ )
65  {
66  }
67 
68  std::string name;
69  std::string permission;
70  std::string directoryName;
71  std::map<std::string, std::string> options;
72  };
73 }
74 
75 namespace avro
76 {
77  template<> struct codec_traits<gpudb::GrantPermissionDirectoryRequest>
78  {
79  static void encode(Encoder& e, const gpudb::GrantPermissionDirectoryRequest& v)
80  {
81  ::avro::encode(e, v.name);
82  ::avro::encode(e, v.permission);
83  ::avro::encode(e, v.directoryName);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::GrantPermissionDirectoryRequest& v)
88  {
89  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
90  {
91  const std::vector<size_t> fo = rd->fieldOrder();
92 
93  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
94  {
95  switch (*it)
96  {
97  case 0:
98  ::avro::decode(d, v.name);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.permission);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.directoryName);
107  break;
108 
109  case 3:
110  ::avro::decode(d, v.options);
111  break;
112 
113  default:
114  break;
115  }
116  }
117  }
118  else
119  {
120  ::avro::decode(d, v.name);
121  ::avro::decode(d, v.permission);
122  ::avro::decode(d, v.directoryName);
123  ::avro::decode(d, v.options);
124  }
125  }
126  };
127 }
128 
129 namespace gpudb
130 {
131 
140  {
141 
147  name(std::string()),
148  permission(std::string()),
149  directoryName(std::string()),
150  info(std::map<std::string, std::string>())
151  {
152  }
153 
154  std::string name;
155  std::string permission;
156  std::string directoryName;
157  std::map<std::string, std::string> info;
158  };
159 }
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::GrantPermissionDirectoryResponse>
164  {
165  static void encode(Encoder& e, const gpudb::GrantPermissionDirectoryResponse& v)
166  {
167  ::avro::encode(e, v.name);
168  ::avro::encode(e, v.permission);
169  ::avro::encode(e, v.directoryName);
170  ::avro::encode(e, v.info);
171  }
172 
173  static void decode(Decoder& d, gpudb::GrantPermissionDirectoryResponse& v)
174  {
175  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
176  {
177  const std::vector<size_t> fo = rd->fieldOrder();
178 
179  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
180  {
181  switch (*it)
182  {
183  case 0:
184  ::avro::decode(d, v.name);
185  break;
186 
187  case 1:
188  ::avro::decode(d, v.permission);
189  break;
190 
191  case 2:
192  ::avro::decode(d, v.directoryName);
193  break;
194 
195  case 3:
196  ::avro::decode(d, v.info);
197  break;
198 
199  default:
200  break;
201  }
202  }
203  }
204  else
205  {
206  ::avro::decode(d, v.name);
207  ::avro::decode(d, v.permission);
208  ::avro::decode(d, v.directoryName);
209  ::avro::decode(d, v.info);
210  }
211  }
212  };
213 }
214 
215 #endif
GrantPermissionDirectoryRequest()
Constructs a GrantPermissionDirectoryRequest object with default parameter values.
std::map< std::string, std::string > options
std::map< std::string, std::string > info
A set of input parameters for const.
GrantPermissionDirectoryResponse()
Constructs a GrantPermissionDirectoryResponse object with default parameter values.
GrantPermissionDirectoryRequest(const std::string &name_, const std::string &permission_, const std::string &directoryName_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionDirectoryRequest object with the specified parameters.
A set of output parameters for const.