GPUdb C++ API  Version 5.2.0.0
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 
44  GrantPermissionSystemRequest(const std::string& name, const std::string& permission, const std::map<std::string, std::string>& options):
45  name(name),
46  permission(permission),
47  options(options)
48  {
49  }
50 
51  std::string name;
52  std::string permission;
53  std::map<std::string, std::string> options;
54  };
55 }
56 
57 namespace avro
58 {
59  template<> struct codec_traits<gpudb::GrantPermissionSystemRequest>
60  {
61  static void encode(Encoder& e, const gpudb::GrantPermissionSystemRequest& v)
62  {
63  ::avro::encode(e, v.name);
64  ::avro::encode(e, v.permission);
65  ::avro::encode(e, v.options);
66  }
67 
68  static void decode(Decoder& d, gpudb::GrantPermissionSystemRequest& v)
69  {
70  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
71  {
72  const std::vector<size_t> fo = rd->fieldOrder();
73 
74  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
75  {
76  switch (*it)
77  {
78  case 0:
79  ::avro::decode(d, v.name);
80  break;
81 
82  case 1:
83  ::avro::decode(d, v.permission);
84  break;
85 
86  case 2:
87  ::avro::decode(d, v.options);
88  break;
89 
90  default:
91  break;
92  }
93  }
94  }
95  else
96  {
97  ::avro::decode(d, v.name);
98  ::avro::decode(d, v.permission);
99  ::avro::decode(d, v.options);
100  }
101  }
102  };
103 }
104 
105 namespace gpudb
106 {
107 
115  {
116 
122  name(std::string()),
123  permission(std::string())
124  {
125  }
126 
127  std::string name;
128  std::string permission;
129  };
130 }
131 
132 namespace avro
133 {
134  template<> struct codec_traits<gpudb::GrantPermissionSystemResponse>
135  {
136  static void encode(Encoder& e, const gpudb::GrantPermissionSystemResponse& v)
137  {
138  ::avro::encode(e, v.name);
139  ::avro::encode(e, v.permission);
140  }
141 
142  static void decode(Decoder& d, gpudb::GrantPermissionSystemResponse& v)
143  {
144  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
145  {
146  const std::vector<size_t> fo = rd->fieldOrder();
147 
148  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
149  {
150  switch (*it)
151  {
152  case 0:
153  ::avro::decode(d, v.name);
154  break;
155 
156  case 1:
157  ::avro::decode(d, v.permission);
158  break;
159 
160  default:
161  break;
162  }
163  }
164  }
165  else
166  {
167  ::avro::decode(d, v.name);
168  ::avro::decode(d, v.permission);
169  }
170  }
171  };
172 }
173 
174 #endif
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 grantPermissionSystem(const GrantPermissionSystemRequest&) const...
std::map< std::string, std::string > options
GrantPermissionSystemRequest()
Constructs a GrantPermissionSystemRequest object with default parameter values.
A set of output parameters for grantPermissionSystem(const GrantPermissionSystemRequest&) const...
GrantPermissionSystemResponse()
Constructs a GrantPermissionSystemResponse object with default parameter values.