GPUdb C++ API  Version 7.2.2.4
grant_role.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_ROLE_H__
7 #define __GRANT_ROLE_H__
8 
9 namespace gpudb
10 {
18  {
23  role(std::string()),
24  member(std::string()),
25  options(std::map<std::string, std::string>())
26  {
27  }
28 
40  GrantRoleRequest(const std::string& role_, const std::string& member_, const std::map<std::string, std::string>& options_):
41  role( role_ ),
42  member( member_ ),
43  options( options_ )
44  {
45  }
46 
51  std::string role;
52 
57  std::string member;
58 
62  std::map<std::string, std::string> options;
63  };
64 } // end namespace gpudb
65 
66 namespace avro
67 {
68  template<> struct codec_traits<gpudb::GrantRoleRequest>
69  {
70  static void encode(Encoder& e, const gpudb::GrantRoleRequest& v)
71  {
72  ::avro::encode(e, v.role);
73  ::avro::encode(e, v.member);
74  ::avro::encode(e, v.options);
75  }
76 
77  static void decode(Decoder& d, gpudb::GrantRoleRequest& v)
78  {
79  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
80  {
81  const std::vector<size_t> fo = rd->fieldOrder();
82 
83  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
84  {
85  switch (*it)
86  {
87  case 0:
88  ::avro::decode(d, v.role);
89  break;
90 
91  case 1:
92  ::avro::decode(d, v.member);
93  break;
94 
95  case 2:
96  ::avro::decode(d, v.options);
97  break;
98 
99  default:
100  break;
101  }
102  }
103  }
104  else
105  {
106  ::avro::decode(d, v.role);
107  ::avro::decode(d, v.member);
108  ::avro::decode(d, v.options);
109  }
110  }
111  };
112 } // end namespace avro
113 
114 namespace gpudb
115 {
121  {
126  role(std::string()),
127  member(std::string()),
128  info(std::map<std::string, std::string>())
129  {
130  }
131 
135  std::string role;
136 
140  std::string member;
141 
145  std::map<std::string, std::string> info;
146  };
147 } // end namespace gpudb
148 
149 namespace avro
150 {
151  template<> struct codec_traits<gpudb::GrantRoleResponse>
152  {
153  static void encode(Encoder& e, const gpudb::GrantRoleResponse& v)
154  {
155  ::avro::encode(e, v.role);
156  ::avro::encode(e, v.member);
157  ::avro::encode(e, v.info);
158  }
159 
160  static void decode(Decoder& d, gpudb::GrantRoleResponse& v)
161  {
162  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
163  {
164  const std::vector<size_t> fo = rd->fieldOrder();
165 
166  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
167  {
168  switch (*it)
169  {
170  case 0:
171  ::avro::decode(d, v.role);
172  break;
173 
174  case 1:
175  ::avro::decode(d, v.member);
176  break;
177 
178  case 2:
179  ::avro::decode(d, v.info);
180  break;
181 
182  default:
183  break;
184  }
185  }
186  }
187  else
188  {
189  ::avro::decode(d, v.role);
190  ::avro::decode(d, v.member);
191  ::avro::decode(d, v.info);
192  }
193  }
194  };
195 } // end namespace avro
196 
197 #endif // __GRANT_ROLE_H__
std::string role
Value of role.
Definition: grant_role.h:135
GrantRoleRequest()
Constructs a GrantRoleRequest object with default parameters.
Definition: grant_role.h:22
std::map< std::string, std::string > options
Optional parameters.
Definition: grant_role.h:62
std::string member
Name of the user or role that will be granted membership in role.
Definition: grant_role.h:57
GrantRoleRequest(const std::string &role_, const std::string &member_, const std::map< std::string, std::string > &options_)
Constructs a GrantRoleRequest object with the specified parameters.
Definition: grant_role.h:40
A set of results returned by GPUdb::grantRole.
Definition: grant_role.h:120
std::string member
Value of member.
Definition: grant_role.h:140
std::map< std::string, std::string > info
Additional information.
Definition: grant_role.h:145
GrantRoleResponse()
Constructs a GrantRoleResponse object with default parameters.
Definition: grant_role.h:125
std::string role
Name of the role in which membership will be granted.
Definition: grant_role.h:51
A set of parameters for GPUdb::grantRole.
Definition: grant_role.h:17