Thanks Anthony, one more questions. I am trying to get the cpc bid from the mutate job response. and i am using the following code:
for result in result_response['SimpleMutateResult']['results']:
print(result.AdGroupCriterion.biddingStrategyConfiguration.bids[0].bid.microAmount)
but the above code sometimes gives the cpm bid instead of cpcbid because the object "bids[0]" is sometimes cpc and other times cpm. How do i change the above code to get cpc bid always?.. below is the response object and the code i tried, which did not work and thre an error.
biddingStrategyConfiguration =
(BiddingStrategyConfiguration){
biddingStrategyType = "MANUAL_CPC"
biddingStrategySource = "CAMPAIGN"
biddingScheme =
(ManualCpcBiddingScheme){
BiddingScheme.Type = "ManualCpcBiddingScheme"
enhancedCpcEnabled = False
}
bids[] =
(CpmBid){
Bids.Type = "CpmBid"
bid =
(Money){
ComparableValue.Type = "Money"
microAmount = 250000
}
cpmBidSource = "ADGROUP"
},
(CpcBid){
Bids.Type = "CpcBid"
bid =
(Money){
ComparableValue.Type = "Money"
microAmount = 3600000
}
cpcBidSource = "CRITERION"
},
sometimes bids[0] is cpc and other times its cpm.. how to refer to cpcbid in the object bids[]?
i tried:
print(result.AdGroupCriterion.biddingStrategyConfiguration.bids['CpcBid'].bid.microAmount)
AttributeError: 'BiddingStrategyConfiguration' object has no attribute 'CpcBid'