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