libepp_nicbr
AsnInfoRsp.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: AsnInfoRsp.H 1235 2014-11-10 16:18:17Z mendelson $ */
7 #ifndef __ASNINFORSP_H__
8 #define __ASNINFORSP_H__
9 
10 #include <map>
11 #include <string>
12 #include <vector>
13 
14 #include "libepp_nicbr.H"
15 
16 #include "Response.H"
17 
18 using std::map;
19 using std::string;
20 using std::vector;
21 
22 LIBEPP_NICBR_NS_BEGIN
23 
25 class AsnInfoRsp : public Response
26 {
27 public:
29  AsnInfoRsp(bool reset = true) : Response(false)
30  {
31  if (reset) {
32  this->reset();
33  }
34  }
35 
37 
40  void set_asn(const int asn)
41  {
42  _asn = asn;
43  }
44 
46 
49  int get_asn() const
50  {
51  return _asn;
52  }
53 
55 
59  void set_roid(const string &roid)
60  {
61  _roid = roid;
62  }
63 
65 
69  string get_roid() const
70  {
71  return _roid;
72  }
73 
75 
79  void set_organization(const string &organization)
80  {
81  _organization = organization;
82  }
83 
85 
89  string get_organization() const
90  {
91  return _organization;
92  }
93 
95 
99  void insert_contact(const string &type, const string &identification)
100  {
101  _contacts[type] = identification;
102  }
103 
105 
108  map< string, string, less<string> > get_contacts() { return _contacts; }
109 
111 
114  void set_clId(const string &clId)
115  {
116  _clId = clId;
117  }
118 
120 
123  string get_clId() const
124  {
125  return _clId;
126  }
127 
129 
132  void set_crId(const string &crId)
133  {
134  _crId = crId;
135  }
136 
138 
141  string get_crId() const
142  {
143  return _crId;
144  }
145 
147 
150  void set_crDate(const string& crDate)
151  {
152  _crDate = crDate;
153  }
154 
156 
159  string get_crDate() const
160  {
161  return _crDate;
162  }
163 
165 
169  void set_exDate(const string &exDate)
170  {
171  _exDate = exDate;
172  }
173 
175 
179  string get_exDate() const
180  {
181  return _exDate;
182  }
183 
185 
188  void set_upId(const string &upId)
189  {
190  _upId = upId;
191  }
192 
194 
197  string get_upId() const
198  {
199  return _upId;
200  }
201 
203 
206  void set_upDate(const string &upDate)
207  {
208  _upDate = upDate;
209  }
210 
212 
215  string get_upDate() const
216  {
217  return _upDate;
218  }
219 
221 
224  void set_trDate(const string &trDate)
225  {
226  _trDate = trDate;
227  }
228 
230 
233  string get_trDate() const
234  {
235  return _trDate;
236  }
237 
239 
242  void insert_asIn(const string &policy)
243  {
244  _asIn.push_back(policy);
245  }
246 
248 
251  vector<string> get_asIn() const
252  {
253  return _asIn;
254  }
255 
257 
260  void insert_asOut(const string &policy)
261  {
262  _asOut.push_back(policy);
263  }
264 
266 
269  vector<string> get_asOut() const
270  {
271  return _asOut;
272  }
273 
274  void reset()
275  {
276  Response::reset();
277  _asn = 0;
278  _roid = "";
279  _organization = "";
280  _contacts.clear();
281  _clId = "";
282  _crId = "";
283  _crDate = "";
284  _exDate = "";
285  _upId = "";
286  _upDate = "";
287  _trDate = "";
288  _asIn.clear();
289  _asOut.clear();
290  }
291 
292 protected:
294  int _asn;
295 
298  string _roid;
299 
303 
305  map< string, string, less<string> > _contacts;
306 
308  string _clId;
309 
311  string _crId;
312 
314  string _crDate;
315 
317  string _exDate;
318 
320  string _upId;
321 
323  string _upDate;
324 
326  string _trDate;
327 
329  vector<string> _asIn;
330 
331  // as-out policy
332  vector<string> _asOut;
333 };
334 
335 LIBEPP_NICBR_NS_END
336 #endif // __ASNINFORSP_H__
string get_exDate() const
Returns AS's expiration date.
Definition: AsnInfoRsp.H:179
void set_upDate(const string &upDate)
Sets date of the last update.
Definition: AsnInfoRsp.H:206
void insert_asIn(const string &policy)
Inserts an AS input policy.
Definition: AsnInfoRsp.H:242
void insert_contact(const string &type, const string &identification)
Inserts a contact in the map of other contacts.
Definition: AsnInfoRsp.H:99
AsnInfoRsp(bool reset=true)
Default constructor.
Definition: AsnInfoRsp.H:29
EPP Response Class.
Definition: Response.H:24
string _upId
identifier of the client that last updated the AS object
Definition: AsnInfoRsp.H:320
string _upDate
date and time of the most recent AS object modification
Definition: AsnInfoRsp.H:323
string get_clId() const
Returns sponsoring client.
Definition: AsnInfoRsp.H:123
string _trDate
most recent successful AS object transfer
Definition: AsnInfoRsp.H:326
Project defines.
string get_upDate() const
Returns date of the last update.
Definition: AsnInfoRsp.H:215
vector< string > get_asIn() const
Returns list of all AS input policies.
Definition: AsnInfoRsp.H:251
string get_roid() const
Returns repository object ID.
Definition: AsnInfoRsp.H:69
void set_exDate(const string &exDate)
Sets AS's expiration date.
Definition: AsnInfoRsp.H:169
void set_crId(const string &crId)
Sets client that created the AS.
Definition: AsnInfoRsp.H:132
void set_clId(const string &clId)
Sets sponsoring client.
Definition: AsnInfoRsp.H:114
int get_asn() const
Returns asn.
Definition: AsnInfoRsp.H:49
EPP Response Class.
string get_trDate() const
Returns most recent successful AS object transfer.
Definition: AsnInfoRsp.H:233
int _asn
Autonomous System Number.
Definition: AsnInfoRsp.H:294
vector< string > get_asOut() const
Returns list of all AS output policies.
Definition: AsnInfoRsp.H:269
string _roid
Definition: AsnInfoRsp.H:298
string get_upId() const
Returns last client that updated the AS.
Definition: AsnInfoRsp.H:197
string _clId
identifier of the sponsoring client
Definition: AsnInfoRsp.H:308
map< string, string, less< string > > _contacts
identifiers for contact objects associated with the AS object
Definition: AsnInfoRsp.H:305
string _crId
identifier of the client that created the AS object
Definition: AsnInfoRsp.H:311
string get_organization() const
Returns organization associated with the AS.
Definition: AsnInfoRsp.H:89
vector< string > _asIn
as-in policy
Definition: AsnInfoRsp.H:329
string get_crDate() const
Returns date of the AS creation.
Definition: AsnInfoRsp.H:159
map< string, string, less< string > > get_contacts()
Returns map of other contacts.
Definition: AsnInfoRsp.H:108
void set_organization(const string &organization)
Sets organization associated with the AS.
Definition: AsnInfoRsp.H:79
void set_upId(const string &upId)
Sets last client that updated the AS.
Definition: AsnInfoRsp.H:188
void set_crDate(const string &crDate)
Sets date of the AS creation.
Definition: AsnInfoRsp.H:150
string _organization
Definition: AsnInfoRsp.H:302
string _exDate
date and time identifying the end of the AS object registration period
Definition: AsnInfoRsp.H:317
void set_trDate(const string &trDate)
Sets most recent successful AS object transfer.
Definition: AsnInfoRsp.H:224
string _crDate
date and time of the AS object creation
Definition: AsnInfoRsp.H:314
string get_crId() const
Returns client that created the AS.
Definition: AsnInfoRsp.H:141
EPP AnsInfoRsp Class.
Definition: AsnInfoRsp.H:25
void set_asn(const int asn)
Sets asn.
Definition: AsnInfoRsp.H:40
void insert_asOut(const string &policy)
Inserts an AS output policy.
Definition: AsnInfoRsp.H:260
void set_roid(const string &roid)
Sets repository object ID.
Definition: AsnInfoRsp.H:59
void reset()
reset attributes
Definition: Response.H:161