Fastly/LoggingGrafanacloudlogsApi.pm untested

filter: Statementstmt 0.0% 0 / 262 Branchbran 0.0% 0 / 114 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 / 406 CC 58 SCAR 53.0
CC
58
Cov
0%
update_log_grafanacloudlogs
380.0
create_log_grafanacloudlogs
306.0
delete_log_grafanacloudlogs
90.0
CRAP 200.9
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::LoggingGrafanacloudlogsApi;
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_log_grafanacloudlogs
51 #
52 # Create a Grafana Cloud Logs log endpoint
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 $name The name for the real-time logging configuration. (optional)
57 # @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional)
58 # @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
59 # @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional)
60 # @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none')
61 # @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2)
62 # @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional)
63 # @param string $url The URL of the Loki instance in your Grafana stack. (optional)
64 # @param string $token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. (optional)
65 # @param string $index The Stream Labels, a JSON string used to identify the stream. (optional)
66 {
67 my $params = {
68 'service_id' => {
69 data_type => 'string',
70 description => 'Alphanumeric string identifying the service.',
71 required => '1',
72 },
73 'version_id' => {
74 data_type => 'int',
75 description => 'Integer identifying a service version.',
76 required => '1',
77 },
78 'name' => {
79 data_type => 'string',
80 description => 'The name for the real-time logging configuration.',
81 required => '0',
82 },
83 'placement' => {
84 data_type => 'string',
85 description => 'Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. ',
86 required => '0',
87 },
88 'response_condition' => {
89 data_type => 'string',
90 description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.',
91 required => '0',
92 },
93 'format' => {
94 data_type => 'string',
95 description => 'A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).',
96 required => '0',
97 },
98 'log_processing_region' => {
99 data_type => 'string',
100 description => 'The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.',
101 required => '0',
102 },
103 'format_version' => {
104 data_type => 'int',
105 description => 'The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. ',
106 required => '0',
107 },
108 'user' => {
109 data_type => 'string',
110 description => 'The Grafana Cloud Logs Dataset you want to log to.',
111 required => '0',
112 },
113 'url' => {
114 data_type => 'string',
115 description => 'The URL of the Loki instance in your Grafana stack.',
116 required => '0',
117 },
118 'token' => {
119 data_type => 'string',
120 description => 'The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.',
121 required => '0',
122 },
123 'index' => {
124 data_type => 'string',
125 description => 'The Stream Labels, a JSON string used to identify the stream.',
126 required => '0',
127 },
128 };
129 __PACKAGE__->method_documentation->{ 'create_log_grafanacloudlogs' } = {
130 summary => 'Create a Grafana Cloud Logs log endpoint',
131 params => $params,
132 returns => 'LoggingGrafanacloudlogsResponse',
133 };
134 }
135 # @return LoggingGrafanacloudlogsResponse
136 #
137 sub create_log_grafanacloudlogs {
138 my ($self, %args) = @_;
139  
140 # verify the required parameter 'service_id' is set
141 unless (exists $args{'service_id'}) {
142 croak("Missing the required parameter 'service_id' when calling create_log_grafanacloudlogs");
143 }
144  
145 # verify the required parameter 'version_id' is set
146 unless (exists $args{'version_id'}) {
147 croak("Missing the required parameter 'version_id' when calling create_log_grafanacloudlogs");
148 }
149  
150 # parse inputs
151 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs';
152  
153 my $_method = 'POST';
154 my $query_params = {};
155 my $header_params = {};
156 my $form_params = {};
157  
158 # 'Accept' and 'Content-Type' header
159 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
160 if ($_header_accept) {
161 $header_params->{'Accept'} = $_header_accept;
162 }
163 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
164  
165 # path params
166 if ( exists $args{'service_id'}) {
167 my $_base_variable = "{" . "service_id" . "}";
168 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
169 $_resource_path =~ s/$_base_variable/$_base_value/g;
170 }
171  
172 # path params
173 if ( exists $args{'version_id'}) {
174 my $_base_variable = "{" . "version_id" . "}";
175 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
176 $_resource_path =~ s/$_base_variable/$_base_value/g;
177 }
178  
179 # form params
180 if ( exists $args{'name'} ) {
181 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
182 }
183  
184 # form params
185 if ( exists $args{'placement'} ) {
186 $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'});
187 }
188  
189 # form params
190 if ( exists $args{'response_condition'} ) {
191 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
192 }
193  
194 # form params
195 if ( exists $args{'format'} ) {
196 $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'});
197 }
198  
199 # form params
200 if ( exists $args{'log_processing_region'} ) {
201 $form_params->{'log_processing_region'} = $self->{api_client}->to_form_value($args{'log_processing_region'});
202 }
203  
204 # form params
205 if ( exists $args{'format_version'} ) {
206 $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'});
207 }
208  
209 # form params
210 if ( exists $args{'user'} ) {
211 $form_params->{'user'} = $self->{api_client}->to_form_value($args{'user'});
212 }
213  
214 # form params
215 if ( exists $args{'url'} ) {
216 $form_params->{'url'} = $self->{api_client}->to_form_value($args{'url'});
217 }
218  
219 # form params
220 if ( exists $args{'token'} ) {
221 $form_params->{'token'} = $self->{api_client}->to_form_value($args{'token'});
222 }
223  
224 # form params
225 if ( exists $args{'index'} ) {
226 $form_params->{'index'} = $self->{api_client}->to_form_value($args{'index'});
227 }
228  
229 my $_body_data;
230 # authentication setting, if any
231 my $auth_settings = [qw(token )];
232  
233 # make the API Call
234 my $response = $self->{api_client}->call_api($_resource_path, $_method,
235 $query_params, $form_params,
236 $header_params, $_body_data, $auth_settings);
237 if (!$response) {
238 return;
239 }
240 my $_response_object = $self->{api_client}->deserialize('LoggingGrafanacloudlogsResponse', $response);
241 return $_response_object;
242 }
243  
244 #
245 # delete_log_grafanacloudlogs
246 #
247 # Delete the Grafana Cloud Logs log endpoint
248 #
249 # @param string $service_id Alphanumeric string identifying the service. (required)
250 # @param int $version_id Integer identifying a service version. (required)
251 # @param string $logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
252 {
253 my $params = {
254 'service_id' => {
255 data_type => 'string',
256 description => 'Alphanumeric string identifying the service.',
257 required => '1',
258 },
259 'version_id' => {
260 data_type => 'int',
261 description => 'Integer identifying a service version.',
262 required => '1',
263 },
264 'logging_grafanacloudlogs_name' => {
265 data_type => 'string',
266 description => 'The name for the real-time logging configuration.',
267 required => '1',
268 },
269 };
270 __PACKAGE__->method_documentation->{ 'delete_log_grafanacloudlogs' } = {
271 summary => 'Delete the Grafana Cloud Logs log endpoint',
272 params => $params,
273 returns => 'InlineResponse200',
274 };
275 }
276 # @return InlineResponse200
277 #
278 sub delete_log_grafanacloudlogs {
279 my ($self, %args) = @_;
280  
281 # verify the required parameter 'service_id' is set
282 unless (exists $args{'service_id'}) {
283 croak("Missing the required parameter 'service_id' when calling delete_log_grafanacloudlogs");
284 }
285  
286 # verify the required parameter 'version_id' is set
287 unless (exists $args{'version_id'}) {
288 croak("Missing the required parameter 'version_id' when calling delete_log_grafanacloudlogs");
289 }
290  
291 # verify the required parameter 'logging_grafanacloudlogs_name' is set
292 unless (exists $args{'logging_grafanacloudlogs_name'}) {
293 croak("Missing the required parameter 'logging_grafanacloudlogs_name' when calling delete_log_grafanacloudlogs");
294 }
295  
296 # parse inputs
297 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}';
298  
299 my $_method = 'DELETE';
300 my $query_params = {};
301 my $header_params = {};
302 my $form_params = {};
303  
304 # 'Accept' and 'Content-Type' header
305 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
306 if ($_header_accept) {
307 $header_params->{'Accept'} = $_header_accept;
308 }
309 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
310  
311 # path params
312 if ( exists $args{'service_id'}) {
313 my $_base_variable = "{" . "service_id" . "}";
314 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
315 $_resource_path =~ s/$_base_variable/$_base_value/g;
316 }
317  
318 # path params
319 if ( exists $args{'version_id'}) {
320 my $_base_variable = "{" . "version_id" . "}";
321 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
322 $_resource_path =~ s/$_base_variable/$_base_value/g;
323 }
324  
325 # path params
326 if ( exists $args{'logging_grafanacloudlogs_name'}) {
327 my $_base_variable = "{" . "logging_grafanacloudlogs_name" . "}";
328 my $_base_value = $self->{api_client}->to_path_value($args{'logging_grafanacloudlogs_name'});
329 $_resource_path =~ s/$_base_variable/$_base_value/g;
330 }
331  
332 my $_body_data;
333 # authentication setting, if any
334 my $auth_settings = [qw(token )];
335  
336 # make the API Call
337 my $response = $self->{api_client}->call_api($_resource_path, $_method,
338 $query_params, $form_params,
339 $header_params, $_body_data, $auth_settings);
340 if (!$response) {
341 return;
342 }
343 my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
344 return $_response_object;
345 }
346  
347 #
348 # get_log_grafanacloudlogs
349 #
350 # Get a Grafana Cloud Logs log endpoint
351 #
352 # @param string $service_id Alphanumeric string identifying the service. (required)
353 # @param int $version_id Integer identifying a service version. (required)
354 # @param string $logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
355 {
356 my $params = {
357 'service_id' => {
358 data_type => 'string',
359 description => 'Alphanumeric string identifying the service.',
360 required => '1',
361 },
362 'version_id' => {
363 data_type => 'int',
364 description => 'Integer identifying a service version.',
365 required => '1',
366 },
367 'logging_grafanacloudlogs_name' => {
368 data_type => 'string',
369 description => 'The name for the real-time logging configuration.',
370 required => '1',
371 },
372 };
373 __PACKAGE__->method_documentation->{ 'get_log_grafanacloudlogs' } = {
374 summary => 'Get a Grafana Cloud Logs log endpoint',
375 params => $params,
376 returns => 'LoggingGrafanacloudlogsResponse',
377 };
378 }
379 # @return LoggingGrafanacloudlogsResponse
380 #
381 sub get_log_grafanacloudlogs {
382 my ($self, %args) = @_;
383  
384 # verify the required parameter 'service_id' is set
385 unless (exists $args{'service_id'}) {
386 croak("Missing the required parameter 'service_id' when calling get_log_grafanacloudlogs");
387 }
388  
389 # verify the required parameter 'version_id' is set
390 unless (exists $args{'version_id'}) {
391 croak("Missing the required parameter 'version_id' when calling get_log_grafanacloudlogs");
392 }
393  
394 # verify the required parameter 'logging_grafanacloudlogs_name' is set
395 unless (exists $args{'logging_grafanacloudlogs_name'}) {
396 croak("Missing the required parameter 'logging_grafanacloudlogs_name' when calling get_log_grafanacloudlogs");
397 }
398  
399 # parse inputs
400 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}';
401  
402 my $_method = 'GET';
403 my $query_params = {};
404 my $header_params = {};
405 my $form_params = {};
406  
407 # 'Accept' and 'Content-Type' header
408 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
409 if ($_header_accept) {
410 $header_params->{'Accept'} = $_header_accept;
411 }
412 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
413  
414 # path params
415 if ( exists $args{'service_id'}) {
416 my $_base_variable = "{" . "service_id" . "}";
417 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
418 $_resource_path =~ s/$_base_variable/$_base_value/g;
419 }
420  
421 # path params
422 if ( exists $args{'version_id'}) {
423 my $_base_variable = "{" . "version_id" . "}";
424 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
425 $_resource_path =~ s/$_base_variable/$_base_value/g;
426 }
427  
428 # path params
429 if ( exists $args{'logging_grafanacloudlogs_name'}) {
430 my $_base_variable = "{" . "logging_grafanacloudlogs_name" . "}";
431 my $_base_value = $self->{api_client}->to_path_value($args{'logging_grafanacloudlogs_name'});
432 $_resource_path =~ s/$_base_variable/$_base_value/g;
433 }
434  
435 my $_body_data;
436 # authentication setting, if any
437 my $auth_settings = [qw(token )];
438  
439 # make the API Call
440 my $response = $self->{api_client}->call_api($_resource_path, $_method,
441 $query_params, $form_params,
442 $header_params, $_body_data, $auth_settings);
443 if (!$response) {
444 return;
445 }
446 my $_response_object = $self->{api_client}->deserialize('LoggingGrafanacloudlogsResponse', $response);
447 return $_response_object;
448 }
449  
450 #
451 # list_log_grafanacloudlogs
452 #
453 # List Grafana Cloud Logs log endpoints
454 #
455 # @param string $service_id Alphanumeric string identifying the service. (required)
456 # @param int $version_id Integer identifying a service version. (required)
457 {
458 my $params = {
459 'service_id' => {
460 data_type => 'string',
461 description => 'Alphanumeric string identifying the service.',
462 required => '1',
463 },
464 'version_id' => {
465 data_type => 'int',
466 description => 'Integer identifying a service version.',
467 required => '1',
468 },
469 };
470 __PACKAGE__->method_documentation->{ 'list_log_grafanacloudlogs' } = {
471 summary => 'List Grafana Cloud Logs log endpoints',
472 params => $params,
473 returns => 'ARRAY[LoggingGrafanacloudlogsResponse]',
474 };
475 }
476 # @return ARRAY[LoggingGrafanacloudlogsResponse]
477 #
478 sub list_log_grafanacloudlogs {
479 my ($self, %args) = @_;
480  
481 # verify the required parameter 'service_id' is set
482 unless (exists $args{'service_id'}) {
483 croak("Missing the required parameter 'service_id' when calling list_log_grafanacloudlogs");
484 }
485  
486 # verify the required parameter 'version_id' is set
487 unless (exists $args{'version_id'}) {
488 croak("Missing the required parameter 'version_id' when calling list_log_grafanacloudlogs");
489 }
490  
491 # parse inputs
492 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs';
493  
494 my $_method = 'GET';
495 my $query_params = {};
496 my $header_params = {};
497 my $form_params = {};
498  
499 # 'Accept' and 'Content-Type' header
500 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
501 if ($_header_accept) {
502 $header_params->{'Accept'} = $_header_accept;
503 }
504 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
505  
506 # path params
507 if ( exists $args{'service_id'}) {
508 my $_base_variable = "{" . "service_id" . "}";
509 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
510 $_resource_path =~ s/$_base_variable/$_base_value/g;
511 }
512  
513 # path params
514 if ( exists $args{'version_id'}) {
515 my $_base_variable = "{" . "version_id" . "}";
516 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
517 $_resource_path =~ s/$_base_variable/$_base_value/g;
518 }
519  
520 my $_body_data;
521 # authentication setting, if any
522 my $auth_settings = [qw(token )];
523  
524 # make the API Call
525 my $response = $self->{api_client}->call_api($_resource_path, $_method,
526 $query_params, $form_params,
527 $header_params, $_body_data, $auth_settings);
528 if (!$response) {
529 return;
530 }
531 my $_response_object = $self->{api_client}->deserialize('ARRAY[LoggingGrafanacloudlogsResponse]', $response);
532 return $_response_object;
533 }
534  
535 #
536 # update_log_grafanacloudlogs
537 #
538 # Update a Grafana Cloud Logs log endpoint
539 #
540 # @param string $service_id Alphanumeric string identifying the service. (required)
541 # @param int $version_id Integer identifying a service version. (required)
542 # @param string $logging_grafanacloudlogs_name The name for the real-time logging configuration. (required)
543 # @param string $name The name for the real-time logging configuration. (optional)
544 # @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional)
545 # @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
546 # @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional)
547 # @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none')
548 # @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2)
549 # @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional)
550 # @param string $url The URL of the Loki instance in your Grafana stack. (optional)
551 # @param string $token The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. (optional)
552 # @param string $index The Stream Labels, a JSON string used to identify the stream. (optional)
553 {
554 my $params = {
555 'service_id' => {
556 data_type => 'string',
557 description => 'Alphanumeric string identifying the service.',
558 required => '1',
559 },
560 'version_id' => {
561 data_type => 'int',
562 description => 'Integer identifying a service version.',
563 required => '1',
564 },
565 'logging_grafanacloudlogs_name' => {
566 data_type => 'string',
567 description => 'The name for the real-time logging configuration.',
568 required => '1',
569 },
570 'name' => {
571 data_type => 'string',
572 description => 'The name for the real-time logging configuration.',
573 required => '0',
574 },
575 'placement' => {
576 data_type => 'string',
577 description => 'Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. ',
578 required => '0',
579 },
580 'response_condition' => {
581 data_type => 'string',
582 description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.',
583 required => '0',
584 },
585 'format' => {
586 data_type => 'string',
587 description => 'A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).',
588 required => '0',
589 },
590 'log_processing_region' => {
591 data_type => 'string',
592 description => 'The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.',
593 required => '0',
594 },
595 'format_version' => {
596 data_type => 'int',
597 description => 'The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. ',
598 required => '0',
599 },
600 'user' => {
601 data_type => 'string',
602 description => 'The Grafana Cloud Logs Dataset you want to log to.',
603 required => '0',
604 },
605 'url' => {
606 data_type => 'string',
607 description => 'The URL of the Loki instance in your Grafana stack.',
608 required => '0',
609 },
610 'token' => {
611 data_type => 'string',
612 description => 'The Grafana Access Policy token with `logs:write` access scoped to your Loki instance.',
613 required => '0',
614 },
615 'index' => {
616 data_type => 'string',
617 description => 'The Stream Labels, a JSON string used to identify the stream.',
618 required => '0',
619 },
620 };
621 __PACKAGE__->method_documentation->{ 'update_log_grafanacloudlogs' } = {
622 summary => 'Update a Grafana Cloud Logs log endpoint',
623 params => $params,
624 returns => 'LoggingGrafanacloudlogsResponse',
625 };
626 }
627 # @return LoggingGrafanacloudlogsResponse
628 #
629 sub update_log_grafanacloudlogs {
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 update_log_grafanacloudlogs");
635 }
636  
637 # verify the required parameter 'version_id' is set
638 unless (exists $args{'version_id'}) {
639 croak("Missing the required parameter 'version_id' when calling update_log_grafanacloudlogs");
640 }
641  
642 # verify the required parameter 'logging_grafanacloudlogs_name' is set
643 unless (exists $args{'logging_grafanacloudlogs_name'}) {
644 croak("Missing the required parameter 'logging_grafanacloudlogs_name' when calling update_log_grafanacloudlogs");
645 }
646  
647 # parse inputs
648 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/grafanacloudlogs/{logging_grafanacloudlogs_name}';
649  
650 my $_method = 'PUT';
651 my $query_params = {};
652 my $header_params = {};
653 my $form_params = {};
654  
655 # 'Accept' and 'Content-Type' header
656 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
657 if ($_header_accept) {
658 $header_params->{'Accept'} = $_header_accept;
659 }
660 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
661  
662 # path params
663 if ( exists $args{'service_id'}) {
664 my $_base_variable = "{" . "service_id" . "}";
665 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
666 $_resource_path =~ s/$_base_variable/$_base_value/g;
667 }
668  
669 # path params
670 if ( exists $args{'version_id'}) {
671 my $_base_variable = "{" . "version_id" . "}";
672 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
673 $_resource_path =~ s/$_base_variable/$_base_value/g;
674 }
675  
676 # path params
677 if ( exists $args{'logging_grafanacloudlogs_name'}) {
678 my $_base_variable = "{" . "logging_grafanacloudlogs_name" . "}";
679 my $_base_value = $self->{api_client}->to_path_value($args{'logging_grafanacloudlogs_name'});
680 $_resource_path =~ s/$_base_variable/$_base_value/g;
681 }
682  
683 # form params
684 if ( exists $args{'name'} ) {
685 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
686 }
687  
688 # form params
689 if ( exists $args{'placement'} ) {
690 $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'});
691 }
692  
693 # form params
694 if ( exists $args{'response_condition'} ) {
695 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
696 }
697  
698 # form params
699 if ( exists $args{'format'} ) {
700 $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'});
701 }
702  
703 # form params
704 if ( exists $args{'log_processing_region'} ) {
705 $form_params->{'log_processing_region'} = $self->{api_client}->to_form_value($args{'log_processing_region'});
706 }
707  
708 # form params
709 if ( exists $args{'format_version'} ) {
710 $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'});
711 }
712  
713 # form params
714 if ( exists $args{'user'} ) {
715 $form_params->{'user'} = $self->{api_client}->to_form_value($args{'user'});
716 }
717  
718 # form params
719 if ( exists $args{'url'} ) {
720 $form_params->{'url'} = $self->{api_client}->to_form_value($args{'url'});
721 }
722  
723 # form params
724 if ( exists $args{'token'} ) {
725 $form_params->{'token'} = $self->{api_client}->to_form_value($args{'token'});
726 }
727  
728 # form params
729 if ( exists $args{'index'} ) {
730 $form_params->{'index'} = $self->{api_client}->to_form_value($args{'index'});
731 }
732  
733 my $_body_data;
734 # authentication setting, if any
735 my $auth_settings = [qw(token )];
736  
737 # make the API Call
738 my $response = $self->{api_client}->call_api($_resource_path, $_method,
739 $query_params, $form_params,
740 $header_params, $_body_data, $auth_settings);
741 if (!$response) {
742 return;
743 }
744 my $_response_object = $self->{api_client}->deserialize('LoggingGrafanacloudlogsResponse', $response);
745 return $_response_object;
746 }
747  
748 1;