Hi,

Thanks for pointing it out. v10.1 still requires all those
xxxSpecified fields to be mentioned when setting nullable fields,
whereas v11.1 doesn't. I wrote the code samples for v11.1 and moved
them to v10.1 without noticing the missing xxxSpecified statements.
The code should look like:

AlertQuery query = new AlertQuery();
query.filterSpec = FilterSpec.ALL;
query.filterSpecSpecified = true;
query.clientSpec = ClientSpec.ALL;
query.clientSpecSpecified = true;
query.triggerTimeSpec = TriggerTimeSpec.ALL_TIME;
query.triggerTimeSpecSpecified = true;
query.severities = new AlertSeverity[] { AlertSeverity.GREEN,
AlertSeverity.YELLOW,
    AlertSeverity.RED};
query.types = new AlertType[] {AlertType.CAMPAIGN_ENDING,
AlertType.CAMPAIGN_ENDED};

// Create the selector.
AlertSelector selector = new AlertSelector();
selector.query = query;
selector.paging = new Paging();
selector.paging.startIndex = 0;
selector.paging.startIndexSpecified = true;
selector.paging.numberResults = 10;
selector.paging.numberResultsSpecified = true;

I'll submit a patch for the new code samples later today.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Oct 12, 7:37 pm, guig <[email protected]> wrote:
> Hello,
>
> I use AlertService like in the example and I have this error message:
>
> [RequiredError.REQUIRED @ selector.query.triggerTimeSpec,
> RequiredError.REQUIRED @ selector.query.clientSpec,
> RequiredError.REQUIRED @ selector.query.filterSpec]
>
> when i call AlertPage page = alertService.get(selector);

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to