Fastly/NetworkProtectApi.pm untested

filter: Statementstmt 0.0% 0 / 582 Branchbran 0.0% 0 / 170 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 30 Podpod 0.0% 0 / 21 totaltotal 0.0% 0 / 812 CC 86 SCAR 34.8
CC
86
Cov
0%
update_network_protect_endpoint
56.0
update_network_protect_network
56.0
update_network_protect_prefix_list
56.0
CRAP 32.3
1 =begin comment
2  
3 Fastly API
4  
5 Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
6  
7 The version of the API Spec document: 1.0.0
8 Contact: oss@fastly.com
9  
10 =end comment
11  
12 =cut
13  
14 #
15 # NOTE: This class is auto generated.
16 # Do not edit the class manually.
17 #
18 package WebService::Fastly::NetworkProtectApi;
19  
20 require 5.6.0;
21 use strict;
22 use warnings;
23 use utf8;
24 use Exporter;
25 use Carp qw( croak );
26 use Log::Any qw($log);
27  
28 use WebService::Fastly::ApiClient;
29  
30 use base "Class::Data::Inheritable";
31  
32 __PACKAGE__->mk_classdata('method_documentation' => {});
33  
34 sub new {
35 my $class = shift;
36 my $api_client;
37  
38 if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) {
39 $api_client = $_[0];
40 } else {
41 $api_client = WebService::Fastly::ApiClient->new(@_);
42 }
43  
44 bless { api_client => $api_client }, $class;
45  
46 }
47  
48  
49 #
50 # create_network_protect_endpoint
51 #
52 # Create a Network Protect endpoint
53 #
54 # @param NetworkProtectEndpointCreate $network_protect_endpoint_create (required)
55 {
56 my $params = {
57 'network_protect_endpoint_create' => {
58 data_type => 'NetworkProtectEndpointCreate',
59 description => '',
60 required => '1',
61 },
62 };
63 __PACKAGE__->method_documentation->{ 'create_network_protect_endpoint' } = {
64 summary => 'Create a Network Protect endpoint',
65 params => $params,
66 returns => 'NetworkProtectEndpointResponse',
67 };
68 }
69 # @return NetworkProtectEndpointResponse
70 #
71 sub create_network_protect_endpoint {
72 my ($self, %args) = @_;
73  
74 # verify the required parameter 'network_protect_endpoint_create' is set
75 unless (exists $args{'network_protect_endpoint_create'}) {
76 croak("Missing the required parameter 'network_protect_endpoint_create' when calling create_network_protect_endpoint");
77 }
78  
79 # parse inputs
80 my $_resource_path = '/network-protect/v1/endpoints';
81  
82 my $_method = 'POST';
83 my $query_params = {};
84 my $header_params = {};
85 my $form_params = {};
86  
87 # 'Accept' and 'Content-Type' header
88 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
89 if ($_header_accept) {
90 $header_params->{'Accept'} = $_header_accept;
91 }
92 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
93  
94 my $_body_data;
95 # body params
96 if ( exists $args{'network_protect_endpoint_create'}) {
97 $_body_data = $args{'network_protect_endpoint_create'};
98 }
99  
100 # authentication setting, if any
101 my $auth_settings = [qw(token )];
102  
103 # make the API Call
104 my $response = $self->{api_client}->call_api($_resource_path, $_method,
105 $query_params, $form_params,
106 $header_params, $_body_data, $auth_settings);
107 if (!$response) {
108 return;
109 }
110 my $_response_object = $self->{api_client}->deserialize('NetworkProtectEndpointResponse', $response);
111 return $_response_object;
112 }
113  
114 #
115 # create_network_protect_network
116 #
117 # Create a Network Protect network
118 #
119 # @param NetworkProtectNetworkCreate $network_protect_network_create (required)
120 {
121 my $params = {
122 'network_protect_network_create' => {
123 data_type => 'NetworkProtectNetworkCreate',
124 description => '',
125 required => '1',
126 },
127 };
128 __PACKAGE__->method_documentation->{ 'create_network_protect_network' } = {
129 summary => 'Create a Network Protect network',
130 params => $params,
131 returns => 'NetworkProtectNetworkResponse',
132 };
133 }
134 # @return NetworkProtectNetworkResponse
135 #
136 sub create_network_protect_network {
137 my ($self, %args) = @_;
138  
139 # verify the required parameter 'network_protect_network_create' is set
140 unless (exists $args{'network_protect_network_create'}) {
141 croak("Missing the required parameter 'network_protect_network_create' when calling create_network_protect_network");
142 }
143  
144 # parse inputs
145 my $_resource_path = '/network-protect/v1/networks';
146  
147 my $_method = 'POST';
148 my $query_params = {};
149 my $header_params = {};
150 my $form_params = {};
151  
152 # 'Accept' and 'Content-Type' header
153 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
154 if ($_header_accept) {
155 $header_params->{'Accept'} = $_header_accept;
156 }
157 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
158  
159 my $_body_data;
160 # body params
161 if ( exists $args{'network_protect_network_create'}) {
162 $_body_data = $args{'network_protect_network_create'};
163 }
164  
165 # authentication setting, if any
166 my $auth_settings = [qw(token )];
167  
168 # make the API Call
169 my $response = $self->{api_client}->call_api($_resource_path, $_method,
170 $query_params, $form_params,
171 $header_params, $_body_data, $auth_settings);
172 if (!$response) {
173 return;
174 }
175 my $_response_object = $self->{api_client}->deserialize('NetworkProtectNetworkResponse', $response);
176 return $_response_object;
177 }
178  
179 #
180 # create_network_protect_prefix_list
181 #
182 # Create a Network Protect prefix list
183 #
184 # @param NetworkProtectPrefixListCreate $network_protect_prefix_list_create (required)
185 {
186 my $params = {
187 'network_protect_prefix_list_create' => {
188 data_type => 'NetworkProtectPrefixListCreate',
189 description => '',
190 required => '1',
191 },
192 };
193 __PACKAGE__->method_documentation->{ 'create_network_protect_prefix_list' } = {
194 summary => 'Create a Network Protect prefix list',
195 params => $params,
196 returns => 'NetworkProtectPrefixListResponse',
197 };
198 }
199 # @return NetworkProtectPrefixListResponse
200 #
201 sub create_network_protect_prefix_list {
202 my ($self, %args) = @_;
203  
204 # verify the required parameter 'network_protect_prefix_list_create' is set
205 unless (exists $args{'network_protect_prefix_list_create'}) {
206 croak("Missing the required parameter 'network_protect_prefix_list_create' when calling create_network_protect_prefix_list");
207 }
208  
209 # parse inputs
210 my $_resource_path = '/network-protect/v1/prefix-lists';
211  
212 my $_method = 'POST';
213 my $query_params = {};
214 my $header_params = {};
215 my $form_params = {};
216  
217 # 'Accept' and 'Content-Type' header
218 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
219 if ($_header_accept) {
220 $header_params->{'Accept'} = $_header_accept;
221 }
222 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
223  
224 my $_body_data;
225 # body params
226 if ( exists $args{'network_protect_prefix_list_create'}) {
227 $_body_data = $args{'network_protect_prefix_list_create'};
228 }
229  
230 # authentication setting, if any
231 my $auth_settings = [qw(token )];
232  
233 # make the API Call
234 my $response = $self->{api_client}->call_api($_resource_path, $_method,
235 $query_params, $form_params,
236 $header_params, $_body_data, $auth_settings);
237 if (!$response) {
238 return;
239 }
240 my $_response_object = $self->{api_client}->deserialize('NetworkProtectPrefixListResponse', $response);
241 return $_response_object;
242 }
243  
244 #
245 # create_network_protect_rule_set
246 #
247 # Create a Network Protect rule set
248 #
249 # @param NetworkProtectRuleSetCreate $network_protect_rule_set_create (required)
250 {
251 my $params = {
252 'network_protect_rule_set_create' => {
253 data_type => 'NetworkProtectRuleSetCreate',
254 description => '',
255 required => '1',
256 },
257 };
258 __PACKAGE__->method_documentation->{ 'create_network_protect_rule_set' } = {
259 summary => 'Create a Network Protect rule set',
260 params => $params,
261 returns => 'NetworkProtectRuleSetResponse',
262 };
263 }
264 # @return NetworkProtectRuleSetResponse
265 #
266 sub create_network_protect_rule_set {
267 my ($self, %args) = @_;
268  
269 # verify the required parameter 'network_protect_rule_set_create' is set
270 unless (exists $args{'network_protect_rule_set_create'}) {
271 croak("Missing the required parameter 'network_protect_rule_set_create' when calling create_network_protect_rule_set");
272 }
273  
274 # parse inputs
275 my $_resource_path = '/network-protect/v1/rule-sets';
276  
277 my $_method = 'POST';
278 my $query_params = {};
279 my $header_params = {};
280 my $form_params = {};
281  
282 # 'Accept' and 'Content-Type' header
283 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
284 if ($_header_accept) {
285 $header_params->{'Accept'} = $_header_accept;
286 }
287 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
288  
289 my $_body_data;
290 # body params
291 if ( exists $args{'network_protect_rule_set_create'}) {
292 $_body_data = $args{'network_protect_rule_set_create'};
293 }
294  
295 # authentication setting, if any
296 my $auth_settings = [qw(token )];
297  
298 # make the API Call
299 my $response = $self->{api_client}->call_api($_resource_path, $_method,
300 $query_params, $form_params,
301 $header_params, $_body_data, $auth_settings);
302 if (!$response) {
303 return;
304 }
305 my $_response_object = $self->{api_client}->deserialize('NetworkProtectRuleSetResponse', $response);
306 return $_response_object;
307 }
308  
309 #
310 # delete_network_protect_endpoint
311 #
312 # Delete a Network Protect endpoint
313 #
314 # @param string $endpoint_id Unique identifier of the Network Protect endpoint. (required)
315 {
316 my $params = {
317 'endpoint_id' => {
318 data_type => 'string',
319 description => 'Unique identifier of the Network Protect endpoint.',
320 required => '1',
321 },
322 };
323 __PACKAGE__->method_documentation->{ 'delete_network_protect_endpoint' } = {
324 summary => 'Delete a Network Protect endpoint',
325 params => $params,
326 returns => undef,
327 };
328 }
329 # @return void
330 #
331 sub delete_network_protect_endpoint {
332 my ($self, %args) = @_;
333  
334 # verify the required parameter 'endpoint_id' is set
335 unless (exists $args{'endpoint_id'}) {
336 croak("Missing the required parameter 'endpoint_id' when calling delete_network_protect_endpoint");
337 }
338  
339 # parse inputs
340 my $_resource_path = '/network-protect/v1/endpoints/{endpoint_id}';
341  
342 my $_method = 'DELETE';
343 my $query_params = {};
344 my $header_params = {};
345 my $form_params = {};
346  
347 # 'Accept' and 'Content-Type' header
348 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
349 if ($_header_accept) {
350 $header_params->{'Accept'} = $_header_accept;
351 }
352 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
353  
354 # path params
355 if ( exists $args{'endpoint_id'}) {
356 my $_base_variable = "{" . "endpoint_id" . "}";
357 my $_base_value = $self->{api_client}->to_path_value($args{'endpoint_id'});
358 $_resource_path =~ s/$_base_variable/$_base_value/g;
359 }
360  
361 my $_body_data;
362 # authentication setting, if any
363 my $auth_settings = [qw(token )];
364  
365 # make the API Call
366 $self->{api_client}->call_api($_resource_path, $_method,
367 $query_params, $form_params,
368 $header_params, $_body_data, $auth_settings);
369 return;
370 }
371  
372 #
373 # delete_network_protect_network
374 #
375 # Delete a Network Protect network
376 #
377 # @param string $network_id Unique identifier of the Network Protect network. (required)
378 {
379 my $params = {
380 'network_id' => {
381 data_type => 'string',
382 description => 'Unique identifier of the Network Protect network.',
383 required => '1',
384 },
385 };
386 __PACKAGE__->method_documentation->{ 'delete_network_protect_network' } = {
387 summary => 'Delete a Network Protect network',
388 params => $params,
389 returns => undef,
390 };
391 }
392 # @return void
393 #
394 sub delete_network_protect_network {
395 my ($self, %args) = @_;
396  
397 # verify the required parameter 'network_id' is set
398 unless (exists $args{'network_id'}) {
399 croak("Missing the required parameter 'network_id' when calling delete_network_protect_network");
400 }
401  
402 # parse inputs
403 my $_resource_path = '/network-protect/v1/networks/{network_id}';
404  
405 my $_method = 'DELETE';
406 my $query_params = {};
407 my $header_params = {};
408 my $form_params = {};
409  
410 # 'Accept' and 'Content-Type' header
411 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
412 if ($_header_accept) {
413 $header_params->{'Accept'} = $_header_accept;
414 }
415 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
416  
417 # path params
418 if ( exists $args{'network_id'}) {
419 my $_base_variable = "{" . "network_id" . "}";
420 my $_base_value = $self->{api_client}->to_path_value($args{'network_id'});
421 $_resource_path =~ s/$_base_variable/$_base_value/g;
422 }
423  
424 my $_body_data;
425 # authentication setting, if any
426 my $auth_settings = [qw(token )];
427  
428 # make the API Call
429 $self->{api_client}->call_api($_resource_path, $_method,
430 $query_params, $form_params,
431 $header_params, $_body_data, $auth_settings);
432 return;
433 }
434  
435 #
436 # delete_network_protect_prefix_list
437 #
438 # Delete a Network Protect prefix list
439 #
440 # @param string $prefix_list_id Unique identifier of the Network Protect prefix list. (required)
441 {
442 my $params = {
443 'prefix_list_id' => {
444 data_type => 'string',
445 description => 'Unique identifier of the Network Protect prefix list.',
446 required => '1',
447 },
448 };
449 __PACKAGE__->method_documentation->{ 'delete_network_protect_prefix_list' } = {
450 summary => 'Delete a Network Protect prefix list',
451 params => $params,
452 returns => undef,
453 };
454 }
455 # @return void
456 #
457 sub delete_network_protect_prefix_list {
458 my ($self, %args) = @_;
459  
460 # verify the required parameter 'prefix_list_id' is set
461 unless (exists $args{'prefix_list_id'}) {
462 croak("Missing the required parameter 'prefix_list_id' when calling delete_network_protect_prefix_list");
463 }
464  
465 # parse inputs
466 my $_resource_path = '/network-protect/v1/prefix-lists/{prefix_list_id}';
467  
468 my $_method = 'DELETE';
469 my $query_params = {};
470 my $header_params = {};
471 my $form_params = {};
472  
473 # 'Accept' and 'Content-Type' header
474 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
475 if ($_header_accept) {
476 $header_params->{'Accept'} = $_header_accept;
477 }
478 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
479  
480 # path params
481 if ( exists $args{'prefix_list_id'}) {
482 my $_base_variable = "{" . "prefix_list_id" . "}";
483 my $_base_value = $self->{api_client}->to_path_value($args{'prefix_list_id'});
484 $_resource_path =~ s/$_base_variable/$_base_value/g;
485 }
486  
487 my $_body_data;
488 # authentication setting, if any
489 my $auth_settings = [qw(token )];
490  
491 # make the API Call
492 $self->{api_client}->call_api($_resource_path, $_method,
493 $query_params, $form_params,
494 $header_params, $_body_data, $auth_settings);
495 return;
496 }
497  
498 #
499 # delete_network_protect_rule_set
500 #
501 # Delete a Network Protect rule set
502 #
503 # @param string $rule_set_id Unique identifier of the Network Protect rule set. (required)
504 {
505 my $params = {
506 'rule_set_id' => {
507 data_type => 'string',
508 description => 'Unique identifier of the Network Protect rule set.',
509 required => '1',
510 },
511 };
512 __PACKAGE__->method_documentation->{ 'delete_network_protect_rule_set' } = {
513 summary => 'Delete a Network Protect rule set',
514 params => $params,
515 returns => undef,
516 };
517 }
518 # @return void
519 #
520 sub delete_network_protect_rule_set {
521 my ($self, %args) = @_;
522  
523 # verify the required parameter 'rule_set_id' is set
524 unless (exists $args{'rule_set_id'}) {
525 croak("Missing the required parameter 'rule_set_id' when calling delete_network_protect_rule_set");
526 }
527  
528 # parse inputs
529 my $_resource_path = '/network-protect/v1/rule-sets/{rule_set_id}';
530  
531 my $_method = 'DELETE';
532 my $query_params = {};
533 my $header_params = {};
534 my $form_params = {};
535  
536 # 'Accept' and 'Content-Type' header
537 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
538 if ($_header_accept) {
539 $header_params->{'Accept'} = $_header_accept;
540 }
541 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
542  
543 # path params
544 if ( exists $args{'rule_set_id'}) {
545 my $_base_variable = "{" . "rule_set_id" . "}";
546 my $_base_value = $self->{api_client}->to_path_value($args{'rule_set_id'});
547 $_resource_path =~ s/$_base_variable/$_base_value/g;
548 }
549  
550 my $_body_data;
551 # authentication setting, if any
552 my $auth_settings = [qw(token )];
553  
554 # make the API Call
555 $self->{api_client}->call_api($_resource_path, $_method,
556 $query_params, $form_params,
557 $header_params, $_body_data, $auth_settings);
558 return;
559 }
560  
561 #
562 # get_network_protect_endpoint
563 #
564 # Get a Network Protect endpoint
565 #
566 # @param string $endpoint_id Unique identifier of the Network Protect endpoint. (required)
567 {
568 my $params = {
569 'endpoint_id' => {
570 data_type => 'string',
571 description => 'Unique identifier of the Network Protect endpoint.',
572 required => '1',
573 },
574 };
575 __PACKAGE__->method_documentation->{ 'get_network_protect_endpoint' } = {
576 summary => 'Get a Network Protect endpoint',
577 params => $params,
578 returns => 'NetworkProtectEndpointResponse',
579 };
580 }
581 # @return NetworkProtectEndpointResponse
582 #
583 sub get_network_protect_endpoint {
584 my ($self, %args) = @_;
585  
586 # verify the required parameter 'endpoint_id' is set
587 unless (exists $args{'endpoint_id'}) {
588 croak("Missing the required parameter 'endpoint_id' when calling get_network_protect_endpoint");
589 }
590  
591 # parse inputs
592 my $_resource_path = '/network-protect/v1/endpoints/{endpoint_id}';
593  
594 my $_method = 'GET';
595 my $query_params = {};
596 my $header_params = {};
597 my $form_params = {};
598  
599 # 'Accept' and 'Content-Type' header
600 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
601 if ($_header_accept) {
602 $header_params->{'Accept'} = $_header_accept;
603 }
604 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
605  
606 # path params
607 if ( exists $args{'endpoint_id'}) {
608 my $_base_variable = "{" . "endpoint_id" . "}";
609 my $_base_value = $self->{api_client}->to_path_value($args{'endpoint_id'});
610 $_resource_path =~ s/$_base_variable/$_base_value/g;
611 }
612  
613 my $_body_data;
614 # authentication setting, if any
615 my $auth_settings = [qw(token )];
616  
617 # make the API Call
618 my $response = $self->{api_client}->call_api($_resource_path, $_method,
619 $query_params, $form_params,
620 $header_params, $_body_data, $auth_settings);
621 if (!$response) {
622 return;
623 }
624 my $_response_object = $self->{api_client}->deserialize('NetworkProtectEndpointResponse', $response);
625 return $_response_object;
626 }
627  
628 #
629 # get_network_protect_network
630 #
631 # Get a Network Protect network
632 #
633 # @param string $network_id Unique identifier of the Network Protect network. (required)
634 {
635 my $params = {
636 'network_id' => {
637 data_type => 'string',
638 description => 'Unique identifier of the Network Protect network.',
639 required => '1',
640 },
641 };
642 __PACKAGE__->method_documentation->{ 'get_network_protect_network' } = {
643 summary => 'Get a Network Protect network',
644 params => $params,
645 returns => 'NetworkProtectNetworkResponse',
646 };
647 }
648 # @return NetworkProtectNetworkResponse
649 #
650 sub get_network_protect_network {
651 my ($self, %args) = @_;
652  
653 # verify the required parameter 'network_id' is set
654 unless (exists $args{'network_id'}) {
655 croak("Missing the required parameter 'network_id' when calling get_network_protect_network");
656 }
657  
658 # parse inputs
659 my $_resource_path = '/network-protect/v1/networks/{network_id}';
660  
661 my $_method = 'GET';
662 my $query_params = {};
663 my $header_params = {};
664 my $form_params = {};
665  
666 # 'Accept' and 'Content-Type' header
667 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
668 if ($_header_accept) {
669 $header_params->{'Accept'} = $_header_accept;
670 }
671 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
672  
673 # path params
674 if ( exists $args{'network_id'}) {
675 my $_base_variable = "{" . "network_id" . "}";
676 my $_base_value = $self->{api_client}->to_path_value($args{'network_id'});
677 $_resource_path =~ s/$_base_variable/$_base_value/g;
678 }
679  
680 my $_body_data;
681 # authentication setting, if any
682 my $auth_settings = [qw(token )];
683  
684 # make the API Call
685 my $response = $self->{api_client}->call_api($_resource_path, $_method,
686 $query_params, $form_params,
687 $header_params, $_body_data, $auth_settings);
688 if (!$response) {
689 return;
690 }
691 my $_response_object = $self->{api_client}->deserialize('NetworkProtectNetworkResponse', $response);
692 return $_response_object;
693 }
694  
695 #
696 # get_network_protect_prefix_list
697 #
698 # Get a Network Protect prefix list
699 #
700 # @param string $prefix_list_id Unique identifier of the Network Protect prefix list. (required)
701 {
702 my $params = {
703 'prefix_list_id' => {
704 data_type => 'string',
705 description => 'Unique identifier of the Network Protect prefix list.',
706 required => '1',
707 },
708 };
709 __PACKAGE__->method_documentation->{ 'get_network_protect_prefix_list' } = {
710 summary => 'Get a Network Protect prefix list',
711 params => $params,
712 returns => 'NetworkProtectPrefixListResponse',
713 };
714 }
715 # @return NetworkProtectPrefixListResponse
716 #
717 sub get_network_protect_prefix_list {
718 my ($self, %args) = @_;
719  
720 # verify the required parameter 'prefix_list_id' is set
721 unless (exists $args{'prefix_list_id'}) {
722 croak("Missing the required parameter 'prefix_list_id' when calling get_network_protect_prefix_list");
723 }
724  
725 # parse inputs
726 my $_resource_path = '/network-protect/v1/prefix-lists/{prefix_list_id}';
727  
728 my $_method = 'GET';
729 my $query_params = {};
730 my $header_params = {};
731 my $form_params = {};
732  
733 # 'Accept' and 'Content-Type' header
734 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
735 if ($_header_accept) {
736 $header_params->{'Accept'} = $_header_accept;
737 }
738 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
739  
740 # path params
741 if ( exists $args{'prefix_list_id'}) {
742 my $_base_variable = "{" . "prefix_list_id" . "}";
743 my $_base_value = $self->{api_client}->to_path_value($args{'prefix_list_id'});
744 $_resource_path =~ s/$_base_variable/$_base_value/g;
745 }
746  
747 my $_body_data;
748 # authentication setting, if any
749 my $auth_settings = [qw(token )];
750  
751 # make the API Call
752 my $response = $self->{api_client}->call_api($_resource_path, $_method,
753 $query_params, $form_params,
754 $header_params, $_body_data, $auth_settings);
755 if (!$response) {
756 return;
757 }
758 my $_response_object = $self->{api_client}->deserialize('NetworkProtectPrefixListResponse', $response);
759 return $_response_object;
760 }
761  
762 #
763 # get_network_protect_rule_set
764 #
765 # Get a Network Protect rule set
766 #
767 # @param string $rule_set_id Unique identifier of the Network Protect rule set. (required)
768 {
769 my $params = {
770 'rule_set_id' => {
771 data_type => 'string',
772 description => 'Unique identifier of the Network Protect rule set.',
773 required => '1',
774 },
775 };
776 __PACKAGE__->method_documentation->{ 'get_network_protect_rule_set' } = {
777 summary => 'Get a Network Protect rule set',
778 params => $params,
779 returns => 'NetworkProtectRuleSetResponse',
780 };
781 }
782 # @return NetworkProtectRuleSetResponse
783 #
784 sub get_network_protect_rule_set {
785 my ($self, %args) = @_;
786  
787 # verify the required parameter 'rule_set_id' is set
788 unless (exists $args{'rule_set_id'}) {
789 croak("Missing the required parameter 'rule_set_id' when calling get_network_protect_rule_set");
790 }
791  
792 # parse inputs
793 my $_resource_path = '/network-protect/v1/rule-sets/{rule_set_id}';
794  
795 my $_method = 'GET';
796 my $query_params = {};
797 my $header_params = {};
798 my $form_params = {};
799  
800 # 'Accept' and 'Content-Type' header
801 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
802 if ($_header_accept) {
803 $header_params->{'Accept'} = $_header_accept;
804 }
805 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
806  
807 # path params
808 if ( exists $args{'rule_set_id'}) {
809 my $_base_variable = "{" . "rule_set_id" . "}";
810 my $_base_value = $self->{api_client}->to_path_value($args{'rule_set_id'});
811 $_resource_path =~ s/$_base_variable/$_base_value/g;
812 }
813  
814 my $_body_data;
815 # authentication setting, if any
816 my $auth_settings = [qw(token )];
817  
818 # make the API Call
819 my $response = $self->{api_client}->call_api($_resource_path, $_method,
820 $query_params, $form_params,
821 $header_params, $_body_data, $auth_settings);
822 if (!$response) {
823 return;
824 }
825 my $_response_object = $self->{api_client}->deserialize('NetworkProtectRuleSetResponse', $response);
826 return $_response_object;
827 }
828  
829 #
830 # list_network_protect_endpoints
831 #
832 # List Network Protect endpoints
833 #
834 # @param int $limit Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error. (optional, default to 100)
835 # @param string $cursor Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page. (optional)
836 {
837 my $params = {
838 'limit' => {
839 data_type => 'int',
840 description => 'Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error.',
841 required => '0',
842 },
843 'cursor' => {
844 data_type => 'string',
845 description => 'Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page.',
846 required => '0',
847 },
848 };
849 __PACKAGE__->method_documentation->{ 'list_network_protect_endpoints' } = {
850 summary => 'List Network Protect endpoints',
851 params => $params,
852 returns => 'NetworkProtectEndpointsResponse',
853 };
854 }
855 # @return NetworkProtectEndpointsResponse
856 #
857 sub list_network_protect_endpoints {
858 my ($self, %args) = @_;
859  
860 # parse inputs
861 my $_resource_path = '/network-protect/v1/endpoints';
862  
863 my $_method = 'GET';
864 my $query_params = {};
865 my $header_params = {};
866 my $form_params = {};
867  
868 # 'Accept' and 'Content-Type' header
869 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
870 if ($_header_accept) {
871 $header_params->{'Accept'} = $_header_accept;
872 }
873 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
874  
875 # query params
876 if ( exists $args{'limit'}) {
877 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
878 }
879  
880 # query params
881 if ( exists $args{'cursor'}) {
882 $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'});
883 }
884  
885 my $_body_data;
886 # authentication setting, if any
887 my $auth_settings = [qw(token )];
888  
889 # make the API Call
890 my $response = $self->{api_client}->call_api($_resource_path, $_method,
891 $query_params, $form_params,
892 $header_params, $_body_data, $auth_settings);
893 if (!$response) {
894 return;
895 }
896 my $_response_object = $self->{api_client}->deserialize('NetworkProtectEndpointsResponse', $response);
897 return $_response_object;
898 }
899  
900 #
901 # list_network_protect_networks
902 #
903 # List Network Protect networks
904 #
905 # @param int $limit Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error. (optional, default to 100)
906 # @param string $cursor Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page. (optional)
907 {
908 my $params = {
909 'limit' => {
910 data_type => 'int',
911 description => 'Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error.',
912 required => '0',
913 },
914 'cursor' => {
915 data_type => 'string',
916 description => 'Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page.',
917 required => '0',
918 },
919 };
920 __PACKAGE__->method_documentation->{ 'list_network_protect_networks' } = {
921 summary => 'List Network Protect networks',
922 params => $params,
923 returns => 'NetworkProtectNetworksResponse',
924 };
925 }
926 # @return NetworkProtectNetworksResponse
927 #
928 sub list_network_protect_networks {
929 my ($self, %args) = @_;
930  
931 # parse inputs
932 my $_resource_path = '/network-protect/v1/networks';
933  
934 my $_method = 'GET';
935 my $query_params = {};
936 my $header_params = {};
937 my $form_params = {};
938  
939 # 'Accept' and 'Content-Type' header
940 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
941 if ($_header_accept) {
942 $header_params->{'Accept'} = $_header_accept;
943 }
944 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
945  
946 # query params
947 if ( exists $args{'limit'}) {
948 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
949 }
950  
951 # query params
952 if ( exists $args{'cursor'}) {
953 $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'});
954 }
955  
956 my $_body_data;
957 # authentication setting, if any
958 my $auth_settings = [qw(token )];
959  
960 # make the API Call
961 my $response = $self->{api_client}->call_api($_resource_path, $_method,
962 $query_params, $form_params,
963 $header_params, $_body_data, $auth_settings);
964 if (!$response) {
965 return;
966 }
967 my $_response_object = $self->{api_client}->deserialize('NetworkProtectNetworksResponse', $response);
968 return $_response_object;
969 }
970  
971 #
972 # list_network_protect_prefix_lists
973 #
974 # List Network Protect prefix lists
975 #
976 # @param int $limit Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error. (optional, default to 100)
977 # @param string $cursor Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page. (optional)
978 {
979 my $params = {
980 'limit' => {
981 data_type => 'int',
982 description => 'Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error.',
983 required => '0',
984 },
985 'cursor' => {
986 data_type => 'string',
987 description => 'Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page.',
988 required => '0',
989 },
990 };
991 __PACKAGE__->method_documentation->{ 'list_network_protect_prefix_lists' } = {
992 summary => 'List Network Protect prefix lists',
993 params => $params,
994 returns => 'NetworkProtectPrefixListsResponse',
995 };
996 }
997 # @return NetworkProtectPrefixListsResponse
998 #
999 sub list_network_protect_prefix_lists {
1000 my ($self, %args) = @_;
1001  
1002 # parse inputs
1003 my $_resource_path = '/network-protect/v1/prefix-lists';
1004  
1005 my $_method = 'GET';
1006 my $query_params = {};
1007 my $header_params = {};
1008 my $form_params = {};
1009  
1010 # 'Accept' and 'Content-Type' header
1011 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1012 if ($_header_accept) {
1013 $header_params->{'Accept'} = $_header_accept;
1014 }
1015 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
1016  
1017 # query params
1018 if ( exists $args{'limit'}) {
1019 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
1020 }
1021  
1022 # query params
1023 if ( exists $args{'cursor'}) {
1024 $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'});
1025 }
1026  
1027 my $_body_data;
1028 # authentication setting, if any
1029 my $auth_settings = [qw(token )];
1030  
1031 # make the API Call
1032 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1033 $query_params, $form_params,
1034 $header_params, $_body_data, $auth_settings);
1035 if (!$response) {
1036 return;
1037 }
1038 my $_response_object = $self->{api_client}->deserialize('NetworkProtectPrefixListsResponse', $response);
1039 return $_response_object;
1040 }
1041  
1042 #
1043 # list_network_protect_rule_sets
1044 #
1045 # List Network Protect rule sets
1046 #
1047 # @param int $limit Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error. (optional, default to 100)
1048 # @param string $cursor Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page. (optional)
1049 {
1050 my $params = {
1051 'limit' => {
1052 data_type => 'int',
1053 description => 'Maximum resources to return. Defaults to 100. Positive values above 1000 are accepted and clamped to 1000; the effective value is reported in meta.limit. Zero, negative, and non-integer values return a `400 Bad Request` error.',
1054 required => '0',
1055 },
1056 'cursor' => {
1057 data_type => 'string',
1058 description => 'Continuation value from a previous response's meta.next_cursor. Omit this parameter to request the first page.',
1059 required => '0',
1060 },
1061 };
1062 __PACKAGE__->method_documentation->{ 'list_network_protect_rule_sets' } = {
1063 summary => 'List Network Protect rule sets',
1064 params => $params,
1065 returns => 'NetworkProtectRuleSetsResponse',
1066 };
1067 }
1068 # @return NetworkProtectRuleSetsResponse
1069 #
1070 sub list_network_protect_rule_sets {
1071 my ($self, %args) = @_;
1072  
1073 # parse inputs
1074 my $_resource_path = '/network-protect/v1/rule-sets';
1075  
1076 my $_method = 'GET';
1077 my $query_params = {};
1078 my $header_params = {};
1079 my $form_params = {};
1080  
1081 # 'Accept' and 'Content-Type' header
1082 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1083 if ($_header_accept) {
1084 $header_params->{'Accept'} = $_header_accept;
1085 }
1086 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
1087  
1088 # query params
1089 if ( exists $args{'limit'}) {
1090 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
1091 }
1092  
1093 # query params
1094 if ( exists $args{'cursor'}) {
1095 $query_params->{'cursor'} = $self->{api_client}->to_query_value($args{'cursor'});
1096 }
1097  
1098 my $_body_data;
1099 # authentication setting, if any
1100 my $auth_settings = [qw(token )];
1101  
1102 # make the API Call
1103 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1104 $query_params, $form_params,
1105 $header_params, $_body_data, $auth_settings);
1106 if (!$response) {
1107 return;
1108 }
1109 my $_response_object = $self->{api_client}->deserialize('NetworkProtectRuleSetsResponse', $response);
1110 return $_response_object;
1111 }
1112  
1113 #
1114 # update_network_protect_endpoint
1115 #
1116 # Update a Network Protect endpoint
1117 #
1118 # @param string $endpoint_id Unique identifier of the Network Protect endpoint. (required)
1119 # @param NetworkProtectEndpointUpdate $network_protect_endpoint_update (required)
1120 {
1121 my $params = {
1122 'endpoint_id' => {
1123 data_type => 'string',
1124 description => 'Unique identifier of the Network Protect endpoint.',
1125 required => '1',
1126 },
1127 'network_protect_endpoint_update' => {
1128 data_type => 'NetworkProtectEndpointUpdate',
1129 description => '',
1130 required => '1',
1131 },
1132 };
1133 __PACKAGE__->method_documentation->{ 'update_network_protect_endpoint' } = {
1134 summary => 'Update a Network Protect endpoint',
1135 params => $params,
1136 returns => 'NetworkProtectEndpointResponse',
1137 };
1138 }
1139 # @return NetworkProtectEndpointResponse
1140 #
1141 sub update_network_protect_endpoint {
1142 my ($self, %args) = @_;
1143  
1144 # verify the required parameter 'endpoint_id' is set
1145 unless (exists $args{'endpoint_id'}) {
1146 croak("Missing the required parameter 'endpoint_id' when calling update_network_protect_endpoint");
1147 }
1148  
1149 # verify the required parameter 'network_protect_endpoint_update' is set
1150 unless (exists $args{'network_protect_endpoint_update'}) {
1151 croak("Missing the required parameter 'network_protect_endpoint_update' when calling update_network_protect_endpoint");
1152 }
1153  
1154 # parse inputs
1155 my $_resource_path = '/network-protect/v1/endpoints/{endpoint_id}';
1156  
1157 my $_method = 'PATCH';
1158 my $query_params = {};
1159 my $header_params = {};
1160 my $form_params = {};
1161  
1162 # 'Accept' and 'Content-Type' header
1163 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1164 if ($_header_accept) {
1165 $header_params->{'Accept'} = $_header_accept;
1166 }
1167 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1168  
1169 # path params
1170 if ( exists $args{'endpoint_id'}) {
1171 my $_base_variable = "{" . "endpoint_id" . "}";
1172 my $_base_value = $self->{api_client}->to_path_value($args{'endpoint_id'});
1173 $_resource_path =~ s/$_base_variable/$_base_value/g;
1174 }
1175  
1176 my $_body_data;
1177 # body params
1178 if ( exists $args{'network_protect_endpoint_update'}) {
1179 $_body_data = $args{'network_protect_endpoint_update'};
1180 }
1181  
1182 # authentication setting, if any
1183 my $auth_settings = [qw(token )];
1184  
1185 # make the API Call
1186 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1187 $query_params, $form_params,
1188 $header_params, $_body_data, $auth_settings);
1189 if (!$response) {
1190 return;
1191 }
1192 my $_response_object = $self->{api_client}->deserialize('NetworkProtectEndpointResponse', $response);
1193 return $_response_object;
1194 }
1195  
1196 #
1197 # update_network_protect_network
1198 #
1199 # Update a Network Protect network
1200 #
1201 # @param string $network_id Unique identifier of the Network Protect network. (required)
1202 # @param NetworkProtectNetworkUpdate $network_protect_network_update (required)
1203 {
1204 my $params = {
1205 'network_id' => {
1206 data_type => 'string',
1207 description => 'Unique identifier of the Network Protect network.',
1208 required => '1',
1209 },
1210 'network_protect_network_update' => {
1211 data_type => 'NetworkProtectNetworkUpdate',
1212 description => '',
1213 required => '1',
1214 },
1215 };
1216 __PACKAGE__->method_documentation->{ 'update_network_protect_network' } = {
1217 summary => 'Update a Network Protect network',
1218 params => $params,
1219 returns => 'NetworkProtectNetworkResponse',
1220 };
1221 }
1222 # @return NetworkProtectNetworkResponse
1223 #
1224 sub update_network_protect_network {
1225 my ($self, %args) = @_;
1226  
1227 # verify the required parameter 'network_id' is set
1228 unless (exists $args{'network_id'}) {
1229 croak("Missing the required parameter 'network_id' when calling update_network_protect_network");
1230 }
1231  
1232 # verify the required parameter 'network_protect_network_update' is set
1233 unless (exists $args{'network_protect_network_update'}) {
1234 croak("Missing the required parameter 'network_protect_network_update' when calling update_network_protect_network");
1235 }
1236  
1237 # parse inputs
1238 my $_resource_path = '/network-protect/v1/networks/{network_id}';
1239  
1240 my $_method = 'PATCH';
1241 my $query_params = {};
1242 my $header_params = {};
1243 my $form_params = {};
1244  
1245 # 'Accept' and 'Content-Type' header
1246 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1247 if ($_header_accept) {
1248 $header_params->{'Accept'} = $_header_accept;
1249 }
1250 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1251  
1252 # path params
1253 if ( exists $args{'network_id'}) {
1254 my $_base_variable = "{" . "network_id" . "}";
1255 my $_base_value = $self->{api_client}->to_path_value($args{'network_id'});
1256 $_resource_path =~ s/$_base_variable/$_base_value/g;
1257 }
1258  
1259 my $_body_data;
1260 # body params
1261 if ( exists $args{'network_protect_network_update'}) {
1262 $_body_data = $args{'network_protect_network_update'};
1263 }
1264  
1265 # authentication setting, if any
1266 my $auth_settings = [qw(token )];
1267  
1268 # make the API Call
1269 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1270 $query_params, $form_params,
1271 $header_params, $_body_data, $auth_settings);
1272 if (!$response) {
1273 return;
1274 }
1275 my $_response_object = $self->{api_client}->deserialize('NetworkProtectNetworkResponse', $response);
1276 return $_response_object;
1277 }
1278  
1279 #
1280 # update_network_protect_prefix_list
1281 #
1282 # Update a Network Protect prefix list
1283 #
1284 # @param string $prefix_list_id Unique identifier of the Network Protect prefix list. (required)
1285 # @param NetworkProtectPrefixListUpdate $network_protect_prefix_list_update (required)
1286 {
1287 my $params = {
1288 'prefix_list_id' => {
1289 data_type => 'string',
1290 description => 'Unique identifier of the Network Protect prefix list.',
1291 required => '1',
1292 },
1293 'network_protect_prefix_list_update' => {
1294 data_type => 'NetworkProtectPrefixListUpdate',
1295 description => '',
1296 required => '1',
1297 },
1298 };
1299 __PACKAGE__->method_documentation->{ 'update_network_protect_prefix_list' } = {
1300 summary => 'Update a Network Protect prefix list',
1301 params => $params,
1302 returns => 'NetworkProtectPrefixListResponse',
1303 };
1304 }
1305 # @return NetworkProtectPrefixListResponse
1306 #
1307 sub update_network_protect_prefix_list {
1308 my ($self, %args) = @_;
1309  
1310 # verify the required parameter 'prefix_list_id' is set
1311 unless (exists $args{'prefix_list_id'}) {
1312 croak("Missing the required parameter 'prefix_list_id' when calling update_network_protect_prefix_list");
1313 }
1314  
1315 # verify the required parameter 'network_protect_prefix_list_update' is set
1316 unless (exists $args{'network_protect_prefix_list_update'}) {
1317 croak("Missing the required parameter 'network_protect_prefix_list_update' when calling update_network_protect_prefix_list");
1318 }
1319  
1320 # parse inputs
1321 my $_resource_path = '/network-protect/v1/prefix-lists/{prefix_list_id}';
1322  
1323 my $_method = 'PATCH';
1324 my $query_params = {};
1325 my $header_params = {};
1326 my $form_params = {};
1327  
1328 # 'Accept' and 'Content-Type' header
1329 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1330 if ($_header_accept) {
1331 $header_params->{'Accept'} = $_header_accept;
1332 }
1333 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1334  
1335 # path params
1336 if ( exists $args{'prefix_list_id'}) {
1337 my $_base_variable = "{" . "prefix_list_id" . "}";
1338 my $_base_value = $self->{api_client}->to_path_value($args{'prefix_list_id'});
1339 $_resource_path =~ s/$_base_variable/$_base_value/g;
1340 }
1341  
1342 my $_body_data;
1343 # body params
1344 if ( exists $args{'network_protect_prefix_list_update'}) {
1345 $_body_data = $args{'network_protect_prefix_list_update'};
1346 }
1347  
1348 # authentication setting, if any
1349 my $auth_settings = [qw(token )];
1350  
1351 # make the API Call
1352 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1353 $query_params, $form_params,
1354 $header_params, $_body_data, $auth_settings);
1355 if (!$response) {
1356 return;
1357 }
1358 my $_response_object = $self->{api_client}->deserialize('NetworkProtectPrefixListResponse', $response);
1359 return $_response_object;
1360 }
1361  
1362 #
1363 # update_network_protect_rule_set
1364 #
1365 # Update a Network Protect rule set
1366 #
1367 # @param string $rule_set_id Unique identifier of the Network Protect rule set. (required)
1368 # @param NetworkProtectRuleSetUpdate $network_protect_rule_set_update (required)
1369 {
1370 my $params = {
1371 'rule_set_id' => {
1372 data_type => 'string',
1373 description => 'Unique identifier of the Network Protect rule set.',
1374 required => '1',
1375 },
1376 'network_protect_rule_set_update' => {
1377 data_type => 'NetworkProtectRuleSetUpdate',
1378 description => '',
1379 required => '1',
1380 },
1381 };
1382 __PACKAGE__->method_documentation->{ 'update_network_protect_rule_set' } = {
1383 summary => 'Update a Network Protect rule set',
1384 params => $params,
1385 returns => 'NetworkProtectRuleSetResponse',
1386 };
1387 }
1388 # @return NetworkProtectRuleSetResponse
1389 #
1390 sub update_network_protect_rule_set {
1391 my ($self, %args) = @_;
1392  
1393 # verify the required parameter 'rule_set_id' is set
1394 unless (exists $args{'rule_set_id'}) {
1395 croak("Missing the required parameter 'rule_set_id' when calling update_network_protect_rule_set");
1396 }
1397  
1398 # verify the required parameter 'network_protect_rule_set_update' is set
1399 unless (exists $args{'network_protect_rule_set_update'}) {
1400 croak("Missing the required parameter 'network_protect_rule_set_update' when calling update_network_protect_rule_set");
1401 }
1402  
1403 # parse inputs
1404 my $_resource_path = '/network-protect/v1/rule-sets/{rule_set_id}';
1405  
1406 my $_method = 'PATCH';
1407 my $query_params = {};
1408 my $header_params = {};
1409 my $form_params = {};
1410  
1411 # 'Accept' and 'Content-Type' header
1412 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1413 if ($_header_accept) {
1414 $header_params->{'Accept'} = $_header_accept;
1415 }
1416 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1417  
1418 # path params
1419 if ( exists $args{'rule_set_id'}) {
1420 my $_base_variable = "{" . "rule_set_id" . "}";
1421 my $_base_value = $self->{api_client}->to_path_value($args{'rule_set_id'});
1422 $_resource_path =~ s/$_base_variable/$_base_value/g;
1423 }
1424  
1425 my $_body_data;
1426 # body params
1427 if ( exists $args{'network_protect_rule_set_update'}) {
1428 $_body_data = $args{'network_protect_rule_set_update'};
1429 }
1430  
1431 # authentication setting, if any
1432 my $auth_settings = [qw(token )];
1433  
1434 # make the API Call
1435 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1436 $query_params, $form_params,
1437 $header_params, $_body_data, $auth_settings);
1438 if (!$response) {
1439 return;
1440 }
1441 my $_response_object = $self->{api_client}->deserialize('NetworkProtectRuleSetResponse', $response);
1442 return $_response_object;
1443 }
1444  
1445 1;