Fastly/ApisecurityOperationsApi.pm untested

filter: Statementstmt 0.0% 0 / 498 Branchbran 0.0% 0 / 176 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 24 Podpod 0.0% 0 / 15 totaltotal 0.0% 0 / 722 CC 89 SCAR 41.5
CC
89
Cov
0%
api_security_list_operations
156.0
api_security_list_discovered_operations
110.0
api_security_update_operation
72.0
CRAP 63.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::ApisecurityOperationsApi;
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 # api_security_bulk_add_tags_to_operations
51 #
52 # Bulk add tags to operations
53 #
54 # @param string $service_id The unique identifier of the service. (required)
55 # @param OperationBulkAddTags $operation_bulk_add_tags (optional)
56 {
57 my $params = {
58 'service_id' => {
59 data_type => 'string',
60 description => 'The unique identifier of the service.',
61 required => '1',
62 },
63 'operation_bulk_add_tags' => {
64 data_type => 'OperationBulkAddTags',
65 description => '',
66 required => '0',
67 },
68 };
69 __PACKAGE__->method_documentation->{ 'api_security_bulk_add_tags_to_operations' } = {
70 summary => 'Bulk add tags to operations',
71 params => $params,
72 returns => 'InlineResponse2071',
73 };
74 }
75 # @return InlineResponse2071
76 #
77 sub api_security_bulk_add_tags_to_operations {
78 my ($self, %args) = @_;
79  
80 # verify the required parameter 'service_id' is set
81 unless (exists $args{'service_id'}) {
82 croak("Missing the required parameter 'service_id' when calling api_security_bulk_add_tags_to_operations");
83 }
84  
85 # parse inputs
86 my $_resource_path = '/api-security/v1/services/{service_id}/operations-bulk-tags';
87  
88 my $_method = 'POST';
89 my $query_params = {};
90 my $header_params = {};
91 my $form_params = {};
92  
93 # 'Accept' and 'Content-Type' header
94 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
95 if ($_header_accept) {
96 $header_params->{'Accept'} = $_header_accept;
97 }
98 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
99  
100 # path params
101 if ( exists $args{'service_id'}) {
102 my $_base_variable = "{" . "service_id" . "}";
103 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
104 $_resource_path =~ s/$_base_variable/$_base_value/g;
105 }
106  
107 my $_body_data;
108 # body params
109 if ( exists $args{'operation_bulk_add_tags'}) {
110 $_body_data = $args{'operation_bulk_add_tags'};
111 }
112  
113 # authentication setting, if any
114 my $auth_settings = [qw(token )];
115  
116 # make the API Call
117 my $response = $self->{api_client}->call_api($_resource_path, $_method,
118 $query_params, $form_params,
119 $header_params, $_body_data, $auth_settings);
120 if (!$response) {
121 return;
122 }
123 my $_response_object = $self->{api_client}->deserialize('InlineResponse2071', $response);
124 return $_response_object;
125 }
126  
127 #
128 # api_security_bulk_create_operations
129 #
130 # Bulk create operations
131 #
132 # @param string $service_id The unique identifier of the service. (required)
133 # @param OperationBulkCreate $operation_bulk_create (optional)
134 {
135 my $params = {
136 'service_id' => {
137 data_type => 'string',
138 description => 'The unique identifier of the service.',
139 required => '1',
140 },
141 'operation_bulk_create' => {
142 data_type => 'OperationBulkCreate',
143 description => '',
144 required => '0',
145 },
146 };
147 __PACKAGE__->method_documentation->{ 'api_security_bulk_create_operations' } = {
148 summary => 'Bulk create operations',
149 params => $params,
150 returns => 'InlineResponse207',
151 };
152 }
153 # @return InlineResponse207
154 #
155 sub api_security_bulk_create_operations {
156 my ($self, %args) = @_;
157  
158 # verify the required parameter 'service_id' is set
159 unless (exists $args{'service_id'}) {
160 croak("Missing the required parameter 'service_id' when calling api_security_bulk_create_operations");
161 }
162  
163 # parse inputs
164 my $_resource_path = '/api-security/v1/services/{service_id}/operations-bulk';
165  
166 my $_method = 'POST';
167 my $query_params = {};
168 my $header_params = {};
169 my $form_params = {};
170  
171 # 'Accept' and 'Content-Type' header
172 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
173 if ($_header_accept) {
174 $header_params->{'Accept'} = $_header_accept;
175 }
176 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
177  
178 # path params
179 if ( exists $args{'service_id'}) {
180 my $_base_variable = "{" . "service_id" . "}";
181 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
182 $_resource_path =~ s/$_base_variable/$_base_value/g;
183 }
184  
185 my $_body_data;
186 # body params
187 if ( exists $args{'operation_bulk_create'}) {
188 $_body_data = $args{'operation_bulk_create'};
189 }
190  
191 # authentication setting, if any
192 my $auth_settings = [qw(token )];
193  
194 # make the API Call
195 my $response = $self->{api_client}->call_api($_resource_path, $_method,
196 $query_params, $form_params,
197 $header_params, $_body_data, $auth_settings);
198 if (!$response) {
199 return;
200 }
201 my $_response_object = $self->{api_client}->deserialize('InlineResponse207', $response);
202 return $_response_object;
203 }
204  
205 #
206 # api_security_bulk_delete_operations
207 #
208 # Bulk delete operations
209 #
210 # @param string $service_id The unique identifier of the service. (required)
211 # @param OperationBulkDelete $operation_bulk_delete (optional)
212 {
213 my $params = {
214 'service_id' => {
215 data_type => 'string',
216 description => 'The unique identifier of the service.',
217 required => '1',
218 },
219 'operation_bulk_delete' => {
220 data_type => 'OperationBulkDelete',
221 description => '',
222 required => '0',
223 },
224 };
225 __PACKAGE__->method_documentation->{ 'api_security_bulk_delete_operations' } = {
226 summary => 'Bulk delete operations',
227 params => $params,
228 returns => 'InlineResponse2071',
229 };
230 }
231 # @return InlineResponse2071
232 #
233 sub api_security_bulk_delete_operations {
234 my ($self, %args) = @_;
235  
236 # verify the required parameter 'service_id' is set
237 unless (exists $args{'service_id'}) {
238 croak("Missing the required parameter 'service_id' when calling api_security_bulk_delete_operations");
239 }
240  
241 # parse inputs
242 my $_resource_path = '/api-security/v1/services/{service_id}/operations-bulk';
243  
244 my $_method = 'DELETE';
245 my $query_params = {};
246 my $header_params = {};
247 my $form_params = {};
248  
249 # 'Accept' and 'Content-Type' header
250 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
251 if ($_header_accept) {
252 $header_params->{'Accept'} = $_header_accept;
253 }
254 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
255  
256 # path params
257 if ( exists $args{'service_id'}) {
258 my $_base_variable = "{" . "service_id" . "}";
259 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
260 $_resource_path =~ s/$_base_variable/$_base_value/g;
261 }
262  
263 my $_body_data;
264 # body params
265 if ( exists $args{'operation_bulk_delete'}) {
266 $_body_data = $args{'operation_bulk_delete'};
267 }
268  
269 # authentication setting, if any
270 my $auth_settings = [qw(token )];
271  
272 # make the API Call
273 my $response = $self->{api_client}->call_api($_resource_path, $_method,
274 $query_params, $form_params,
275 $header_params, $_body_data, $auth_settings);
276 if (!$response) {
277 return;
278 }
279 my $_response_object = $self->{api_client}->deserialize('InlineResponse2071', $response);
280 return $_response_object;
281 }
282  
283 #
284 # api_security_create_operation
285 #
286 # Create operation
287 #
288 # @param string $service_id The unique identifier of the service. (required)
289 # @param OperationCreate $operation_create (optional)
290 {
291 my $params = {
292 'service_id' => {
293 data_type => 'string',
294 description => 'The unique identifier of the service.',
295 required => '1',
296 },
297 'operation_create' => {
298 data_type => 'OperationCreate',
299 description => '',
300 required => '0',
301 },
302 };
303 __PACKAGE__->method_documentation->{ 'api_security_create_operation' } = {
304 summary => 'Create operation',
305 params => $params,
306 returns => 'OperationGet',
307 };
308 }
309 # @return OperationGet
310 #
311 sub api_security_create_operation {
312 my ($self, %args) = @_;
313  
314 # verify the required parameter 'service_id' is set
315 unless (exists $args{'service_id'}) {
316 croak("Missing the required parameter 'service_id' when calling api_security_create_operation");
317 }
318  
319 # parse inputs
320 my $_resource_path = '/api-security/v1/services/{service_id}/operations';
321  
322 my $_method = 'POST';
323 my $query_params = {};
324 my $header_params = {};
325 my $form_params = {};
326  
327 # 'Accept' and 'Content-Type' header
328 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
329 if ($_header_accept) {
330 $header_params->{'Accept'} = $_header_accept;
331 }
332 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
333  
334 # path params
335 if ( exists $args{'service_id'}) {
336 my $_base_variable = "{" . "service_id" . "}";
337 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
338 $_resource_path =~ s/$_base_variable/$_base_value/g;
339 }
340  
341 my $_body_data;
342 # body params
343 if ( exists $args{'operation_create'}) {
344 $_body_data = $args{'operation_create'};
345 }
346  
347 # authentication setting, if any
348 my $auth_settings = [qw(token )];
349  
350 # make the API Call
351 my $response = $self->{api_client}->call_api($_resource_path, $_method,
352 $query_params, $form_params,
353 $header_params, $_body_data, $auth_settings);
354 if (!$response) {
355 return;
356 }
357 my $_response_object = $self->{api_client}->deserialize('OperationGet', $response);
358 return $_response_object;
359 }
360  
361 #
362 # api_security_create_operation_tag
363 #
364 # Create operation tag
365 #
366 # @param string $service_id The unique identifier of the service. (required)
367 # @param TagCreate $tag_create (optional)
368 {
369 my $params = {
370 'service_id' => {
371 data_type => 'string',
372 description => 'The unique identifier of the service.',
373 required => '1',
374 },
375 'tag_create' => {
376 data_type => 'TagCreate',
377 description => '',
378 required => '0',
379 },
380 };
381 __PACKAGE__->method_documentation->{ 'api_security_create_operation_tag' } = {
382 summary => 'Create operation tag',
383 params => $params,
384 returns => 'TagGet',
385 };
386 }
387 # @return TagGet
388 #
389 sub api_security_create_operation_tag {
390 my ($self, %args) = @_;
391  
392 # verify the required parameter 'service_id' is set
393 unless (exists $args{'service_id'}) {
394 croak("Missing the required parameter 'service_id' when calling api_security_create_operation_tag");
395 }
396  
397 # parse inputs
398 my $_resource_path = '/api-security/v1/services/{service_id}/tags';
399  
400 my $_method = 'POST';
401 my $query_params = {};
402 my $header_params = {};
403 my $form_params = {};
404  
405 # 'Accept' and 'Content-Type' header
406 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
407 if ($_header_accept) {
408 $header_params->{'Accept'} = $_header_accept;
409 }
410 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
411  
412 # path params
413 if ( exists $args{'service_id'}) {
414 my $_base_variable = "{" . "service_id" . "}";
415 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
416 $_resource_path =~ s/$_base_variable/$_base_value/g;
417 }
418  
419 my $_body_data;
420 # body params
421 if ( exists $args{'tag_create'}) {
422 $_body_data = $args{'tag_create'};
423 }
424  
425 # authentication setting, if any
426 my $auth_settings = [qw(token )];
427  
428 # make the API Call
429 my $response = $self->{api_client}->call_api($_resource_path, $_method,
430 $query_params, $form_params,
431 $header_params, $_body_data, $auth_settings);
432 if (!$response) {
433 return;
434 }
435 my $_response_object = $self->{api_client}->deserialize('TagGet', $response);
436 return $_response_object;
437 }
438  
439 #
440 # api_security_delete_operation
441 #
442 # Delete operation
443 #
444 # @param string $service_id The unique identifier of the service. (required)
445 # @param string $operation_id The unique identifier of the operation. (required)
446 {
447 my $params = {
448 'service_id' => {
449 data_type => 'string',
450 description => 'The unique identifier of the service.',
451 required => '1',
452 },
453 'operation_id' => {
454 data_type => 'string',
455 description => 'The unique identifier of the operation.',
456 required => '1',
457 },
458 };
459 __PACKAGE__->method_documentation->{ 'api_security_delete_operation' } = {
460 summary => 'Delete operation',
461 params => $params,
462 returns => undef,
463 };
464 }
465 # @return void
466 #
467 sub api_security_delete_operation {
468 my ($self, %args) = @_;
469  
470 # verify the required parameter 'service_id' is set
471 unless (exists $args{'service_id'}) {
472 croak("Missing the required parameter 'service_id' when calling api_security_delete_operation");
473 }
474  
475 # verify the required parameter 'operation_id' is set
476 unless (exists $args{'operation_id'}) {
477 croak("Missing the required parameter 'operation_id' when calling api_security_delete_operation");
478 }
479  
480 # parse inputs
481 my $_resource_path = '/api-security/v1/services/{service_id}/operations/{operation_id}';
482  
483 my $_method = 'DELETE';
484 my $query_params = {};
485 my $header_params = {};
486 my $form_params = {};
487  
488 # 'Accept' and 'Content-Type' header
489 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
490 if ($_header_accept) {
491 $header_params->{'Accept'} = $_header_accept;
492 }
493 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
494  
495 # path params
496 if ( exists $args{'service_id'}) {
497 my $_base_variable = "{" . "service_id" . "}";
498 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
499 $_resource_path =~ s/$_base_variable/$_base_value/g;
500 }
501  
502 # path params
503 if ( exists $args{'operation_id'}) {
504 my $_base_variable = "{" . "operation_id" . "}";
505 my $_base_value = $self->{api_client}->to_path_value($args{'operation_id'});
506 $_resource_path =~ s/$_base_variable/$_base_value/g;
507 }
508  
509 my $_body_data;
510 # authentication setting, if any
511 my $auth_settings = [qw(token )];
512  
513 # make the API Call
514 $self->{api_client}->call_api($_resource_path, $_method,
515 $query_params, $form_params,
516 $header_params, $_body_data, $auth_settings);
517 return;
518 }
519  
520 #
521 # api_security_delete_operation_tag
522 #
523 # Delete operation tag
524 #
525 # @param string $service_id The unique identifier of the service. (required)
526 # @param string $tag_id The unique identifier of the operation tag. (required)
527 {
528 my $params = {
529 'service_id' => {
530 data_type => 'string',
531 description => 'The unique identifier of the service.',
532 required => '1',
533 },
534 'tag_id' => {
535 data_type => 'string',
536 description => 'The unique identifier of the operation tag.',
537 required => '1',
538 },
539 };
540 __PACKAGE__->method_documentation->{ 'api_security_delete_operation_tag' } = {
541 summary => 'Delete operation tag',
542 params => $params,
543 returns => undef,
544 };
545 }
546 # @return void
547 #
548 sub api_security_delete_operation_tag {
549 my ($self, %args) = @_;
550  
551 # verify the required parameter 'service_id' is set
552 unless (exists $args{'service_id'}) {
553 croak("Missing the required parameter 'service_id' when calling api_security_delete_operation_tag");
554 }
555  
556 # verify the required parameter 'tag_id' is set
557 unless (exists $args{'tag_id'}) {
558 croak("Missing the required parameter 'tag_id' when calling api_security_delete_operation_tag");
559 }
560  
561 # parse inputs
562 my $_resource_path = '/api-security/v1/services/{service_id}/tags/{tag_id}';
563  
564 my $_method = 'DELETE';
565 my $query_params = {};
566 my $header_params = {};
567 my $form_params = {};
568  
569 # 'Accept' and 'Content-Type' header
570 my $_header_accept = $self->{api_client}->select_header_accept('application/problem+json');
571 if ($_header_accept) {
572 $header_params->{'Accept'} = $_header_accept;
573 }
574 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
575  
576 # path params
577 if ( exists $args{'service_id'}) {
578 my $_base_variable = "{" . "service_id" . "}";
579 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
580 $_resource_path =~ s/$_base_variable/$_base_value/g;
581 }
582  
583 # path params
584 if ( exists $args{'tag_id'}) {
585 my $_base_variable = "{" . "tag_id" . "}";
586 my $_base_value = $self->{api_client}->to_path_value($args{'tag_id'});
587 $_resource_path =~ s/$_base_variable/$_base_value/g;
588 }
589  
590 my $_body_data;
591 # authentication setting, if any
592 my $auth_settings = [qw(token )];
593  
594 # make the API Call
595 $self->{api_client}->call_api($_resource_path, $_method,
596 $query_params, $form_params,
597 $header_params, $_body_data, $auth_settings);
598 return;
599 }
600  
601 #
602 # api_security_get_operation
603 #
604 # Retrieve operation
605 #
606 # @param string $service_id The unique identifier of the service. (required)
607 # @param string $operation_id The unique identifier of the operation. (required)
608 {
609 my $params = {
610 'service_id' => {
611 data_type => 'string',
612 description => 'The unique identifier of the service.',
613 required => '1',
614 },
615 'operation_id' => {
616 data_type => 'string',
617 description => 'The unique identifier of the operation.',
618 required => '1',
619 },
620 };
621 __PACKAGE__->method_documentation->{ 'api_security_get_operation' } = {
622 summary => 'Retrieve operation',
623 params => $params,
624 returns => 'OperationGet',
625 };
626 }
627 # @return OperationGet
628 #
629 sub api_security_get_operation {
630 my ($self, %args) = @_;
631  
632 # verify the required parameter 'service_id' is set
633 unless (exists $args{'service_id'}) {
634 croak("Missing the required parameter 'service_id' when calling api_security_get_operation");
635 }
636  
637 # verify the required parameter 'operation_id' is set
638 unless (exists $args{'operation_id'}) {
639 croak("Missing the required parameter 'operation_id' when calling api_security_get_operation");
640 }
641  
642 # parse inputs
643 my $_resource_path = '/api-security/v1/services/{service_id}/operations/{operation_id}';
644  
645 my $_method = 'GET';
646 my $query_params = {};
647 my $header_params = {};
648 my $form_params = {};
649  
650 # 'Accept' and 'Content-Type' header
651 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
652 if ($_header_accept) {
653 $header_params->{'Accept'} = $_header_accept;
654 }
655 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
656  
657 # path params
658 if ( exists $args{'service_id'}) {
659 my $_base_variable = "{" . "service_id" . "}";
660 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
661 $_resource_path =~ s/$_base_variable/$_base_value/g;
662 }
663  
664 # path params
665 if ( exists $args{'operation_id'}) {
666 my $_base_variable = "{" . "operation_id" . "}";
667 my $_base_value = $self->{api_client}->to_path_value($args{'operation_id'});
668 $_resource_path =~ s/$_base_variable/$_base_value/g;
669 }
670  
671 my $_body_data;
672 # authentication setting, if any
673 my $auth_settings = [qw(token )];
674  
675 # make the API Call
676 my $response = $self->{api_client}->call_api($_resource_path, $_method,
677 $query_params, $form_params,
678 $header_params, $_body_data, $auth_settings);
679 if (!$response) {
680 return;
681 }
682 my $_response_object = $self->{api_client}->deserialize('OperationGet', $response);
683 return $_response_object;
684 }
685  
686 #
687 # api_security_get_operation_tag
688 #
689 # Retrieve operation tag
690 #
691 # @param string $service_id The unique identifier of the service. (required)
692 # @param string $tag_id The unique identifier of the operation tag. (required)
693 {
694 my $params = {
695 'service_id' => {
696 data_type => 'string',
697 description => 'The unique identifier of the service.',
698 required => '1',
699 },
700 'tag_id' => {
701 data_type => 'string',
702 description => 'The unique identifier of the operation tag.',
703 required => '1',
704 },
705 };
706 __PACKAGE__->method_documentation->{ 'api_security_get_operation_tag' } = {
707 summary => 'Retrieve operation tag',
708 params => $params,
709 returns => 'TagGet',
710 };
711 }
712 # @return TagGet
713 #
714 sub api_security_get_operation_tag {
715 my ($self, %args) = @_;
716  
717 # verify the required parameter 'service_id' is set
718 unless (exists $args{'service_id'}) {
719 croak("Missing the required parameter 'service_id' when calling api_security_get_operation_tag");
720 }
721  
722 # verify the required parameter 'tag_id' is set
723 unless (exists $args{'tag_id'}) {
724 croak("Missing the required parameter 'tag_id' when calling api_security_get_operation_tag");
725 }
726  
727 # parse inputs
728 my $_resource_path = '/api-security/v1/services/{service_id}/tags/{tag_id}';
729  
730 my $_method = 'GET';
731 my $query_params = {};
732 my $header_params = {};
733 my $form_params = {};
734  
735 # 'Accept' and 'Content-Type' header
736 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
737 if ($_header_accept) {
738 $header_params->{'Accept'} = $_header_accept;
739 }
740 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
741  
742 # path params
743 if ( exists $args{'service_id'}) {
744 my $_base_variable = "{" . "service_id" . "}";
745 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
746 $_resource_path =~ s/$_base_variable/$_base_value/g;
747 }
748  
749 # path params
750 if ( exists $args{'tag_id'}) {
751 my $_base_variable = "{" . "tag_id" . "}";
752 my $_base_value = $self->{api_client}->to_path_value($args{'tag_id'});
753 $_resource_path =~ s/$_base_variable/$_base_value/g;
754 }
755  
756 my $_body_data;
757 # authentication setting, if any
758 my $auth_settings = [qw(token )];
759  
760 # make the API Call
761 my $response = $self->{api_client}->call_api($_resource_path, $_method,
762 $query_params, $form_params,
763 $header_params, $_body_data, $auth_settings);
764 if (!$response) {
765 return;
766 }
767 my $_response_object = $self->{api_client}->deserialize('TagGet', $response);
768 return $_response_object;
769 }
770  
771 #
772 # api_security_list_discovered_operations
773 #
774 # List discovered operations
775 #
776 # @param string $service_id The unique identifier of the service. (required)
777 # @param ARRAY[string] $method Filter operations by HTTP method. (optional)
778 # @param ARRAY[string] $domain Filter operations by fully-qualified domain name (exact match). (optional)
779 # @param string $path Filter operations by path (exact match). (optional)
780 # @param int $limit The maximum number of operations to return per page. (optional, default to 100)
781 # @param int $page The page number to return. (optional, default to 0)
782 {
783 my $params = {
784 'service_id' => {
785 data_type => 'string',
786 description => 'The unique identifier of the service.',
787 required => '1',
788 },
789 'method' => {
790 data_type => 'ARRAY[string]',
791 description => 'Filter operations by HTTP method.',
792 required => '0',
793 },
794 'domain' => {
795 data_type => 'ARRAY[string]',
796 description => 'Filter operations by fully-qualified domain name (exact match).',
797 required => '0',
798 },
799 'path' => {
800 data_type => 'string',
801 description => 'Filter operations by path (exact match).',
802 required => '0',
803 },
804 'limit' => {
805 data_type => 'int',
806 description => 'The maximum number of operations to return per page.',
807 required => '0',
808 },
809 'page' => {
810 data_type => 'int',
811 description => 'The page number to return.',
812 required => '0',
813 },
814 };
815 __PACKAGE__->method_documentation->{ 'api_security_list_discovered_operations' } = {
816 summary => 'List discovered operations',
817 params => $params,
818 returns => 'InlineResponse2001',
819 };
820 }
821 # @return InlineResponse2001
822 #
823 sub api_security_list_discovered_operations {
824 my ($self, %args) = @_;
825  
826 # verify the required parameter 'service_id' is set
827 unless (exists $args{'service_id'}) {
828 croak("Missing the required parameter 'service_id' when calling api_security_list_discovered_operations");
829 }
830  
831 # parse inputs
832 my $_resource_path = '/api-security/v1/services/{service_id}/discovered-operations';
833  
834 my $_method = 'GET';
835 my $query_params = {};
836 my $header_params = {};
837 my $form_params = {};
838  
839 # 'Accept' and 'Content-Type' header
840 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
841 if ($_header_accept) {
842 $header_params->{'Accept'} = $_header_accept;
843 }
844 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
845  
846 # query params
847 if ( exists $args{'method'}) {
848 $query_params->{'method'} = $self->{api_client}->to_query_value($args{'method'});
849 }
850  
851 # query params
852 if ( exists $args{'domain'}) {
853 $query_params->{'domain'} = $self->{api_client}->to_query_value($args{'domain'});
854 }
855  
856 # query params
857 if ( exists $args{'path'}) {
858 $query_params->{'path'} = $self->{api_client}->to_query_value($args{'path'});
859 }
860  
861 # query params
862 if ( exists $args{'limit'}) {
863 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
864 }
865  
866 # query params
867 if ( exists $args{'page'}) {
868 $query_params->{'page'} = $self->{api_client}->to_query_value($args{'page'});
869 }
870  
871 # path params
872 if ( exists $args{'service_id'}) {
873 my $_base_variable = "{" . "service_id" . "}";
874 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
875 $_resource_path =~ s/$_base_variable/$_base_value/g;
876 }
877  
878 my $_body_data;
879 # authentication setting, if any
880 my $auth_settings = [qw(token )];
881  
882 # make the API Call
883 my $response = $self->{api_client}->call_api($_resource_path, $_method,
884 $query_params, $form_params,
885 $header_params, $_body_data, $auth_settings);
886 if (!$response) {
887 return;
888 }
889 my $_response_object = $self->{api_client}->deserialize('InlineResponse2001', $response);
890 return $_response_object;
891 }
892  
893 #
894 # api_security_list_operation_tags
895 #
896 # List operation tags
897 #
898 # @param string $service_id The unique identifier of the service. (required)
899 # @param int $limit The maximum number of operations to return per page. (optional, default to 100)
900 # @param int $page The page number to return. (optional, default to 0)
901 {
902 my $params = {
903 'service_id' => {
904 data_type => 'string',
905 description => 'The unique identifier of the service.',
906 required => '1',
907 },
908 'limit' => {
909 data_type => 'int',
910 description => 'The maximum number of operations to return per page.',
911 required => '0',
912 },
913 'page' => {
914 data_type => 'int',
915 description => 'The page number to return.',
916 required => '0',
917 },
918 };
919 __PACKAGE__->method_documentation->{ 'api_security_list_operation_tags' } = {
920 summary => 'List operation tags',
921 params => $params,
922 returns => 'InlineResponse2003',
923 };
924 }
925 # @return InlineResponse2003
926 #
927 sub api_security_list_operation_tags {
928 my ($self, %args) = @_;
929  
930 # verify the required parameter 'service_id' is set
931 unless (exists $args{'service_id'}) {
932 croak("Missing the required parameter 'service_id' when calling api_security_list_operation_tags");
933 }
934  
935 # parse inputs
936 my $_resource_path = '/api-security/v1/services/{service_id}/tags';
937  
938 my $_method = 'GET';
939 my $query_params = {};
940 my $header_params = {};
941 my $form_params = {};
942  
943 # 'Accept' and 'Content-Type' header
944 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
945 if ($_header_accept) {
946 $header_params->{'Accept'} = $_header_accept;
947 }
948 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
949  
950 # query params
951 if ( exists $args{'limit'}) {
952 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
953 }
954  
955 # query params
956 if ( exists $args{'page'}) {
957 $query_params->{'page'} = $self->{api_client}->to_query_value($args{'page'});
958 }
959  
960 # path params
961 if ( exists $args{'service_id'}) {
962 my $_base_variable = "{" . "service_id" . "}";
963 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
964 $_resource_path =~ s/$_base_variable/$_base_value/g;
965 }
966  
967 my $_body_data;
968 # authentication setting, if any
969 my $auth_settings = [qw(token )];
970  
971 # make the API Call
972 my $response = $self->{api_client}->call_api($_resource_path, $_method,
973 $query_params, $form_params,
974 $header_params, $_body_data, $auth_settings);
975 if (!$response) {
976 return;
977 }
978 my $_response_object = $self->{api_client}->deserialize('InlineResponse2003', $response);
979 return $_response_object;
980 }
981  
982 #
983 # api_security_list_operations
984 #
985 # List operations
986 #
987 # @param string $service_id The unique identifier of the service. (required)
988 # @param string $tag_id Filter operations by operation tag ID. Only operations associated with this operation tag will be returned. (optional)
989 # @param string $status Filter operations by status. Defaults to SAVED if omitted. (optional, default to 'SAVED')
990 # @param ARRAY[string] $method Filter operations by HTTP method. (optional)
991 # @param ARRAY[string] $domain Filter operations by fully-qualified domain name (exact match). (optional)
992 # @param string $path Filter operations by path (exact match). (optional)
993 # @param int $limit The maximum number of operations to return per page. (optional, default to 100)
994 # @param int $page The page number to return. (optional, default to 0)
995 {
996 my $params = {
997 'service_id' => {
998 data_type => 'string',
999 description => 'The unique identifier of the service.',
1000 required => '1',
1001 },
1002 'tag_id' => {
1003 data_type => 'string',
1004 description => 'Filter operations by operation tag ID. Only operations associated with this operation tag will be returned.',
1005 required => '0',
1006 },
1007 'status' => {
1008 data_type => 'string',
1009 description => 'Filter operations by status. Defaults to SAVED if omitted.',
1010 required => '0',
1011 },
1012 'method' => {
1013 data_type => 'ARRAY[string]',
1014 description => 'Filter operations by HTTP method.',
1015 required => '0',
1016 },
1017 'domain' => {
1018 data_type => 'ARRAY[string]',
1019 description => 'Filter operations by fully-qualified domain name (exact match).',
1020 required => '0',
1021 },
1022 'path' => {
1023 data_type => 'string',
1024 description => 'Filter operations by path (exact match).',
1025 required => '0',
1026 },
1027 'limit' => {
1028 data_type => 'int',
1029 description => 'The maximum number of operations to return per page.',
1030 required => '0',
1031 },
1032 'page' => {
1033 data_type => 'int',
1034 description => 'The page number to return.',
1035 required => '0',
1036 },
1037 };
1038 __PACKAGE__->method_documentation->{ 'api_security_list_operations' } = {
1039 summary => 'List operations',
1040 params => $params,
1041 returns => 'InlineResponse2002',
1042 };
1043 }
1044 # @return InlineResponse2002
1045 #
1046 sub api_security_list_operations {
1047 my ($self, %args) = @_;
1048  
1049 # verify the required parameter 'service_id' is set
1050 unless (exists $args{'service_id'}) {
1051 croak("Missing the required parameter 'service_id' when calling api_security_list_operations");
1052 }
1053  
1054 # parse inputs
1055 my $_resource_path = '/api-security/v1/services/{service_id}/operations';
1056  
1057 my $_method = 'GET';
1058 my $query_params = {};
1059 my $header_params = {};
1060 my $form_params = {};
1061  
1062 # 'Accept' and 'Content-Type' header
1063 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1064 if ($_header_accept) {
1065 $header_params->{'Accept'} = $_header_accept;
1066 }
1067 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
1068  
1069 # query params
1070 if ( exists $args{'tag_id'}) {
1071 $query_params->{'tag_id'} = $self->{api_client}->to_query_value($args{'tag_id'});
1072 }
1073  
1074 # query params
1075 if ( exists $args{'status'}) {
1076 $query_params->{'status'} = $self->{api_client}->to_query_value($args{'status'});
1077 }
1078  
1079 # query params
1080 if ( exists $args{'method'}) {
1081 $query_params->{'method'} = $self->{api_client}->to_query_value($args{'method'});
1082 }
1083  
1084 # query params
1085 if ( exists $args{'domain'}) {
1086 $query_params->{'domain'} = $self->{api_client}->to_query_value($args{'domain'});
1087 }
1088  
1089 # query params
1090 if ( exists $args{'path'}) {
1091 $query_params->{'path'} = $self->{api_client}->to_query_value($args{'path'});
1092 }
1093  
1094 # query params
1095 if ( exists $args{'limit'}) {
1096 $query_params->{'limit'} = $self->{api_client}->to_query_value($args{'limit'});
1097 }
1098  
1099 # query params
1100 if ( exists $args{'page'}) {
1101 $query_params->{'page'} = $self->{api_client}->to_query_value($args{'page'});
1102 }
1103  
1104 # path params
1105 if ( exists $args{'service_id'}) {
1106 my $_base_variable = "{" . "service_id" . "}";
1107 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
1108 $_resource_path =~ s/$_base_variable/$_base_value/g;
1109 }
1110  
1111 my $_body_data;
1112 # authentication setting, if any
1113 my $auth_settings = [qw(token )];
1114  
1115 # make the API Call
1116 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1117 $query_params, $form_params,
1118 $header_params, $_body_data, $auth_settings);
1119 if (!$response) {
1120 return;
1121 }
1122 my $_response_object = $self->{api_client}->deserialize('InlineResponse2002', $response);
1123 return $_response_object;
1124 }
1125  
1126 #
1127 # api_security_update_operation
1128 #
1129 # Update operation
1130 #
1131 # @param string $service_id The unique identifier of the service. (required)
1132 # @param string $operation_id The unique identifier of the operation. (required)
1133 # @param OperationUpdate $operation_update (optional)
1134 {
1135 my $params = {
1136 'service_id' => {
1137 data_type => 'string',
1138 description => 'The unique identifier of the service.',
1139 required => '1',
1140 },
1141 'operation_id' => {
1142 data_type => 'string',
1143 description => 'The unique identifier of the operation.',
1144 required => '1',
1145 },
1146 'operation_update' => {
1147 data_type => 'OperationUpdate',
1148 description => '',
1149 required => '0',
1150 },
1151 };
1152 __PACKAGE__->method_documentation->{ 'api_security_update_operation' } = {
1153 summary => 'Update operation',
1154 params => $params,
1155 returns => 'OperationGet',
1156 };
1157 }
1158 # @return OperationGet
1159 #
1160 sub api_security_update_operation {
1161 my ($self, %args) = @_;
1162  
1163 # verify the required parameter 'service_id' is set
1164 unless (exists $args{'service_id'}) {
1165 croak("Missing the required parameter 'service_id' when calling api_security_update_operation");
1166 }
1167  
1168 # verify the required parameter 'operation_id' is set
1169 unless (exists $args{'operation_id'}) {
1170 croak("Missing the required parameter 'operation_id' when calling api_security_update_operation");
1171 }
1172  
1173 # parse inputs
1174 my $_resource_path = '/api-security/v1/services/{service_id}/operations/{operation_id}';
1175  
1176 my $_method = 'PATCH';
1177 my $query_params = {};
1178 my $header_params = {};
1179 my $form_params = {};
1180  
1181 # 'Accept' and 'Content-Type' header
1182 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1183 if ($_header_accept) {
1184 $header_params->{'Accept'} = $_header_accept;
1185 }
1186 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1187  
1188 # path params
1189 if ( exists $args{'service_id'}) {
1190 my $_base_variable = "{" . "service_id" . "}";
1191 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
1192 $_resource_path =~ s/$_base_variable/$_base_value/g;
1193 }
1194  
1195 # path params
1196 if ( exists $args{'operation_id'}) {
1197 my $_base_variable = "{" . "operation_id" . "}";
1198 my $_base_value = $self->{api_client}->to_path_value($args{'operation_id'});
1199 $_resource_path =~ s/$_base_variable/$_base_value/g;
1200 }
1201  
1202 my $_body_data;
1203 # body params
1204 if ( exists $args{'operation_update'}) {
1205 $_body_data = $args{'operation_update'};
1206 }
1207  
1208 # authentication setting, if any
1209 my $auth_settings = [qw(token )];
1210  
1211 # make the API Call
1212 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1213 $query_params, $form_params,
1214 $header_params, $_body_data, $auth_settings);
1215 if (!$response) {
1216 return;
1217 }
1218 my $_response_object = $self->{api_client}->deserialize('OperationGet', $response);
1219 return $_response_object;
1220 }
1221  
1222 #
1223 # api_security_update_operation_tag
1224 #
1225 # Update operation tag
1226 #
1227 # @param string $service_id The unique identifier of the service. (required)
1228 # @param string $tag_id The unique identifier of the operation tag. (required)
1229 # @param TagBase $body (optional)
1230 {
1231 my $params = {
1232 'service_id' => {
1233 data_type => 'string',
1234 description => 'The unique identifier of the service.',
1235 required => '1',
1236 },
1237 'tag_id' => {
1238 data_type => 'string',
1239 description => 'The unique identifier of the operation tag.',
1240 required => '1',
1241 },
1242 'body' => {
1243 data_type => 'TagBase',
1244 description => '',
1245 required => '0',
1246 },
1247 };
1248 __PACKAGE__->method_documentation->{ 'api_security_update_operation_tag' } = {
1249 summary => 'Update operation tag',
1250 params => $params,
1251 returns => 'TagGet',
1252 };
1253 }
1254 # @return TagGet
1255 #
1256 sub api_security_update_operation_tag {
1257 my ($self, %args) = @_;
1258  
1259 # verify the required parameter 'service_id' is set
1260 unless (exists $args{'service_id'}) {
1261 croak("Missing the required parameter 'service_id' when calling api_security_update_operation_tag");
1262 }
1263  
1264 # verify the required parameter 'tag_id' is set
1265 unless (exists $args{'tag_id'}) {
1266 croak("Missing the required parameter 'tag_id' when calling api_security_update_operation_tag");
1267 }
1268  
1269 # parse inputs
1270 my $_resource_path = '/api-security/v1/services/{service_id}/tags/{tag_id}';
1271  
1272 my $_method = 'PATCH';
1273 my $query_params = {};
1274 my $header_params = {};
1275 my $form_params = {};
1276  
1277 # 'Accept' and 'Content-Type' header
1278 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
1279 if ($_header_accept) {
1280 $header_params->{'Accept'} = $_header_accept;
1281 }
1282 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
1283  
1284 # path params
1285 if ( exists $args{'service_id'}) {
1286 my $_base_variable = "{" . "service_id" . "}";
1287 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
1288 $_resource_path =~ s/$_base_variable/$_base_value/g;
1289 }
1290  
1291 # path params
1292 if ( exists $args{'tag_id'}) {
1293 my $_base_variable = "{" . "tag_id" . "}";
1294 my $_base_value = $self->{api_client}->to_path_value($args{'tag_id'});
1295 $_resource_path =~ s/$_base_variable/$_base_value/g;
1296 }
1297  
1298 my $_body_data;
1299 # body params
1300 if ( exists $args{'body'}) {
1301 $_body_data = $args{'body'};
1302 }
1303  
1304 # authentication setting, if any
1305 my $auth_settings = [qw(token )];
1306  
1307 # make the API Call
1308 my $response = $self->{api_client}->call_api($_resource_path, $_method,
1309 $query_params, $form_params,
1310 $header_params, $_body_data, $auth_settings);
1311 if (!$response) {
1312 return;
1313 }
1314 my $_response_object = $self->{api_client}->deserialize('TagGet', $response);
1315 return $_response_object;
1316 }
1317  
1318 1;