google-adwords-api 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/README +3 -3
- data/examples/{v201206/basic_operations/delete_ad_group.rb → v201209/adwords_for_video/add_video_campaign.rb} +41 -40
- data/examples/{v201206/basic_operations/pause_ad.rb → v201209/adwords_for_video/find_videos.rb} +33 -25
- data/examples/{v201206/basic_operations/get_keywords.rb → v201209/adwords_for_video/get_keyword_criteria.rb} +24 -27
- data/examples/{v201206/basic_operations/get_campaigns_with_awql.rb → v201209/adwords_for_video/get_targeting_groups.rb} +26 -18
- data/examples/{v201206/basic_operations/get_ad_groups.rb → v201209/adwords_for_video/get_video_campaign_criteria.rb} +22 -21
- data/examples/v201209/adwords_for_video/get_video_campaign_stats.rb +126 -0
- data/examples/{v201206/basic_operations/get_campaigns.rb → v201209/adwords_for_video/get_video_campaigns.rb} +16 -15
- data/examples/v201302/advanced_operations/create_and_attach_shared_keyword_set.rb +139 -0
- data/examples/v201302/advanced_operations/find_and_remove_criteria_from_shared_set.rb +173 -0
- data/lib/adwords_api/api_config.rb +17 -59
- data/lib/adwords_api/report_utils.rb +3 -19
- data/lib/adwords_api/{v201206/ad_param_service.rb → v201209/video_ad_service.rb} +8 -8
- data/lib/adwords_api/v201209/video_ad_service_registry.rb +46 -0
- data/lib/adwords_api/{v201206/campaign_ad_extension_service.rb → v201209/video_campaign_criterion_service.rb} +8 -8
- data/lib/adwords_api/v201209/video_campaign_criterion_service_registry.rb +47 -0
- data/lib/adwords_api/{v201206/bulk_mutate_job_service.rb → v201209/video_campaign_service.rb} +8 -8
- data/lib/adwords_api/v201209/video_campaign_service_registry.rb +46 -0
- data/lib/adwords_api/v201209/video_service.rb +42 -0
- data/lib/adwords_api/v201209/video_service_registry.rb +46 -0
- data/lib/adwords_api/{v201206/ad_group_ad_service.rb → v201209/video_targeting_group_criterion_service.rb} +8 -12
- data/lib/adwords_api/v201209/video_targeting_group_criterion_service_registry.rb +46 -0
- data/lib/adwords_api/{v201206/ad_extension_override_service.rb → v201209/video_targeting_group_service.rb} +8 -8
- data/lib/adwords_api/v201209/video_targeting_group_service_registry.rb +46 -0
- data/lib/adwords_api/v201302/ad_group_feed_service.rb +1 -1
- data/lib/adwords_api/v201302/ad_group_feed_service_registry.rb +2 -2
- data/lib/adwords_api/v201302/campaign_feed_service.rb +1 -1
- data/lib/adwords_api/v201302/campaign_feed_service_registry.rb +2 -2
- data/lib/adwords_api/v201302/feed_item_service.rb +1 -1
- data/lib/adwords_api/v201302/feed_item_service_registry.rb +3 -4
- data/lib/adwords_api/v201302/feed_service.rb +1 -1
- data/lib/adwords_api/v201302/feed_service_registry.rb +4 -5
- data/lib/adwords_api/{v201206/user_list_service.rb → v201302/shared_set_service.rb} +9 -9
- data/lib/adwords_api/v201302/shared_set_service_registry.rb +47 -0
- data/lib/adwords_api/version.rb +1 -1
- data/test/adwords_api/test_report_utils.rb +0 -89
- data/test/examples/v201302/test_advanced_operations.rb +10 -0
- data/test/templates/v201209/basic_operations_get_campaigns.def +1 -1
- data/test/templates/v201302/basic_operations_get_campaigns.def +1 -1
- data/test/templates/v201302/misc_use_oauth2_jwt.def +131 -0
- data/test/test_utils.rb +6 -2
- metadata +26 -121
- data/examples/v201206/account_management/create_account.rb +0 -87
- data/examples/v201206/account_management/get_account_alerts.rb +0 -114
- data/examples/v201206/account_management/get_account_changes.rb +0 -137
- data/examples/v201206/account_management/get_account_hierarchy.rb +0 -95
- data/examples/v201206/account_management/get_client_customer_id.rb +0 -88
- data/examples/v201206/account_management/get_client_unit_usage.rb +0 -90
- data/examples/v201206/basic_operations/add_ad_groups.rb +0 -136
- data/examples/v201206/basic_operations/add_campaigns.rb +0 -151
- data/examples/v201206/basic_operations/add_keywords.rb +0 -108
- data/examples/v201206/basic_operations/add_text_ads.rb +0 -105
- data/examples/v201206/basic_operations/delete_ad.rb +0 -85
- data/examples/v201206/basic_operations/delete_campaign.rb +0 -103
- data/examples/v201206/basic_operations/delete_keyword.rb +0 -90
- data/examples/v201206/basic_operations/get_text_ads.rb +0 -106
- data/examples/v201206/basic_operations/update_ad_group.rb +0 -81
- data/examples/v201206/basic_operations/update_campaign.rb +0 -84
- data/examples/v201206/basic_operations/update_keyword.rb +0 -99
- data/examples/v201206/campaign_management/add_experiment.rb +0 -158
- data/examples/v201206/campaign_management/add_keywords_in_bulk.rb +0 -150
- data/examples/v201206/campaign_management/add_location_extension.rb +0 -117
- data/examples/v201206/campaign_management/add_location_extension_override.rb +0 -83
- data/examples/v201206/campaign_management/get_all_disapproved_ads.rb +0 -93
- data/examples/v201206/campaign_management/get_all_disapproved_ads_with_awql.rb +0 -84
- data/examples/v201206/campaign_management/promote_experiment.rb +0 -77
- data/examples/v201206/campaign_management/set_ad_parameters.rb +0 -114
- data/examples/v201206/campaign_management/validate_text_ad.rb +0 -106
- data/examples/v201206/error_handling/handle_captcha_challenge.rb +0 -93
- data/examples/v201206/error_handling/handle_partial_failures.rb +0 -126
- data/examples/v201206/error_handling/handle_policy_violation_error.rb +0 -137
- data/examples/v201206/error_handling/handle_two_factor_authorization_error.rb +0 -88
- data/examples/v201206/misc/get_all_images_and_videos.rb +0 -100
- data/examples/v201206/misc/upload_image.rb +0 -89
- data/examples/v201206/misc/use_oauth2.rb +0 -97
- data/examples/v201206/optimization/estimate_keyword_traffic.rb +0 -129
- data/examples/v201206/optimization/get_keyword_bid_simulations.rb +0 -92
- data/examples/v201206/optimization/get_keyword_ideas.rb +0 -114
- data/examples/v201206/optimization/get_placement_ideas.rb +0 -104
- data/examples/v201206/remarketing/add_audience.rb +0 -115
- data/examples/v201206/remarketing/add_conversion_tracker.rb +0 -97
- data/examples/v201206/reporting/download_criteria_report.rb +0 -79
- data/examples/v201206/reporting/download_criteria_report_with_awql.rb +0 -78
- data/examples/v201206/reporting/get_campaign_stats.rb +0 -105
- data/examples/v201206/reporting/get_report_fields.rb +0 -71
- data/examples/v201206/reporting/parallel_report_download.rb +0 -162
- data/examples/v201206/targeting/add_campaign_targeting_criteria.rb +0 -118
- data/examples/v201206/targeting/get_campaign_targeting_criteria.rb +0 -102
- data/examples/v201206/targeting/get_targetable_languages_and_carriers.rb +0 -86
- data/examples/v201206/targeting/lookup_location.rb +0 -104
- data/lib/adwords_api/v201206/ad_extension_override_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/ad_group_ad_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/ad_group_criterion_service.rb +0 -42
- data/lib/adwords_api/v201206/ad_group_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/ad_group_service.rb +0 -42
- data/lib/adwords_api/v201206/ad_group_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/ad_param_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/alert_service.rb +0 -34
- data/lib/adwords_api/v201206/alert_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/budget_order_service.rb +0 -42
- data/lib/adwords_api/v201206/budget_order_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/bulk_mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/campaign_ad_extension_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/campaign_criterion_service.rb +0 -42
- data/lib/adwords_api/v201206/campaign_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/campaign_service.rb +0 -42
- data/lib/adwords_api/v201206/campaign_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/constant_data_service.rb +0 -62
- data/lib/adwords_api/v201206/constant_data_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/conversion_tracker_service.rb +0 -38
- data/lib/adwords_api/v201206/conversion_tracker_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/customer_service.rb +0 -34
- data/lib/adwords_api/v201206/customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/customer_sync_service.rb +0 -34
- data/lib/adwords_api/v201206/customer_sync_service_registry.rb +0 -47
- data/lib/adwords_api/v201206/data_service.rb +0 -38
- data/lib/adwords_api/v201206/data_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/experiment_service.rb +0 -38
- data/lib/adwords_api/v201206/experiment_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/geo_location_service.rb +0 -34
- data/lib/adwords_api/v201206/geo_location_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/info_service.rb +0 -34
- data/lib/adwords_api/v201206/info_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/location_criterion_service.rb +0 -34
- data/lib/adwords_api/v201206/location_criterion_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/managed_customer_service.rb +0 -38
- data/lib/adwords_api/v201206/managed_customer_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/media_service.rb +0 -38
- data/lib/adwords_api/v201206/media_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/mutate_job_service.rb +0 -42
- data/lib/adwords_api/v201206/mutate_job_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/report_definition_service.rb +0 -34
- data/lib/adwords_api/v201206/report_definition_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/targeting_idea_service.rb +0 -38
- data/lib/adwords_api/v201206/targeting_idea_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/traffic_estimator_service.rb +0 -34
- data/lib/adwords_api/v201206/traffic_estimator_service_registry.rb +0 -46
- data/lib/adwords_api/v201206/user_list_service_registry.rb +0 -46
- data/test/examples/v201206/test_account_management.rb +0 -60
- data/test/examples/v201206/test_basic_operations.rb +0 -177
- data/test/examples/v201206/test_campaign_management.rb +0 -124
- data/test/examples/v201206/test_error_handling.rb +0 -63
- data/test/examples/v201206/test_misc.rb +0 -39
- data/test/examples/v201206/test_optimization.rb +0 -63
- data/test/examples/v201206/test_remarketing.rb +0 -39
- data/test/examples/v201206/test_reporting.rb +0 -84
- data/test/examples/v201206/test_targeting.rb +0 -60
- data/test/examples/v201206/utils.rb +0 -244
- data/test/suite_exampletests_v201206.rb +0 -37
@@ -45,35 +45,6 @@ module AdwordsApi
|
|
45
45
|
|
46
46
|
# Configure the services available to each version
|
47
47
|
@@service_config = {
|
48
|
-
:v201206 => [
|
49
|
-
:AdExtensionOverrideService,
|
50
|
-
:AdGroupAdService,
|
51
|
-
:AdGroupCriterionService,
|
52
|
-
:AdGroupService,
|
53
|
-
:AdParamService,
|
54
|
-
:AlertService,
|
55
|
-
:BudgetOrderService,
|
56
|
-
:BulkMutateJobService,
|
57
|
-
:CampaignAdExtensionService,
|
58
|
-
:CampaignCriterionService,
|
59
|
-
:CampaignService,
|
60
|
-
:ConstantDataService,
|
61
|
-
:ConversionTrackerService,
|
62
|
-
:CustomerService,
|
63
|
-
:CustomerSyncService,
|
64
|
-
:DataService,
|
65
|
-
:ExperimentService,
|
66
|
-
:GeoLocationService,
|
67
|
-
:InfoService,
|
68
|
-
:LocationCriterionService,
|
69
|
-
:ManagedCustomerService,
|
70
|
-
:MediaService,
|
71
|
-
:MutateJobService,
|
72
|
-
:ReportDefinitionService,
|
73
|
-
:TargetingIdeaService,
|
74
|
-
:TrafficEstimatorService,
|
75
|
-
:UserListService
|
76
|
-
],
|
77
48
|
:v201209 => [
|
78
49
|
:AdExtensionOverrideService,
|
79
50
|
:AdGroupAdService,
|
@@ -101,7 +72,14 @@ module AdwordsApi
|
|
101
72
|
:ReportDefinitionService,
|
102
73
|
:TargetingIdeaService,
|
103
74
|
:TrafficEstimatorService,
|
104
|
-
:UserListService
|
75
|
+
:UserListService,
|
76
|
+
# AdWords for Video API Beta services.
|
77
|
+
:VideoAdService,
|
78
|
+
:VideoCampaignCriterionService,
|
79
|
+
:VideoCampaignService,
|
80
|
+
:VideoService,
|
81
|
+
:VideoTargetingGroupCriterionService,
|
82
|
+
:VideoTargetingGroupService
|
105
83
|
],
|
106
84
|
:v201302 => [
|
107
85
|
:AdExtensionOverrideService,
|
@@ -134,6 +112,7 @@ module AdwordsApi
|
|
134
112
|
:MutateJobService,
|
135
113
|
:ReportDefinitionService,
|
136
114
|
:SharedCriterionService,
|
115
|
+
:SharedSetService,
|
137
116
|
:TargetingIdeaService,
|
138
117
|
:TrafficEstimatorService,
|
139
118
|
:UserListService
|
@@ -145,7 +124,6 @@ module AdwordsApi
|
|
145
124
|
:PRODUCTION => {
|
146
125
|
:oauth_scope => 'https://adwords.google.com/api/adwords/',
|
147
126
|
:header_ns => 'https://adwords.google.com/api/adwords/cm/',
|
148
|
-
:v201206 => 'https://adwords.google.com/api/adwords/',
|
149
127
|
:v201209 => 'https://adwords.google.com/api/adwords/',
|
150
128
|
:v201302 => 'https://adwords.google.com/api/adwords/'
|
151
129
|
}
|
@@ -154,34 +132,6 @@ module AdwordsApi
|
|
154
132
|
# Configure the subdirectories for each version / service pair.
|
155
133
|
# A missing pair means that only the base URL is used.
|
156
134
|
@@subdir_config = {
|
157
|
-
# v201206
|
158
|
-
[:v201206, :AdExtensionOverrideService] => 'cm/',
|
159
|
-
[:v201206, :AdGroupAdService] => 'cm/',
|
160
|
-
[:v201206, :AdGroupCriterionService] => 'cm/',
|
161
|
-
[:v201206, :AdGroupService] => 'cm/',
|
162
|
-
[:v201206, :AdParamService] => 'cm/',
|
163
|
-
[:v201206, :AlertService] => 'mcm/',
|
164
|
-
[:v201206, :BudgetOrderService] => 'billing/',
|
165
|
-
[:v201206, :BulkMutateJobService] => 'job/',
|
166
|
-
[:v201206, :CampaignAdExtensionService] => 'cm/',
|
167
|
-
[:v201206, :CampaignCriterionService] => 'cm/',
|
168
|
-
[:v201206, :CampaignService] => 'cm/',
|
169
|
-
[:v201206, :ConstantDataService] => 'cm/',
|
170
|
-
[:v201206, :ConversionTrackerService] => 'cm/',
|
171
|
-
[:v201206, :CustomerSyncService] => 'ch/',
|
172
|
-
[:v201206, :DataService] => 'cm/',
|
173
|
-
[:v201206, :ExperimentService] => 'cm/',
|
174
|
-
[:v201206, :GeoLocationService] => 'cm/',
|
175
|
-
[:v201206, :InfoService] => 'info/',
|
176
|
-
[:v201206, :LocationCriterionService] => 'cm/',
|
177
|
-
[:v201206, :MediaService] => 'cm/',
|
178
|
-
[:v201206, :MutateJobService] => 'cm/',
|
179
|
-
[:v201206, :ReportDefinitionService] => 'cm/',
|
180
|
-
[:v201206, :TargetingIdeaService] => 'o/',
|
181
|
-
[:v201206, :TrafficEstimatorService] => 'o/',
|
182
|
-
[:v201206, :UserListService] => 'cm/',
|
183
|
-
[:v201206, :ManagedCustomerService] => 'mcm/',
|
184
|
-
[:v201206, :CustomerService] => 'mcm/',
|
185
135
|
# v201209
|
186
136
|
[:v201209, :AdExtensionOverrideService] => 'cm/',
|
187
137
|
[:v201209, :AdGroupAdService] => 'cm/',
|
@@ -210,6 +160,13 @@ module AdwordsApi
|
|
210
160
|
[:v201209, :ManagedCustomerService] => 'mcm/',
|
211
161
|
[:v201209, :CustomerService] => 'mcm/',
|
212
162
|
[:v201209, :BudgetService] => 'cm/',
|
163
|
+
# AdWords for Video API Beta services.
|
164
|
+
[:v201209, :VideoAdService] => 'video/',
|
165
|
+
[:v201209, :VideoCampaignCriterionService] => 'video/',
|
166
|
+
[:v201209, :VideoCampaignService] => 'video/',
|
167
|
+
[:v201209, :VideoService] => 'video/',
|
168
|
+
[:v201209, :VideoTargetingGroupCriterionService] => 'video/',
|
169
|
+
[:v201209, :VideoTargetingGroupService] => 'video/',
|
213
170
|
# v201302
|
214
171
|
[:v201302, :AdExtensionOverrideService] => 'cm/',
|
215
172
|
[:v201302, :AdGroupAdService] => 'cm/',
|
@@ -238,6 +195,7 @@ module AdwordsApi
|
|
238
195
|
[:v201302, :MutateJobService] => 'cm/',
|
239
196
|
[:v201302, :ReportDefinitionService] => 'cm/',
|
240
197
|
[:v201302, :SharedCriterionService] => 'cm/',
|
198
|
+
[:v201302, :SharedSetService] => 'cm/',
|
241
199
|
[:v201302, :TargetingIdeaService] => 'o/',
|
242
200
|
[:v201302, :TrafficEstimatorService] => 'o/',
|
243
201
|
[:v201302, :UserListService] => 'cm/',
|
@@ -194,14 +194,10 @@ module AdwordsApi
|
|
194
194
|
# Checks downloaded data for error signature. Raises ReportError if it
|
195
195
|
# detects an error.
|
196
196
|
def check_for_errors(response)
|
197
|
-
# Check for error in body.
|
198
|
-
report_body = response.body
|
199
|
-
if report_body and (@version == :v201206) and
|
200
|
-
((RUBY_VERSION < '1.9.1') or report_body.valid_encoding?)
|
201
|
-
check_for_legacy_error(report_body, response.code)
|
202
|
-
end
|
203
197
|
# Check for error code.
|
204
|
-
|
198
|
+
if response.code != 200
|
199
|
+
# Check for error in body.
|
200
|
+
report_body = response.body
|
205
201
|
check_for_xml_error(report_body, response.code)
|
206
202
|
# No XML error found nor raised, falling back to a default message.
|
207
203
|
raise AdwordsApi::Errors::ReportError.new(response.code,
|
@@ -210,18 +206,6 @@ module AdwordsApi
|
|
210
206
|
return nil
|
211
207
|
end
|
212
208
|
|
213
|
-
# Checks for a legacy error in the response body and raises an exception if
|
214
|
-
# it was found.
|
215
|
-
def check_for_legacy_error(report_body, response_code)
|
216
|
-
error_message_regex = '^!!!(-?\d+)\|\|\|(-?\d+)\|\|\|(.*)\?\?\?'
|
217
|
-
data = report_body.slice(0, 1024)
|
218
|
-
matches = data.match(error_message_regex)
|
219
|
-
if matches
|
220
|
-
message = (matches[3].nil?) ? data : matches[3]
|
221
|
-
raise AdwordsApi::Errors::ReportError.new(response_code, message)
|
222
|
-
end
|
223
|
-
end
|
224
|
-
|
225
209
|
# Checks for an XML error in the response body and raises an exception if
|
226
210
|
# it was found.
|
227
211
|
def check_for_xml_error(report_body, response_code)
|
@@ -5,16 +5,16 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.9.2 on 2013-
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:36.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/
|
11
|
+
require 'adwords_api/v201209/video_ad_service_registry'
|
12
12
|
|
13
|
-
module AdwordsApi; module
|
14
|
-
class
|
13
|
+
module AdwordsApi; module V201209; module VideoAdService
|
14
|
+
class VideoAdService < AdsCommon::SavonService
|
15
15
|
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/
|
17
|
-
super(config, endpoint, namespace, :
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/video/v201209'
|
17
|
+
super(config, endpoint, namespace, :v201209)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(*args, &block)
|
@@ -28,11 +28,11 @@ module AdwordsApi; module V201206; module AdParamService
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def get_service_registry()
|
31
|
-
return
|
31
|
+
return VideoAdServiceRegistry
|
32
32
|
end
|
33
33
|
|
34
34
|
def get_module()
|
35
|
-
return AdwordsApi::
|
35
|
+
return AdwordsApi::V201209::VideoAdService
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:36.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201209; module VideoAdService
|
13
|
+
class VideoAdServiceRegistry
|
14
|
+
VIDEOADSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"VideoAdSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"VideoAdPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"VideoAdOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"VideoAdReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
|
15
|
+
VIDEOADSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ExemptionRequest=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"BetaError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.Reason"=>{:fields=>[], :ns=>0}, :"CurrencyCodeError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"MatchesRegexError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccessError=>{:fields=>[{:name=>:reason, :type=>"AccessError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdsApiError=>{:fields=>[{:name=>:reason, :type=>"AdsApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ApprovalContext=>{:fields=>[{:name=>:targeting_scope, :type=>"TargetingScope", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_type, :type=>"DestinationType", :min_occurs=>0, :max_occurs=>1}]}, :ApprovalContext_VideoAd_ApprovalLimitMapEntry=>{:fields=>[{:name=>:key, :type=>"ApprovalContext", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"VideoAd.ApprovalLimit", :min_occurs=>0, :max_occurs=>1}]}, :ApprovalContext_VideoAd_ApprovalStatusMapEntry=>{:fields=>[{:name=>:key, :type=>"ApprovalContext", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"VideoAd.ApprovalStatus", :min_occurs=>0, :max_occurs=>1}]}, :CampaignKey=>{:fields=>[{:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CountryKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"RegionCode", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DateKey=>{:fields=>[{:name=>:date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimension, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>1}]}, :DayOfWeekKey=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}]}, :DeviceKey=>{:fields=>[{:name=>:device_type, :type=>"DeviceKey.DeviceType", :min_occurs=>0, :max_occurs=>1}]}, :DisapprovalReason=>{:fields=>[{:name=>:reason, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:help_id, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatKey=>{:fields=>[{:name=>:display_format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatNetworkKey=>{:fields=>[{:name=>:format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatTypeKey=>{:fields=>[{:name=>:display_format_type, :type=>"VideoAdDisplayFormat.Type", :min_occurs=>0, :max_occurs=>1}]}, :EntityNotFoundError=>{:fields=>[{:name=>:reason, :type=>"EntityNotFoundError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :HourOfDayKey=>{:fields=>[{:name=>:hour_of_day, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :VideoImage=>{:fields=>[{:name=>:type, :type=>"VideoImage.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:secondary_type, :type=>"VideoImage.Type", :min_occurs=>0, :max_occurs=>1}, {:name=>:media_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:mime_type, :type=>"VideoImage.MimeType", :min_occurs=>0, :max_occurs=>1}]}, :Integer_LongMapEntry=>{:fields=>[{:name=>:key, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :MetroKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NetworkKey=>{:fields=>[{:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :PaidViewsKey=>{:fields=>[{:name=>:paid_views, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :RegionKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ReportError=>{:fields=>[{:name=>:reason, :type=>"ReportError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ScopedDisapprovalReason=>{:fields=>[{:name=>:approval_context, :type=>"ApprovalContext", :min_occurs=>0, :max_occurs=>1}, {:name=>:disapproval_reason, :type=>"DisapprovalReason", :min_occurs=>0, :max_occurs=>1}]}, :SegmentationError=>{:fields=>[{:name=>:reason, :type=>"SegmentationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ServingIssue=>{:fields=>[{:name=>:reason, :type=>"ServingIssue.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:hide_action_link, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :Sortable=>{:fields=>[], :choices=>[{:name=>:stats_sortable, :original_name=>"StatsSortable", :type=>"StatsSortable", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_ad_sortable, :original_name=>"VideoAdSortable", :type=>"VideoAdSortable", :min_occurs=>1, :max_occurs=>1}]}, :Sorting=>{:fields=>[{:name=>:field, :type=>"Sortable", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"Sortable", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:sort_orders, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SortingError=>{:fields=>[{:name=>:reason, :type=>"SortingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StatsSelector=>{:fields=>[{:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmentation_dimensions, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:metrics, :type=>"Metric", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_types, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:segmented_summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:all_time_restrict, :type=>"StatsSelector.AllTimeRestrict", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupAssociation=>{:fields=>[{:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"TargetingGroupAssociation.Status", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupKey=>{:fields=>[{:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TimeSeriesError=>{:fields=>[{:name=>:reason, :type=>"TimeSeriesError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoAdError=>{:fields=>[{:name=>:reason, :type=>"VideoAdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoAdKey=>{:fields=>[{:name=>:video_ad_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :VideoAdSelector=>{:fields=>[{:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:statuses, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:stats_selector, :type=>"StatsSelector", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}, {:name=>:sorting, :type=>"Sorting", :min_occurs=>0, :max_occurs=>1}]}, :GeoKey=>{:fields=>[], :choices=>[{:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}]}, :SegmentKey=>{:fields=>[], :choices=>[{:name=>:campaign_key, :original_name=>"CampaignKey", :type=>"CampaignKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:date_key, :original_name=>"DateKey", :type=>"DateKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:day_of_week_key, :original_name=>"DayOfWeekKey", :type=>"DayOfWeekKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:device_key, :original_name=>"DeviceKey", :type=>"DeviceKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_key, :original_name=>"DisplayFormatKey", :type=>"DisplayFormatKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_network_key, :original_name=>"DisplayFormatNetworkKey", :type=>"DisplayFormatNetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_type_key, :original_name=>"DisplayFormatTypeKey", :type=>"DisplayFormatTypeKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:geo_key, :original_name=>"GeoKey", :type=>"GeoKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:hour_of_day_key, :original_name=>"HourOfDayKey", :type=>"HourOfDayKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:network_key, :original_name=>"NetworkKey", :type=>"NetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:paid_views_key, :original_name=>"PaidViewsKey", :type=>"PaidViewsKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:targeting_group_key, :original_name=>"TargetingGroupKey", :type=>"TargetingGroupKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_ad_key, :original_name=>"VideoAdKey", :type=>"VideoAdKey", :min_occurs=>1, :max_occurs=>1}]}, :ServingInfo=>{:fields=>[{:name=>:issues, :type=>"ServingIssue", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:serving_status, :type=>"ServingStatus", :min_occurs=>0, :max_occurs=>1}]}, :VideoEntityStats=>{:fields=>[{:name=>:summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:segment_key, :type=>"SegmentKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpv, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_reach_frequencies, :type=>"Integer_LongMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:average_impression_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_view_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:unique_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:thumbnail_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:website_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_view, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_view, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_view_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribes, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribe_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:vtr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_starts, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:eligible_follow_on_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:engagement_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:retention_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :VideoAd=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_associations, :type=>"TargetingGroupAssociation", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmented_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:issues, :type=>"ServingInfo", :min_occurs=>0, :max_occurs=>1}, {:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:headline, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description1, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:description2, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:image, :type=>"VideoImage", :min_occurs=>0, :max_occurs=>1}, {:name=>:you_tube_destination_page, :type=>"VideoAd.YouTubeDestinationPage", :min_occurs=>0, :max_occurs=>1}, {:name=>:destination_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:companion_banner, :type=>"VideoImage", :min_occurs=>0, :max_occurs=>1}, {:name=>:show_video_annotations, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:in_display_destination_type, :type=>"DestinationType", :min_occurs=>0, :max_occurs=>1}, {:name=>:approval_statuses, :type=>"ApprovalContext_VideoAd_ApprovalStatusMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:approval_limits, :type=>"ApprovalContext_VideoAd_ApprovalLimitMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:disapproval_reasons, :type=>"ScopedDisapprovalReason", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:true_view_in_search_on_you_tube_status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_search_on_google_status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_stream_on_you_tube_status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_stream_on_gdn_status, :original_name=>"trueViewInStreamOnGDNStatus", :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_display_on_you_tube_status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_display_on_gdn_status, :original_name=>"trueViewInDisplayOnGDNStatus", :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_slate_on_you_tube_status, :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:true_view_in_slate_on_gdn_status, :original_name=>"trueViewInSlateOnGDNStatus", :type=>"VideoAdStatus", :min_occurs=>0, :max_occurs=>1}]}, :VideoAdOperation=>{:fields=>[{:name=>:operand, :type=>"VideoAd", :min_occurs=>0, :max_occurs=>1}, {:name=>:exemption_requests, :type=>"ExemptionRequest", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Operation"}, :VideoAdPage=>{:fields=>[{:name=>:entries, :type=>"VideoAd", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :VideoAdReturnValue=>{:fields=>[{:name=>:value, :type=>"VideoAd", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :"AccessError.Reason"=>{:fields=>[]}, :"AdsApiError.Reason"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :DestinationType=>{:fields=>[]}, :"DeviceKey.DeviceType"=>{:fields=>[]}, :"EntityNotFoundError.Reason"=>{:fields=>[]}, :"VideoImage.MimeType"=>{:fields=>[]}, :"VideoImage.Type"=>{:fields=>[]}, :Metric=>{:fields=>[]}, :RegionCode=>{:fields=>[]}, :"ReportError.Reason"=>{:fields=>[]}, :SegmentationDimension=>{:fields=>[]}, :"SegmentationError.Reason"=>{:fields=>[]}, :"ServingIssue.Reason"=>{:fields=>[]}, :ServingStatus=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"SortingError.Reason"=>{:fields=>[]}, :"VideoEntityStats.SummaryType"=>{:fields=>[]}, :"StatsSelector.AllTimeRestrict"=>{:fields=>[]}, :StatsSortable=>{:fields=>[]}, :"TargetingGroupAssociation.Status"=>{:fields=>[]}, :TargetingScope=>{:fields=>[]}, :"TimeSeriesError.Reason"=>{:fields=>[]}, :"VideoAd.ApprovalLimit"=>{:fields=>[]}, :"VideoAd.ApprovalStatus"=>{:fields=>[]}, :"VideoAd.YouTubeDestinationPage"=>{:fields=>[]}, :VideoAdDisplayFormat=>{:fields=>[]}, :"VideoAdDisplayFormat.Type"=>{:fields=>[]}, :"VideoAdError.Reason"=>{:fields=>[]}, :VideoAdNetwork=>{:fields=>[]}, :VideoAdSortable=>{:fields=>[]}, :VideoAdStatus=>{:fields=>[]}}
|
16
|
+
VIDEOADSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201209"]
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return VIDEOADSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return VIDEOADSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return VIDEOADSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault, VideoAdServiceRegistry)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -5,16 +5,16 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.9.2 on 2013-
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:38.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/
|
11
|
+
require 'adwords_api/v201209/video_campaign_criterion_service_registry'
|
12
12
|
|
13
|
-
module AdwordsApi; module
|
14
|
-
class
|
13
|
+
module AdwordsApi; module V201209; module VideoCampaignCriterionService
|
14
|
+
class VideoCampaignCriterionService < AdsCommon::SavonService
|
15
15
|
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/
|
17
|
-
super(config, endpoint, namespace, :
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/video/v201209'
|
17
|
+
super(config, endpoint, namespace, :v201209)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(*args, &block)
|
@@ -28,11 +28,11 @@ module AdwordsApi; module V201206; module CampaignAdExtensionService
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def get_service_registry()
|
31
|
-
return
|
31
|
+
return VideoCampaignCriterionServiceRegistry
|
32
32
|
end
|
33
33
|
|
34
34
|
def get_module()
|
35
|
-
return AdwordsApi::
|
35
|
+
return AdwordsApi::V201209::VideoCampaignCriterionService
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end; end; end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:38.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201209; module VideoCampaignCriterionService
|
13
|
+
class VideoCampaignCriterionServiceRegistry
|
14
|
+
VIDEOCAMPAIGNCRITERIONSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"VideoCampaignCriterionSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"VideoCampaignCriterionPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"VideoCampaignCriterionOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"VideoCampaignCriterionReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
|
15
|
+
VIDEOCAMPAIGNCRITERIONSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"BetaError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.Reason"=>{:fields=>[], :ns=>0}, :"CurrencyCodeError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"MatchesRegexError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccessError=>{:fields=>[{:name=>:reason, :type=>"AccessError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdsApiError=>{:fields=>[{:name=>:reason, :type=>"AdsApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AudienceAge=>{:fields=>[{:name=>:age_range, :type=>"AudienceAge.AgeRange", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :AudienceGender=>{:fields=>[{:name=>:gender_type, :type=>"AudienceGender.GenderType", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :AudienceInterest=>{:fields=>[{:name=>:interest_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:interest_path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"BaseCriterion"}, :AudienceUserList=>{:fields=>[{:name=>:list_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :BaseCriterion=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:base_criterion_type, :original_name=>"BaseCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CampaignKey=>{:fields=>[{:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Channel=>{:fields=>[{:name=>:user_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:public_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :ContentKeyword=>{:fields=>[], :base=>"BaseKeyword"}, :ContentCategoryLabel=>{:fields=>[], :base=>"BaseCriterion"}, :CountryKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"RegionCode", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DateKey=>{:fields=>[{:name=>:date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimension, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>1}]}, :DayOfWeekKey=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}]}, :DeviceKey=>{:fields=>[{:name=>:device_type, :type=>"DeviceKey.DeviceType", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatKey=>{:fields=>[{:name=>:display_format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatNetworkKey=>{:fields=>[{:name=>:format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatTypeKey=>{:fields=>[{:name=>:display_format_type, :type=>"VideoAdDisplayFormat.Type", :min_occurs=>0, :max_occurs=>1}]}, :EntityNotFoundError=>{:fields=>[{:name=>:reason, :type=>"EntityNotFoundError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :GeoKey=>{:fields=>[], :choices=>[{:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}]}, :GoogleKeyword=>{:fields=>[], :base=>"BaseKeyword"}, :HourOfDayKey=>{:fields=>[{:name=>:hour_of_day, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Integer_LongMapEntry=>{:fields=>[{:name=>:key, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :BaseKeyword=>{:fields=>[{:name=>:text, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:match_type, :type=>"BaseKeyword.MatchType", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :LanguageVideoCriterion=>{:fields=>[{:name=>:code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :LocationVideoCriterion=>{:fields=>[{:name=>:location_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:display_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_obsolete, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:parent_locations, :type=>"LocationVideoCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"BaseCriterion"}, :MetroKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NegativeVideoCampaignCriterion=>{:fields=>[], :base=>"VideoCampaignCriterion"}, :NetworkKey=>{:fields=>[{:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :PaidViewsKey=>{:fields=>[{:name=>:paid_views, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :RegionKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ReportError=>{:fields=>[{:name=>:reason, :type=>"ReportError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :ReportedVideoCampaignCriterion=>{:fields=>[{:name=>:targeting_groups, :type=>"TargetingGroupInfo", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmented_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:excluded, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :base=>"VideoCampaignCriterion"}, :RunOfYoutube=>{:fields=>[], :base=>"BaseCriterion"}, :SearchKeyword=>{:fields=>[], :base=>"BaseKeyword"}, :SegmentKey=>{:fields=>[], :choices=>[{:name=>:campaign_key, :original_name=>"CampaignKey", :type=>"CampaignKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:date_key, :original_name=>"DateKey", :type=>"DateKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:day_of_week_key, :original_name=>"DayOfWeekKey", :type=>"DayOfWeekKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:device_key, :original_name=>"DeviceKey", :type=>"DeviceKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_key, :original_name=>"DisplayFormatKey", :type=>"DisplayFormatKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_network_key, :original_name=>"DisplayFormatNetworkKey", :type=>"DisplayFormatNetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_type_key, :original_name=>"DisplayFormatTypeKey", :type=>"DisplayFormatTypeKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:geo_key, :original_name=>"GeoKey", :type=>"GeoKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:hour_of_day_key, :original_name=>"HourOfDayKey", :type=>"HourOfDayKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:network_key, :original_name=>"NetworkKey", :type=>"NetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:paid_views_key, :original_name=>"PaidViewsKey", :type=>"PaidViewsKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:targeting_group_key, :original_name=>"TargetingGroupKey", :type=>"TargetingGroupKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_ad_key, :original_name=>"VideoAdKey", :type=>"VideoAdKey", :min_occurs=>1, :max_occurs=>1}]}, :SegmentationError=>{:fields=>[{:name=>:reason, :type=>"SegmentationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Sortable=>{:fields=>[], :choices=>[{:name=>:stats_sortable, :original_name=>"StatsSortable", :type=>"StatsSortable", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_campaign_criterion_sortable, :original_name=>"VideoCampaignCriterionSortable", :type=>"VideoCampaignCriterionSortable", :min_occurs=>1, :max_occurs=>1}]}, :Sorting=>{:fields=>[{:name=>:field, :type=>"Sortable", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"Sortable", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:sort_orders, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SortingError=>{:fields=>[{:name=>:reason, :type=>"SortingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoEntityStats=>{:fields=>[{:name=>:summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:segment_key, :type=>"SegmentKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpv, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_reach_frequencies, :type=>"Integer_LongMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:average_impression_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_view_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:unique_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:thumbnail_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:website_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_view, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_view, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_view_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribes, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribe_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:vtr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_starts, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:eligible_follow_on_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:engagement_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:retention_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupCriterionError=>{:fields=>[{:name=>:reason, :type=>"TargetingGroupCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :TargetingGroupInfo=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupKey=>{:fields=>[{:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Topic=>{:fields=>[{:name=>:vertical_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:vertical_path, :type=>"string", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"BaseCriterion"}, :VideoAdKey=>{:fields=>[{:name=>:video_ad_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :VideoCampaignCriterion=>{:fields=>[{:name=>:campaign_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:criterion, :type=>"BaseCriterion", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_campaign_criterion_type, :original_name=>"VideoCampaignCriterion.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :VideoCampaignCriterionError=>{:fields=>[{:name=>:reason, :type=>"VideoCampaignCriterionError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoCampaignCriterionOperation=>{:fields=>[{:name=>:operand, :type=>"VideoCampaignCriterion", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :VideoCampaignCriterionPage=>{:fields=>[{:name=>:entries, :type=>"VideoCampaignCriterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :VideoCampaignCriterionReturnValue=>{:fields=>[{:name=>:value, :type=>"VideoCampaignCriterion", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :VideoCampaignCriterionSelector=>{:fields=>[{:name=>:campaign_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:criterion_types, :type=>"BaseCriterion.Type", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:sorting, :type=>"Sorting", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :VideoCampaignReportPage=>{:fields=>[{:name=>:entries, :type=>"ReportedVideoCampaignCriterion", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"Page"}, :VideoCriterion=>{:fields=>[{:name=>:video_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :WebSite=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :YouTubePlacement=>{:fields=>[{:name=>:url, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :base=>"BaseCriterion"}, :"AccessError.Reason"=>{:fields=>[]}, :"AdsApiError.Reason"=>{:fields=>[]}, :"AudienceAge.AgeRange"=>{:fields=>[]}, :"AudienceGender.GenderType"=>{:fields=>[]}, :"BaseCriterion.Type"=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DeviceKey.DeviceType"=>{:fields=>[]}, :"EntityNotFoundError.Reason"=>{:fields=>[]}, :"BaseKeyword.MatchType"=>{:fields=>[]}, :RegionCode=>{:fields=>[]}, :"ReportError.Reason"=>{:fields=>[]}, :SegmentationDimension=>{:fields=>[]}, :"SegmentationError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"SortingError.Reason"=>{:fields=>[]}, :"VideoEntityStats.SummaryType"=>{:fields=>[]}, :StatsSortable=>{:fields=>[]}, :"TargetingGroupCriterionError.Reason"=>{:fields=>[]}, :VideoAdDisplayFormat=>{:fields=>[]}, :"VideoAdDisplayFormat.Type"=>{:fields=>[]}, :VideoAdNetwork=>{:fields=>[]}, :"VideoCampaignCriterionError.Reason"=>{:fields=>[]}, :VideoCampaignCriterionSortable=>{:fields=>[]}}
|
16
|
+
VIDEOCAMPAIGNCRITERIONSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201209"]
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return VIDEOCAMPAIGNCRITERIONSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return VIDEOCAMPAIGNCRITERIONSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return VIDEOCAMPAIGNCRITERIONSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Indicates that this instance is a subtype of ApplicationException.
|
32
|
+
# Although this field is returned in the response, it is ignored on input
|
33
|
+
# and cannot be selected. Specify xsi:type instead.
|
34
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
35
|
+
attr_reader :message # string
|
36
|
+
attr_reader :application_exception_type # string
|
37
|
+
end
|
38
|
+
|
39
|
+
class ApiException < ApplicationException
|
40
|
+
attr_reader :errors # ApiError
|
41
|
+
def initialize(exception_fault)
|
42
|
+
@array_fields ||= []
|
43
|
+
@array_fields << 'errors'
|
44
|
+
super(exception_fault, VideoCampaignCriterionServiceRegistry)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end; end; end
|
data/lib/adwords_api/{v201206/bulk_mutate_job_service.rb → v201209/video_campaign_service.rb}
RENAMED
@@ -5,16 +5,16 @@
|
|
5
5
|
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
6
|
# License:: Licensed under the Apache License, Version 2.0.
|
7
7
|
#
|
8
|
-
# Code generated by AdsCommon library 0.9.2 on 2013-
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:39.
|
9
9
|
|
10
10
|
require 'ads_common/savon_service'
|
11
|
-
require 'adwords_api/
|
11
|
+
require 'adwords_api/v201209/video_campaign_service_registry'
|
12
12
|
|
13
|
-
module AdwordsApi; module
|
14
|
-
class
|
13
|
+
module AdwordsApi; module V201209; module VideoCampaignService
|
14
|
+
class VideoCampaignService < AdsCommon::SavonService
|
15
15
|
def initialize(config, endpoint)
|
16
|
-
namespace = 'https://adwords.google.com/api/adwords/
|
17
|
-
super(config, endpoint, namespace, :
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/video/v201209'
|
17
|
+
super(config, endpoint, namespace, :v201209)
|
18
18
|
end
|
19
19
|
|
20
20
|
def get(*args, &block)
|
@@ -28,11 +28,11 @@ module AdwordsApi; module V201206; module BulkMutateJobService
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def get_service_registry()
|
31
|
-
return
|
31
|
+
return VideoCampaignServiceRegistry
|
32
32
|
end
|
33
33
|
|
34
34
|
def get_module()
|
35
|
-
return AdwordsApi::
|
35
|
+
return AdwordsApi::V201209::VideoCampaignService
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end; end; end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:39.
|
9
|
+
|
10
|
+
require 'adwords_api/errors'
|
11
|
+
|
12
|
+
module AdwordsApi; module V201209; module VideoCampaignService
|
13
|
+
class VideoCampaignServiceRegistry
|
14
|
+
VIDEOCAMPAIGNSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"VideoCampaignSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"VideoCampaignPage", :min_occurs=>0, :max_occurs=>1}]}}, :mutate=>{:input=>[{:name=>:operations, :type=>"VideoCampaignOperation", :min_occurs=>0, :max_occurs=>:unbounded}], :output=>{:name=>"mutate_response", :fields=>[{:name=>:rval, :type=>"VideoCampaignReturnValue", :min_occurs=>0, :max_occurs=>1}]}}}
|
15
|
+
VIDEOCAMPAIGNSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :BetaError=>{:fields=>[{:name=>:reason, :type=>"BetaError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CollectionSizeError=>{:fields=>[{:name=>:reason, :type=>"CollectionSizeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :CurrencyCodeError=>{:fields=>[{:name=>:reason, :type=>"CurrencyCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateRange=>{:fields=>[{:name=>:min, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:max, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DoubleValue=>{:fields=>[{:name=>:number, :type=>"double", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :IdError=>{:fields=>[{:name=>:reason, :type=>"IdError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :LongValue=>{:fields=>[{:name=>:number, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"NumberValue", :ns=>0}, :MatchesRegexError=>{:fields=>[{:name=>:reason, :type=>"MatchesRegexError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Money=>{:fields=>[{:name=>:micro_amount, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :base=>"ComparableValue", :ns=>0}, :NotEmptyError=>{:fields=>[{:name=>:reason, :type=>"NotEmptyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NullError=>{:fields=>[{:name=>:reason, :type=>"NullError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NumberValue=>{:fields=>[], :abstract=>true, :base=>"ComparableValue", :ns=>0}, :OperatorError=>{:fields=>[{:name=>:reason, :type=>"OperatorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"PolicyViolationError.Part"=>{:fields=>[{:name=>:index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:length, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :PolicyViolationKey=>{:fields=>[{:name=>:policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_text, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RangeError=>{:fields=>[{:name=>:reason, :type=>"RangeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ReadOnlyError=>{:fields=>[{:name=>:reason, :type=>"ReadOnlyError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RegionCodeError=>{:fields=>[{:name=>:reason, :type=>"RegionCodeError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RejectedError=>{:fields=>[{:name=>:reason, :type=>"RejectedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SelectorError=>{:fields=>[{:name=>:reason, :type=>"SelectorError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :StringLengthError=>{:fields=>[{:name=>:reason, :type=>"StringLengthError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ComparableValue=>{:fields=>[{:name=>:comparable_value_type, :original_name=>"ComparableValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ListReturnValue=>{:fields=>[{:name=>:list_return_value_type, :original_name=>"ListReturnValue.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Operation=>{:fields=>[{:name=>:operator, :type=>"Operator", :min_occurs=>0, :max_occurs=>1}, {:name=>:operation_type, :original_name=>"Operation.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :original_name=>"Page.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :PolicyViolationError=>{:fields=>[{:name=>:key, :type=>"PolicyViolationKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_url, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:external_policy_description, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_exemptable, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:violating_parts, :type=>"PolicyViolationError.Part", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :original_name=>"ApiError.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :original_name=>"ApplicationException.Type", :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"BetaError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"CollectionSizeError.Reason"=>{:fields=>[], :ns=>0}, :"CurrencyCodeError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"IdError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"MatchesRegexError.Reason"=>{:fields=>[], :ns=>0}, :"NotEmptyError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"NullError.Reason"=>{:fields=>[], :ns=>0}, :Operator=>{:fields=>[], :ns=>0}, :"OperatorError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RangeError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"ReadOnlyError.Reason"=>{:fields=>[], :ns=>0}, :"RegionCodeError.Reason"=>{:fields=>[], :ns=>0}, :"RejectedError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SelectorError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :"StringLengthError.Reason"=>{:fields=>[], :ns=>0}, :AccessError=>{:fields=>[{:name=>:reason, :type=>"AccessError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AdsApiError=>{:fields=>[{:name=>:reason, :type=>"AdsApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :CampaignKey=>{:fields=>[{:name=>:campaign_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :CountryKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"RegionCode", :min_occurs=>0, :max_occurs=>1}, {:name=>:country_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :DateKey=>{:fields=>[{:name=>:date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:dimension, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>1}]}, :DayOfWeekKey=>{:fields=>[{:name=>:day_of_week, :type=>"DayOfWeek", :min_occurs=>0, :max_occurs=>1}]}, :DeviceKey=>{:fields=>[{:name=>:device_type, :type=>"DeviceKey.DeviceType", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatKey=>{:fields=>[{:name=>:display_format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatNetworkKey=>{:fields=>[{:name=>:format, :type=>"VideoAdDisplayFormat", :min_occurs=>0, :max_occurs=>1}, {:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :DisplayFormatTypeKey=>{:fields=>[{:name=>:display_format_type, :type=>"VideoAdDisplayFormat.Type", :min_occurs=>0, :max_occurs=>1}]}, :EntityNotFoundError=>{:fields=>[{:name=>:reason, :type=>"EntityNotFoundError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :HourOfDayKey=>{:fields=>[{:name=>:hour_of_day, :type=>"int", :min_occurs=>0, :max_occurs=>1}]}, :Integer_LongMapEntry=>{:fields=>[{:name=>:key, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:value, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :MetroKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:metro_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :NetworkKey=>{:fields=>[{:name=>:network, :type=>"VideoAdNetwork", :min_occurs=>0, :max_occurs=>1}]}, :PaidViewsKey=>{:fields=>[{:name=>:paid_views, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :RegionKey=>{:fields=>[{:name=>:criterion_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_code, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:region_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :ReportError=>{:fields=>[{:name=>:reason, :type=>"ReportError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :SegmentationError=>{:fields=>[{:name=>:reason, :type=>"SegmentationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :Sortable=>{:fields=>[], :choices=>[{:name=>:stats_sortable, :original_name=>"StatsSortable", :type=>"StatsSortable", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_campaign_sortable, :original_name=>"VideoCampaignSortable", :type=>"VideoCampaignSortable", :min_occurs=>1, :max_occurs=>1}]}, :Sorting=>{:fields=>[{:name=>:field, :type=>"Sortable", :min_occurs=>0, :max_occurs=>1}, {:name=>:sort_order, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>1}, {:name=>:fields, :type=>"Sortable", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:sort_orders, :type=>"SortOrder", :min_occurs=>0, :max_occurs=>:unbounded}]}, :SortingError=>{:fields=>[{:name=>:reason, :type=>"SortingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :StatsSelector=>{:fields=>[{:name=>:date_range, :type=>"DateRange", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmentation_dimensions, :type=>"SegmentationDimension", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:metrics, :type=>"Metric", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_types, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:segmented_summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:all_time_restrict, :type=>"StatsSelector.AllTimeRestrict", :min_occurs=>0, :max_occurs=>1}]}, :TargetingGroupKey=>{:fields=>[{:name=>:targeting_group_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_group_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :TimeSeriesError=>{:fields=>[{:name=>:reason, :type=>"TimeSeriesError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoAdKey=>{:fields=>[{:name=>:video_ad_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_ad_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}]}, :VideoBiddingError=>{:fields=>[{:name=>:reason, :type=>"VideoBiddingError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoBudgetError=>{:fields=>[{:name=>:reason, :type=>"VideoBudgetError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoCampaignError=>{:fields=>[{:name=>:reason, :type=>"VideoCampaignError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :VideoCampaignSelector=>{:fields=>[{:name=>:ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:campaign_statuses, :type=>"VideoCampaignStatus", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:stats_selector, :type=>"StatsSelector", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}, {:name=>:sorting, :type=>"Sorting", :min_occurs=>0, :max_occurs=>1}]}, :VideoFrequencyCap=>{:fields=>[{:name=>:impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:time_unit, :type=>"TimeUnit", :min_occurs=>0, :max_occurs=>1}, {:name=>:level, :type=>"VideoLevel", :min_occurs=>0, :max_occurs=>1}]}, :GeoKey=>{:fields=>[], :choices=>[{:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}]}, :SegmentKey=>{:fields=>[], :choices=>[{:name=>:campaign_key, :original_name=>"CampaignKey", :type=>"CampaignKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:country_key, :original_name=>"CountryKey", :type=>"CountryKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:date_key, :original_name=>"DateKey", :type=>"DateKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:day_of_week_key, :original_name=>"DayOfWeekKey", :type=>"DayOfWeekKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:device_key, :original_name=>"DeviceKey", :type=>"DeviceKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_key, :original_name=>"DisplayFormatKey", :type=>"DisplayFormatKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_network_key, :original_name=>"DisplayFormatNetworkKey", :type=>"DisplayFormatNetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:display_format_type_key, :original_name=>"DisplayFormatTypeKey", :type=>"DisplayFormatTypeKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:geo_key, :original_name=>"GeoKey", :type=>"GeoKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:hour_of_day_key, :original_name=>"HourOfDayKey", :type=>"HourOfDayKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:metro_key, :original_name=>"MetroKey", :type=>"MetroKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:network_key, :original_name=>"NetworkKey", :type=>"NetworkKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:paid_views_key, :original_name=>"PaidViewsKey", :type=>"PaidViewsKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:region_key, :original_name=>"RegionKey", :type=>"RegionKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:targeting_group_key, :original_name=>"TargetingGroupKey", :type=>"TargetingGroupKey", :min_occurs=>1, :max_occurs=>1}, {:name=>:video_ad_key, :original_name=>"VideoAdKey", :type=>"VideoAdKey", :min_occurs=>1, :max_occurs=>1}]}, :VideoEntityStats=>{:fields=>[{:name=>:summary_type, :type=>"VideoEntityStats.SummaryType", :min_occurs=>0, :max_occurs=>1}, {:name=>:segment_key, :type=>"SegmentKey", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpc, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpv, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_cpm, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:impression_reach_frequencies, :type=>"Integer_LongMapEntry", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:average_impression_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:average_view_frequency, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:unique_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:thumbnail_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:website_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:view_through_conversions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversions_many_per_view, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cost_per_conversion_many_per_view, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:conversion_rate_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_conversion_value, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:value_per_conv_many_per_view, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_view_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribes, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:follow_on_subscribe_rate, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:vtr, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:video_starts, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100s, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile25_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile50_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile75_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:quartile100_percents, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:percent_served, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:eligible_follow_on_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:engagement_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:retention_score, :type=>"double", :min_occurs=>0, :max_occurs=>1}, {:name=>:total_views, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_impressions, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_clicks, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:cta_ctr, :type=>"double", :min_occurs=>0, :max_occurs=>1}]}, :VideoBudget=>{:fields=>[{:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:amount, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:delivery_method, :type=>"VideoBudget.BudgetDeliveryMethod", :min_occurs=>0, :max_occurs=>1}, {:name=>:is_explicitly_shared, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}]}, :SummaryBudgets=>{:fields=>[{:name=>:total_video_budget, :type=>"VideoBudget", :min_occurs=>0, :max_occurs=>1}, {:name=>:non_video_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}, {:name=>:combined_budget, :type=>"Money", :min_occurs=>0, :max_occurs=>1}]}, :VideoCampaign=>{:fields=>[{:name=>:id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:status, :type=>"VideoCampaignStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:start_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:end_date, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:budget_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:bidding_mode, :type=>"VideoCampaign.BiddingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:targeting_mode, :type=>"VideoCampaign.TargetingMode", :min_occurs=>0, :max_occurs=>1}, {:name=>:spending_status, :type=>"VideoCampaign.SpendingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:scheduling_status, :type=>"CampaignSchedulingStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:ad_serving_optimization_status, :type=>"AdServingOptimizationStatus", :min_occurs=>0, :max_occurs=>1}, {:name=>:frequency_cap, :type=>"VideoFrequencyCap", :min_occurs=>0, :max_occurs=>1}, {:name=>:stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>1}, {:name=>:segmented_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}]}, :VideoCampaignOperation=>{:fields=>[{:name=>:operand, :type=>"VideoCampaign", :min_occurs=>0, :max_occurs=>1}], :base=>"Operation"}, :VideoCampaignPage=>{:fields=>[{:name=>:entries, :type=>"VideoCampaign", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_stats, :type=>"VideoEntityStats", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:summary_budgets, :type=>"SummaryBudgets", :min_occurs=>0, :max_occurs=>1}], :base=>"Page"}, :VideoCampaignReturnValue=>{:fields=>[{:name=>:value, :type=>"VideoCampaign", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ListReturnValue"}, :"AccessError.Reason"=>{:fields=>[]}, :AdServingOptimizationStatus=>{:fields=>[]}, :"AdsApiError.Reason"=>{:fields=>[]}, :"VideoBudget.BudgetDeliveryMethod"=>{:fields=>[]}, :CampaignSchedulingStatus=>{:fields=>[]}, :DayOfWeek=>{:fields=>[]}, :"DeviceKey.DeviceType"=>{:fields=>[]}, :"EntityNotFoundError.Reason"=>{:fields=>[]}, :Metric=>{:fields=>[]}, :RegionCode=>{:fields=>[]}, :"ReportError.Reason"=>{:fields=>[]}, :SegmentationDimension=>{:fields=>[]}, :"SegmentationError.Reason"=>{:fields=>[]}, :SortOrder=>{:fields=>[]}, :"SortingError.Reason"=>{:fields=>[]}, :"VideoEntityStats.SummaryType"=>{:fields=>[]}, :"StatsSelector.AllTimeRestrict"=>{:fields=>[]}, :StatsSortable=>{:fields=>[]}, :"TimeSeriesError.Reason"=>{:fields=>[]}, :TimeUnit=>{:fields=>[]}, :VideoAdDisplayFormat=>{:fields=>[]}, :"VideoAdDisplayFormat.Type"=>{:fields=>[]}, :VideoAdNetwork=>{:fields=>[]}, :"VideoBiddingError.Reason"=>{:fields=>[]}, :"VideoBudgetError.Reason"=>{:fields=>[]}, :"VideoCampaign.BiddingMode"=>{:fields=>[]}, :"VideoCampaign.SpendingStatus"=>{:fields=>[]}, :"VideoCampaign.TargetingMode"=>{:fields=>[]}, :"VideoCampaignError.Reason"=>{:fields=>[]}, :VideoCampaignSortable=>{:fields=>[]}, :VideoCampaignStatus=>{:fields=>[]}, :VideoLevel=>{:fields=>[]}}
|
16
|
+
VIDEOCAMPAIGNSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201209"]
|
17
|
+
|
18
|
+
def self.get_method_signature(method_name)
|
19
|
+
return VIDEOCAMPAIGNSERVICE_METHODS[method_name.to_sym]
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.get_type_signature(type_name)
|
23
|
+
return VIDEOCAMPAIGNSERVICE_TYPES[type_name.to_sym]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.get_namespace(index)
|
27
|
+
return VIDEOCAMPAIGNSERVICE_NAMESPACES[index]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Base class for exceptions.
|
32
|
+
class ApplicationException < AdwordsApi::Errors::ApiException
|
33
|
+
attr_reader :message # string
|
34
|
+
attr_reader :application_exception_type # string
|
35
|
+
end
|
36
|
+
|
37
|
+
# Exception class for holding a list of service errors.
|
38
|
+
class ApiException < ApplicationException
|
39
|
+
attr_reader :errors # ApiError
|
40
|
+
def initialize(exception_fault)
|
41
|
+
@array_fields ||= []
|
42
|
+
@array_fields << 'errors'
|
43
|
+
super(exception_fault, VideoCampaignServiceRegistry)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end; end; end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Encoding: utf-8
|
2
|
+
#
|
3
|
+
# This is auto-generated code, changes will be overwritten.
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2012, Google Inc. All Rights Reserved.
|
6
|
+
# License:: Licensed under the Apache License, Version 2.0.
|
7
|
+
#
|
8
|
+
# Code generated by AdsCommon library 0.9.2 on 2013-04-03 11:21:41.
|
9
|
+
|
10
|
+
require 'ads_common/savon_service'
|
11
|
+
require 'adwords_api/v201209/video_service_registry'
|
12
|
+
|
13
|
+
module AdwordsApi; module V201209; module VideoService
|
14
|
+
class VideoService < AdsCommon::SavonService
|
15
|
+
def initialize(config, endpoint)
|
16
|
+
namespace = 'https://adwords.google.com/api/adwords/video/v201209'
|
17
|
+
super(config, endpoint, namespace, :v201209)
|
18
|
+
end
|
19
|
+
|
20
|
+
def get(*args, &block)
|
21
|
+
return execute_action('get', args, &block)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mutate_call_to_action(*args, &block)
|
25
|
+
return execute_action('mutate_call_to_action', args, &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
def search(*args, &block)
|
29
|
+
return execute_action('search', args, &block)
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def get_service_registry()
|
35
|
+
return VideoServiceRegistry
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_module()
|
39
|
+
return AdwordsApi::V201209::VideoService
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end; end; end
|