GPUdb C++ API  Version 6.2.0.3
grant_role.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_ROLE_H__
7 #define __GRANT_ROLE_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  role(std::string()),
26  member(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
42  GrantRoleRequest(const std::string& role_, const std::string& member_, const std::map<std::string, std::string>& options_):
43  role( role_ ),
44  member( member_ ),
45  options( options_ )
46  {
47  }
48 
49  std::string role;
50  std::string member;
51  std::map<std::string, std::string> options;
52  };
53 }
54 
55 namespace avro
56 {
57  template<> struct codec_traits<gpudb::GrantRoleRequest>
58  {
59  static void encode(Encoder& e, const gpudb::GrantRoleRequest& v)
60  {
61  ::avro::encode(e, v.role);
62  ::avro::encode(e, v.member);
63  ::avro::encode(e, v.options);
64  }
65 
66  static void decode(Decoder& d, gpudb::GrantRoleRequest& v)
67  {
68  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
69  {
70  const std::vector<size_t> fo = rd->fieldOrder();
71 
72  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
73  {
74  switch (*it)
75  {
76  case 0:
77  ::avro::decode(d, v.role);
78  break;
79 
80  case 1:
81  ::avro::decode(d, v.member);
82  break;
83 
84  case 2:
85  ::avro::decode(d, v.options);
86  break;
87 
88  default:
89  break;
90  }
91  }
92  }
93  else
94  {
95  ::avro::decode(d, v.role);
96  ::avro::decode(d, v.member);
97  ::avro::decode(d, v.options);
98  }
99  }
100  };
101 }
102 
103 namespace gpudb
104 {
105 
113  {
114 
119  role(std::string()),
120  member(std::string())
121  {
122  }
123 
124  std::string role;
125  std::string member;
126  };
127 }
128 
129 namespace avro
130 {
131  template<> struct codec_traits<gpudb::GrantRoleResponse>
132  {
133  static void encode(Encoder& e, const gpudb::GrantRoleResponse& v)
134  {
135  ::avro::encode(e, v.role);
136  ::avro::encode(e, v.member);
137  }
138 
139  static void decode(Decoder& d, gpudb::GrantRoleResponse& v)
140  {
141  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
142  {
143  const std::vector<size_t> fo = rd->fieldOrder();
144 
145  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
146  {
147  switch (*it)
148  {
149  case 0:
150  ::avro::decode(d, v.role);
151  break;
152 
153  case 1:
154  ::avro::decode(d, v.member);
155  break;
156 
157  default:
158  break;
159  }
160  }
161  }
162  else
163  {
164  ::avro::decode(d, v.role);
165  ::avro::decode(d, v.member);
166  }
167  }
168  };
169 }
170 
171 #endif
GrantRoleRequest()
Constructs a GrantRoleRequest object with default parameter values.
Definition: grant_role.h:24
std::map< std::string, std::string > options
Definition: grant_role.h:51
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:42
A set of output parameters for grantRole(const GrantRoleRequest&) const.
Definition: grant_role.h:112
GrantRoleResponse()
Constructs a GrantRoleResponse object with default parameter values.
Definition: grant_role.h:118
A set of input parameters for grantRole(const GrantRoleRequest&) const.
Definition: grant_role.h:18