google-apis-admob_v1beta 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -103,6 +103,11 @@ module Google
103
103
  # @return [String]
104
104
  attr_accessor :name
105
105
 
106
+ # Settings for a rewarded ad unit.
107
+ # Corresponds to the JSON property `rewardSettings`
108
+ # @return [Google::Apis::AdmobV1beta::AdUnitRewardSettings]
109
+ attr_accessor :reward_settings
110
+
106
111
  def initialize(**args)
107
112
  update!(**args)
108
113
  end
@@ -115,6 +120,174 @@ module Google
115
120
  @app_id = args[:app_id] if args.key?(:app_id)
116
121
  @display_name = args[:display_name] if args.key?(:display_name)
117
122
  @name = args[:name] if args.key?(:name)
123
+ @reward_settings = args[:reward_settings] if args.key?(:reward_settings)
124
+ end
125
+ end
126
+
127
+ # Settings to map an AdMob ad unit to a 3rd party ad unit.
128
+ class AdUnitMapping
129
+ include Google::Apis::Core::Hashable
130
+
131
+ # Settings for the specified ad unit to make an ad request to 3rd party ad
132
+ # network. Key-value pairs with values set by the user for the keys requested by
133
+ # the ad network. Please see https://support.google.com/admob/answer/3245073 for
134
+ # details on how to configure the network settings.
135
+ # Corresponds to the JSON property `adUnitConfigurations`
136
+ # @return [Hash<String,String>]
137
+ attr_accessor :ad_unit_configurations
138
+
139
+ # The ID of mediation ad source adapter used by this ad unit mapping. The
140
+ # adapter determines the information needed in the ad_network_settings.
141
+ # Corresponds to the JSON property `adapterId`
142
+ # @return [Fixnum]
143
+ attr_accessor :adapter_id
144
+
145
+ # Optional. The display name of this ad unit mapping instance.
146
+ # Corresponds to the JSON property `displayName`
147
+ # @return [String]
148
+ attr_accessor :display_name
149
+
150
+ # Resource name of this ad unit mapping. Format is: accounts/`publisher_id`/
151
+ # adUnits/`ad_unit_id_fragment`/adUnitMappings/`ad_unit_mapping_id` Example:
152
+ # accounts/pub-1234567890123456/adUnits/0123456789/adUnitMappings/987654321
153
+ # Corresponds to the JSON property `name`
154
+ # @return [String]
155
+ attr_accessor :name
156
+
157
+ # Output only. The status of this ad unit mapping.
158
+ # Corresponds to the JSON property `state`
159
+ # @return [String]
160
+ attr_accessor :state
161
+
162
+ def initialize(**args)
163
+ update!(**args)
164
+ end
165
+
166
+ # Update properties of this object
167
+ def update!(**args)
168
+ @ad_unit_configurations = args[:ad_unit_configurations] if args.key?(:ad_unit_configurations)
169
+ @adapter_id = args[:adapter_id] if args.key?(:adapter_id)
170
+ @display_name = args[:display_name] if args.key?(:display_name)
171
+ @name = args[:name] if args.key?(:name)
172
+ @state = args[:state] if args.key?(:state)
173
+ end
174
+ end
175
+
176
+ # Settings for a rewarded ad unit.
177
+ class AdUnitRewardSettings
178
+ include Google::Apis::Core::Hashable
179
+
180
+ # Reward amount for this ad unit.
181
+ # Corresponds to the JSON property `unitAmount`
182
+ # @return [Fixnum]
183
+ attr_accessor :unit_amount
184
+
185
+ # Reward item for this ad unit.
186
+ # Corresponds to the JSON property `unitType`
187
+ # @return [String]
188
+ attr_accessor :unit_type
189
+
190
+ def initialize(**args)
191
+ update!(**args)
192
+ end
193
+
194
+ # Update properties of this object
195
+ def update!(**args)
196
+ @unit_amount = args[:unit_amount] if args.key?(:unit_amount)
197
+ @unit_type = args[:unit_type] if args.key?(:unit_type)
198
+ end
199
+ end
200
+
201
+ # Describes adapters supported by each mediation ad source. Adapters correspond
202
+ # to a specific SDK implementation of the ad source, and are each associated
203
+ # with a single platform and a list of supported ad unit formats. Adapters may
204
+ # also require setting some configurations to perform ad requests.
205
+ # Configurations can be specified in the AdUnitMapping by setting the [
206
+ # ad_unit_configurations](#AdUnitMapping.ad_unit_configurations) key/value pairs.
207
+ # For example, the ad_unit_configurations can be used to pass various IDs to
208
+ # the adapter's third-party SDK.
209
+ class Adapter
210
+ include Google::Apis::Core::Hashable
211
+
212
+ # Output only. Configuration metadata associated with this adapter.
213
+ # Corresponds to the JSON property `adapterConfigMetadata`
214
+ # @return [Array<Google::Apis::AdmobV1beta::AdapterAdapterConfigMetadata>]
215
+ attr_accessor :adapter_config_metadata
216
+
217
+ # Output only. ID of this adapter. It is used to set [adapter_id](#AdUnitMapping.
218
+ # adapter_id).
219
+ # Corresponds to the JSON property `adapterId`
220
+ # @return [String]
221
+ attr_accessor :adapter_id
222
+
223
+ # Output only. Indicates the formats of the ad units supported by this adapter.
224
+ # Corresponds to the JSON property `formats`
225
+ # @return [Array<String>]
226
+ attr_accessor :formats
227
+
228
+ # Output only. Resource name of the adapter. Format is: accounts/`publisher_id`/
229
+ # adSources/`ad_source_id`/adapters/`adapter_id`.
230
+ # Corresponds to the JSON property `name`
231
+ # @return [String]
232
+ attr_accessor :name
233
+
234
+ # Output only. Mobile application platform supported by this adapter. Supported
235
+ # values are: IOS, ANDROID, WINDOWS_PHONE
236
+ # Corresponds to the JSON property `platform`
237
+ # @return [String]
238
+ attr_accessor :platform
239
+
240
+ # Output only. The display name of this adapter.
241
+ # Corresponds to the JSON property `title`
242
+ # @return [String]
243
+ attr_accessor :title
244
+
245
+ def initialize(**args)
246
+ update!(**args)
247
+ end
248
+
249
+ # Update properties of this object
250
+ def update!(**args)
251
+ @adapter_config_metadata = args[:adapter_config_metadata] if args.key?(:adapter_config_metadata)
252
+ @adapter_id = args[:adapter_id] if args.key?(:adapter_id)
253
+ @formats = args[:formats] if args.key?(:formats)
254
+ @name = args[:name] if args.key?(:name)
255
+ @platform = args[:platform] if args.key?(:platform)
256
+ @title = args[:title] if args.key?(:title)
257
+ end
258
+ end
259
+
260
+ # Configuration metadata associated with this adapter. They are used to define
261
+ # the ad_unit_configurations associated with AdUnitMappings for the this adapter.
262
+ class AdapterAdapterConfigMetadata
263
+ include Google::Apis::Core::Hashable
264
+
265
+ # This is used to fill the key of the [ad_unit_configurations](#AdUnitMapping.
266
+ # ad_unit_configurations).
267
+ # Corresponds to the JSON property `adapterConfigMetadataId`
268
+ # @return [String]
269
+ attr_accessor :adapter_config_metadata_id
270
+
271
+ # Name of the adapter configuration metadata.
272
+ # Corresponds to the JSON property `adapterConfigMetadataLabel`
273
+ # @return [String]
274
+ attr_accessor :adapter_config_metadata_label
275
+
276
+ # Whether this metadata is required for configuring the AdUnitMappings.
277
+ # Corresponds to the JSON property `isRequired`
278
+ # @return [Boolean]
279
+ attr_accessor :is_required
280
+ alias_method :is_required?, :is_required
281
+
282
+ def initialize(**args)
283
+ update!(**args)
284
+ end
285
+
286
+ # Update properties of this object
287
+ def update!(**args)
288
+ @adapter_config_metadata_id = args[:adapter_config_metadata_id] if args.key?(:adapter_config_metadata_id)
289
+ @adapter_config_metadata_label = args[:adapter_config_metadata_label] if args.key?(:adapter_config_metadata_label)
290
+ @is_required = args[:is_required] if args.key?(:is_required)
118
291
  end
