| 1 | package VM::HetznerCloud::API::Firewalls; | ||
| 2 | |||
| 3 | # ABSTRACT: Firewalls | ||
| 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 { 'firewalls' } ); |
|
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 | 'sort' => { | ||
| 37 | 'in' => 'query', | ||
| 38 | 'required' => 0, | ||
| 39 | 'validate' => 'string', | ||
| 40 | }, | ||
| 41 | }; | ||
| 42 | |||
| 43 | 0 | return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/firewalls#get' } ); | |
| 44 | } | ||
| 45 | |||
| 46 | 0 | ▶ | sub create ($self, %params) { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 47 | 0 | my $request_params = {}; | |
| 48 | 0 | return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/firewalls#post' } ); | |
| 49 | } | ||
| 50 | |||
| 51 | 0 | ▶ | sub delete ($self, %params) { |
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 52 | 0 | my $request_params = { | |
| 53 | 'id' => { | ||
| 54 | 'in' => 'path', | ||
| 55 | 'required' => 1, | ||
| 56 | 'validate' => 'int64', | ||
| 57 | }, | ||
| 58 | }; | ||
| 59 | |||
| 60 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'delete', oid => '/firewalls/{id}#delete' } ); | |
| 61 | } | ||
| 62 | |||
| 63 | 0 | ▶ | sub get ($self, %params) { |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 64 | 0 | my $request_params = { | |
| 65 | 'id' => { | ||
| 66 | 'in' => 'path', | ||
| 67 | 'required' => 1, | ||
| 68 | 'validate' => 'int64', | ||
| 69 | }, | ||
| 70 | }; | ||
| 71 | |||
| 72 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'get', oid => '/firewalls/{id}#get' } ); | |
| 73 | } | ||
| 74 | |||
| 75 | 0 | ▶ | sub put ($self, %params) { |
|
Subroutine
put: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 76 | 0 | my $request_params = { | |
| 77 | 'id' => { | ||
| 78 | 'in' => 'path', | ||
| 79 | 'required' => 1, | ||
| 80 | 'validate' => 'int64', | ||
| 81 | }, | ||
| 82 | }; | ||
| 83 | |||
| 84 | 0 | return $self->_request( '/:id', \%params, $request_params, { type => 'put', oid => '/firewalls/{id}#put' } ); | |
| 85 | } | ||
| 86 | |||
| 87 | 0 | ▶ | sub list_actions ($self, %params) { |
|
Subroutine
list_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 88 | 0 | my $request_params = { | |
| 89 | 'id' => { | ||
| 90 | 'in' => 'path', | ||
| 91 | 'required' => 1, | ||
| 92 | 'validate' => 'int64', | ||
| 93 | }, | ||
| 94 | 'sort' => { | ||
| 95 | 'in' => 'query', | ||
| 96 | 'required' => 0, | ||
| 97 | 'validate' => 'string', | ||
| 98 | }, | ||
| 99 | 'status' => { | ||
| 100 | 'in' => 'query', | ||
| 101 | 'required' => 0, | ||
| 102 | 'validate' => 'string', | ||
| 103 | }, | ||
| 104 | }; | ||
| 105 | |||
| 106 | 0 | return $self->_request( '/:id/actions', \%params, $request_params, { type => 'get', oid => '/firewalls/{id}/actions#get' } ); | |
| 107 | } | ||
| 108 | |||
| 109 | 0 | ▶ | sub apply_to_resources ($self, %params) { |
|
Subroutine
apply_to_resources: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 110 | 0 | my $request_params = { | |
| 111 | 'id' => { | ||
| 112 | 'in' => 'path', | ||
| 113 | 'required' => 1, | ||
| 114 | 'validate' => 'int64', | ||
| 115 | }, | ||
| 116 | }; | ||
| 117 | |||
| 118 | 0 | return $self->_request( '/:id/actions/apply_to_resources', \%params, $request_params, { type => 'post', oid => '/firewalls/{id}/actions/apply_to_resources#post' } ); | |
| 119 | } | ||
| 120 | |||
| 121 | 0 | ▶ | sub remove_from_resources ($self, %params) { |
|
Subroutine
remove_from_resources: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 122 | 0 | my $request_params = { | |
| 123 | 'id' => { | ||
| 124 | 'in' => 'path', | ||
| 125 | 'required' => 1, | ||
| 126 | 'validate' => 'int64', | ||
| 127 | }, | ||
| 128 | }; | ||
| 129 | |||
| 130 | 0 | return $self->_request( '/:id/actions/remove_from_resources', \%params, $request_params, { type => 'post', oid => '/firewalls/{id}/actions/remove_from_resources#post' } ); | |
| 131 | } | ||
| 132 | |||
| 133 | 0 | ▶ | sub set_rules ($self, %params) { |
|
Subroutine
set_rules: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 134 | 0 | my $request_params = { | |
| 135 | 'id' => { | ||
| 136 | 'in' => 'path', | ||
| 137 | 'required' => 1, | ||
| 138 | 'validate' => 'int64', | ||
| 139 | }, | ||
| 140 | }; | ||
| 141 | |||
| 142 | 0 | return $self->_request( '/:id/actions/set_rules', \%params, $request_params, { type => 'post', oid => '/firewalls/{id}/actions/set_rules#post' } ); | |
| 143 | } | ||
| 144 | |||
| 145 | 0 | ▶ | sub get_actions ($self, %params) { |
|
Subroutine
get_actions: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 146 | 0 | my $request_params = { | |
| 147 | 'action_id' => { | ||
| 148 | 'in' => 'path', | ||
| 149 | 'required' => 1, | ||
| 150 | 'validate' => 'int64', | ||
| 151 | }, | ||
| 152 | 'id' => { | ||
| 153 | 'in' => 'path', | ||
| 154 | 'required' => 1, | ||
| 155 | 'validate' => 'int64', | ||
| 156 | }, | ||
| 157 | }; | ||
| 158 | |||
| 159 | 0 | return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/firewalls/{id}/actions/{action_id}#get' } ); | |
| 160 | } | ||
| 161 | |||
| 162 | |||
| 163 | 3 | 1; | |
| 164 | |||
| 165 | __END__ | ||