Wrapper Types


Most fields in the Google Ads API use wrapper classes rather than primitive value types. For example, the campaign's name field is a Google::Protobuf::StringValue, not a String. This is done because some fields have a meaningful difference between the default value and no value, which is enabled by wrapper classes. They exist on all fields in the API for consistency--you can expect each field to work the same way.

As usual, you can bypass this utility and use the wrapper classes manually. If you prefer, the built in shortcut can be used like this:

campaign.name = client.wrapper.string("Example Campaign")