line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VM::HetznerCloud::API::PrimaryIps; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: PrimaryIps |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# --- |
6
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_hetzner_info.pl |
7
|
|
|
|
|
|
|
# --- |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1855
|
use v5.24; |
|
3
|
|
|
|
|
13
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
20
|
use Moo; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
18
|
|
12
|
3
|
|
|
3
|
|
947
|
use Types::Standard qw(:all); |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
82
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
71208
|
use Mojo::Base -strict, -signatures; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
37
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'VM::HetznerCloud::APIBase'; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
784
|
use utf8; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
13
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; # VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has endpoint => ( is => 'ro', isa => Str, default => sub { 'primary_ips' } ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub list ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $request_params = { |
26
|
|
|
|
|
|
|
'ip' => { |
27
|
|
|
|
|
|
|
'in' => 'query', |
28
|
|
|
|
|
|
|
'required' => 0, |
29
|
|
|
|
|
|
|
'validate' => 'string', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'label_selector' => { |
32
|
|
|
|
|
|
|
'in' => 'query', |
33
|
|
|
|
|
|
|
'required' => 0, |
34
|
|
|
|
|
|
|
'validate' => 'string', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'name' => { |
37
|
|
|
|
|
|
|
'in' => 'query', |
38
|
|
|
|
|
|
|
'required' => 0, |
39
|
|
|
|
|
|
|
'validate' => 'string', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
'sort' => { |
42
|
|
|
|
|
|
|
'in' => 'query', |
43
|
|
|
|
|
|
|
'required' => 0, |
44
|
|
|
|
|
|
|
'validate' => 'string', |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/primary_ips#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 => '/primary_ips#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 => '/primary_ips/{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 => '/primary_ips/{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 => '/primary_ips/{id}#put' } ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
0
|
1
|
|
sub assign ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
|
my $request_params = { |
94
|
|
|
|
|
|
|
'id' => { |
95
|
|
|
|
|
|
|
'in' => 'path', |
96
|
|
|
|
|
|
|
'required' => 1, |
97
|
|
|
|
|
|
|
'validate' => 'int64', |
98
|
|
|
|
|
|
|
}, |
99
|
|
|
|
|
|
|
}; |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/assign', \%params, $request_params, { type => 'post', oid => '/primary_ips/{id}/actions/assign#post' } ); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
0
|
1
|
|
sub change_dns_ptr ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
105
|
0
|
|
|
|
|
|
my $request_params = { |
106
|
|
|
|
|
|
|
'id' => { |
107
|
|
|
|
|
|
|
'in' => 'path', |
108
|
|
|
|
|
|
|
'required' => 1, |
109
|
|
|
|
|
|
|
'validate' => 'int64', |
110
|
|
|
|
|
|
|
}, |
111
|
|
|
|
|
|
|
}; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_dns_ptr', \%params, $request_params, { type => 'post', oid => '/primary_ips/{id}/actions/change_dns_ptr#post' } ); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
0
|
1
|
|
sub change_protection ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
117
|
0
|
|
|
|
|
|
my $request_params = { |
118
|
|
|
|
|
|
|
'id' => { |
119
|
|
|
|
|
|
|
'in' => 'path', |
120
|
|
|
|
|
|
|
'required' => 1, |
121
|
|
|
|
|
|
|
'validate' => 'int64', |
122
|
|
|
|
|
|
|
}, |
123
|
|
|
|
|
|
|
}; |
124
|
|
|
|
|
|
|
|
125
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_protection', \%params, $request_params, { type => 'post', oid => '/primary_ips/{id}/actions/change_protection#post' } ); |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
0
|
|
|
0
|
1
|
|
sub unassign ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
129
|
0
|
|
|
|
|
|
my $request_params = { |
130
|
|
|
|
|
|
|
'id' => { |
131
|
|
|
|
|
|
|
'in' => 'path', |
132
|
|
|
|
|
|
|
'required' => 1, |
133
|
|
|
|
|
|
|
'validate' => 'int64', |
134
|
|
|
|
|
|
|
}, |
135
|
|
|
|
|
|
|
}; |
136
|
|
|
|
|
|
|
|
137
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/unassign', \%params, $request_params, { type => 'post', oid => '/primary_ips/{id}/actions/unassign#post' } ); |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
1; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
__END__ |