Fastly/LoggingBigqueryApi.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_log_bigquery
506.0
create_log_bigquery
420.0
delete_log_bigquery
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::LoggingBigqueryApi;
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_bigquery
51 #
52 # Create a BigQuery 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 of the BigQuery logging object. Used as a primary key for API access. (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/). Must produce JSON that matches the schema of your BigQuery table. (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 Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional)
63 # @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional)
64 # @param string $account_name The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided. (optional)
65 # @param string $dataset Your BigQuery dataset. (optional)
66 # @param string $table Your BigQuery table. (optional)
67 # @param string $template_suffix BigQuery table name suffix template. Optional. (optional)
68 # @param string $project_id Your Google Cloud Platform project ID. Required (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 'name' => {
82 data_type => 'string',
83 description => 'The name of the BigQuery logging object. Used as a primary key for API access.',
84 required => '0',
85 },
86 'placement' => {
87 data_type => 'string',
88 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`. ',
89 required => '0',
90 },
91 'response_condition' => {
92 data_type => 'string',
93 description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.',
94 required => '0',
95 },
96 'format' => {
97 data_type => 'string',
98 description => 'A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table.',
99 required => '0',
100 },
101 'log_processing_region' => {
102 data_type => 'string',
103 description => 'The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.',
104 required => '0',
105 },
106 'format_version' => {
107 data_type => 'int',
108 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`. ',
109 required => '0',
110 },
111 'user' => {
112 data_type => 'string',
113 description => 'Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.',
114 required => '0',
115 },
116 'secret_key' => {
117 data_type => 'string',
118 description => 'Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.',
119 required => '0',
120 },
121 'account_name' => {
122 data_type => 'string',
123 description => 'The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.',
124 required => '0',
125 },
126 'dataset' => {
127 data_type => 'string',
128 description => 'Your BigQuery dataset.',
129 required => '0',
130 },
131 'table' => {
132 data_type => 'string',
133 description => 'Your BigQuery table.',
134 required => '0',
135 },
136 'template_suffix' => {
137 data_type => 'string',
138 description => 'BigQuery table name suffix template. Optional.',
139 required => '0',
140 },
141 'project_id' => {
142 data_type => 'string',
143 description => 'Your Google Cloud Platform project ID. Required',
144 required => '0',
145 },
146 };
147 __PACKAGE__->method_documentation->{ 'create_log_bigquery' } = {
148 summary => 'Create a BigQuery log endpoint',
149 params => $params,
150 returns => 'LoggingBigqueryResponse',
151 };
152 }
153 # @return LoggingBigqueryResponse
154 #
155 sub create_log_bigquery {
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_log_bigquery");
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_log_bigquery");
166 }
167  
168 # parse inputs
169 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery';
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{'name'} ) {
199 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
200 }
201  
202 # form params
203 if ( exists $args{'placement'} ) {
204 $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'});
205 }
206  
207 # form params
208 if ( exists $args{'response_condition'} ) {
209 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
210 }
211  
212 # form params
213 if ( exists $args{'format'} ) {
214 $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'});
215 }
216  
217 # form params
218 if ( exists $args{'log_processing_region'} ) {
219 $form_params->{'log_processing_region'} = $self->{api_client}->to_form_value($args{'log_processing_region'});
220 }
221  
222 # form params
223 if ( exists $args{'format_version'} ) {
224 $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'});
225 }
226  
227 # form params
228 if ( exists $args{'user'} ) {
229 $form_params->{'user'} = $self->{api_client}->to_form_value($args{'user'});
230 }
231  
232 # form params
233 if ( exists $args{'secret_key'} ) {
234 $form_params->{'secret_key'} = $self->{api_client}->to_form_value($args{'secret_key'});
235 }
236  
237 # form params
238 if ( exists $args{'account_name'} ) {
239 $form_params->{'account_name'} = $self->{api_client}->to_form_value($args{'account_name'});
240 }
241  
242 # form params
243 if ( exists $args{'dataset'} ) {
244 $form_params->{'dataset'} = $self->{api_client}->to_form_value($args{'dataset'});
245 }
246  
247 # form params
248 if ( exists $args{'table'} ) {
249 $form_params->{'table'} = $self->{api_client}->to_form_value($args{'table'});
250 }
251  
252 # form params
253 if ( exists $args{'template_suffix'} ) {
254 $form_params->{'template_suffix'} = $self->{api_client}->to_form_value($args{'template_suffix'});
255 }
256  
257 # form params
258 if ( exists $args{'project_id'} ) {
259 $form_params->{'project_id'} = $self->{api_client}->to_form_value($args{'project_id'});
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('LoggingBigqueryResponse', $response);
274 return $_response_object;
275 }
276  
277 #
278 # delete_log_bigquery
279 #
280 # Delete a BigQuery log endpoint
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 $logging_bigquery_name The name for the real-time logging configuration. (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 'logging_bigquery_name' => {
298 data_type => 'string',
299 description => 'The name for the real-time logging configuration.',
300 required => '1',
301 },
302 };
303 __PACKAGE__->method_documentation->{ 'delete_log_bigquery' } = {
304 summary => 'Delete a BigQuery log endpoint',
305 params => $params,
306 returns => 'InlineResponse200',
307 };
308 }
309 # @return InlineResponse200
310 #
311 sub delete_log_bigquery {
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_log_bigquery");
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_log_bigquery");
322 }
323  
324 # verify the required parameter 'logging_bigquery_name' is set
325 unless (exists $args{'logging_bigquery_name'}) {
326 croak("Missing the required parameter 'logging_bigquery_name' when calling delete_log_bigquery");
327 }
328  
329 # parse inputs
330 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_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{'logging_bigquery_name'}) {
360 my $_base_variable = "{" . "logging_bigquery_name" . "}";
361 my $_base_value = $self->{api_client}->to_path_value($args{'logging_bigquery_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_log_bigquery
382 #
383 # Get a BigQuery log endpoint
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 $logging_bigquery_name The name for the real-time logging configuration. (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 'logging_bigquery_name' => {
401 data_type => 'string',
402 description => 'The name for the real-time logging configuration.',
403 required => '1',
404 },
405 };
406 __PACKAGE__->method_documentation->{ 'get_log_bigquery' } = {
407 summary => 'Get a BigQuery log endpoint',
408 params => $params,
409 returns => 'LoggingBigqueryResponse',
410 };
411 }
412 # @return LoggingBigqueryResponse
413 #
414 sub get_log_bigquery {
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_log_bigquery");
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_log_bigquery");
425 }
426  
427 # verify the required parameter 'logging_bigquery_name' is set
428 unless (exists $args{'logging_bigquery_name'}) {
429 croak("Missing the required parameter 'logging_bigquery_name' when calling get_log_bigquery");
430 }
431  
432 # parse inputs
433 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_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{'logging_bigquery_name'}) {
463 my $_base_variable = "{" . "logging_bigquery_name" . "}";
464 my $_base_value = $self->{api_client}->to_path_value($args{'logging_bigquery_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('LoggingBigqueryResponse', $response);
480 return $_response_object;
481 }
482  
483 #
484 # list_log_bigquery
485 #
486 # List BigQuery log endpoints
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_log_bigquery' } = {
504 summary => 'List BigQuery log endpoints',
505 params => $params,
506 returns => 'ARRAY[LoggingBigqueryResponse]',
507 };
508 }
509 # @return ARRAY[LoggingBigqueryResponse]
510 #
511 sub list_log_bigquery {
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_log_bigquery");
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_log_bigquery");
522 }
523  
524 # parse inputs
525 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery';
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[LoggingBigqueryResponse]', $response);
565 return $_response_object;
566 }
567  
568 #
569 # update_log_bigquery
570 #
571 # Update a BigQuery log endpoint
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 $logging_bigquery_name The name for the real-time logging configuration. (required)
576 # @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional)
577 # @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)
578 # @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
579 # @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional)
580 # @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')
581 # @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)
582 # @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional)
583 # @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional)
584 # @param string $account_name The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided. (optional)
585 # @param string $dataset Your BigQuery dataset. (optional)
586 # @param string $table Your BigQuery table. (optional)
587 # @param string $template_suffix BigQuery table name suffix template. Optional. (optional)
588 # @param string $project_id Your Google Cloud Platform project ID. Required (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 'logging_bigquery_name' => {
602 data_type => 'string',
603 description => 'The name for the real-time logging configuration.',
604 required => '1',
605 },
606 'name' => {
607 data_type => 'string',
608 description => 'The name of the BigQuery logging object. Used as a primary key for API access.',
609 required => '0',
610 },
611 'placement' => {
612 data_type => 'string',
613 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`. ',
614 required => '0',
615 },
616 'response_condition' => {
617 data_type => 'string',
618 description => 'The name of an existing condition in the configured endpoint, or leave blank to always execute.',
619 required => '0',
620 },
621 'format' => {
622 data_type => 'string',
623 description => 'A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table.',
624 required => '0',
625 },
626 'log_processing_region' => {
627 data_type => 'string',
628 description => 'The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.',
629 required => '0',
630 },
631 'format_version' => {
632 data_type => 'int',
633 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`. ',
634 required => '0',
635 },
636 'user' => {
637 data_type => 'string',
638 description => 'Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.',
639 required => '0',
640 },
641 'secret_key' => {
642 data_type => 'string',
643 description => 'Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.',
644 required => '0',
645 },
646 'account_name' => {
647 data_type => 'string',
648 description => 'The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.',
649 required => '0',
650 },
651 'dataset' => {
652 data_type => 'string',
653 description => 'Your BigQuery dataset.',
654 required => '0',
655 },
656 'table' => {
657 data_type => 'string',
658 description => 'Your BigQuery table.',
659 required => '0',
660 },
661 'template_suffix' => {
662 data_type => 'string',
663 description => 'BigQuery table name suffix template. Optional.',
664 required => '0',
665 },
666 'project_id' => {
667 data_type => 'string',
668 description => 'Your Google Cloud Platform project ID. Required',
669 required => '0',
670 },
671 };
672 __PACKAGE__->method_documentation->{ 'update_log_bigquery' } = {
673 summary => 'Update a BigQuery log endpoint',
674 params => $params,
675 returns => 'LoggingBigqueryResponse',
676 };
677 }
678 # @return LoggingBigqueryResponse
679 #
680 sub update_log_bigquery {
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_log_bigquery");
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_log_bigquery");
691 }
692  
693 # verify the required parameter 'logging_bigquery_name' is set
694 unless (exists $args{'logging_bigquery_name'}) {
695 croak("Missing the required parameter 'logging_bigquery_name' when calling update_log_bigquery");
696 }
697  
698 # parse inputs
699 my $_resource_path = '/service/{service_id}/version/{version_id}/logging/bigquery/{logging_bigquery_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{'logging_bigquery_name'}) {
729 my $_base_variable = "{" . "logging_bigquery_name" . "}";
730 my $_base_value = $self->{api_client}->to_path_value($args{'logging_bigquery_name'});
731 $_resource_path =~ s/$_base_variable/$_base_value/g;
732 }
733  
734 # form params
735 if ( exists $args{'name'} ) {
736 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
737 }
738  
739 # form params
740 if ( exists $args{'placement'} ) {
741 $form_params->{'placement'} = $self->{api_client}->to_form_value($args{'placement'});
742 }
743  
744 # form params
745 if ( exists $args{'response_condition'} ) {
746 $form_params->{'response_condition'} = $self->{api_client}->to_form_value($args{'response_condition'});
747 }
748  
749 # form params
750 if ( exists $args{'format'} ) {
751 $form_params->{'format'} = $self->{api_client}->to_form_value($args{'format'});
752 }
753  
754 # form params
755 if ( exists $args{'log_processing_region'} ) {
756 $form_params->{'log_processing_region'} = $self->{api_client}->to_form_value($args{'log_processing_region'});
757 }
758  
759 # form params
760 if ( exists $args{'format_version'} ) {
761 $form_params->{'format_version'} = $self->{api_client}->to_form_value($args{'format_version'});
762 }
763  
764 # form params
765 if ( exists $args{'user'} ) {
766 $form_params->{'user'} = $self->{api_client}->to_form_value($args{'user'});
767 }
768  
769 # form params
770 if ( exists $args{'secret_key'} ) {
771 $form_params->{'secret_key'} = $self->{api_client}->to_form_value($args{'secret_key'});
772 }
773  
774 # form params
775 if ( exists $args{'account_name'} ) {
776 $form_params->{'account_name'} = $self->{api_client}->to_form_value($args{'account_name'});
777 }
778  
779 # form params
780 if ( exists $args{'dataset'} ) {
781 $form_params->{'dataset'} = $self->{api_client}->to_form_value($args{'dataset'});
782 }
783  
784 # form params
785 if ( exists $args{'table'} ) {
786 $form_params->{'table'} = $self->{api_client}->to_form_value($args{'table'});
787 }
788  
789 # form params
790 if ( exists $args{'template_suffix'} ) {
791 $form_params->{'template_suffix'} = $self->{api_client}->to_form_value($args{'template_suffix'});
792 }
793  
794 # form params
795 if ( exists $args{'project_id'} ) {
796 $form_params->{'project_id'} = $self->{api_client}->to_form_value($args{'project_id'});
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('LoggingBigqueryResponse', $response);
811 return $_response_object;
812 }
813  
814 1;