119
292
  end
120
293
 
@@ -175,6 +348,15 @@ module Google
175
348
  class AppLinkedAppInfo
176
349
  include Google::Apis::Core::Hashable
177
350
 
351
+ # Optional. The app store information for published Android apps. This field is
352
+ # only used for apps on the Android platform and will be ignored if the PLATFORM
353
+ # is set to iOS. The default value is the Google Play App store. This field can
354
+ # be updated after app is created. If the app is not published, this field will
355
+ # not be included in the response.
356
+ # Corresponds to the JSON property `androidAppStores`
357
+ # @return [Array<String>]
358
+ attr_accessor :android_app_stores
359
+
178
360
  # The app store ID of the app; present if and only if the app is linked to an
179
361
  # app store. If the app is added to the Google Play store, it will be the
180
362
  # application ID of the app. For example: "com.example.myapp". See https://
@@ -198,6 +380,7 @@ module Google
198
380
 
199
381
  # Update properties of this object
200
382
  def update!(**args)
383
+ @android_app_stores = args[:android_app_stores] if args.key?(:android_app_stores)
201
384
  @app_store_id = args[:app_store_id] if args.key?(:app_store_id)
202
385
  @display_name = args[:display_name] if args.key?(:display_name)
203
386
  end
@@ -224,6 +407,218 @@ module Google
224
407
  end
225
408
  end
226
409
 
