Hi Vinuntha,
Thanks for reaching out with this question! For future reference, this is the perfect type of question to post on the Issues tracker of the Github Repository for the library. It's really helpful to other users who might have the same question :)
The frequency_caps field on a campaign is a repeated message field, which means it's a list of message objects, in this case FrequencyCapEntry object. The proto3 documentation here explains how those fields work and how to manipulate them.
What you'll want to do is call the .add() method on the field, which will insert a FrequencyCapEntry instance into the repeated field and return it back. From there you can set fields on the object directly. Here's an example of it being done in the update_keyword.py example.
Hope that helps!
Best,
Ben Karl, Google Ads API Team
Hi Souvik,
No problem, since Campaign.frequency_caps is a non-scalar repeated field, you will need to initialize a FrequencyCapEntry message and append it, like you would a normal list in Python.
Our documentation actually has an example for this exact field.
Hope this helps! If you have any other specific questions about using the Python client library, please submit an issue to our GitHub Issues page.
Best,
Ben, Google Ads API Team