| 1 | package Net::Fastly::Origin; | ||
| 2 | |||
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use base qw(Net::Fastly::BelongsToServiceAndVersion); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | Net::Fastly::Origin->mk_accessors(qw(service_id name comment)); | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Net::Fastly::Origin - Representation of a logical group of directors - for example the asset server directors from all your DCNs | ||
| 11 | |||
| 12 | =head1 ACCESSORS | ||
| 13 | |||
| 14 | =head2 service_id | ||
| 15 | |||
| 16 | The id of the service this belongs to. | ||
| 17 | |||
| 18 | =head2 version | ||
| 19 | |||
| 20 | The number of the version this belongs to. | ||
| 21 | |||
| 22 | =head2 name | ||
| 23 | |||
| 24 | The domain name of this domain | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | =head2 add_director <director object> | ||
| 29 | |||
| 30 | Add a director to an origin. | ||
| 31 | |||
| 32 | Returns true on success and false on failure. | ||
| 33 | |||
| 34 | =cut | ||
| 35 | sub add_director { | ||
| 36 | 0 | ▶ | my $self = shift; |
|
Subroutine
add_director: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 37 | 0 | my $director = shift; | |
| 38 | 0 | my $hash = $self->_fetcher->client->_post($self->_put_path($self)."/director/".$director->name); | |
| 39 | 0 | return !!(keys %$hash); | |
| 40 | } | ||
| 41 | |||
| 42 | =head2 delete_director <director object> | ||
| 43 | |||
| 44 | Delete a director from an origin. | ||
| 45 | |||
| 46 | Returns true on success and false on failure. | ||
| 47 | |||
| 48 | =cut | ||
| 49 | sub delete_director { | ||
| 50 | 0 | ▶ | my $self = shift; |
|
Subroutine
delete_director: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 51 | 0 | my $director = shift; | |
| 52 | 0 | my $hash = $self->_fetcher->client->_delete($self->_put_path($self)."/director/".$director->name); | |
| 53 | 0 | return !!(keys %$hash); | |
| 54 | } | ||
| 55 | |||
| 56 | 5 | 1; | |