GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_credential.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 __CREATE_CREDENTIAL_H__
7 #define __CREATE_CREDENTIAL_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  credentialName(std::string()),
28  type(std::string()),
29  identity(std::string()),
30  secret(std::string()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
69  CreateCredentialRequest(const std::string& credentialName_, const std::string& type_, const std::string& identity_, const std::string& secret_, const std::map<std::string, std::string>& options_):
70  credentialName( credentialName_ ),
71  type( type_ ),
72  identity( identity_ ),
73  secret( secret_ ),
74  options( options_ )
75  {
76  }
77 
78  std::string credentialName;
79  std::string type;
80  std::string identity;
81  std::string secret;
82  std::map<std::string, std::string> options;
83  };
84 }
85 
86 namespace avro
87 {
88  template<> struct codec_traits<gpudb::CreateCredentialRequest>
89  {
90  static void encode(Encoder& e, const gpudb::CreateCredentialRequest& v)
91  {
92  ::avro::encode(e, v.credentialName);
93  ::avro::encode(e, v.type);
94  ::avro::encode(e, v.identity);
95  ::avro::encode(e, v.secret);
96  ::avro::encode(e, v.options);
97  }
98 
99  static void decode(Decoder& d, gpudb::CreateCredentialRequest& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.credentialName);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.type);
115  break;
116 
117  case 2:
118  ::avro::decode(d, v.identity);
119  break;
120 
121  case 3:
122  ::avro::decode(d, v.secret);
123  break;
124 
125  case 4:
126  ::avro::decode(d, v.options);
127  break;
128 
129  default:
130  break;
131  }
132  }
133  }
134  else
135  {
136  ::avro::decode(d, v.credentialName);
137  ::avro::decode(d, v.type);
138  ::avro::decode(d, v.identity);
139  ::avro::decode(d, v.secret);
140  ::avro::decode(d, v.options);
141  }
142  }
143  };
144 }
145 
146 namespace gpudb
147 {
148 
157  {
158 
164  credentialName(std::string()),
165  info(std::map<std::string, std::string>())
166  {
167  }
168 
169  std::string credentialName;
170  std::map<std::string, std::string> info;
171  };
172 }
173 
174 namespace avro
175 {
176  template<> struct codec_traits<gpudb::CreateCredentialResponse>
177  {
178  static void encode(Encoder& e, const gpudb::CreateCredentialResponse& v)
179  {
180  ::avro::encode(e, v.credentialName);
181  ::avro::encode(e, v.info);
182  }
183 
184  static void decode(Decoder& d, gpudb::CreateCredentialResponse& v)
185  {
186  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
187  {
188  const std::vector<size_t> fo = rd->fieldOrder();
189 
190  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
191  {
192  switch (*it)
193  {
194  case 0:
195  ::avro::decode(d, v.credentialName);
196  break;
197 
198  case 1:
199  ::avro::decode(d, v.info);
200  break;
201 
202  default:
203  break;
204  }
205  }
206  }
207  else
208  {
209  ::avro::decode(d, v.credentialName);
210  ::avro::decode(d, v.info);
211  }
212  }
213  };
214 }
215 
216 #endif
CreateCredentialRequest()
Constructs a CreateCredentialRequest object with default parameter values.
std::map< std::string, std::string > options
std::map< std::string, std::string > info
A set of input parameters for const.
CreateCredentialRequest(const std::string &credentialName_, const std::string &type_, const std::string &identity_, const std::string &secret_, const std::map< std::string, std::string > &options_)
Constructs a CreateCredentialRequest object with the specified parameters.
A set of output parameters for const.
CreateCredentialResponse()
Constructs a CreateCredentialResponse object with default parameter values.