GPUdb C++ API  Version 7.2.2.4
alter_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 __ALTER_ROLE_H__
7 #define __ALTER_ROLE_H__
8 
9 namespace gpudb
10 {
18  {
23  name(std::string()),
24  action(std::string()),
25  value(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
55  AlterRoleRequest(const std::string& name_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
56  name( name_ ),
57  action( action_ ),
58  value( value_ ),
59  options( options_ )
60  {
61  }
62 
66  std::string name;
67 
81  std::string action;
82 
86  std::string value;
87 
91  std::map<std::string, std::string> options;
92  };
93 } // end namespace gpudb
94 
95 namespace avro
96 {
97  template<> struct codec_traits<gpudb::AlterRoleRequest>
98  {
99  static void encode(Encoder& e, const gpudb::AlterRoleRequest& v)
100  {
101  ::avro::encode(e, v.name);
102  ::avro::encode(e, v.action);
103  ::avro::encode(e, v.value);
104  ::avro::encode(e, v.options);
105  }
106 
107  static void decode(Decoder& d, gpudb::AlterRoleRequest& v)
108  {
109  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
110  {
111  const std::vector<size_t> fo = rd->fieldOrder();
112 
113  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
114  {
115  switch (*it)
116  {
117  case 0:
118  ::avro::decode(d, v.name);
119  break;
120 
121  case 1:
122  ::avro::decode(d, v.action);
123  break;
124 
125  case 2:
126  ::avro::decode(d, v.value);
127  break;
128 
129  case 3:
130  ::avro::decode(d, v.options);
131  break;
132 
133  default:
134  break;
135  }
136  }
137  }
138  else
139  {
140  ::avro::decode(d, v.name);
141  ::avro::decode(d, v.action);
142  ::avro::decode(d, v.value);
143  ::avro::decode(d, v.options);
144  }
145  }
146  };
147 } // end namespace avro
148 
149 namespace gpudb
150 {
156  {
161  name(std::string()),
162  info(std::map<std::string, std::string>())
163  {
164  }
165 
169  std::string name;
170 
174  std::map<std::string, std::string> info;
175  };
176 } // end namespace gpudb
177 
178 namespace avro
179 {
180  template<> struct codec_traits<gpudb::AlterRoleResponse>
181  {
182  static void encode(Encoder& e, const gpudb::AlterRoleResponse& v)
183  {
184  ::avro::encode(e, v.name);
185  ::avro::encode(e, v.info);
186  }
187 
188  static void decode(Decoder& d, gpudb::AlterRoleResponse& v)
189  {
190  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
191  {
192  const std::vector<size_t> fo = rd->fieldOrder();
193 
194  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
195  {
196  switch (*it)
197  {
198  case 0:
199  ::avro::decode(d, v.name);
200  break;
201 
202  case 1:
203  ::avro::decode(d, v.info);
204  break;
205 
206  default:
207  break;
208  }
209  }
210  }
211  else
212  {
213  ::avro::decode(d, v.name);
214  ::avro::decode(d, v.info);
215  }
216  }
217  };
218 } // end namespace avro
219 
220 #endif // __ALTER_ROLE_H__
std::string action
Modification operation to be applied to the role.
Definition: alter_role.h:81
A set of parameters for GPUdb::alterRole.
Definition: alter_role.h:17
std::string value
The value of the modification, depending on action.
Definition: alter_role.h:86
AlterRoleRequest(const std::string &name_, const std::string &action_, const std::string &value_, const std::map< std::string, std::string > &options_)
Constructs an AlterRoleRequest object with the specified parameters.
Definition: alter_role.h:55
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_role.h:91
AlterRoleResponse()
Constructs an AlterRoleResponse object with default parameters.
Definition: alter_role.h:160
std::string name
Name of the role to be altered.
Definition: alter_role.h:66
std::string name
Value of name.
Definition: alter_role.h:169
AlterRoleRequest()
Constructs an AlterRoleRequest object with default parameters.
Definition: alter_role.h:22
std::map< std::string, std::string > info
Additional information.
Definition: alter_role.h:174
A set of results returned by GPUdb::alterRole.
Definition: alter_role.h:155