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   97704 use warnings;
  3         12  
  3         70  
18 3     3   12 use base qw(Google::Ads::GoogleAds::BaseEntity);
  3         5  
  3         79  
19 3     3   13  
  3         6  
  3         703  
20             use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
21 3     3   695  
  3         6  
  3         951  
22             my ($class, $args) = @_;
23             my $self = {
24 14     14 0 2575 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             biddingStrategySystemStatus => $args->{biddingStrategySystemStatus},
33             biddingStrategyType => $args->{biddingStrategyType},
34             campaignBudget => $args->{campaignBudget},
35             campaignGroup => $args->{campaignGroup},
36             commission => $args->{commission},
37             dynamicSearchAdsSetting => $args->{dynamicSearchAdsSetting},
38             endDate => $args->{endDate},
39             excludedParentAssetFieldTypes => $args->{excludedParentAssetFieldTypes},
40             experimentType => $args->{experimentType},
41             finalUrlSuffix => $args->{finalUrlSuffix},
42             frequencyCaps => $args->{frequencyCaps},
43             geoTargetTypeSetting => $args->{geoTargetTypeSetting},
44             hotelSetting => $args->{hotelSetting},
45             id => $args->{id},
46             labels => $args->{labels},
47             localCampaignSetting => $args->{localCampaignSetting},
48             localServicesCampaignSettings => $args->{localServicesCampaignSettings},
49             manualCpa => $args->{manualCpa},
50             manualCpc => $args->{manualCpc},
51             manualCpm => $args->{manualCpm},
52             manualCpv => $args->{manualCpv},
53             maximizeConversionValue => $args->{maximizeConversionValue},
54             maximizeConversions => $args->{maximizeConversions},
55             name => $args->{name},
56             networkSettings => $args->{networkSettings},
57             optimizationGoalSetting => $args->{optimizationGoalSetting},
58             optimizationScore => $args->{optimizationScore},
59             paymentMode => $args->{paymentMode},
60             percentCpc => $args->{percentCpc},
61             performanceMaxUpgrade => $args->{performanceMaxUpgrade},
62             realTimeBiddingSetting => $args->{realTimeBiddingSetting},
63             resourceName => $args->{resourceName},
64             selectiveOptimization => $args->{selectiveOptimization},
65             servingStatus => $args->{servingStatus},
66             shoppingSetting => $args->{shoppingSetting},
67             startDate => $args->{startDate},
68             status => $args->{status},
69             targetCpa => $args->{targetCpa},
70             targetCpm => $args->{targetCpm},
71             targetImpressionShare => $args->{targetImpressionShare},
72             targetRoas => $args->{targetRoas},
73             targetSpend => $args->{targetSpend},
74             targetingSetting => $args->{targetingSetting},
75             trackingSetting => $args->{trackingSetting},
76             trackingUrlTemplate => $args->{trackingUrlTemplate},
77             urlCustomParameters => $args->{urlCustomParameters},
78             urlExpansionOptOut => $args->{urlExpansionOptOut},
79             vanityPharma => $args->{vanityPharma},
80             videoBrandSafetySuitability => $args->{videoBrandSafetySuitability}};
81              
82 14         236 # Delete the unassigned fields in this object for a more concise JSON payload
83             remove_unassigned_fields($self, $args);
84              
85 14         36 bless $self, $class;
86             return $self;
87 14         37 }
88 14         42  
89             1;