| 1 | package Net::Whois::Object::Role::AFRINIC; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use base qw/Net::Whois::Object/; | ||
| 6 | |||
| 7 | # whois -t role -h whois.afrinic.net | ||
| 8 | # % This is the AfriNIC Whois server. | ||
| 9 | # | ||
| 10 | # role: [mandatory] [single] [lookup key] | ||
| 11 | # address: [mandatory] [multiple] [ ] | ||
| 12 | # phone: [optional] [multiple] [ ] | ||
| 13 | # fax-no: [optional] [multiple] [ ] | ||
| 14 | # e-mail: [mandatory] [multiple] [lookup key] | ||
| 15 | # org: [optional] [multiple] [inverse key] | ||
| 16 | # admin-c: [mandatory] [multiple] [inverse key] | ||
| 17 | # tech-c: [mandatory] [multiple] [inverse key] | ||
| 18 | # nic-hdl: [mandatory] [single] [primary/look-up key] | ||
| 19 | # remarks: [optional] [multiple] [ ] | ||
| 20 | # notify: [optional] [multiple] [inverse key] | ||
| 21 | # abuse-mailbox: [optional] [multiple] [inverse key] | ||
| 22 | # mnt-by: [optional] [multiple] [inverse key] | ||
| 23 | # changed: [mandatory] [multiple] [ ] | ||
| 24 | # source: [mandatory] [single] [ ] | ||
| 25 | |||
| 26 | |||
| 27 | __PACKAGE__->attributes( 'primary', [ 'nic_hdl' ] ); | ||
| 28 | __PACKAGE__->attributes( 'mandatory', [ 'role', 'address', 'e_mail', 'admin_c', 'tech_c', 'nic_hdl', 'changed', 'source' ] ); | ||
| 29 | __PACKAGE__->attributes( 'optional', [ 'phone', 'fax_no', 'org', 'remarks', 'notify', 'abuse_mailbox', 'mnt_by' ] ); | ||
| 30 | __PACKAGE__->attributes( 'single', [ 'role', 'nic_hdl', 'source' ] ); | ||
| 31 | __PACKAGE__->attributes( 'multiple', [ 'address', 'e_mail', 'org', 'tech_c', 'admin_c', 'changed', 'phone', 'fax_no', 'trouble', 'remarks', 'notify', 'mnt_by', 'abuse_mailbox' ] ); | ||
| 32 | |||
| 33 | |||
| 34 | =head1 NAME | ||
| 35 | |||
| 36 | Net::Whois::Object::Role::AFRINIC - an object representation of the RPSL Role block | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | The role class is similar to the person class. However, instead of | ||
| 41 | describing a human being, it describes a role performed by one or more | ||
| 42 | human beings. Examples include help desks, network monitoring | ||
| 43 | centres, system administrators, etc. A role object is particularly | ||
| 44 | useful since often a person performing a role may change; however the | ||
| 45 | role itself remains. The "nic-hdl:" attributes of the person and role | ||
| 46 | classes share the same name space. Once the object is created, the | ||
| 47 | value of the "role:" attribute cannot be changed. | ||
| 48 | |||
| 49 | =head1 METHODS | ||
| 50 | |||
| 51 | =head2 B<new( %options )> | ||
| 52 | |||
| 53 | Constructor for the Net::Whois::Object::Role::AFRINIC class | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | sub new { | ||
| 58 | my ( $class, @options ) = @_; | ||
| 59 | |||
| 60 | my $self = bless {}, $class; | ||
| 61 | $self->_init(@options); | ||
| 62 | |||
| 63 | return $self; | ||
| 64 | } | ||
| 65 | |||
| 66 | =head2 B<role( [$role] )> | ||
| 67 | |||
| 68 | Accessor to the role attribute. | ||
| 69 | Accepts an optional role, always return the current role. | ||
| 70 | |||
| 71 | =head2 B<address( [$address] )> | ||
| 72 | |||
| 73 | Accessor to the address attribute. | ||
| 74 | Accepts an optional address line to be added to the address array, | ||
| 75 | always return the current address array. | ||
| 76 | |||
| 77 | =head2 B<phone( [$phone] )> | ||
| 78 | |||
| 79 | Accessor to the phone attribute. | ||
| 80 | Accepts an optional phone to be added to the phone array, | ||
| 81 | always return the current phone array. | ||
| 82 | |||
| 83 | =head2 B<fax_no( [$fax_no] )> | ||
| 84 | |||
| 85 | Accessor to the fax_no attribute. | ||
| 86 | Accepts an optional fax_no to be added to the fax_no array, | ||
| 87 | always return the current fax_no array. | ||
| 88 | |||
| 89 | =head2 B<e_mail( [$e_mail] )> | ||
| 90 | |||
| 91 | Accessor to the e_mail attribute. | ||
| 92 | Accepts an optional e_mail to be added to the e_mail array, | ||
| 93 | always return the current e_mail array. | ||
| 94 | |||
| 95 | =head2 B<org( [$org] )> | ||
| 96 | |||
| 97 | Accessor to the org attribute. | ||
| 98 | Accepts an optional org, always return the current org. | ||
| 99 | |||
| 100 | Points to an existing organisation object representing the entity that | ||
| 101 | holds the resource. | ||
| 102 | |||
| 103 | The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits | ||
| 104 | followed by a source specification. The first digit must not be "0". | ||
| 105 | Source specification starts with "-" followed by source name up to | ||
| 106 | 9-character length. | ||
| 107 | |||
| 108 | =head2 B<trouble( [$trouble] )> | ||
| 109 | |||
| 110 | Accessor to the trouble attribute. | ||
| 111 | Accepts an optional trouble value to be added to the trouble array, | ||
| 112 | always return the current trouble array. | ||
| 113 | |||
| 114 | =head2 B<admin_c( [$contact] )> | ||
| 115 | |||
| 116 | Accessor to the admin_c attribute. | ||
| 117 | Accepts an optional contact to be added to the admin_c array, | ||
| 118 | always return the current admin_c array. | ||
| 119 | |||
| 120 | =head2 B<tech_c( [$contact] )> | ||
| 121 | |||
| 122 | Accessor to the tech_c attribute. | ||
| 123 | Accepts an optional contact to be added to the tech_c array, | ||
| 124 | always return the current tech_c array. | ||
| 125 | |||
| 126 | =head2 B<nic_hdl( [$nic_hdl] )> | ||
| 127 | |||
| 128 | Accessor to the nic_hdl attribute. | ||
| 129 | Accepts an optional nic_hdl, always return the current nic_hdl. | ||
| 130 | |||
| 131 | =head2 B<remarks( [$remark] )> | ||
| 132 | |||
| 133 | Accessor to the remarks attribute. | ||
| 134 | Accepts an optional remark to be added to the remarks array, | ||
| 135 | always return the current remarks array. | ||
| 136 | |||
| 137 | =head2 B<notify( [$notify] )> | ||
| 138 | |||
| 139 | Accessor to the notify attribute. | ||
| 140 | Accepts an optional notify value to be added to the notify array, | ||
| 141 | always return the current notify array. | ||
| 142 | |||
| 143 | =head2 B<mnt_by( [$mnt_by] )> | ||
| 144 | |||
| 145 | Accessor to the mnt_by attribute. | ||
| 146 | Accepts an optional mnt_by value to be added to the mnt_by array, | ||
| 147 | always return the current mnt_by array. | ||
| 148 | |||
| 149 | =head2 B<changed( [$changed] )> | ||
| 150 | |||
| 151 | Accessor to the changed attribute. | ||
| 152 | Accepts an optional changed value to be added to the changed array, | ||
| 153 | always return the current changed array. | ||
| 154 | |||
| 155 | =head2 B<source( [$source] )> | ||
| 156 | |||
| 157 | Accessor to the source attribute. | ||
| 158 | Accepts an optional source, always return the current source. | ||
| 159 | |||
| 160 | =cut | ||
| 161 | |||
| 162 | 1; |