410
+ # Request to create a batch of ad unit mappings under the specific AdMob account.
411
+ class BatchCreateAdUnitMappingsRequest
412
+ include Google::Apis::Core::Hashable
413
+
414
+ # Required. The request message specifying the ad unit mappings to create. A
415
+ # maximum of 100 ad unit mappings can be created in a batch. If the number of ad
416
+ # unit mappings in the batch request exceed 100, the entire request will be
417
+ # rejected and no ad unit mappings will be created.
418
+ # Corresponds to the JSON property `requests`
419
+ # @return [Array<Google::Apis::AdmobV1beta::CreateAdUnitMappingRequest>]
420
+ attr_accessor :requests
421
+
422
+ def initialize(**args)
423
+ update!(**args)
424
+ end
425
+
426
+ # Update properties of this object
427
+ def update!(**args)
428
+ @requests = args[:requests] if args.key?(:requests)
429
+ end
430
+ end
431
+
432
+ # Response containing a batch of created ad unit mappings.
433
+ class BatchCreateAdUnitMappingsResponse
434
+ include Google::Apis::Core::Hashable
435
+
436
+ # The Ad units mappings created under the requested account.
437
+ # Corresponds to the JSON property `adUnitMappings`
438
+ # @return [Array<Google::Apis::AdmobV1beta::AdUnitMapping>]
439
+ attr_accessor :ad_unit_mappings
440
+
441
+ def initialize(**args)
442
+ update!(**args)
443
+ end
444
+
445
+ # Update properties of this object
446
+ def update!(**args)
447
+ @ad_unit_mappings = args[:ad_unit_mappings] if args.key?(:ad_unit_mappings)
448
+ end
449
+ end
450
+
451
+ # The request for the BatchUpdateCampaigns API.
452
+ class BatchUpdateCampaignsRequest
453
+ include Google::Apis::Core::Hashable
454
+
455
+ # Required. The individual requests to update campaigns. Max 1000 allowed.
456
+ # Corresponds to the JSON property `requests`
457
+ # @return [Array<Google::Apis::AdmobV1beta::UpdateCampaignRequest>]
458
+ attr_accessor :requests
459
+
460
+ def initialize(**args)
461
+ update!(**args)
462
+ end
463
+
464
+ # Update properties of this object
465
+ def update!(**args)
466
+ @requests = args[:requests] if args.key?(:requests)
467
+ end
468
+ end
469
+
470
+ # The response for the BatchUpdateCampaigns API.
471
+ class BatchUpdateCampaignsResponse
472
+ include Google::Apis::Core::Hashable
473
+
474
+ # The updated campaigns per the request.
475
+ # Corresponds to the JSON property `campaigns`
476
+ # @return [Array<Google::Apis::AdmobV1beta::Campaign>]
477
+ attr_accessor :campaigns
478
+
479
+ def initialize(**args)
480
+ update!(**args)
481
+ end
482
+
483
+ # Update properties of this object
484
+ def update!(**args)
485
+ @campaigns = args[:campaigns] if args.key?(:campaigns)
486
+ end
487
+ end
488
+
489
+ # Describes an AdMob campaign.
490
+ class Campaign
491
+ include Google::Apis::Core::Hashable
492
+
493
+ # CPI setting for AdMob campaign. Ignored unless campaign goal type is MAX_CPI
494
+ # or TARGET_CPI.
495
+ # Corresponds to the JSON property `cpiSetting`
496
+ # @return [Google::Apis::AdmobV1beta::CampaignCpiSetting]
497
+ attr_accessor :cpi_setting
498
+
499
+ # Output only. The display name for the campaign.
500
+ # Corresponds to the JSON property `displayName`
501
+ # @return [String]
502
+ attr_accessor :display_name
503
+
504
+ # Output only. The Goal type of the campaign.
505
+ # Corresponds to the JSON property `goalType`
506
+ # @return [String]
507
+ attr_accessor :goal_type
508
+
509
+ # Output only. Resource name for this campaign. Format is: accounts/`
510
+ # publisher_id`/campaigns/`campaign_id` Example: accounts/pub-9876543210987654/
511
+ # campaigns/0123456789
512
+ # Corresponds to the JSON property `name`
513
+ # @return [String]
514
+ attr_accessor :name
515
+
516
+ def initialize(**args)
517
+ update!(**args)
518
+ end
519
+
520
+ # Update properties of this object
521
+ def update!(**args)
522
+ @cpi_setting = args[:cpi_setting] if args.key?(:cpi_setting)
523
+ @display_name = args[:display_name] if args.key?(:display_name)
524
+ @goal_type = args[:goal_type] if args.key?(:goal_type)
525
+ @name = args[:name] if args.key?(:name)
526
+ end
527
+ end
528
+
529
+ # CPI setting for AdMob campaign. Ignored unless campaign goal type is MAX_CPI
530
+ # or TARGET_CPI.
531
+ class CampaignCpiSetting
532
+ include Google::Apis::Core::Hashable
533
+
534
+ # Cost-per-install for this campaign in micro units in the currency of the
535
+ # GoogleAds account linked to this AdMob publisher.
536
+ # Corresponds to the JSON property `cpiMicros`
537
+ # @return [Fixnum]
538
+ attr_accessor :cpi_micros
539
+
540
+ def initialize(**args)
541
+ update!(**args)
542
+ end
543
+
544
+ # Update properties of this object
545
+ def update!(**args)
546
+ @cpi_micros = args[:cpi_micros] if args.key?(:cpi_micros)
547
+ end
548
+ end
549
+
550
+ # The specification for generating a Campaign report. For example, the
551
+ # specification to get IMPRESSIONS and CLICKS sliced by CAMPAIGN_ID can look
552
+ # like the following example: ` "date_range": ` "start_date": `"year": 2021, "
553
+ # month": 12, "day": 1`, "end_date": `"year": 2021, "month": 12, "day": 30` `, "
554
+ # dimensions": ["CAMPAIGN_ID"], "metrics": ["IMPRESSIONS", "CLICKS"], `
555
+ class CampaignReportSpec
556
+ include Google::Apis::Core::Hashable
557
+
558
+ # Specification of a single date range. Both dates are inclusive.
559
+ # Corresponds to the JSON property `dateRange`
560
+ # @return [Google::Apis::AdmobV1beta::DateRange]
561
+ attr_accessor :date_range
562
+
563
+ # List of dimensions of the report. The value combination of these dimensions
564
+ # determines the row of the report. If no dimensions are specified, the report
565
+ # returns a single row of requested metrics for the entire account.
566
+ # Corresponds to the JSON property `dimensions`
567
+ # @return [Array<String>]
568
+ attr_accessor :dimensions
569
+
570
+ # Language used for any localized text, such as certain applicable dimension
571
+ # values. The language tag is defined in the IETF BCP47. Defaults to 'en-US' if
572
+ # unspecified or invalid.
573
+ # Corresponds to the JSON property `languageCode`
574
+ # @return [String]
575
+ attr_accessor :language_code
576
+
577
+ # List of metrics of the report. A report must specify at least one metric.
578
+ # Corresponds to the JSON property `metrics`
579
+ # @return [Array<String>]
580
+ attr_accessor :metrics
581
+
582
+ def initialize(**args)
583
+ update!(**args)
584
+ end
585
+
586
+ # Update properties of this object
587
+ def update!(**args)
588
+ @date_range = args[:date_range] if args.key?(:date_range)
589
+ @dimensions = args[:dimensions] if args.key?(:dimensions)
590
+ @language_code = args[:language_code] if args.key?(:language_code)
591
+ @metrics = args[:metrics] if args.key?(:metrics)
592
+ end
593
+ end
594
+
595
+ # Request to create an ad unit mapping under the specific AdMob account and ad
596
+ # unit.
597
+ class CreateAdUnitMappingRequest
598
+ include Google::Apis::Core::Hashable
599
+
600
+ # Settings to map an AdMob ad unit to a 3rd party ad unit.
601
+ # Corresponds to the JSON property `adUnitMapping`
602
+ # @return [Google::Apis::AdmobV1beta::AdUnitMapping]
603
+ attr_accessor :ad_unit_mapping
604
+
605
+ # Required. The parent which owns the ad unit mapping. Format: accounts/`
606
+ # publisher_id`/adUnits/`ad_unit_id`
607
+ # Corresponds to the JSON property `parent`
608
+ # @return [String]
609
+ attr_accessor :parent
610
+
611
+ def initialize(**args)
612
+ update!(**args)
613
+ end
614
+
615
+ # Update properties of this object
616
+ def update!(**args)
617
+ @ad_unit_mapping = args[:ad_unit_mapping] if args.key?(:ad_unit_mapping)
618
+ @parent = args[:parent] if args.key?(:parent)
619
+ end
620
+ end
621
+
227
622
  # Represents a whole or partial calendar date, such as a birthday. The time of
