GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_container_registry.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_CONTAINER_REGISTRY_H__
7 #define __CREATE_CONTAINER_REGISTRY_H__
8 
9 namespace gpudb
10 {
11 
18  struct CreateContainerRegistryRequest
19  {
20 
26  CreateContainerRegistryRequest() :
27  registryName(std::string()),
28  uri(std::string()),
29  credential(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
56  CreateContainerRegistryRequest(const std::string& registryName_, const std::string& uri_, const std::string& credential_, const std::map<std::string, std::string>& options_):
57  registryName( registryName_ ),
58  uri( uri_ ),
59  credential( credential_ ),
60  options( options_ )
61  {
62  }
63 
64  std::string registryName;
65  std::string uri;
66  std::string credential;
67  std::map<std::string, std::string> options;
68  };
69 }
70 
75 namespace avro
76 {
77  template<> struct codec_traits<gpudb::CreateContainerRegistryRequest>
78  {
79  static void encode(Encoder& e, const gpudb::CreateContainerRegistryRequest& v)
80  {
81  ::avro::encode(e, v.registryName);
82  ::avro::encode(e, v.uri);
83  ::avro::encode(e, v.credential);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::CreateContainerRegistryRequest& v)
88  {
89  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
90  {
91  const std::vector<size_t> fo = rd->fieldOrder();
92 
93  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
94  {
95  switch (*it)
96  {
97  case 0:
98  ::avro::decode(d, v.registryName);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.uri);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.credential);
107  break;
108 
109  case 3:
110  ::avro::decode(d, v.options);
111  break;
112 
113  default:
114  break;
115  }
116  }
117  }
118  else
119  {
120  ::avro::decode(d, v.registryName);
121  ::avro::decode(d, v.uri);
122  ::avro::decode(d, v.credential);
123  ::avro::decode(d, v.options);
124  }
125  }
126  };
127 }
128 
129 namespace gpudb
130 {
131 
138  struct CreateContainerRegistryResponse
139  {
140 
146  CreateContainerRegistryResponse() :
147  registryName(std::string()),
148  entityId(int32_t()),
149  info(std::map<std::string, std::string>())
150  {
151  }
152 
153  std::string registryName;
154  int32_t entityId;
155  std::map<std::string, std::string> info;
156  };
157 }
158 
163 namespace avro
164 {
165  template<> struct codec_traits<gpudb::CreateContainerRegistryResponse>
166  {
167  static void encode(Encoder& e, const gpudb::CreateContainerRegistryResponse& v)
168  {
169  ::avro::encode(e, v.registryName);
170  ::avro::encode(e, v.entityId);
171  ::avro::encode(e, v.info);
172  }
173 
174  static void decode(Decoder& d, gpudb::CreateContainerRegistryResponse& v)
175  {
176  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
177  {
178  const std::vector<size_t> fo = rd->fieldOrder();
179 
180  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
181  {
182  switch (*it)
183  {
184  case 0:
185  ::avro::decode(d, v.registryName);
186  break;
187 
188  case 1:
189  ::avro::decode(d, v.entityId);
190  break;
191 
192  case 2:
193  ::avro::decode(d, v.info);
194  break;
195 
196  default:
197  break;
198  }
199  }
200  }
201  else
202  {
203  ::avro::decode(d, v.registryName);
204  ::avro::decode(d, v.entityId);
205  ::avro::decode(d, v.info);
206  }
207  }
208  };
209 }
210 
211 #endif