| 1 | package WWW::Hetzner::Cloud::ServerType; | ||
| 2 | # ABSTRACT: Hetzner Cloud ServerType object | ||
| 3 | |||
| 4 | 60 | our $VERSION = '0.102'; | |
| 5 | |||
| 6 | 60 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 60 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 60 | has _client => ( | |
| 11 | is => 'ro', | ||
| 12 | required => 1, | ||
| 13 | weak_ref => 1, | ||
| 14 | init_arg => 'client', | ||
| 15 | ); | ||
| 16 | |||
| 17 | 60 | has id => ( is => 'ro' ); | |
| 18 | |||
| 19 | |||
| 20 | 60 | has name => ( is => 'ro' ); | |
| 21 | |||
| 22 | |||
| 23 | 60 | has description => ( is => 'ro' ); | |
| 24 | |||
| 25 | |||
| 26 | 60 | has cores => ( is => 'ro' ); | |
| 27 | |||
| 28 | |||
| 29 | 60 | has memory => ( is => 'ro' ); | |
| 30 | |||
| 31 | |||
| 32 | 60 | has disk => ( is => 'ro' ); | |
| 33 | |||
| 34 | |||
| 35 | 60 | has cpu_type => ( is => 'ro' ); | |
| 36 | |||
| 37 | |||
| 38 | 60 | has architecture => ( is => 'ro' ); | |
| 39 | |||
| 40 | |||
| 41 | 60 | has deprecated => ( is => 'ro' ); | |
| 42 | |||
| 43 | |||
| 44 | 16 | ▶ | has locations => ( is => 'ro', default => sub { [] } ); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 45 | |||
| 46 | |||
| 47 | 4 | ▶ | sub data { |
|
Subroutine
data: called CC=1 SCAR=0.0
Pod
documented
| |||
| 48 | 4 | my ($self) = @_; | |
| 49 | return { | ||
| 50 | 4 | id => $self->id, | |
| 51 | name => $self->name, | ||
| 52 | description => $self->description, | ||
| 53 | cores => $self->cores, | ||
| 54 | memory => $self->memory, | ||
| 55 | disk => $self->disk, | ||
| 56 | cpu_type => $self->cpu_type, | ||
| 57 | architecture => $self->architecture, | ||
| 58 | deprecated => $self->deprecated, | ||
| 59 | locations => $self->locations, | ||
| 60 | }; | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | |||
| 65 | 60 | 1. | |
| 66 | |||
| 67 | __END__ | ||