228
623
  # day and time zone are either specified elsewhere or are insignificant. The
229
624
  # date is relative to the Gregorian Calendar. This can represent one of the
@@ -304,6 +699,49 @@ module Google
304
699
  end
305
700
  end
306
701
 
702
+ # Request to generate campaign report.
703
+ class GenerateCampaignReportRequest
704
+ include Google::Apis::Core::Hashable
705
+
706
+ # The specification for generating a Campaign report. For example, the
707
+ # specification to get IMPRESSIONS and CLICKS sliced by CAMPAIGN_ID can look
708
+ # like the following example: ` "date_range": ` "start_date": `"year": 2021, "
709
+ # month": 12, "day": 1`, "end_date": `"year": 2021, "month": 12, "day": 30` `, "
710
+ # dimensions": ["CAMPAIGN_ID"], "metrics": ["IMPRESSIONS", "CLICKS"], `
711
+ # Corresponds to the JSON property `reportSpec`
712
+ # @return [Google::Apis::AdmobV1beta::CampaignReportSpec]
713
+ attr_accessor :report_spec
714
+
715
+ def initialize(**args)
716
+ update!(**args)
717
+ end
718
+
719
+ # Update properties of this object
720
+ def update!(**args)
721
+ @report_spec = args[:report_spec] if args.key?(:report_spec)
722
+ end
723
+ end
724
+
725
+ # Campaign Report API response.
726
+ class GenerateCampaignReportResponse
727
+ include Google::Apis::Core::Hashable
728
+
729
+ # The campaign report data from the specified publisher. At most 100000 rows
730
+ # will be returned from the API.
731
+ # Corresponds to the JSON property `rows`
732
+ # @return [Array<Google::Apis::AdmobV1beta::ReportRow>]
733
+ attr_accessor :rows
734
+
735
+ def initialize(**args)
736
+ update!(**args)
737
+ end
738
+
739
+ # Update properties of this object
740
+ def update!(**args)
741
+ @rows = args[:rows] if args.key?(:rows)
742
+ end
743
+ end
744
+
307
745
  # Request to generate an AdMob mediation report.
308
746
  class GenerateMediationReportRequest
309
747
  include Google::Apis::Core::Hashable
@@ -476,6 +914,32 @@ module Google
476
914
  end
477
915
  end
478
916
 
