GPUdb C++ API  Version 6.2.0.3
show_security.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 __SHOW_SECURITY_H__
7 #define __SHOW_SECURITY_H__
8 
9 namespace gpudb
10 {
11 
21  {
22 
28  names(std::vector<std::string>()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
44  ShowSecurityRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
45  names( names_ ),
46  options( options_ )
47  {
48  }
49 
50  std::vector<std::string> names;
51  std::map<std::string, std::string> options;
52  };
53 }
54 
55 namespace avro
56 {
57  template<> struct codec_traits<gpudb::ShowSecurityRequest>
58  {
59  static void encode(Encoder& e, const gpudb::ShowSecurityRequest& v)
60  {
61  ::avro::encode(e, v.names);
62  ::avro::encode(e, v.options);
63  }
64 
65  static void decode(Decoder& d, gpudb::ShowSecurityRequest& v)
66  {
67  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
68  {
69  const std::vector<size_t> fo = rd->fieldOrder();
70 
71  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
72  {
73  switch (*it)
74  {
75  case 0:
76  ::avro::decode(d, v.names);
77  break;
78 
79  case 1:
80  ::avro::decode(d, v.options);
81  break;
82 
83  default:
84  break;
85  }
86  }
87  }
88  else
89  {
90  ::avro::decode(d, v.names);
91  ::avro::decode(d, v.options);
92  }
93  }
94  };
95 }
96 
97 namespace gpudb
98 {
99 
109  {
110 
116  types(std::map<std::string, std::string>()),
117  roles(std::map<std::string, std::vector<std::string> >()),
118  permissions(std::map<std::string, std::vector<std::map<std::string, std::string> > >())
119  {
120  }
121 
122  std::map<std::string, std::string> types;
123  std::map<std::string, std::vector<std::string> > roles;
124  std::map<std::string, std::vector<std::map<std::string, std::string> > > permissions;
125  };
126 }
127 
128 namespace avro
129 {
130  template<> struct codec_traits<gpudb::ShowSecurityResponse>
131  {
132  static void encode(Encoder& e, const gpudb::ShowSecurityResponse& v)
133  {
134  ::avro::encode(e, v.types);
135  ::avro::encode(e, v.roles);
136  ::avro::encode(e, v.permissions);
137  }
138 
139  static void decode(Decoder& d, gpudb::ShowSecurityResponse& 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.types);
151  break;
152 
153  case 1:
154  ::avro::decode(d, v.roles);
155  break;
156 
157  case 2:
158  ::avro::decode(d, v.permissions);
159  break;
160 
161  default:
162  break;
163  }
164  }
165  }
166  else
167  {
168  ::avro::decode(d, v.types);
169  ::avro::decode(d, v.roles);
170  ::avro::decode(d, v.permissions);
171  }
172  }
173  };
174 }
175 
176 #endif
std::map< std::string, std::vector< std::map< std::string, std::string > > > permissions
std::map< std::string, std::string > options
Definition: show_security.h:51
A set of output parameters for showSecurity(const ShowSecurityRequest&) const.
std::map< std::string, std::vector< std::string > > roles
ShowSecurityResponse()
Constructs a ShowSecurityResponse object with default parameter values.
std::map< std::string, std::string > types
A set of input parameters for showSecurity(const ShowSecurityRequest&) const.
Definition: show_security.h:20
ShowSecurityRequest()
Constructs a ShowSecurityRequest object with default parameter values.
Definition: show_security.h:27
ShowSecurityRequest(const std::vector< std::string > &names_, const std::map< std::string, std::string > &options_)
Constructs a ShowSecurityRequest object with the specified parameters.
Definition: show_security.h:44
std::vector< std::string > names
Definition: show_security.h:50