File Coverage

blib/lib/Google/Ads/GoogleAds/V11/Resources/Campaign.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 22 23 95.6


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 3     3   98230 use warnings;
  3         12  
  3         74  
18 3     3   18 use base qw(Google::Ads::GoogleAds::BaseEntity);
  3         6  
  3         67  
19 3     3   17  
  3         12  
  3         743  
20             use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
21 3     3   708  
  3         17  
  3         912  
22             my ($class, $args) = @_;
23             my $self = {
24 14     14 0 2805 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             localServicesCampaignSettings => $args->{localServicesCampaignSettings},
48             manualCpa => $args->{manualCpa},
49             manualCpc => $args->{manualCpc},
50             manualCpm => $args->{manualCpm},
51             manualCpv => $args->{manualCpv},
52             maximizeConversionValue => $args->{maximizeConversionValue},
53             maximizeConversions => $args->{maximizeConversions},
54             name => $args->{name},
55             networkSettings => $args->{networkSettings},
56             optimizationGoalSetting => $args->{optimizationGoalSetting},
57             optimizationScore => $args->{optimizationScore},
58             paymentMode => $args->{paymentMode},
59             percentCpc => $args->{percentCpc},
60             performanceMaxUpgrade => $args->{performanceMaxUpgrade},
61             realTimeBiddingSetting => $args->{realTimeBiddingSetting},
62             resourceName => $args->{resourceName},
63             selectiveOptimization => $args->{selectiveOptimization},
64             servingStatus => $args->{servingStatus},
65             shoppingSetting => $args->{shoppingSetting},
66             startDate => $args->{startDate},
67             status => $args->{status},
68             targetCpa => $args->{targetCpa},
69             targetCpm => $args->{targetCpm},
70             targetImpressionShare => $args->{targetImpressionShare},
71             targetRoas => $args->{targetRoas},
72             targetSpend => $args->{targetSpend},
73             targetingSetting => $args->{targetingSetting},
74             trackingSetting => $args->{trackingSetting},
75             trackingUrlTemplate => $args->{trackingUrlTemplate},
76             urlCustomParameters => $args->{urlCustomParameters},
77             urlExpansionOptOut => $args->{urlExpansionOptOut},
78             vanityPharma => $args->{vanityPharma},
79             videoBrandSafetySuitability => $args->{videoBrandSafetySuitability}};
80              
81 14         225 # Delete the unassigned fields in this object for a more concise JSON payload
82             remove_unassigned_fields($self, $args);
83              
84 14         37 bless $self, $class;
85             return $self;
86 14         38 }
87 14         62  
88             1;