917
+ # Response for the ListAdUnitMappingsRequest.
918
+ class ListAdUnitMappingsResponse
919
+ include Google::Apis::Core::Hashable
920
+
921
+ # The ad unit mappings from the specified account and ad unit.
922
+ # Corresponds to the JSON property `adUnitMappings`
923
+ # @return [Array<Google::Apis::AdmobV1beta::AdUnitMapping>]
924
+ attr_accessor :ad_unit_mappings
925
+
926
+ # Used to set the `page_token` in the `ListAdUnitMappingsRequest` to retrieve
927
+ # the next page. If this field is omitted, there are no subsequent pages.
928
+ # Corresponds to the JSON property `nextPageToken`
929
+ # @return [String]
930
+ attr_accessor :next_page_token
931
+
932
+ def initialize(**args)
933
+ update!(**args)
934
+ end
935
+
936
+ # Update properties of this object
937
+ def update!(**args)
938
+ @ad_unit_mappings = args[:ad_unit_mappings] if args.key?(:ad_unit_mappings)
939
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
940
+ end
941
+ end
942
+
479
943
  # Response for the ad units list request.
480
944
  class ListAdUnitsResponse
481
945
  include Google::Apis::Core::Hashable
@@ -502,6 +966,32 @@ module Google
502
966
  end
503
967
  end
504
968
 
969
+ # Response for the ListAdaptersRequest.
970
+ class ListAdaptersResponse
971
+ include Google::Apis::Core::Hashable
972
+
973
+ # The adapter.
974
+ # Corresponds to the JSON property `adapters`
975
+ # @return [Array<Google::Apis::AdmobV1beta::Adapter>]
976
+ attr_accessor :adapters
977
+
978
+ # Used to set the `page_token` in the `ListAdapterRequest` to retrieve the next
979
+ # page. If this field is omitted, there are no subsequent pages.
980
+ # Corresponds to the JSON property `nextPageToken`
981
+ # @return [String]
982
+ attr_accessor :next_page_token
983
+
984
+ def initialize(**args)
985
+ update!(**args)
986
+ end
987
+
988
+ # Update properties of this object
989
+ def update!(**args)
990
+ @adapters = args[:adapters] if args.key?(:adapters)
991
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
992
+ end
993
+ end
994
+
505
995
  # Response for the apps list request.
506
996
  class ListAppsResponse
507
997
  include Google::Apis::Core::Hashable
@@ -528,6 +1018,58 @@ module Google
528
1018
  end
529
1019
  end
530
1020
 
1021
+ # Response for the ListCampaignsRequest.
1022
+ class ListCampaignsResponse
1023
+ include Google::Apis::Core::Hashable
1024
+
1025
+ # The resulting mediation groups for the requested account.
1026
+ # Corresponds to the JSON property `campaigns`
1027
+ # @return [Array<Google::Apis::AdmobV1beta::Campaign>]
1028
+ attr_accessor :campaigns
1029
+
1030
+ # Used to set the `page_token` in the `ListCampaignsRequest` to retrieve the
1031
+ # next page. If this field is omitted, there are no subsequent pages.
1032
+ # Corresponds to the JSON property `nextPageToken`
1033
+ # @return [String]
1034
+ attr_accessor :next_page_token
1035
+
1036
+ def initialize(**args)
1037
+ update!(**args)
1038
+ end
1039
+
1040
+ # Update properties of this object
1041
+ def update!(**args)
1042
+ @campaigns = args[:campaigns] if args.key?(:campaigns)
1043
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1044
+ end
1045
+ end
1046
+
1047
+ # Response for the mediation groups list request.
1048
+ class ListMediationGroupsResponse
1049
+ include Google::Apis::Core::Hashable
1050
+
1051
+ # The resulting mediation groups for the requested account.
1052
+ # Corresponds to the JSON property `mediationGroups`
1053
+ # @return [Array<Google::Apis::AdmobV1beta::MediationGroup>]
1054
+ attr_accessor :mediation_groups
1055
+
1056
+ # If not empty, indicates that there may be more mediation groups for the
1057
+ # request; this value should be passed in a new `ListMediationGroupsRequest`.
1058
+ # Corresponds to the JSON property `nextPageToken`
1059
+ # @return [String]
1060
+ attr_accessor :next_page_token
1061
+
1062
+ def initialize(**args)
1063
+ update!(**args)
1064
+ end
1065
+
1066
+ # Update properties of this object
1067
+ def update!(**args)
1068
+ @mediation_groups = args[:mediation_groups] if args.key?(:mediation_groups)
1069
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1070
+ end
1071
+ end
1072
+
531
1073
  # Response for the publisher account list request.
532
1074
  class ListPublisherAccountsResponse
533
1075
  include Google::Apis::Core::Hashable
@@ -584,6 +1126,286 @@ module Google
584
1126
  end
585
1127
  end
586
1128
 
