line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VM::HetznerCloud::API::PlacementGroups; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: PlacementGroups |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# --- |
6
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_hetzner_info.pl |
7
|
|
|
|
|
|
|
# --- |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1850
|
use v5.24; |
|
3
|
|
|
|
|
23
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
24
|
use Moo; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
21
|
|
12
|
3
|
|
|
3
|
|
1057
|
use Types::Standard qw(:all); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
26
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
71641
|
use Mojo::Base -strict, -signatures; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
27
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'VM::HetznerCloud::APIBase'; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
746
|
use utf8; |
|
3
|
|
|
|
|
24
|
|
|
3
|
|
|
|
|
67
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; # VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has endpoint => ( is => 'ro', isa => Str, default => sub { 'placement_groups' } ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub list ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $request_params = { |
26
|
|
|
|
|
|
|
'label_selector' => { |
27
|
|
|
|
|
|
|
'in' => 'query', |
28
|
|
|
|
|
|
|
'required' => 0, |
29
|
|
|
|
|
|
|
'validate' => 'string', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'name' => { |
32
|
|
|
|
|
|
|
'in' => 'query', |
33
|
|
|
|
|
|
|
'required' => 0, |
34
|
|
|
|
|
|
|
'validate' => 'string', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'sort' => { |
37
|
|
|
|
|
|
|
'in' => 'query', |
38
|
|
|
|
|
|
|
'required' => 0, |
39
|
|
|
|
|
|
|
'validate' => 'string', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
'type' => { |
42
|
|
|
|
|
|
|
'in' => 'query', |
43
|
|
|
|
|
|
|
'required' => 0, |
44
|
|
|
|
|
|
|
'validate' => 'string', |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/placement_groups#get' } ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
|
sub create ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $request_params = {}; |
53
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/placement_groups#post' } ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
0
|
1
|
|
sub delete ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
my $request_params = { |
58
|
|
|
|
|
|
|
'id' => { |
59
|
|
|
|
|
|
|
'in' => 'path', |
60
|
|
|
|
|
|
|
'required' => 1, |
61
|
|
|
|
|
|
|
'validate' => 'int64', |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
}; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/placement_groups/{id}#delete' } ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
0
|
1
|
|
sub get ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
my $request_params = { |
70
|
|
|
|
|
|
|
'id' => { |
71
|
|
|
|
|
|
|
'in' => 'path', |
72
|
|
|
|
|
|
|
'required' => 1, |
73
|
|
|
|
|
|
|
'validate' => 'int64', |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
}; |
76
|
|
|
|
|
|
|
|
77
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/placement_groups/{id}#get' } ); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
|
sub put ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
my $request_params = { |
82
|
|
|
|
|
|
|
'id' => { |
83
|
|
|
|
|
|
|
'in' => 'path', |
84
|
|
|
|
|
|
|
'required' => 1, |
85
|
|
|
|
|
|
|
'validate' => 'int64', |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
}; |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/placement_groups/{id}#put' } ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
__END__ |