| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package VM::HetznerCloud::API::FloatingIps; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | # ABSTRACT: FloatingIps | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | # --- | 
| 6 |  |  |  |  |  |  | # This class is auto-generated by bin/get_hetzner_info.pl | 
| 7 |  |  |  |  |  |  | # --- | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 3 |  |  | 3 |  | 2100 | use v5.24; | 
|  | 3 |  |  |  |  | 13 |  | 
| 10 |  |  |  |  |  |  |  | 
| 11 | 3 |  |  | 3 |  | 18 | use Moo; | 
|  | 3 |  |  |  |  | 12 |  | 
|  | 3 |  |  |  |  | 45 |  | 
| 12 | 3 |  |  | 3 |  | 1070 | use Types::Standard qw(:all); | 
|  | 3 |  |  |  |  | 6 |  | 
|  | 3 |  |  |  |  | 32 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 3 |  |  | 3 |  | 73292 | use Mojo::Base -strict, -signatures; | 
|  | 3 |  |  |  |  | 7 |  | 
|  | 3 |  |  |  |  | 41 |  | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | extends 'VM::HetznerCloud::APIBase'; | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 3 |  |  | 3 |  | 962 | use utf8; | 
|  | 3 |  |  |  |  | 9 |  | 
|  | 3 |  |  |  |  | 34 |  | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | our $VERSION = '0.0.3'; # VERSION | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | has endpoint  => ( is => 'ro', isa => Str, default => sub { 'floating_ips' } ); | 
| 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 |  |  |  |  |  |  | }; | 
| 42 |  |  |  |  |  |  |  | 
| 43 | 0 |  |  |  |  |  | return $self->_request( '', \%params, $request_params, { type => 'get', oid => '/floating_ips#get' } ); | 
| 44 |  |  |  |  |  |  | } | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 0 |  |  | 0 | 1 |  | sub create ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 47 | 0 |  |  |  |  |  | my $request_params = {}; | 
| 48 | 0 |  |  |  |  |  | return $self->_request( '', \%params, $request_params, { type => 'post', oid => '/floating_ips#post' } ); | 
| 49 |  |  |  |  |  |  | } | 
| 50 |  |  |  |  |  |  |  | 
| 51 | 0 |  |  | 0 | 1 |  | sub delete ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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 => '/floating_ips/{id}#delete' } ); | 
| 61 |  |  |  |  |  |  | } | 
| 62 |  |  |  |  |  |  |  | 
| 63 | 0 |  |  | 0 | 1 |  | sub get ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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 => '/floating_ips/{id}#get' } ); | 
| 73 |  |  |  |  |  |  | } | 
| 74 |  |  |  |  |  |  |  | 
| 75 | 0 |  |  | 0 | 1 |  | sub put ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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 => '/floating_ips/{id}#put' } ); | 
| 85 |  |  |  |  |  |  | } | 
| 86 |  |  |  |  |  |  |  | 
| 87 | 0 |  |  | 0 | 1 |  | sub list_actions ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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 => '/floating_ips/{id}/actions#get' } ); | 
| 107 |  |  |  |  |  |  | } | 
| 108 |  |  |  |  |  |  |  | 
| 109 | 0 |  |  | 0 | 1 |  | sub assign ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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/assign', \%params, $request_params, { type => 'post', oid => '/floating_ips/{id}/actions/assign#post' } ); | 
| 119 |  |  |  |  |  |  | } | 
| 120 |  |  |  |  |  |  |  | 
| 121 | 0 |  |  | 0 | 1 |  | sub change_dns_ptr ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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/change_dns_ptr', \%params, $request_params, { type => 'post', oid => '/floating_ips/{id}/actions/change_dns_ptr#post' } ); | 
| 131 |  |  |  |  |  |  | } | 
| 132 |  |  |  |  |  |  |  | 
| 133 | 0 |  |  | 0 | 1 |  | sub change_protection ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 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/change_protection', \%params, $request_params, { type => 'post', oid => '/floating_ips/{id}/actions/change_protection#post' } ); | 
| 143 |  |  |  |  |  |  | } | 
| 144 |  |  |  |  |  |  |  | 
| 145 | 0 |  |  | 0 | 1 |  | sub unassign ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 146 | 0 |  |  |  |  |  | my $request_params = { | 
| 147 |  |  |  |  |  |  | 'id' => { | 
| 148 |  |  |  |  |  |  | 'in'       => 'path', | 
| 149 |  |  |  |  |  |  | 'required' => 1, | 
| 150 |  |  |  |  |  |  | 'validate' => 'int64', | 
| 151 |  |  |  |  |  |  | }, | 
| 152 |  |  |  |  |  |  | }; | 
| 153 |  |  |  |  |  |  |  | 
| 154 | 0 |  |  |  |  |  | return $self->_request( '/:id/actions/unassign', \%params, $request_params, { type => 'post', oid => '/floating_ips/{id}/actions/unassign#post' } ); | 
| 155 |  |  |  |  |  |  | } | 
| 156 |  |  |  |  |  |  |  | 
| 157 | 0 |  |  | 0 | 1 |  | sub get_actions ($self, %params) { | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 158 | 0 |  |  |  |  |  | my $request_params = { | 
| 159 |  |  |  |  |  |  | 'action_id' => { | 
| 160 |  |  |  |  |  |  | 'in'       => 'path', | 
| 161 |  |  |  |  |  |  | 'required' => 1, | 
| 162 |  |  |  |  |  |  | 'validate' => 'int64', | 
| 163 |  |  |  |  |  |  | }, | 
| 164 |  |  |  |  |  |  | 'id' => { | 
| 165 |  |  |  |  |  |  | 'in'       => 'path', | 
| 166 |  |  |  |  |  |  | 'required' => 1, | 
| 167 |  |  |  |  |  |  | 'validate' => 'int64', | 
| 168 |  |  |  |  |  |  | }, | 
| 169 |  |  |  |  |  |  | }; | 
| 170 |  |  |  |  |  |  |  | 
| 171 | 0 |  |  |  |  |  | return $self->_request( '/:id/actions/:action_id', \%params, $request_params, { type => 'get', oid => '/floating_ips/{id}/actions/{action_id}#get' } ); | 
| 172 |  |  |  |  |  |  | } | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  |  | 
| 175 |  |  |  |  |  |  | 1; | 
| 176 |  |  |  |  |  |  |  | 
| 177 |  |  |  |  |  |  | __END__ |