1129
+ # The mediation A/B experiment. NEXT ID: 12
1130
+ class MediationAbExperiment
1131
+ include Google::Apis::Core::Hashable
1132
+
1133
+ # Output only. The experiment mediation lines for control. They are inherited
1134
+ # from the parent mediation group. It is an output only field.
1135
+ # Corresponds to the JSON property `controlMediationLines`
1136
+ # @return [Array<Google::Apis::AdmobV1beta::MediationAbExperimentExperimentMediationLine>]
1137
+ attr_accessor :control_mediation_lines
1138
+
1139
+ # The display name for the mediation A/B experiment.
1140
+ # Corresponds to the JSON property `displayName`
1141
+ # @return [String]
1142
+ attr_accessor :display_name
1143
+
1144
+ # Output only. Unique identifier for the mediation A/B experiment. It is an
1145
+ # output only property.
1146
+ # Corresponds to the JSON property `experimentId`
1147
+ # @return [String]
1148
+ attr_accessor :experiment_id
1149
+
1150
+ # Resource name for this experiment. The format is accounts/`publisher_id`/
1151
+ # mediationGroups/`mediation_group_id`/mediationAbExperiment/ `
1152
+ # mediation_group_experiment_id`. For example: accounts/pub-9876543210987654/
1153
+ # mediationGroups/0123456789/ mediationAbExperiment/12345
1154
+ # Corresponds to the JSON property `name`
1155
+ # @return [String]
1156
+ attr_accessor :name
1157
+
1158
+ # Output only. The state of the experiment. It is an output only field.
1159
+ # Corresponds to the JSON property `state`
1160
+ # @return [String]
1161
+ attr_accessor :state
1162
+
1163
+ # The experiment mediation lines created for the treatment. They will be used
1164
+ # for serving when the experiment status is RUNNING.
1165
+ # Corresponds to the JSON property `treatmentMediationLines`
1166
+ # @return [Array<Google::Apis::AdmobV1beta::MediationAbExperimentExperimentMediationLine>]
1167
+ attr_accessor :treatment_mediation_lines
1168
+
1169
+ # The percentage of the mediation A/B experiment traffic that will be send to
1170
+ # the treatment (variant B). The remainder is sent to the control (variant A).
1171
+ # The percentage is expressed as an integer in the inclusive range of [1,99].
1172
+ # See https://support.google.com/admob/answer/9572326 for details.
1173
+ # Corresponds to the JSON property `treatmentTrafficPercentage`
1174
+ # @return [Fixnum]
1175
+ attr_accessor :treatment_traffic_percentage
1176
+
1177
+ def initialize(**args)
1178
+ update!(**args)
1179
+ end
1180
+
1181
+ # Update properties of this object
1182
+ def update!(**args)
1183
+ @control_mediation_lines = args[:control_mediation_lines] if args.key?(:control_mediation_lines)
1184
+ @display_name = args[:display_name] if args.key?(:display_name)
1185
+ @experiment_id = args[:experiment_id] if args.key?(:experiment_id)
1186
+ @name = args[:name] if args.key?(:name)
1187
+ @state = args[:state] if args.key?(:state)
1188
+ @treatment_mediation_lines = args[:treatment_mediation_lines] if args.key?(:treatment_mediation_lines)
1189
+ @treatment_traffic_percentage = args[:treatment_traffic_percentage] if args.key?(:treatment_traffic_percentage)
1190
+ end
1191
+ end
1192
+
1193
+ # The mediation group line for the experiment. It will be used for serving
1194
+ # during the run of the experiment.
1195
+ class MediationAbExperimentExperimentMediationLine
1196
+ include Google::Apis::Core::Hashable
1197
+
1198
+ # Settings for an ad network used by a mediation group.
1199
+ # Corresponds to the JSON property `mediationGroupLine`
1200
+ # @return [Google::Apis::AdmobV1beta::MediationGroupMediationGroupLine]
1201
+ attr_accessor :mediation_group_line
1202
+
1203
+ def initialize(**args)
1204
+ update!(**args)
1205
+ end
1206
+
1207
+ # Update properties of this object
1208
+ def update!(**args)
1209
+ @mediation_group_line = args[:mediation_group_line] if args.key?(:mediation_group_line)
1210
+ end
1211
+ end
1212
+
1213
+ # Describes an AdMob mediation group.
1214
+ class MediationGroup
1215
+ include Google::Apis::Core::Hashable
1216
+
1217
+ # User provided name for the mediation group. The maximum length allowed is 120
1218
+ # characters.
1219
+ # Corresponds to the JSON property `displayName`
1220
+ # @return [String]
1221
+ attr_accessor :display_name
1222
+
1223
+ # Output only. The state of the mediation a/b experiment that belongs to this
1224
+ # mediation group.
1225
+ # Corresponds to the JSON property `mediationAbExperimentState`
1226
+ # @return [String]
1227
+ attr_accessor :mediation_ab_experiment_state
1228
+
1229
+ # The ID of the mediation group. Example: "0123456789". This is a read only
1230
+ # property.
1231
+ # Corresponds to the JSON property `mediationGroupId`
1232
+ # @return [String]
1233
+ attr_accessor :mediation_group_id
1234
+
1235
+ # The mediation lines used for serving for this mediation group. Key is the ID
1236
+ # of the mediation group line. For creation, use distinct negative values as
1237
+ # placeholder.
1238
+ # Corresponds to the JSON property `mediationGroupLines`
1239
+ # @return [Hash<String,Google::Apis::AdmobV1beta::MediationGroupMediationGroupLine>]
1240
+ attr_accessor :mediation_group_lines
1241
+
1242
+ # Resource name for this mediation group. Format is: accounts/`publisher_id`/
1243
+ # mediationGroups/`mediation_group_id` Example: accounts/pub-9876543210987654/
1244
+ # mediationGroups/0123456789
1245
+ # Corresponds to the JSON property `name`
1246
+ # @return [String]
1247
+ attr_accessor :name
1248
+
1249
+ # The status of the mediation group. Only enabled mediation groups will be
1250
+ # served.
1251
+ # Corresponds to the JSON property `state`
1252
+ # @return [String]
1253
+ attr_accessor :state
1254
+
1255
+ # Set of criteria targeted by this mediation group. For example, a mediation
1256
+ # group can target specific ad unit IDs, platform, format and geo location.
1257
+ # Corresponds to the JSON property `targeting`
1258
+ # @return [Google::Apis::AdmobV1beta::MediationGroupTargeting]
1259
+ attr_accessor :targeting
1260
+
1261
+ def initialize(**args)
1262
+ update!(**args)
1263
+ end
1264
+
1265
+ # Update properties of this object
1266
+ def update!(**args)
1267
+ @display_name = args[:display_name] if args.key?(:display_name)
1268
+ @mediation_ab_experiment_state = args[:mediation_ab_experiment_state] if args.key?(:mediation_ab_experiment_state)
1269
+ @mediation_group_id = args[:mediation_group_id] if args.key?(:mediation_group_id)
1270
+ @mediation_group_lines = args[:mediation_group_lines] if args.key?(:mediation_group_lines)
1271
+ @name = args[:name] if args.key?(:name)
1272
+ @state = args[:state] if args.key?(:state)
1273
+ @targeting = args[:targeting] if args.key?(:targeting)
1274
+ end
1275
+ end
1276
+
1277
+ # Settings for an ad network used by a mediation group.
1278
+ class MediationGroupMediationGroupLine
1279
+ include Google::Apis::Core::Hashable
1280
+
1281
+ # The ID of the ad source this mediation line is associated with.
1282
+ # Corresponds to the JSON property `adSourceId`
1283
+ # @return [String]
1284
+ attr_accessor :ad_source_id
1285
+
1286
+ # References of the ad unit mappings for each ad unit associated with this
1287
+ # mediation line. Key is the ad unit ID, value is resource name of the ad unit
1288
+ # mapping. For mediation lines where the ad source id is the AdMob Network, ad
1289
+ # unit mappings will be ignored.
1290
+ # Corresponds to the JSON property `adUnitMappings`
1291
+ # @return [Hash<String,String>]
1292
+ attr_accessor :ad_unit_mappings
1293
+
1294
+ # The CPM for this allocation line. $0.01 is the minimum allowed amount. For
1295
+ # LIVE CPM modes, the default amount is $0.01. This value is ignored if `
1296
+ # cpm_mode` is `LIVE`. **Warning:** "USD" is the only supported currency at the
1297
+ # moment. The unit is in micros.
1298
+ # Corresponds to the JSON property `cpmMicros`
1299
+ # @return [Fixnum]
1300
+ attr_accessor :cpm_micros
1301
+
1302
+ # Indicates how the CPM for this mediation line is provided. Note that `MANUAL`
1303
+ # and `LIVE` are the only fully-supported mode at the moment. Please use the
1304
+ # AdMob UI (https://admob.google.com) if you wish to create or update to other
1305
+ # cpm modes.
1306
+ # Corresponds to the JSON property `cpmMode`
1307
+ # @return [String]
1308
+ attr_accessor :cpm_mode
1309
+
1310
+ # User-provided label for this mediation line. The maximum length allowed is 255
1311
+ # characters.
1312
+ # Corresponds to the JSON property `displayName`
1313
+ # @return [String]
1314
+ attr_accessor :display_name
1315
+
1316
+ # Output only. The Mediation A/B experiment variant to which the mediation group
1317
+ # line belongs to.
1318
+ # Corresponds to the JSON property `experimentVariant`
1319
+ # @return [String]
1320
+ attr_accessor :experiment_variant
1321
+
1322
+ # The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a
1323
+ # new mediation group line, use a distinct negative integer as the ID place
1324
+ # holder.
1325
+ # Corresponds to the JSON property `id`
1326
+ # @return [String]
1327
+ attr_accessor :id
1328
+
1329
+ # The status of the mediation group line. Only enabled mediation group lines
1330
+ # will be served.
1331
+ # Corresponds to the JSON property `state`
1332
+ # @return [String]
1333
+ attr_accessor :state
1334
+
1335
+ def initialize(**args)
1336
+ update!(**args)
1337
+ end
1338
+
1339
+ # Update properties of this object
1340
+ def update!(**args)
1341
+ @ad_source_id = args[:ad_source_id] if args.key?(:ad_source_id)
1342
+ @ad_unit_mappings = args[:ad_unit_mappings] if args.key?(:ad_unit_mappings)
1343
+ @cpm_micros = args[:cpm_micros] if args.key?(:cpm_micros)
1344
+ @cpm_mode = args[:cpm_mode] if args.key?(:cpm_mode)
1345
+ @display_name = args[:display_name] if args.key?(:display_name)
1346
+ @experiment_variant = args[:experiment_variant] if args.key?(:experiment_variant)
1347
+ @id = args[:id] if args.key?(:id)
1348
+ @state = args[:state] if args.key?(:state)
1349
+ end
1350
+ end
1351
+
1352
+ # Set of criteria targeted by this mediation group. For example, a mediation
1353
+ # group can target specific ad unit IDs, platform, format and geo location.
1354
+ class MediationGroupTargeting
1355
+ include Google::Apis::Core::Hashable
1356
+
1357
+ # Ad units targeted by this mediation group. Example: "ca-app-pub-1234/8790".
1358
+ # Corresponds to the JSON property `adUnitIds`
1359
+ # @return [Array<String>]
1360
+ attr_accessor :ad_unit_ids
1361
+
1362
+ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if
1363
+ # this mediation group does not exclude any region.
1364
+ # Corresponds to the JSON property `excludedRegionCodes`
1365
+ # @return [Array<String>]
1366
+ attr_accessor :excluded_region_codes
1367
+
1368
+ # Ad format targeted by this mediation group. Examples: "banner", "native".
1369
+ # Corresponds to the JSON property `format`
1370
+ # @return [String]
1371
+ attr_accessor :format
1372
+
1373
+ # The parameter can be used to target ad requests based on the availability of
1374
+ # the IDFA. If set to ALL, the mediation group applies to all ad requests (with
1375
+ # or without IDFA). If set to AVAILABLE, the mediation group applies to ad
1376
+ # requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad
1377
+ # requests without IDFA. Doesn't need to be specified for an ANDROID device.
1378
+ # Corresponds to the JSON property `idfaTargeting`
1379
+ # @return [String]
1380
+ attr_accessor :idfa_targeting
1381
+
1382
+ # Describes the platform of the app. Examples: "IOS", "Android".
1383
+ # Corresponds to the JSON property `platform`
1384
+ # @return [String]
1385
+ attr_accessor :platform
1386
+
1387
+ # The Unicode country/region code (CLDR) of a location, such as "US". Unset if
1388
+ # this mediation group targets all available regions. For more information, see
1389
+ # http://www.unicode.org/reports/tr35/#unicode_region_subtag.
1390
+ # Corresponds to the JSON property `targetedRegionCodes`
1391
+ # @return [Array<String>]
1392
+ attr_accessor :targeted_region_codes
1393
+
1394
+ def initialize(**args)
1395
+ update!(**args)
1396
+ end
1397
+
1398
+ # Update properties of this object
1399
+ def update!(**args)
1400
+ @ad_unit_ids = args[:ad_unit_ids] if args.key?(:ad_unit_ids)
1401
+ @excluded_region_codes = args[:excluded_region_codes] if args.key?(:excluded_region_codes)
1402
+ @format = args[:format] if args.key?(:format)
1403
+ @idfa_targeting = args[:idfa_targeting] if args.key?(:idfa_targeting)
1404
+ @platform = args[:platform] if args.key?(:platform)
1405
+ @targeted_region_codes = args[:targeted_region_codes] if args.key?(:targeted_region_codes)
1406
+ end
1407
+ end
1408
+
587
1409
  # The specification for generating an AdMob Mediation report. For example, the
