libepp_nicbr
IpNetworkInfoRsp.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: IpNetworkInfoRsp.H 1270 2014-12-04 12:49:27Z gustavo $ */
7 #ifndef __IPNETWORKINFORSP_H__
8 #define __IPNETWORKINFORSP_H__
9 
10 #include <list>
11 #include <map>
12 #include <vector>
13 #include <string>
14 
15 #include "libepp_nicbr.H"
16 
17 #include "Response.H"
18 #include "ReverseDSInfo.H"
19 
20 using std::list;
21 using std::map;
22 using std::vector;
23 using std::string;
24 
25 LIBEPP_NICBR_NS_BEGIN
26 
28 class IpNetworkInfoRsp : public Response
29 {
30 public:
32  class Network
33  {
34  public:
37  {
38  this->reset();
39  }
40 
42 
45  void set_ipRange(const IpRange &ipRange)
46  {
47  _ipRange = ipRange;
48  }
49 
51 
55  {
56  return _ipRange;
57  }
58 
60 
63  void set_roid(const string &roid)
64  {
65  _roid = roid;
66  }
67 
69 
72  string get_roid() const
73  {
74  return _roid;
75  }
76 
77  void reset()
78  {
79  _ipRange.reset();
80  _roid = "";
81  }
82 
83  private:
85  IpRange _ipRange;
86 
88  string _roid;
89  };
90 
93  {
94  public:
97  {
98  this->reset();
99  }
100 
102 
105  void set_roid(const string &roid)
106  {
107  _roid = roid;
108  }
109 
111 
114  string get_roid() const
115  {
116  return _roid;
117  }
118 
120 
123  void set_allocType(const string &allocType)
124  {
125  _allocType = allocType;
126  }
127 
129 
132  string get_allocType() const
133  {
134  return _allocType;
135  }
136 
138 
141  void set_reserveType(const string &reserveType)
142  {
143  _reserveType = reserveType;
144  }
145 
147 
150  string get_reserveType() const
151  {
152  return _reserveType;
153  }
154 
156 
159  void set_reserveComment(const string &reserveComment)
160  {
161  _reserveComment = reserveComment;
162  }
163 
165 
168  string get_reserveComment() const
169  {
170  return _reserveComment;
171  }
172 
174 
177  void set_organization(const string &organization)
178  {
179  _organization = organization;
180  }
181 
183 
186  string get_organization() const
187  {
188  return _organization;
189  }
190 
192 
196  void insert_contact(const string &type, const string &identification)
197  {
198  _contacts[type] = identification;
199  }
200 
202 
205  map< string, string, less<string> > get_contacts() const
206  {
207  return _contacts;
208  }
209 
211 
215  void set_asn(const int asn)
216  {
217  _asn = asn;
218  }
219 
221 
224  int get_asn() const
225  {
226  return _asn;
227  }
228 
230 
233  void insert_reverseDns(const ReverseDns &reverseDns)
234  {
235  _reversesDns.push_back(reverseDns);
236  }
237 
239 
242  vector<ReverseDns> get_reversesDns() const
243  {
244  return _reversesDns;
245  }
246 
248 
251  void add_dsInfo(const ReverseDSInfo &ds_info)
252  {
253  _ds_list.push_back(ds_info);
254  }
255 
257 
260  list<ReverseDSInfo> get_dsInfo() const
261  {
262  return _ds_list;
263  }
264 
266 
270  void set_parentNetwork(const Network &network)
271  {
272  _parentNetwork = network;
273  }
274 
276 
280  {
281  return _parentNetwork;
282  }
283 
285 
289  void insert_childNetwork(const Network &network)
290  {
291  _childNetworks.push_back(network);
292  }
293 
295 
299  vector<Network> get_childNetworks() const
300  {
301  return _childNetworks;
302  }
303 
305 
309  void set_clId(const string& clId)
310  {
311  _clId = clId;
312  }
313 
315 
318  string get_clId() const
319  {
320  return _clId;
321  }
322 
324 
328  void set_crId(const string& crId)
329  {
330  _crId = crId;
331  }
332 
334 
337  string get_crId() const
338  {
339  return _crId;
340  }
341 
343 
346  void set_crDate(const string& crDate)
347  {
348  _crDate = crDate;
349  }
350 
352 
355  string get_crDate() const
356  {
357  return _crDate;
358  }
359 
361 
365  void set_exDate(const string &exDate)
366  {
367  _exDate = exDate;
368  }
369 
371 
375  string get_exDate() const
376  {
377  return _exDate;
378  }
379 
381 
385  void set_upId(const string &upId)
386  {
387  _upId = upId;
388  }
389 
391 
394  string get_upId() const
395  {
396  return _upId;
397  }
398 
400 
404  void set_upDate(const string &upDate)
405  {
406  _upDate = upDate;
407  }
408 
410 
413  string get_upDate() const
414  {
415  return _upDate;
416  }
417 
419 
422  void set_trDate(const string &trDate)
423  {
424  _trDate = trDate;
425  }
426 
428 
431  string get_trDate() const
432  {
433  return _trDate;
434  }
435 
436  void reset()
437  {
438  _roid = "";
439  _allocType = "";
440  _organization = "";
441  _contacts.clear();
442  _asn = 0;
443  _reversesDns.clear();
444  _ds_list.clear();
445  _parentNetwork.reset();
446  _childNetworks.clear();
447  _clId = "";
448  _crId = "";
449  _crDate = "";
450  _exDate = "";
451  _upId = "";
452  _upDate = "";
453  _trDate = "";
454  }
455 
456  private:
458  string _roid;
459 
461  string _allocType;
462 
464  string _reserveType;
465 
467  string _reserveComment;
468 
470  string _organization;
471 
473  map< string, string, less<string> > _contacts;
474 
476  int _asn;
477 
479  vector<ReverseDns> _reversesDns;
480 
482  list<ReverseDSInfo> _ds_list;
483 
485  Network _parentNetwork;
486 
489  vector<Network> _childNetworks;
490 
492  string _clId;
493 
495  string _crId;
496 
498  string _crDate;
499 
502  string _exDate;
503 
505  string _upId;
506 
508  string _upDate;
509 
511  string _trDate;
512  };
513 
515  IpNetworkInfoRsp(bool reset = false) : Response(false)
516  {
517  if (reset) {
518  this->reset();
519  }
520  }
521 
523 
526  void set_ipRange(const IpRange &ipRange)
527  {
528  _ipRange = ipRange;
529  }
530 
532 
536  {
537  return _ipRange;
538  }
539 
541 
544  void insert_ipRangeInfo(const IpRangeInfo &ipRangeInfo)
545  {
546  _ipRangeInfo.push_back(ipRangeInfo);
547  }
548 
550 
553  vector<IpRangeInfo> get_ipRangeInfo() const
554  {
555  return _ipRangeInfo;
556  }
557 
558  void reset()
559  {
560  Response::reset();
561  _ipRange.reset();
562  _ipRangeInfo.clear();
563  }
564 
565 protected:
568 
570  vector<IpRangeInfo> _ipRangeInfo;
571 };
572 
573 LIBEPP_NICBR_NS_END
574 #endif // __IPNETWORKINFORSP_H__
IpRange get_ipRange() const
Returns ip range.
Definition: IpNetworkInfoRsp.H:54
string get_trDate() const
Returns most recent successful IP network object transfer.
Definition: IpNetworkInfoRsp.H:431
string get_crDate() const
Returns date of the ip range creation.
Definition: IpNetworkInfoRsp.H:355
void set_organization(const string &organization)
Sets organization.
Definition: IpNetworkInfoRsp.H:177
EPP Response Class.
Definition: Response.H:24
IpNetworkInfoRsp(bool reset=false)
Default constructor.
Definition: IpNetworkInfoRsp.H:515
void set_crDate(const string &crDate)
Sets date of the ip range creation.
Definition: IpNetworkInfoRsp.H:346
string get_organization() const
Returns organization associated with the ip range.
Definition: IpNetworkInfoRsp.H:186
IpRange _ipRange
ip range
Definition: IpNetworkInfoRsp.H:567
EPP/DNSSEC DS information class for reverse DNS.
string get_upId() const
Returns last client that updated the ip range.
Definition: IpNetworkInfoRsp.H:394
Project defines.
vector< ReverseDns > get_reversesDns() const
Returns reverses dns.
Definition: IpNetworkInfoRsp.H:242
string get_crId() const
Returns client that created the ip range.
Definition: IpNetworkInfoRsp.H:337
EPP Network Class used in IpNetworkInfoRsp Class.
Definition: IpNetworkInfoRsp.H:32
EPP Response Class.
string get_reserveType() const
Returns reservation type.
Definition: IpNetworkInfoRsp.H:150
Network()
Default constructor.
Definition: IpNetworkInfoRsp.H:36
void set_reserveType(const string &reserveType)
Sets reservation type.
Definition: IpNetworkInfoRsp.H:141
void set_reserveComment(const string &reserveComment)
Sets reservation comments.
Definition: IpNetworkInfoRsp.H:159
void set_roid(const string &roid)
Sets repository object ID.
Definition: IpNetworkInfoRsp.H:63
Describes IpRange structure.
Definition: CommonData.H:192
void set_upId(const string &upId)
Sets last client that updated the ip range.
Definition: IpNetworkInfoRsp.H:385
void set_roid(const string &roid)
Sets repository object ID.
Definition: IpNetworkInfoRsp.H:105
vector< IpRangeInfo > get_ipRangeInfo() const
Returns list of all ip range infos.
Definition: IpNetworkInfoRsp.H:553
void insert_contact(const string &type, const string &identification)
Inserts a contact in the map of other contacts.
Definition: IpNetworkInfoRsp.H:196
string get_upDate() const
Returns date of the last update.
Definition: IpNetworkInfoRsp.H:413
IpRange get_ipRange() const
Returns ip range.
Definition: IpNetworkInfoRsp.H:535
string get_roid() const
Returns repository object ID.
Definition: IpNetworkInfoRsp.H:72
void set_exDate(const string &exDate)
Sets ip range's expiration date.
Definition: IpNetworkInfoRsp.H:365
void set_allocType(const string &allocType)
Sets allocation type.
Definition: IpNetworkInfoRsp.H:123
Network get_parentNetwork() const
Returns parent network.
Definition: IpNetworkInfoRsp.H:279
EPP IpNetworkInfoRsp Class.
Definition: IpNetworkInfoRsp.H:28
void set_trDate(const string &trDate)
Sets most recent successful IP network object transfer.
Definition: IpNetworkInfoRsp.H:422
void set_asn(const int asn)
Sets asn.
Definition: IpNetworkInfoRsp.H:215
void set_ipRange(const IpRange &ipRange)
Sets ip range.
Definition: IpNetworkInfoRsp.H:45
string get_allocType() const
Returns allocation type.
Definition: IpNetworkInfoRsp.H:132
void set_upDate(const string &upDate)
Sets date of the last update.
Definition: IpNetworkInfoRsp.H:404
vector< IpRangeInfo > _ipRangeInfo
ip range info
Definition: IpNetworkInfoRsp.H:570
void set_crId(const string &crId)
Sets client that created the ip range.
Definition: IpNetworkInfoRsp.H:328
IpRangeInfo()
Default constructor.
Definition: IpNetworkInfoRsp.H:96
list< ReverseDSInfo > get_dsInfo() const
Returns DS information list.
Definition: IpNetworkInfoRsp.H:260
void insert_ipRangeInfo(const IpRangeInfo &ipRangeInfo)
Inserts ip range info.
Definition: IpNetworkInfoRsp.H:544
string get_roid() const
Returns repository object ID.
Definition: IpNetworkInfoRsp.H:114
void insert_childNetwork(const Network &network)
Inserts child network.
Definition: IpNetworkInfoRsp.H:289
void insert_reverseDns(const ReverseDns &reverseDns)
Sets reverse dns.
Definition: IpNetworkInfoRsp.H:233
void set_parentNetwork(const Network &network)
Sets parent network.
Definition: IpNetworkInfoRsp.H:270
string get_reserveComment() const
Returns reservation comments.
Definition: IpNetworkInfoRsp.H:168
void set_ipRange(const IpRange &ipRange)
Sets ip range.
Definition: IpNetworkInfoRsp.H:526
map< string, string, less< string > > get_contacts() const
Returns map of other contacts.
Definition: IpNetworkInfoRsp.H:205
EPP IpRangeInfo Class used in IpRangeInfoRsp Class.
Definition: IpNetworkInfoRsp.H:92
void reset()
reset attributes
Definition: Response.H:161
int get_asn() const
Returns asn.
Definition: IpNetworkInfoRsp.H:224
string get_clId() const
Returns sponsoring client.
Definition: IpNetworkInfoRsp.H:318
void set_clId(const string &clId)
Sets sponsoring client.
Definition: IpNetworkInfoRsp.H:309
Reverse DSInfo Class.
Definition: ReverseDSInfo.H:16
string get_exDate() const
Returns ip range's expiration date.
Definition: IpNetworkInfoRsp.H:375
vector< Network > get_childNetworks() const
Returns child networks.
Definition: IpNetworkInfoRsp.H:299
void add_dsInfo(const ReverseDSInfo &ds_info)
Adds DS information.
Definition: IpNetworkInfoRsp.H:251