line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VM::HetznerCloud::API::Images; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Images |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# --- |
6
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_hetzner_info.pl |
7
|
|
|
|
|
|
|
# --- |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
2062
|
use v5.24; |
|
3
|
|
|
|
|
14
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
23
|
use Moo; |
|
3
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
21
|
|
12
|
3
|
|
|
3
|
|
1040
|
use Types::Standard qw(:all); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
26
|
|
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
3
|
|
76300
|
use Mojo::Base -strict, -signatures; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
41
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'VM::HetznerCloud::APIBase'; |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
1046
|
use utf8; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
21
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.0.3'; # VERSION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has endpoint => ( is => 'ro', isa => Str, default => sub { 'images' } ); |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub list ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $request_params = { |
26
|
|
|
|
|
|
|
'architecture' => { |
27
|
|
|
|
|
|
|
'in' => 'query', |
28
|
|
|
|
|
|
|
'required' => 0, |
29
|
|
|
|
|
|
|
'validate' => 'string', |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'bound_to' => { |
32
|
|
|
|
|
|
|
'in' => 'query', |
33
|
|
|
|
|
|
|
'required' => 0, |
34
|
|
|
|
|
|
|
'validate' => 'string', |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'include_deprecated' => { |
37
|
|
|
|
|
|
|
'in' => 'query', |
38
|
|
|
|
|
|
|
'required' => 0, |
39
|
|
|
|
|
|
|
'validate' => 'boolean', |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
'label_selector' => { |
42
|
|
|
|
|
|
|
'in' => 'query', |
43
|
|
|
|
|
|
|
'required' => 0, |
44
|
|
|
|
|
|
|
'validate' => 'string', |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
'name' => { |
47
|
|
|
|
|
|
|
'in' => 'query', |
48
|
|
|
|
|
|
|
'required' => 0, |
49
|
|
|
|
|
|
|
'validate' => 'string', |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
'sort' => { |
52
|
|
|
|
|
|
|
'in' => 'query', |
53
|
|
|
|
|
|
|
'required' => 0, |
54
|
|
|
|
|
|
|
'validate' => 'string', |
55
|
|
|
|
|
|
|
}, |
56
|
|
|
|
|
|
|
'status' => { |
57
|
|
|
|
|
|
|
'in' => 'query', |
58
|
|
|
|
|
|
|
'required' => 0, |
59
|
|
|
|
|
|
|
'validate' => 'string', |
60
|
|
|
|
|
|
|
}, |
61
|
|
|
|
|
|
|
'type' => { |
62
|
|
|
|
|
|
|
'in' => 'query', |
63
|
|
|
|
|
|
|
'required' => 0, |
64
|
|
|
|
|
|
|
'validate' => 'string', |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
}; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/images#get' } ); |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
0
|
1
|
|
sub delete ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $request_params = { |
73
|
|
|
|
|
|
|
'id' => { |
74
|
|
|
|
|
|
|
'in' => 'path', |
75
|
|
|
|
|
|
|
'required' => 1, |
76
|
|
|
|
|
|
|
'validate' => 'int64', |
77
|
|
|
|
|
|
|
}, |
78
|
|
|
|
|
|
|
}; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/images/{id}#delete' } ); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
0
|
1
|
|
sub get ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
my $request_params = { |
85
|
|
|
|
|
|
|
'id' => { |
86
|
|
|
|
|
|
|
'in' => 'path', |
87
|
|
|
|
|
|
|
'required' => 1, |
88
|
|
|
|
|
|
|
'validate' => 'int64', |
89
|
|
|
|
|
|
|
}, |
90
|
|
|
|
|
|
|
}; |
91
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/images/{id}#get' } ); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
0
|
1
|
|
sub put ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
my $request_params = { |
97
|
|
|
|
|
|
|
'id' => { |
98
|
|
|
|
|
|
|
'in' => 'path', |
99
|
|
|
|
|
|
|
'required' => 1, |
100
|
|
|
|
|
|
|
'validate' => 'int64', |
101
|
|
|
|
|
|
|
}, |
102
|
|
|
|
|
|
|
}; |
103
|
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/images/{id}#put' } ); |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
0
|
1
|
|
sub list_actions ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
my $request_params = { |
109
|
|
|
|
|
|
|
'id' => { |
110
|
|
|
|
|
|
|
'in' => 'path', |
111
|
|
|
|
|
|
|
'required' => 1, |
112
|
|
|
|
|
|
|
'validate' => 'int64', |
113
|
|
|
|
|
|
|
}, |
114
|
|
|
|
|
|
|
'sort' => { |
115
|
|
|
|
|
|
|
'in' => 'query', |
116
|
|
|
|
|
|
|
'required' => 0, |
117
|
|
|
|
|
|
|
'validate' => 'string', |
118
|
|
|
|
|
|
|
}, |
119
|
|
|
|
|
|
|
'status' => { |
120
|
|
|
|
|
|
|
'in' => 'query', |
121
|
|
|
|
|
|
|
'required' => 0, |
122
|
|
|
|
|
|
|
'validate' => 'string', |
123
|
|
|
|
|
|
|
}, |
124
|
|
|
|
|
|
|
}; |
125
|
|
|
|
|
|
|
|
126
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions', \%params, $request_params, { type => 'get', oid => '/images/{id}/actions#get' } ); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
0
|
|
|
0
|
1
|
|
sub change_protection ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
130
|
0
|
|
|
|
|
|
my $request_params = { |
131
|
|
|
|
|
|
|
'id' => { |
132
|
|
|
|
|
|
|
'in' => 'path', |
133
|
|
|
|
|
|
|
'required' => 1, |
134
|
|
|
|
|
|
|
'validate' => 'int64', |
135
|
|
|
|
|
|
|
}, |
136
|
|
|
|
|
|
|
}; |
137
|
|
|
|
|
|
|
|
138
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/change_protection', \%params, $request_params, { type => 'post', oid => '/images/{id}/actions/change_protection#post' } ); |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
|
141
|
0
|
|
|
0
|
1
|
|
sub get_actions ($self, %params) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
my $request_params = { |
143
|
|
|
|
|
|
|
'action_id' => { |
144
|
|
|
|
|
|
|
'in' => 'path', |
145
|
|
|
|
|
|
|
'required' => 1, |
146
|
|
|
|
|
|
|
'validate' => 'int64', |
147
|
|
|
|
|
|
|
}, |
148
|
|
|
|
|
|
|
'id' => { |
149
|
|
|
|
|
|
|
'in' => 'path', |
150
|
|
|
|
|
|
|
'required' => 1, |
151
|
|
|
|
|
|
|
'validate' => 'int64', |
152
|
|
|
|
|
|
|
}, |
153
|
|
|
|
|
|
|
}; |
154
|
|
|
|
|
|
|
|
155
|
0
|
|
|
|
|
|
return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/images/{id}/actions/{action_id}#get' } ); |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
1; |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
__END__ |