588
1410
  # specification to get observed ECPM sliced by ad source and app for the 'US'
589
1411
  # and 'CN' countries can look like the following example: ` "date_range": ` "
@@ -1078,6 +1900,25 @@ module Google
1078
1900
  end
1079
1901
  end
1080
1902
 
1903
+ # Request to end the mediation A/B experiment and choose a winning variant.
1904
+ class StopMediationAbExperimentRequest
1905
+ include Google::Apis::Core::Hashable
1906
+
1907
+ # The choice for the winning variant.
1908
+ # Corresponds to the JSON property `variantChoice`
1909
+ # @return [String]
1910
+ attr_accessor :variant_choice
1911
+
1912
+ def initialize(**args)
1913
+ update!(**args)
1914
+ end
1915
+
1916
+ # Update properties of this object
1917
+ def update!(**args)
1918
+ @variant_choice = args[:variant_choice] if args.key?(:variant_choice)
1919
+ end
1920
+ end
1921
+
1081
1922
  # List of string values.
1082
1923
  class StringList
1083
1924
  include Google::Apis::Core::Hashable
@@ -1096,6 +1937,33 @@ module Google
1096
1937
  @values = args[:values] if args.key?(:values)
1097
1938
  end
1098
1939
  end
1940
+
1941
+ # An update request for a singular campaign. Currently only cpi_micros of
1942
+ # MAX_CPI and TARGET_CPI campaigns can be updated.
1943
+ class UpdateCampaignRequest
1944
+ include Google::Apis::Core::Hashable
1945
+
1946
+ # Describes an AdMob campaign.
1947
+ # Corresponds to the JSON property `campaign`
1948
+ # @return [Google::Apis::AdmobV1beta::Campaign]
1949
+ attr_accessor :campaign
1950
+
1951
+ # List of campaign fields to be updated. Currently this field is not supported
1952
+ # as only the cpi_micros field can be updated.
1953
+ # Corresponds to the JSON property `updateMask`
1954
+ # @return [String]
1955
+ attr_accessor :update_mask
1956
+
1957
+ def initialize(**args)
1958
+ update!(**args)
1959
+ end
1960
+
1961
+ # Update properties of this object
1962
+ def update!(**args)
1963
+ @campaign = args[:campaign] if args.key?(:campaign)
1964
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1965
+ end
1966
+ end
1099
1967
  end
1100
1968
  end
1101
1969
  end