File Coverage

blib/lib/Google/Ads/GoogleAds/V10/Resources/Campaign.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 2020, 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              
16             use strict;
17 1     1   814 use warnings;
  1         3  
  1         25  
18 1     1   5 use base qw(Google::Ads::GoogleAds::BaseEntity);
  1         3  
  1         34  
19 1     1   7  
  1         2  
  1         67  
20             use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
21 1     1   7  
  1         2  
  1         311  
22             my ($class, $args) = @_;
23             my $self = {
24 0     0 0   accessibleBiddingStrategy => $args->{accessibleBiddingStrategy},
25             adServingOptimizationStatus => $args->{adServingOptimizationStatus},
26             advertisingChannelSubType => $args->{advertisingChannelSubType},
27             advertisingChannelType => $args->{advertisingChannelType},
28             appCampaignSetting => $args->{appCampaignSetting},
29             audienceSetting => $args->{audienceSetting},
30             baseCampaign => $args->{baseCampaign},
31             biddingStrategy => $args->{biddingStrategy},
32             biddingStrategyType => $args->{biddingStrategyType},
33             campaignBudget => $args->{campaignBudget},
34             campaignGroup => $args->{campaignGroup},
35             commission => $args->{commission},
36             dynamicSearchAdsSetting => $args->{dynamicSearchAdsSetting},
37             endDate => $args->{endDate},
38             excludedParentAssetFieldTypes => $args->{excludedParentAssetFieldTypes},
39             experimentType => $args->{experimentType},
40             finalUrlSuffix => $args->{finalUrlSuffix},
41             frequencyCaps => $args->{frequencyCaps},
42             geoTargetTypeSetting => $args->{geoTargetTypeSetting},
43             hotelSetting => $args->{hotelSetting},
44             id => $args->{id},
45             labels => $args->{labels},
46             localCampaignSetting => $args->{localCampaignSetting},
47             manualCpc => $args->{manualCpc},
48             manualCpm => $args->{manualCpm},
49             manualCpv => $args->{manualCpv},
50             maximizeConversionValue => $args->{maximizeConversionValue},
51             maximizeConversions => $args->{maximizeConversions},
52             name => $args->{name},
53             networkSettings => $args->{networkSettings},
54             optimizationGoalSetting => $args->{optimizationGoalSetting},
55             optimizationScore => $args->{optimizationScore},
56             paymentMode => $args->{paymentMode},
57             percentCpc => $args->{percentCpc},
58             realTimeBiddingSetting => $args->{realTimeBiddingSetting},
59             resourceName => $args->{resourceName},
60             selectiveOptimization => $args->{selectiveOptimization},
61             servingStatus => $args->{servingStatus},
62             shoppingSetting => $args->{shoppingSetting},
63             startDate => $args->{startDate},
64             status => $args->{status},
65             targetCpa => $args->{targetCpa},
66             targetCpm => $args->{targetCpm},
67             targetImpressionShare => $args->{targetImpressionShare},
68             targetRoas => $args->{targetRoas},
69             targetSpend => $args->{targetSpend},
70             targetingSetting => $args->{targetingSetting},
71             trackingSetting => $args->{trackingSetting},
72             trackingUrlTemplate => $args->{trackingUrlTemplate},
73             urlCustomParameters => $args->{urlCustomParameters},
74             urlExpansionOptOut => $args->{urlExpansionOptOut},
75             vanityPharma => $args->{vanityPharma},
76             videoBrandSafetySuitability => $args->{videoBrandSafetySuitability}};
77              
78 0           # Delete the unassigned fields in this object for a more concise JSON payload
79             remove_unassigned_fields($self, $args);
80              
81 0           bless $self, $class;
82             return $self;
83 0           }
84 0            
85             1;