Fastly/HeaderApi.pm untested

filter: Statementstmt 0.0% 0 / 270 Branchbran 0.0% 0 / 122 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 15 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 422 CC 62 SCAR 55.2
CC
62
Cov
0%
update_header_object
462.0
create_header_object
380.0
delete_header_object
90.0
CRAP 249.5
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::HeaderApi;
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_header_object
51 #
52 # Create a Header object
53 #
54 # @param string $service_id Alphanumeric string identifying the service. (required)
55 # @param int $version_id Integer identifying a service version. (required)
56 # @param string $action Accepts a string value. (optional)
57 # @param string $cache_condition Name of the cache condition controlling when this configuration applies. (optional)
58 # @param string $dst Header to set. (optional)
59 # @param string $name A handle to refer to this Header object. (optional)
60 # @param string $regex Regular expression to use. Only applies to `regex` and `regex_repeat` actions. (optional)
61 # @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional)
62 # @param string $response_condition Optional name of a response condition to apply. (optional)
63 # @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional)
64 # @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional)
65 # @param string $type Accepts a string value. (optional)
66 # @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional)
67 # @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100')
68 {
69 my $params = {
70 'service_id' => {
71 data_type => 'string',
72 description => 'Alphanumeric string identifying the service.',
73 required => '1',
74 },
75 'version_id' => {
76 data_type => 'int',
77 description => 'Integer identifying a service version.',
78 required => '1',
79 },
80 'action' => {
81 data_type => 'string',
82 description => 'Accepts a string value.',
83 required => '0',
84 },
85 'cache_condition' => {
86 data_type => 'string',
87 description => 'Name of the cache condition controlling when this configuration applies.',
88 required => '0',
89 },
90 'dst' => {
91 data_type => 'string',
92 description => 'Header to set.',
93 required => '0',
94 },
95 'name' => {
96 data_type => 'string',
97 description => 'A handle to refer to this Header object.',
98 required => '0',
99 },
100 'regex' => {
101 data_type => 'string',
102 description => 'Regular expression to use. Only applies to `regex` and `regex_repeat` actions.',
103 required => '0',
104 },
105 'request_condition' => {
106 data_type => 'string',
107 description => 'Condition which, if met, will select this configuration during a request. Optional.',
108 required => '0',
109 },
110 'response_condition' => {
111 data_type => 'string',
112 description => 'Optional name of a response condition to apply.',
113 required => '0',
114 },
115 'src' => {
116 data_type => 'string',
117 description => 'Variable to be used as a source for the header content. Does not apply to `delete` action.',
118 required => '0',
119 },
120 'substitution' => {
121 data_type => 'string',
122 description => 'Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions.',
123 required => '0',
124 },
125 'type' => {
126 data_type => 'string',
127 description => 'Accepts a string value.',
128 required => '0',
129 },
130 'ignore_if_set' => {
131 data_type => 'string',
132 description => 'Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true)',
133 required => '0',
134 },
135 'priority' => {
136 data_type => 'string',
137 description => 'Priority determines execution order. Lower numbers execute first.',
138 required => '0',
139 },
140 };
141 __PACKAGE__->method_documentation->{ 'create_header_object' } = {
142 summary => 'Create a Header object',
143 params => $params,
144 returns => 'HeaderResponse',
145 };
146 }
147 # @return HeaderResponse
148 #
149 sub create_header_object {
150 my ($self, %args) = @_;
151  
152 # verify the required parameter 'service_id' is set
153 unless (exists $args{'service_id'}) {
154 croak("Missing the required parameter 'service_id' when calling create_header_object");
155 }
156  
157 # verify the required parameter 'version_id' is set
158 unless (exists $args{'version_id'}) {
159 croak("Missing the required parameter 'version_id' when calling create_header_object");
160 }
161  
162 # parse inputs
163 my $_resource_path = '/service/{service_id}/version/{version_id}/header';
164  
165 my $_method = 'POST';
166 my $query_params = {};
167 my $header_params = {};
168 my $form_params = {};
169  
170 # 'Accept' and 'Content-Type' header
171 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
172 if ($_header_accept) {
173 $header_params->{'Accept'} = $_header_accept;
174 }
175 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
176  
177 # path params
178 if ( exists $args{'service_id'}) {
179 my $_base_variable = "{" . "service_id" . "}";
180 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
181 $_resource_path =~ s/$_base_variable/$_base_value/g;
182 }
183  
184 # path params
185 if ( exists $args{'version_id'}) {
186 my $_base_variable = "{" . "version_id" . "}";
187 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
188 $_resource_path =~ s/$_base_variable/$_base_value/g;
189 }
190  
191 # form params
192 if ( exists $args{'action'} ) {
193 $form_params->{'action'} = $self->{api_client}->to_form_value($args{'action'});
194 }
195  
196 # form params
197 if ( exists $args{'cache_condition'} ) {
198 $form_params->{'cache_condition'} = $self->{api_client}->to_form_value($args{'cache_condition'});
199 }
200  
201 # form params
202 if ( exists $args{'dst'} ) {
203 $form_params->{'dst'} = $self->{api_client}->to_form_value($args{'dst'});
204 }
205  
206 # form params
207 if ( exists $args{'name'} ) {
208 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
209 }
210  
211 # form params
212 if ( exists $args{'regex'} ) {
213 $form_params->{'regex'} = $self->{api_client}->to_form_value($args{'regex'});
214 }
215  
216 # form params
217 if ( exists $args{'request_condition'} ) {
218 $form_params->{'request_condition'} = $self->{api_client}->to_form_value($args{'request_condition'});
219 }
220  
221 # form params
222 if ( exists $args{'response_condition'} ) {
223 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
224 }
225  
226 # form params
227 if ( exists $args{'src'} ) {
228 $form_params->{'src'} = $self->{api_client}->to_form_value($args{'src'});
229 }
230  
231 # form params
232 if ( exists $args{'substitution'} ) {
233 $form_params->{'substitution'} = $self->{api_client}->to_form_value($args{'substitution'});
234 }
235  
236 # form params
237 if ( exists $args{'type'} ) {
238 $form_params->{'type'} = $self->{api_client}->to_form_value($args{'type'});
239 }
240  
241 # form params
242 if ( exists $args{'ignore_if_set'} ) {
243 $form_params->{'ignore_if_set'} = $self->{api_client}->to_form_value($args{'ignore_if_set'});
244 }
245  
246 # form params
247 if ( exists $args{'priority'} ) {
248 $form_params->{'priority'} = $self->{api_client}->to_form_value($args{'priority'});
249 }
250  
251 my $_body_data;
252 # authentication setting, if any
253 my $auth_settings = [qw(token )];
254  
255 # make the API Call
256 my $response = $self->{api_client}->call_api($_resource_path, $_method,
257 $query_params, $form_params,
258 $header_params, $_body_data, $auth_settings);
259 if (!$response) {
260 return;
261 }
262 my $_response_object = $self->{api_client}->deserialize('HeaderResponse', $response);
263 return $_response_object;
264 }
265  
266 #
267 # delete_header_object
268 #
269 # Delete a Header object
270 #
271 # @param string $service_id Alphanumeric string identifying the service. (required)
272 # @param int $version_id Integer identifying a service version. (required)
273 # @param string $header_name A handle to refer to this Header object. (required)
274 {
275 my $params = {
276 'service_id' => {
277 data_type => 'string',
278 description => 'Alphanumeric string identifying the service.',
279 required => '1',
280 },
281 'version_id' => {
282 data_type => 'int',
283 description => 'Integer identifying a service version.',
284 required => '1',
285 },
286 'header_name' => {
287 data_type => 'string',
288 description => 'A handle to refer to this Header object.',
289 required => '1',
290 },
291 };
292 __PACKAGE__->method_documentation->{ 'delete_header_object' } = {
293 summary => 'Delete a Header object',
294 params => $params,
295 returns => 'InlineResponse200',
296 };
297 }
298 # @return InlineResponse200
299 #
300 sub delete_header_object {
301 my ($self, %args) = @_;
302  
303 # verify the required parameter 'service_id' is set
304 unless (exists $args{'service_id'}) {
305 croak("Missing the required parameter 'service_id' when calling delete_header_object");
306 }
307  
308 # verify the required parameter 'version_id' is set
309 unless (exists $args{'version_id'}) {
310 croak("Missing the required parameter 'version_id' when calling delete_header_object");
311 }
312  
313 # verify the required parameter 'header_name' is set
314 unless (exists $args{'header_name'}) {
315 croak("Missing the required parameter 'header_name' when calling delete_header_object");
316 }
317  
318 # parse inputs
319 my $_resource_path = '/service/{service_id}/version/{version_id}/header/{header_name}';
320  
321 my $_method = 'DELETE';
322 my $query_params = {};
323 my $header_params = {};
324 my $form_params = {};
325  
326 # 'Accept' and 'Content-Type' header
327 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
328 if ($_header_accept) {
329 $header_params->{'Accept'} = $_header_accept;
330 }
331 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
332  
333 # path params
334 if ( exists $args{'service_id'}) {
335 my $_base_variable = "{" . "service_id" . "}";
336 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
337 $_resource_path =~ s/$_base_variable/$_base_value/g;
338 }
339  
340 # path params
341 if ( exists $args{'version_id'}) {
342 my $_base_variable = "{" . "version_id" . "}";
343 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
344 $_resource_path =~ s/$_base_variable/$_base_value/g;
345 }
346  
347 # path params
348 if ( exists $args{'header_name'}) {
349 my $_base_variable = "{" . "header_name" . "}";
350 my $_base_value = $self->{api_client}->to_path_value($args{'header_name'});
351 $_resource_path =~ s/$_base_variable/$_base_value/g;
352 }
353  
354 my $_body_data;
355 # authentication setting, if any
356 my $auth_settings = [qw(token )];
357  
358 # make the API Call
359 my $response = $self->{api_client}->call_api($_resource_path, $_method,
360 $query_params, $form_params,
361 $header_params, $_body_data, $auth_settings);
362 if (!$response) {
363 return;
364 }
365 my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
366 return $_response_object;
367 }
368  
369 #
370 # get_header_object
371 #
372 # Get a Header object
373 #
374 # @param string $service_id Alphanumeric string identifying the service. (required)
375 # @param int $version_id Integer identifying a service version. (required)
376 # @param string $header_name A handle to refer to this Header object. (required)
377 {
378 my $params = {
379 'service_id' => {
380 data_type => 'string',
381 description => 'Alphanumeric string identifying the service.',
382 required => '1',
383 },
384 'version_id' => {
385 data_type => 'int',
386 description => 'Integer identifying a service version.',
387 required => '1',
388 },
389 'header_name' => {
390 data_type => 'string',
391 description => 'A handle to refer to this Header object.',
392 required => '1',
393 },
394 };
395 __PACKAGE__->method_documentation->{ 'get_header_object' } = {
396 summary => 'Get a Header object',
397 params => $params,
398 returns => 'HeaderResponse',
399 };
400 }
401 # @return HeaderResponse
402 #
403 sub get_header_object {
404 my ($self, %args) = @_;
405  
406 # verify the required parameter 'service_id' is set
407 unless (exists $args{'service_id'}) {
408 croak("Missing the required parameter 'service_id' when calling get_header_object");
409 }
410  
411 # verify the required parameter 'version_id' is set
412 unless (exists $args{'version_id'}) {
413 croak("Missing the required parameter 'version_id' when calling get_header_object");
414 }
415  
416 # verify the required parameter 'header_name' is set
417 unless (exists $args{'header_name'}) {
418 croak("Missing the required parameter 'header_name' when calling get_header_object");
419 }
420  
421 # parse inputs
422 my $_resource_path = '/service/{service_id}/version/{version_id}/header/{header_name}';
423  
424 my $_method = 'GET';
425 my $query_params = {};
426 my $header_params = {};
427 my $form_params = {};
428  
429 # 'Accept' and 'Content-Type' header
430 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
431 if ($_header_accept) {
432 $header_params->{'Accept'} = $_header_accept;
433 }
434 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
435  
436 # path params
437 if ( exists $args{'service_id'}) {
438 my $_base_variable = "{" . "service_id" . "}";
439 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
440 $_resource_path =~ s/$_base_variable/$_base_value/g;
441 }
442  
443 # path params
444 if ( exists $args{'version_id'}) {
445 my $_base_variable = "{" . "version_id" . "}";
446 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
447 $_resource_path =~ s/$_base_variable/$_base_value/g;
448 }
449  
450 # path params
451 if ( exists $args{'header_name'}) {
452 my $_base_variable = "{" . "header_name" . "}";
453 my $_base_value = $self->{api_client}->to_path_value($args{'header_name'});
454 $_resource_path =~ s/$_base_variable/$_base_value/g;
455 }
456  
457 my $_body_data;
458 # authentication setting, if any
459 my $auth_settings = [qw(token )];
460  
461 # make the API Call
462 my $response = $self->{api_client}->call_api($_resource_path, $_method,
463 $query_params, $form_params,
464 $header_params, $_body_data, $auth_settings);
465 if (!$response) {
466 return;
467 }
468 my $_response_object = $self->{api_client}->deserialize('HeaderResponse', $response);
469 return $_response_object;
470 }
471  
472 #
473 # list_header_objects
474 #
475 # List Header objects
476 #
477 # @param string $service_id Alphanumeric string identifying the service. (required)
478 # @param int $version_id Integer identifying a service version. (required)
479 {
480 my $params = {
481 'service_id' => {
482 data_type => 'string',
483 description => 'Alphanumeric string identifying the service.',
484 required => '1',
485 },
486 'version_id' => {
487 data_type => 'int',
488 description => 'Integer identifying a service version.',
489 required => '1',
490 },
491 };
492 __PACKAGE__->method_documentation->{ 'list_header_objects' } = {
493 summary => 'List Header objects',
494 params => $params,
495 returns => 'ARRAY[HeaderResponse]',
496 };
497 }
498 # @return ARRAY[HeaderResponse]
499 #
500 sub list_header_objects {
501 my ($self, %args) = @_;
502  
503 # verify the required parameter 'service_id' is set
504 unless (exists $args{'service_id'}) {
505 croak("Missing the required parameter 'service_id' when calling list_header_objects");
506 }
507  
508 # verify the required parameter 'version_id' is set
509 unless (exists $args{'version_id'}) {
510 croak("Missing the required parameter 'version_id' when calling list_header_objects");
511 }
512  
513 # parse inputs
514 my $_resource_path = '/service/{service_id}/version/{version_id}/header';
515  
516 my $_method = 'GET';
517 my $query_params = {};
518 my $header_params = {};
519 my $form_params = {};
520  
521 # 'Accept' and 'Content-Type' header
522 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
523 if ($_header_accept) {
524 $header_params->{'Accept'} = $_header_accept;
525 }
526 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
527  
528 # path params
529 if ( exists $args{'service_id'}) {
530 my $_base_variable = "{" . "service_id" . "}";
531 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
532 $_resource_path =~ s/$_base_variable/$_base_value/g;
533 }
534  
535 # path params
536 if ( exists $args{'version_id'}) {
537 my $_base_variable = "{" . "version_id" . "}";
538 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
539 $_resource_path =~ s/$_base_variable/$_base_value/g;
540 }
541  
542 my $_body_data;
543 # authentication setting, if any
544 my $auth_settings = [qw(token )];
545  
546 # make the API Call
547 my $response = $self->{api_client}->call_api($_resource_path, $_method,
548 $query_params, $form_params,
549 $header_params, $_body_data, $auth_settings);
550 if (!$response) {
551 return;
552 }
553 my $_response_object = $self->{api_client}->deserialize('ARRAY[HeaderResponse]', $response);
554 return $_response_object;
555 }
556  
557 #
558 # update_header_object
559 #
560 # Update a Header object
561 #
562 # @param string $service_id Alphanumeric string identifying the service. (required)
563 # @param int $version_id Integer identifying a service version. (required)
564 # @param string $header_name A handle to refer to this Header object. (required)
565 # @param string $action Accepts a string value. (optional)
566 # @param string $cache_condition Name of the cache condition controlling when this configuration applies. (optional)
567 # @param string $dst Header to set. (optional)
568 # @param string $name A handle to refer to this Header object. (optional)
569 # @param string $regex Regular expression to use. Only applies to `regex` and `regex_repeat` actions. (optional)
570 # @param string $request_condition Condition which, if met, will select this configuration during a request. Optional. (optional)
571 # @param string $response_condition Optional name of a response condition to apply. (optional)
572 # @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional)
573 # @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional)
574 # @param string $type Accepts a string value. (optional)
575 # @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional)
576 # @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100')
577 {
578 my $params = {
579 'service_id' => {
580 data_type => 'string',
581 description => 'Alphanumeric string identifying the service.',
582 required => '1',
583 },
584 'version_id' => {
585 data_type => 'int',
586 description => 'Integer identifying a service version.',
587 required => '1',
588 },
589 'header_name' => {
590 data_type => 'string',
591 description => 'A handle to refer to this Header object.',
592 required => '1',
593 },
594 'action' => {
595 data_type => 'string',
596 description => 'Accepts a string value.',
597 required => '0',
598 },
599 'cache_condition' => {
600 data_type => 'string',
601 description => 'Name of the cache condition controlling when this configuration applies.',
602 required => '0',
603 },
604 'dst' => {
605 data_type => 'string',
606 description => 'Header to set.',
607 required => '0',
608 },
609 'name' => {
610 data_type => 'string',
611 description => 'A handle to refer to this Header object.',
612 required => '0',
613 },
614 'regex' => {
615 data_type => 'string',
616 description => 'Regular expression to use. Only applies to `regex` and `regex_repeat` actions.',
617 required => '0',
618 },
619 'request_condition' => {
620 data_type => 'string',
621 description => 'Condition which, if met, will select this configuration during a request. Optional.',
622 required => '0',
623 },
624 'response_condition' => {
625 data_type => 'string',
626 description => 'Optional name of a response condition to apply.',
627 required => '0',
628 },
629 'src' => {
630 data_type => 'string',
631 description => 'Variable to be used as a source for the header content. Does not apply to `delete` action.',
632 required => '0',
633 },
634 'substitution' => {
635 data_type => 'string',
636 description => 'Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions.',
637 required => '0',
638 },
639 'type' => {
640 data_type => 'string',
641 description => 'Accepts a string value.',
642 required => '0',
643 },
644 'ignore_if_set' => {
645 data_type => 'string',
646 description => 'Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true)',
647 required => '0',
648 },
649 'priority' => {
650 data_type => 'string',
651 description => 'Priority determines execution order. Lower numbers execute first.',
652 required => '0',
653 },
654 };
655 __PACKAGE__->method_documentation->{ 'update_header_object' } = {
656 summary => 'Update a Header object',
657 params => $params,
658 returns => 'HeaderResponse',
659 };
660 }
661 # @return HeaderResponse
662 #
663 sub update_header_object {
664 my ($self, %args) = @_;
665  
666 # verify the required parameter 'service_id' is set
667 unless (exists $args{'service_id'}) {
668 croak("Missing the required parameter 'service_id' when calling update_header_object");
669 }
670  
671 # verify the required parameter 'version_id' is set
672 unless (exists $args{'version_id'}) {
673 croak("Missing the required parameter 'version_id' when calling update_header_object");
674 }
675  
676 # verify the required parameter 'header_name' is set
677 unless (exists $args{'header_name'}) {
678 croak("Missing the required parameter 'header_name' when calling update_header_object");
679 }
680  
681 # parse inputs
682 my $_resource_path = '/service/{service_id}/version/{version_id}/header/{header_name}';
683  
684 my $_method = 'PUT';
685 my $query_params = {};
686 my $header_params = {};
687 my $form_params = {};
688  
689 # 'Accept' and 'Content-Type' header
690 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
691 if ($_header_accept) {
692 $header_params->{'Accept'} = $_header_accept;
693 }
694 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
695  
696 # path params
697 if ( exists $args{'service_id'}) {
698 my $_base_variable = "{" . "service_id" . "}";
699 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
700 $_resource_path =~ s/$_base_variable/$_base_value/g;
701 }
702  
703 # path params
704 if ( exists $args{'version_id'}) {
705 my $_base_variable = "{" . "version_id" . "}";
706 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
707 $_resource_path =~ s/$_base_variable/$_base_value/g;
708 }
709  
710 # path params
711 if ( exists $args{'header_name'}) {
712 my $_base_variable = "{" . "header_name" . "}";
713 my $_base_value = $self->{api_client}->to_path_value($args{'header_name'});
714 $_resource_path =~ s/$_base_variable/$_base_value/g;
715 }
716  
717 # form params
718 if ( exists $args{'action'} ) {
719 $form_params->{'action'} = $self->{api_client}->to_form_value($args{'action'});
720 }
721  
722 # form params
723 if ( exists $args{'cache_condition'} ) {
724 $form_params->{'cache_condition'} = $self->{api_client}->to_form_value($args{'cache_condition'});
725 }
726  
727 # form params
728 if ( exists $args{'dst'} ) {
729 $form_params->{'dst'} = $self->{api_client}->to_form_value($args{'dst'});
730 }
731  
732 # form params
733 if ( exists $args{'name'} ) {
734 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
735 }
736  
737 # form params
738 if ( exists $args{'regex'} ) {
739 $form_params->{'regex'} = $self->{api_client}->to_form_value($args{'regex'});
740 }
741  
742 # form params
743 if ( exists $args{'request_condition'} ) {
744 $form_params->{'request_condition'} = $self->{api_client}->to_form_value($args{'request_condition'});
745 }
746  
747 # form params
748 if ( exists $args{'response_condition'} ) {
749 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
750 }
751  
752 # form params
753 if ( exists $args{'src'} ) {
754 $form_params->{'src'} = $self->{api_client}->to_form_value($args{'src'});
755 }
756  
757 # form params
758 if ( exists $args{'substitution'} ) {
759 $form_params->{'substitution'} = $self->{api_client}->to_form_value($args{'substitution'});
760 }
761  
762 # form params
763 if ( exists $args{'type'} ) {
764 $form_params->{'type'} = $self->{api_client}->to_form_value($args{'type'});
765 }
766  
767 # form params
768 if ( exists $args{'ignore_if_set'} ) {
769 $form_params->{'ignore_if_set'} = $self->{api_client}->to_form_value($args{'ignore_if_set'});
770 }
771  
772 # form params
773 if ( exists $args{'priority'} ) {
774 $form_params->{'priority'} = $self->{api_client}->to_form_value($args{'priority'});
775 }
776  
777 my $_body_data;
778 # authentication setting, if any
779 my $auth_settings = [qw(token )];
780  
781 # make the API Call
782 my $response = $self->{api_client}->call_api($_resource_path, $_method,
783 $query_params, $form_params,
784 $header_params, $_body_data, $auth_settings);
785 if (!$response) {
786 return;
787 }
788 my $_response_object = $self->{api_client}->deserialize('HeaderResponse', $response);
789 return $_response_object;
790 }
791  
792 1;