GPUdb C++ API  Version 7.2.2.4
grant_permission_directory.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica 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 {
20  {
26  name(std::string()),
27  permission(std::string()),
28  directoryName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
63  GrantPermissionDirectoryRequest(const std::string& name_, const std::string& permission_, const std::string& directoryName_, const std::map<std::string, std::string>& options_):
64  name( name_ ),
65  permission( permission_ ),
66  directoryName( directoryName_ ),
67  options( options_ )
68  {
69  }
70 
75  std::string name;
76 
91  std::string permission;
92 
97  std::string directoryName;
98 
102  std::map<std::string, std::string> options;
103  };
104 } // end namespace gpudb
105 
106 namespace avro
107 {
108  template<> struct codec_traits<gpudb::GrantPermissionDirectoryRequest>
109  {
110  static void encode(Encoder& e, const gpudb::GrantPermissionDirectoryRequest& v)
111  {
112  ::avro::encode(e, v.name);
113  ::avro::encode(e, v.permission);
114  ::avro::encode(e, v.directoryName);
115  ::avro::encode(e, v.options);
116  }
117 
118  static void decode(Decoder& d, gpudb::GrantPermissionDirectoryRequest& v)
119  {
120  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
121  {
122  const std::vector<size_t> fo = rd->fieldOrder();
123 
124  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
125  {
126  switch (*it)
127  {
128  case 0:
129  ::avro::decode(d, v.name);
130  break;
131 
132  case 1:
133  ::avro::decode(d, v.permission);
134  break;
135 
136  case 2:
137  ::avro::decode(d, v.directoryName);
138  break;
139 
140  case 3:
141  ::avro::decode(d, v.options);
142  break;
143 
144  default:
145  break;
146  }
147  }
148  }
149  else
150  {
151  ::avro::decode(d, v.name);
152  ::avro::decode(d, v.permission);
153  ::avro::decode(d, v.directoryName);
154  ::avro::decode(d, v.options);
155  }
156  }
157  };
158 } // end namespace avro
159 
160 namespace gpudb
161 {
168  {
174  name(std::string()),
175  permission(std::string()),
176  directoryName(std::string()),
177  info(std::map<std::string, std::string>())
178  {
179  }
180 
184  std::string name;
185 
190  std::string permission;
191 
196  std::string directoryName;
197 
201  std::map<std::string, std::string> info;
202  };
203 } // end namespace gpudb
204 
205 namespace avro
206 {
207  template<> struct codec_traits<gpudb::GrantPermissionDirectoryResponse>
208  {
209  static void encode(Encoder& e, const gpudb::GrantPermissionDirectoryResponse& v)
210  {
211  ::avro::encode(e, v.name);
212  ::avro::encode(e, v.permission);
213  ::avro::encode(e, v.directoryName);
214  ::avro::encode(e, v.info);
215  }
216 
217  static void decode(Decoder& d, gpudb::GrantPermissionDirectoryResponse& v)
218  {
219  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
220  {
221  const std::vector<size_t> fo = rd->fieldOrder();
222 
223  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
224  {
225  switch (*it)
226  {
227  case 0:
228  ::avro::decode(d, v.name);
229  break;
230 
231  case 1:
232  ::avro::decode(d, v.permission);
233  break;
234 
235  case 2:
236  ::avro::decode(d, v.directoryName);
237  break;
238 
239  case 3:
240  ::avro::decode(d, v.info);
241  break;
242 
243  default:
244  break;
245  }
246  }
247  }
248  else
249  {
250  ::avro::decode(d, v.name);
251  ::avro::decode(d, v.permission);
252  ::avro::decode(d, v.directoryName);
253  ::avro::decode(d, v.info);
254  }
255  }
256  };
257 } // end namespace avro
258 
259 #endif // __GRANT_PERMISSION_DIRECTORY_H__
GrantPermissionDirectoryRequest()
Constructs a GrantPermissionDirectoryRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
std::map< std::string, std::string > info
Additional information.
std::string directoryName
Value of directoryName.
A set of parameters for GPUdb::grantPermissionDirectory.
std::string permission
Permission to grant to the user or role.
GrantPermissionDirectoryResponse()
Constructs a GrantPermissionDirectoryResponse object with default parameters.
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 results returned by GPUdb::grantPermissionDirectory.
std::string directoryName
Name of the KiFS directory to which the permission grants access.
std::string name
Name of the user or role to which the permission will be granted.