Upgrading from Google Ads API v4 to v5 - "field presence" vs. "wrapper types "

50 views
Skip to first unread message

Mat

unread,
Oct 6, 2020, 10:28:03 AM10/6/20
to AdWords API and Google Ads API Forum
Hi,

in the upgrading guide, you'll find this block of text:

###
Approximately half of our resources now use field presence such as optional string and optional double instead of wrapper types such as StringValue and DoubleValue. The rest of the resources will change to field presence in a future release.

For the fields mentioned here, update your code to remove wrapper types.

###

I've studied the pages linked in that text, but that did not really help in figuring out how we have to update our code. 

I've then checked the Github change log of the Python examples and learned that the only structural change I see is the missing ".value" part while assigning a value to a resource and vice versa.

Is that basically what we should do? Searching for ".value" in the v4-code and deleting it?
And would you recommend to mirgrate now or better wait until all of the resources are updated "in a future release"?

Regards

Mat

Google Ads API Forum Advisor Prod

unread,
Oct 6, 2020, 11:45:31 PM10/6/20
to m...@keyword-experte.de, adwor...@googlegroups.com
Hi Mat,

Thank you for reaching out to our support team.

We currently do not have documentation pointing out each of the specific changes should make in your code(s), however, you can refer to our Migration guide for all the other things you would need to consider.

Should you have questions or encounter issues related to the services or the features of the Ads API during the migration, you may point them out to our team and we'll be happy to assist you. Also, in the event that you may have questions specific to the Python client library, you can reach out directly to the Python client library owners via this Github link.

As for your question whether it is recommended now to migrate or to wait for a future release, allow me to reach out to the rest of our team so we can discuss and gather the information you need.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZYSu:ref

Google Ads API Forum Advisor Prod

unread,
Oct 7, 2020, 3:50:03 PM10/7/20
to m...@keyword-experte.de, adwor...@googlegroups.com
Hello Mat,

This change affects some languages more than others. Python is one of the lucky programming languages that has very little that needs to be done to migrate. As you pointed out, the only structural difference is the .value.  As for when you decide to move, that's up to you. This is just personal preference based on years of doing software maintenance, but considering Python has so little that changes, I would already start moving to the new version so I could pick up the new features. 

Regards,
Nadine Wang, Google Ads API Team 

 

ref:_00D1U1174p._5004Q25ZYSu:ref

Mat

unread,
Oct 8, 2020, 1:31:57 AM10/8/20
to AdWords API and Google Ads API Forum
Hi Peter and Nadine,

thank you very much!

Regards
Mat

Reply all
Reply to author
Forward
0 new messages