Module Expr Str ImportFrom alias Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore ListLoad Dict Str Str Str Dict Str Str Str NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If CompareIn Str NameLoad body For NameStore SubscriptLoad NameLoad Index Str body Print BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Str Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareGt Call NameLoad SubscriptLoad NameLoad Index Str Num body AugAssignAdd NameStore Call NameLoad SubscriptLoad NameLoad Index Str orelse Break If CompareGt NameLoad Num body Print BinOpMod Str NameLoad orelse Print Str decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad NameLoad
N/A N/A This code example approves all suggested ad units with 50 or more requests.

This feature is only available to DFP premium solution networks.
 googleads dfp N/A THRESHOLD_NUMBER_OF_REQUESTS 50 main N/A N/A client N/A N/A N/A suggested_ad_unit_service N/A N/A client GetService SuggestedAdUnitService version v201511 N/A values N/A N/A key value numRequests N/A xsi_type value NumberValue THRESHOLD_NUMBER_OF_REQUESTS N/A query WHERE numRequests > :numRequests N/A statement N/A N/A dfp FilterStatement query values N/A num_approved_suggested_ad_units 0 N/A True N/A N/A response N/A N/A suggested_ad_unit_service getSuggestedAdUnitsByStatement N/A N/A statement ToStatement N/A N/A results response N/A N/A suggested_ad_unit N/A response N/A results N/A N/A N/A Suggested ad unit with id '%s', and number of requests '%s' will be approved. N/A N/A suggested_ad_unit N/A id N/A suggested_ad_unit N/A numRequests N/A result N/A N/A suggested_ad_unit_service performSuggestedAdUnitAction N/A xsi_type ApproveSuggestedAdUnit N/A N/A statement ToStatement N/A N/A result N/A N/A int N/A result N/A numChanges 0 N/A N/A num_approved_suggested_ad_units N/A int N/A result N/A numChanges N/A N/A N/A N/A num_approved_suggested_ad_units 0 N/A N/A N/A Number of suggested ad units approved: %s num_approved_suggested_ad_units N/A N/A No suggested ad units were approved. N/A N/A N/A __name__ __main__ N/A N/A dfp_client N/A N/A N/A dfp DfpClient LoadFromStorage N/A N/A main dfp_client