GPUdb C++ API  Version 5.2.0.0
grant_permission_table.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_TABLE_H__
7 #define __GRANT_PERMISSION_TABLE_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  name(std::string()),
27  permission(std::string()),
28  tableName(std::string()),
29  filterExpression(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
53  GrantPermissionTableRequest(const std::string& name, const std::string& permission, const std::string& tableName, const std::string& filterExpression, const std::map<std::string, std::string>& options):
54  name(name),
55  permission(permission),
56  tableName(tableName),
57  filterExpression(filterExpression),
58  options(options)
59  {
60  }
61 
62  std::string name;
63  std::string permission;
64  std::string tableName;
65  std::string filterExpression;
66  std::map<std::string, std::string> options;
67  };
68 }
69 
70 namespace avro
71 {
72  template<> struct codec_traits<gpudb::GrantPermissionTableRequest>
73  {
74  static void encode(Encoder& e, const gpudb::GrantPermissionTableRequest& v)
75  {
76  ::avro::encode(e, v.name);
77  ::avro::encode(e, v.permission);
78  ::avro::encode(e, v.tableName);
79  ::avro::encode(e, v.filterExpression);
80  ::avro::encode(e, v.options);
81  }
82 
83  static void decode(Decoder& d, gpudb::GrantPermissionTableRequest& 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.tableName);
103  break;
104 
105  case 3:
106  ::avro::decode(d, v.filterExpression);
107  break;
108 
109  case 4:
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.tableName);
123  ::avro::decode(d, v.filterExpression);
124  ::avro::decode(d, v.options);
125  }
126  }
127  };
128 }
129 
130 namespace gpudb
131 {
132 
140  {
141 
147  name(std::string()),
148  permission(std::string()),
149  tableName(std::string()),
150  filterExpression(std::string())
151  {
152  }
153 
154  std::string name;
155  std::string permission;
156  std::string tableName;
157  std::string filterExpression;
158  };
159 }
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::GrantPermissionTableResponse>
164  {
165  static void encode(Encoder& e, const gpudb::GrantPermissionTableResponse& v)
166  {
167  ::avro::encode(e, v.name);
168  ::avro::encode(e, v.permission);
169  ::avro::encode(e, v.tableName);
170  ::avro::encode(e, v.filterExpression);
171  }
172 
173  static void decode(Decoder& d, gpudb::GrantPermissionTableResponse& 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.tableName);
193  break;
194 
195  case 3:
196  ::avro::decode(d, v.filterExpression);
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.tableName);
209  ::avro::decode(d, v.filterExpression);
210  }
211  }
212  };
213 }
214 
215 #endif
GrantPermissionTableRequest()
Constructs a GrantPermissionTableRequest object with default parameter values.
GrantPermissionTableRequest(const std::string &name, const std::string &permission, const std::string &tableName, const std::string &filterExpression, const std::map< std::string, std::string > &options)
Constructs a GrantPermissionTableRequest object with the specified parameters.
A set of output parameters for grantPermissionTable(const GrantPermissionTableRequest&) const...
std::map< std::string, std::string > options
GrantPermissionTableResponse()
Constructs a GrantPermissionTableResponse object with default parameter values.
A set of input parameters for grantPermissionTable(const GrantPermissionTableRequest&) const...