Hey Will,

Yes, the field mask helper is actually pretty simple. You can also pass None as 
one of the paramters, and it will compare the other object to a blank version 
of the same type. I just did some simple experimentation and it doesn't seem as 
though it handles oneof fields (like bidding strategy) very well. For example, 
if I compare a campaign with manual_cpc.enhanced_cpc_enabled = True to another 
campaign with manual_cpm set to {} it doesn't acknowledge the change in field, 
it just seems to think that manual_cpc has been unset.

In general the way to unset any field (in your case, to remove the resource 
name for a portfolio bidding strategy) is to leave the field blank and manually 
add the field to the update_mask. The API will see that you intend to update 
that field, see that it's blank, and assume you meant to return it to it's 
default value, in this case an empty string. At some point in the distant 
future I'd like for the update_mask logic to be more implicit and require no 
manual intervention, but that's unlikely to happen any time soon.

If you have any more questions or issues related to this, please feel free to 
add another issue to the GitHub repo.

Thanks,
Ben, Google Ads API Team
ref:_00D1U1174p._5004Q2Rw2hc:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/t9GV8000000000000000000000000000000000000000000000R3WWV000Ygi-4JKzQzSC_ZG5b5S32Q%40sfdc.net.
      • ... Will Schymik
      • ... Will Schymik
  • Re... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Will Schymik
      • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Will Schymik
      • ... Will Schymik
      • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Will Schymik
      • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to