File Coverage

blib/lib/Google/Ads/GoogleAds/LongRunning/Operation.pm
Criterion Covered Total %
statement 12 17 70.5
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 23 69.5


line stmt bran cond sub pod time code
1             # Copyright 2019, Google LLC
2             #
3             # Licensed under the Apache License, Version 2.0 (the "License");
4             # you may not use this file except in compliance with the License.
5             # You may obtain a copy of the License at
6             #
7             # http://www.apache.org/licenses/LICENSE-2.0
8             #
9             # Unless required by applicable law or agreed to in writing, software
10             # distributed under the License is distributed on an "AS IS" BASIS,
11             # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12             # See the License for the specific language governing permissions and
13             # limitations under the License.
14             #
15             # Represents a long-running operation that is the result of a network
16             # API call.
17              
18              
19             use strict;
20 1     1   666 use warnings;
  1         2  
  1         21  
21 1     1   4 use base qw(Google::Ads::GoogleAds::BaseEntity);
  1         2  
  1         29  
22 1     1   5  
  1         2  
  1         62  
23             use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
24 1     1   6  
  1         1  
  1         139  
25             my ($class, $args) = @_;
26             my $self = {
27 0     0 0   name => $args->{name},
28             metadata => $args->{metadata},
29             done => $args->{done},
30             error => $args->{error},
31             response => $args->{response}};
32              
33 0           # Delete the unassigned fields in this object for a more concise JSON payload
34             remove_unassigned_fields($self, $args);
35              
36 0           bless $self, $class;
37             return $self;
38 0           }
39 0            
40             1;
41              
42             =pod
43              
44             =head1 NAME
45              
46             Google::Ads::GoogleAds::LongRunning::Operation
47              
48             =head1 DESCRIPTION
49              
50             Represents a long-running operation that is the result of a network API call.
51              
52             =head1 ATTRIBUTES
53              
54             =head2 name
55              
56             The server-assigned name, which is only unique within the same service that
57             originally returns it.
58              
59             =head2 metadata
60              
61             Service-specific metadata associated with the operation. It typically contains
62             progress information and common metadata such as create time.
63              
64             =head2 done
65              
66             If the value is "false", it means the operation is still in progress. If "true",
67             the operation is completed.
68              
69             =head2 error
70              
71             The error result of the operation in case of failure or cancellation.
72              
73             =head2 response
74              
75             The normal response of the operation in case of success.
76              
77             =head1 LICENSE AND COPYRIGHT
78              
79             Copyright 2019 Google LLC
80              
81             Licensed under the Apache License, Version 2.0 (the "License");
82             you may not use this file except in compliance with the License.
83             You may obtain a copy of the License at
84              
85             http://www.apache.org/licenses/LICENSE-2.0
86              
87             Unless required by applicable law or agreed to in writing, software
88             distributed under the License is distributed on an "AS IS" BASIS,
89             WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90             See the License for the specific language governing permissions and
91             limitations under the License.
92              
93             =head1 REPOSITORY INFORMATION
94              
95             $Rev: $
96             $LastChangedBy: $
97             $Id: $
98              
99             =cut