| 1 | package WebService::CloudFlare::Host::Response::ZoneLookup; | ||
| 2 | use Moose; | ||
| 3 | with 'WebService::CloudFlare::Host::Role::Response'; | ||
| 4 | |||
| 5 | sub res_map { | ||
| 6 | return ( | ||
| 7 | 'result' => 'result', | ||
| 8 | 'msg' => 'msg', | ||
| 9 | 'action' => 'request:act', | ||
| 10 | 'zone_name' => 'response:zone_name', | ||
| 11 | 'zone_exists' => 'response:zone_exists', | ||
| 12 | 'zone_hosted' => 'response:zone_hosted', | ||
| 13 | 'hosted' => 'response:hosted_cnames', | ||
| 14 | 'forwarded' => 'response:forward_tos', | ||
| 15 | ); | ||
| 16 | } | ||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | # Strings (Required) | ||
| 21 | has [qw/ result action /] | ||
| 22 | => ( is => 'rw', isa => 'Str', required => 1 ); | ||
| 23 | |||
| 24 | # Strings (Not Required) | ||
| 25 | has [qw/ zone_name /] | ||
| 26 | => ( is => 'rw', isa => 'Str', required => 0 ); | ||
| 27 | |||
| 28 | # HashRefs (Not Required) | ||
| 29 | has [qw/ hosted forwarded /] | ||
| 30 | => ( is => 'rw', isa => 'HashRef[Str]|Undef', required => 0 ); | ||
| 31 | |||
| 32 | # JSON boolean values, coerced into 1|0 (Not Required) | ||
| 33 | has [qw/ zone_exists zone_hosted /] | ||
| 34 | => ( is => 'ro', isa => 'json_bool', required => 0, coerce => 1 ); | ||
| 35 | |||
| 36 | 1; |