GPUdb C++ API  Version 7.2.2.4
create_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 __CREATE_ROLE_H__
7 #define __CREATE_ROLE_H__
8 
9 namespace gpudb
10 {
18  {
23  name(std::string()),
24  options(std::map<std::string, std::string>())
25  {
26  }
27 
44  CreateRoleRequest(const std::string& name_, const std::map<std::string, std::string>& options_):
45  name( name_ ),
46  options( options_ )
47  {
48  }
49 
55  std::string name;
56 
66  std::map<std::string, std::string> options;
67  };
68 } // end namespace gpudb
69 
70 namespace avro
71 {
72  template<> struct codec_traits<gpudb::CreateRoleRequest>
73  {
74  static void encode(Encoder& e, const gpudb::CreateRoleRequest& v)
75  {
76  ::avro::encode(e, v.name);
77  ::avro::encode(e, v.options);
78  }
79 
80  static void decode(Decoder& d, gpudb::CreateRoleRequest& v)
81  {
82  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
83  {
84  const std::vector<size_t> fo = rd->fieldOrder();
85 
86  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
87  {
88  switch (*it)
89  {
90  case 0:
91  ::avro::decode(d, v.name);
92  break;
93 
94  case 1:
95  ::avro::decode(d, v.options);
96  break;
97 
98  default:
99  break;
100  }
101  }
102  }
103  else
104  {
105  ::avro::decode(d, v.name);
106  ::avro::decode(d, v.options);
107  }
108  }
109  };
110 } // end namespace avro
111 
112 namespace gpudb
113 {
119  {
124  name(std::string()),
125  info(std::map<std::string, std::string>())
126  {
127  }
128 
132  std::string name;
133 
137  std::map<std::string, std::string> info;
138  };
139 } // end namespace gpudb
140 
141 namespace avro
142 {
143  template<> struct codec_traits<gpudb::CreateRoleResponse>
144  {
145  static void encode(Encoder& e, const gpudb::CreateRoleResponse& v)
146  {
147  ::avro::encode(e, v.name);
148  ::avro::encode(e, v.info);
149  }
150 
151  static void decode(Decoder& d, gpudb::CreateRoleResponse& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.name);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.info);
167  break;
168 
169  default:
170  break;
171  }
172  }
173  }
174  else
175  {
176  ::avro::decode(d, v.name);
177  ::avro::decode(d, v.info);
178  }
179  }
180  };
181 } // end namespace avro
182 
183 #endif // __CREATE_ROLE_H__
std::string name
Name of the role to be created.
Definition: create_role.h:55
A set of parameters for GPUdb::createRole.
Definition: create_role.h:17
A set of results returned by GPUdb::createRole.
Definition: create_role.h:118
std::map< std::string, std::string > options
Optional parameters.
Definition: create_role.h:66
CreateRoleResponse()
Constructs a CreateRoleResponse object with default parameters.
Definition: create_role.h:123
CreateRoleRequest()
Constructs a CreateRoleRequest object with default parameters.
Definition: create_role.h:22
CreateRoleRequest(const std::string &name_, const std::map< std::string, std::string > &options_)
Constructs a CreateRoleRequest object with the specified parameters.
Definition: create_role.h:44
std::string name
Value of name.
Definition: create_role.h:132
std::map< std::string, std::string > info
Additional information.
Definition: create_role.h:137