Fastly/HealthcheckApi.pm untested

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