| 1 | package VM::HetznerCloud::API::Networks; | ||
| 2 | |||
| 3 | # ABSTRACT: Networks | ||
| 4 | |||
| 5 | # --- | ||
| 6 | # This class is auto-generated by bin/get_hetzner_info.pl | ||
| 7 | # --- | ||
| 8 | |||
| 9 | 3 | ▶ | use v5.24; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 3 | ▶ | use Types::Standard qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 3 | ▶ | use Mojo::Base -strict, -signatures; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 3 | extends 'VM::HetznerCloud::APIBase'; | |
| 17 | |||
| 18 | 3 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 3 | our $VERSION = '0.0.3'; # VERSION | |
| 21 | |||
| 22 | 0 | ▶ | has endpoint => ( is => 'ro', isa => Str, default => sub { 'networks' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | |||
| 24 | 0 | ▶ | sub list ($self, %params) { |
|
Subroutine
list: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 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 | }; | ||
| 37 | |||
| 38 | 0 | return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/networks#get' } ); | |
| 39 | } | ||
| 40 | |||
| 41 | 0 | ▶ | sub create ($self, %params) { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 42 | 0 | my $request_params = {}; | |
| 43 | 0 | return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/networks#post' } ); | |
| 44 | } | ||
| 45 | |||
| 46 | 0 | ▶ | sub delete ($self, %params) { |
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 47 | 0 | my $request_params = { | |
| 48 | 'id' => { | ||
| 49 | 'in' => 'path', | ||
| 50 | 'required' => 1, | ||
| 51 | 'validate' => 'int64', | ||
| 52 | }, | ||
| 53 | }; | ||
| 54 | |||
| 55 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/networks/{id}#delete' } ); | |
| 56 | } | ||
| 57 | |||
| 58 | 0 | ▶ | sub get ($self, %params) { |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 59 | 0 | my $request_params = { | |
| 60 | 'id' => { | ||
| 61 | 'in' => 'path', | ||
| 62 | 'required' => 1, | ||
| 63 | 'validate' => 'int64', | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | |||
| 67 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/networks/{id}#get' } ); | |
| 68 | } | ||
| 69 | |||
| 70 | 0 | ▶ | sub put ($self, %params) { |
|
Subroutine
put: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 71 | 0 | my $request_params = { | |
| 72 | 'id' => { | ||
| 73 | 'in' => 'path', | ||
| 74 | 'required' => 1, | ||
| 75 | 'validate' => 'int64', | ||
| 76 | }, | ||
| 77 | }; | ||
| 78 | |||
| 79 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/networks/{id}#put' } ); | |
| 80 | } | ||
| 81 | |||
| 82 | 0 | ▶ | sub list_actions ($self, %params) { |
|
Subroutine
list_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 83 | 0 | my $request_params = { | |
| 84 | 'id' => { | ||
| 85 | 'in' => 'path', | ||
| 86 | 'required' => 1, | ||
| 87 | 'validate' => 'int64', | ||
| 88 | }, | ||
| 89 | 'sort' => { | ||
| 90 | 'in' => 'query', | ||
| 91 | 'required' => 0, | ||
| 92 | 'validate' => 'string', | ||
| 93 | }, | ||
| 94 | 'status' => { | ||
| 95 | 'in' => 'query', | ||
| 96 | 'required' => 0, | ||
| 97 | 'validate' => 'string', | ||
| 98 | }, | ||
| 99 | }; | ||
| 100 | |||
| 101 | 0 | return $self->_request( '/:id/actions', \%params, $request_params, { type => 'get', oid => '/networks/{id}/actions#get' } ); | |
| 102 | } | ||
| 103 | |||
| 104 | 0 | ▶ | sub add_route ($self, %params) { |
|
Subroutine
add_route: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 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/add_route', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/add_route#post' } ); | |
| 114 | } | ||
| 115 | |||
| 116 | 0 | ▶ | sub add_subnet ($self, %params) { |
|
Subroutine
add_subnet: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 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/add_subnet', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/add_subnet#post' } ); | |
| 126 | } | ||
| 127 | |||
| 128 | 0 | ▶ | sub change_ip_range ($self, %params) { |
|
Subroutine
change_ip_range: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 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/change_ip_range', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/change_ip_range#post' } ); | |
| 138 | } | ||
| 139 | |||
| 140 | 0 | ▶ | sub change_protection ($self, %params) { |
|
Subroutine
change_protection: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 141 | 0 | my $request_params = { | |
| 142 | 'id' => { | ||
| 143 | 'in' => 'path', | ||
| 144 | 'required' => 1, | ||
| 145 | 'validate' => 'int64', | ||
| 146 | }, | ||
| 147 | }; | ||
| 148 | |||
| 149 | 0 | return $self->_request( '/:id/actions/change_protection', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/change_protection#post' } ); | |
| 150 | } | ||
| 151 | |||
| 152 | 0 | ▶ | sub delete_route ($self, %params) { |
|
Subroutine
delete_route: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 153 | 0 | my $request_params = { | |
| 154 | 'id' => { | ||
| 155 | 'in' => 'path', | ||
| 156 | 'required' => 1, | ||
| 157 | 'validate' => 'int64', | ||
| 158 | }, | ||
| 159 | }; | ||
| 160 | |||
| 161 | 0 | return $self->_request( '/:id/actions/delete_route', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/delete_route#post' } ); | |
| 162 | } | ||
| 163 | |||
| 164 | 0 | ▶ | sub delete_subnet ($self, %params) { |
|
Subroutine
delete_subnet: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 165 | 0 | my $request_params = { | |
| 166 | 'id' => { | ||
| 167 | 'in' => 'path', | ||
| 168 | 'required' => 1, | ||
| 169 | 'validate' => 'int64', | ||
| 170 | }, | ||
| 171 | }; | ||
| 172 | |||
| 173 | 0 | return $self->_request( '/:id/actions/delete_subnet', \%params, $request_params, { type => 'post', oid => '/networks/{id}/actions/delete_subnet#post' } ); | |
| 174 | } | ||
| 175 | |||
| 176 | 0 | ▶ | sub get_actions ($self, %params) { |
|
Subroutine
get_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 177 | 0 | my $request_params = { | |
| 178 | 'action_id' => { | ||
| 179 | 'in' => 'path', | ||
| 180 | 'required' => 1, | ||
| 181 | 'validate' => 'int64', | ||
| 182 | }, | ||
| 183 | 'id' => { | ||
| 184 | 'in' => 'path', | ||
| 185 | 'required' => 1, | ||
| 186 | 'validate' => 'int64', | ||
| 187 | }, | ||
| 188 | }; | ||
| 189 | |||
| 190 | 0 | return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/networks/{id}/actions/{action_id}#get' } ); | |
| 191 | } | ||
| 192 | |||
| 193 | |||
| 194 | 3 | 1; | |
| 195 | |||
| 196 | __END__ | ||