|
1 | 1 | // Copyright 2013 The Flutter Authors. All rights reserved.
|
2 | 2 | // Use of this source code is governed by a BSD-style license that can be
|
3 | 3 | // found in the LICENSE file.
|
4 |
| -// Autogenerated from Pigeon (v22.4.2), do not edit directly. |
| 4 | +// Autogenerated from Pigeon (v22.5.0), do not edit directly. |
5 | 5 | // See also: https://pub.dev/packages/pigeon
|
6 | 6 | @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass", "SyntheticAccessor")
|
7 | 7 |
|
@@ -561,6 +561,12 @@ abstract class InteractiveMediaAdsLibraryPigeonProxyApiRegistrar(
|
561 | 561 | */
|
562 | 562 | abstract fun getPigeonApiUniversalAdId(): PigeonApiUniversalAdId
|
563 | 563 |
|
| 564 | + /** |
| 565 | + * An implementation of [PigeonApiAd] used to add a new Dart instance of `Ad` to the Dart |
| 566 | + * `InstanceManager`. |
| 567 | + */ |
| 568 | + abstract fun getPigeonApiAd(): PigeonApiAd |
| 569 | + |
564 | 570 | fun setUp() {
|
565 | 571 | InteractiveMediaAdsLibraryPigeonInstanceManagerApi.setUpMessageHandlers(
|
566 | 572 | binaryMessenger, instanceManager)
|
@@ -705,6 +711,8 @@ private class InteractiveMediaAdsLibraryPigeonProxyApiBaseCodec(
|
705 | 711 | registrar.getPigeonApiCompanionAd().pigeon_newInstance(value) {}
|
706 | 712 | } else if (value is com.google.ads.interactivemedia.v3.api.UniversalAdId) {
|
707 | 713 | registrar.getPigeonApiUniversalAdId().pigeon_newInstance(value) {}
|
| 714 | + } else if (value is com.google.ads.interactivemedia.v3.api.Ad) { |
| 715 | + registrar.getPigeonApiAd().pigeon_newInstance(value) {} |
708 | 716 | }
|
709 | 717 |
|
710 | 718 | when {
|
@@ -4905,3 +4913,209 @@ abstract class PigeonApiUniversalAdId(
|
4905 | 4913 | }
|
4906 | 4914 | }
|
4907 | 4915 | }
|
| 4916 | +/** |
| 4917 | + * An object that holds data corresponding to the main Ad. |
| 4918 | + * |
| 4919 | + * See |
| 4920 | + * https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/Ad.html. |
| 4921 | + */ |
| 4922 | +@Suppress("UNCHECKED_CAST") |
| 4923 | +abstract class PigeonApiAd( |
| 4924 | + open val pigeonRegistrar: InteractiveMediaAdsLibraryPigeonProxyApiRegistrar |
| 4925 | +) { |
| 4926 | + /** The ad ID as specified in the VAST response. */ |
| 4927 | + abstract fun adId(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4928 | + |
| 4929 | + /** The pod metadata object. */ |
| 4930 | + abstract fun adPodInfo( |
| 4931 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 4932 | + ): com.google.ads.interactivemedia.v3.api.AdPodInfo |
| 4933 | + |
| 4934 | + /** The ad system as specified in the VAST response. */ |
| 4935 | + abstract fun adSystem(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4936 | + |
| 4937 | + /** The IDs of the ads' creatives, starting with the first wrapper ad. */ |
| 4938 | + abstract fun adWrapperCreativeIds( |
| 4939 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 4940 | + ): List<String> |
| 4941 | + |
| 4942 | + /** The wrapper ad IDs as specified in the VAST response. */ |
| 4943 | + abstract fun adWrapperIds( |
| 4944 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 4945 | + ): List<String> |
| 4946 | + |
| 4947 | + /** The wrapper ad systems as specified in the VAST response. */ |
| 4948 | + abstract fun adWrapperSystems( |
| 4949 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 4950 | + ): List<String> |
| 4951 | + |
| 4952 | + /** The advertiser name as defined by the serving party. */ |
| 4953 | + abstract fun advertiserName(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4954 | + |
| 4955 | + /** |
| 4956 | + * The companions for the current ad while using DAI. |
| 4957 | + * |
| 4958 | + * Returns an empty list in any other scenario. |
| 4959 | + */ |
| 4960 | + abstract fun companionAds( |
| 4961 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 4962 | + ): List<com.google.ads.interactivemedia.v3.api.CompanionAd> |
| 4963 | + |
| 4964 | + /** |
| 4965 | + * The content type of the currently selected creative, or null if no creative is selected or the |
| 4966 | + * content type is unavailable. |
| 4967 | + */ |
| 4968 | + abstract fun contentType(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String? |
| 4969 | + |
| 4970 | + /** The ISCI (Industry Standard Commercial Identifier) code for an ad. */ |
| 4971 | + abstract fun creativeAdId(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4972 | + |
| 4973 | + /** The ID of the selected creative for the ad, */ |
| 4974 | + abstract fun creativeId(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4975 | + |
| 4976 | + /** The first deal ID present in the wrapper chain for the current ad, starting from the top. */ |
| 4977 | + abstract fun dealId(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String |
| 4978 | + |
| 4979 | + /** The description of this ad from the VAST response. */ |
| 4980 | + abstract fun description(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String? |
| 4981 | + |
| 4982 | + /** The duration of the ad in seconds, -1 if not available. */ |
| 4983 | + abstract fun duration(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Double |
| 4984 | + |
| 4985 | + /** The height of the selected creative if non-linear, else returns 0. */ |
| 4986 | + abstract fun height(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Long |
| 4987 | + |
| 4988 | + /** The number of seconds of playback before the ad becomes skippable. */ |
| 4989 | + abstract fun skipTimeOffset(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Double |
| 4990 | + |
| 4991 | + /** The URL associated with the survey for the given ad. */ |
| 4992 | + abstract fun surveyUrl(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String? |
| 4993 | + |
| 4994 | + /** The title of this ad from the VAST response. */ |
| 4995 | + abstract fun title(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): String? |
| 4996 | + |
| 4997 | + /** The custom parameters associated with the ad at the time of ad trafficking. */ |
| 4998 | + abstract fun traffickingParameters( |
| 4999 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 5000 | + ): String |
| 5001 | + |
| 5002 | + /** Te set of ad UI elements rendered by the IMA SDK for this ad. */ |
| 5003 | + abstract fun uiElements( |
| 5004 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 5005 | + ): List<UiElement> |
| 5006 | + |
| 5007 | + /** The list of all universal ad IDs for this ad. */ |
| 5008 | + abstract fun universalAdIds( |
| 5009 | + pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad |
| 5010 | + ): List<com.google.ads.interactivemedia.v3.api.UniversalAdId> |
| 5011 | + |
| 5012 | + /** The VAST bitrate in Kbps of the selected creative. */ |
| 5013 | + abstract fun vastMediaBitrate(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Long |
| 5014 | + |
| 5015 | + /** The VAST media height in pixels of the selected creative. */ |
| 5016 | + abstract fun vastMediaHeight(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Long |
| 5017 | + |
| 5018 | + /** The VAST media width in pixels of the selected creative. */ |
| 5019 | + abstract fun vastMediaWidth(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Long |
| 5020 | + |
| 5021 | + /** The width of the selected creative if non-linear, else returns 0. */ |
| 5022 | + abstract fun width(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Long |
| 5023 | + |
| 5024 | + /** Indicates whether the ad’s current mode of operation is linear or non-linear. */ |
| 5025 | + abstract fun isLinear(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Boolean |
| 5026 | + |
| 5027 | + /** Indicates whether the ad can be skipped by the user. */ |
| 5028 | + abstract fun isSkippable(pigeon_instance: com.google.ads.interactivemedia.v3.api.Ad): Boolean |
| 5029 | + |
| 5030 | + @Suppress("LocalVariableName", "FunctionName") |
| 5031 | + /** Creates a Dart instance of Ad and attaches it to [pigeon_instanceArg]. */ |
| 5032 | + fun pigeon_newInstance( |
| 5033 | + pigeon_instanceArg: com.google.ads.interactivemedia.v3.api.Ad, |
| 5034 | + callback: (Result<Unit>) -> Unit |
| 5035 | + ) { |
| 5036 | + if (pigeonRegistrar.ignoreCallsToDart) { |
| 5037 | + callback( |
| 5038 | + Result.failure( |
| 5039 | + FlutterError("ignore-calls-error", "Calls to Dart are being ignored.", ""))) |
| 5040 | + return |
| 5041 | + } |
| 5042 | + if (pigeonRegistrar.instanceManager.containsInstance(pigeon_instanceArg)) { |
| 5043 | + Result.success(Unit) |
| 5044 | + return |
| 5045 | + } |
| 5046 | + val pigeon_identifierArg = |
| 5047 | + pigeonRegistrar.instanceManager.addHostCreatedInstance(pigeon_instanceArg) |
| 5048 | + val adIdArg = adId(pigeon_instanceArg) |
| 5049 | + val adPodInfoArg = adPodInfo(pigeon_instanceArg) |
| 5050 | + val adSystemArg = adSystem(pigeon_instanceArg) |
| 5051 | + val adWrapperCreativeIdsArg = adWrapperCreativeIds(pigeon_instanceArg) |
| 5052 | + val adWrapperIdsArg = adWrapperIds(pigeon_instanceArg) |
| 5053 | + val adWrapperSystemsArg = adWrapperSystems(pigeon_instanceArg) |
| 5054 | + val advertiserNameArg = advertiserName(pigeon_instanceArg) |
| 5055 | + val companionAdsArg = companionAds(pigeon_instanceArg) |
| 5056 | + val contentTypeArg = contentType(pigeon_instanceArg) |
| 5057 | + val creativeAdIdArg = creativeAdId(pigeon_instanceArg) |
| 5058 | + val creativeIdArg = creativeId(pigeon_instanceArg) |
| 5059 | + val dealIdArg = dealId(pigeon_instanceArg) |
| 5060 | + val descriptionArg = description(pigeon_instanceArg) |
| 5061 | + val durationArg = duration(pigeon_instanceArg) |
| 5062 | + val heightArg = height(pigeon_instanceArg) |
| 5063 | + val skipTimeOffsetArg = skipTimeOffset(pigeon_instanceArg) |
| 5064 | + val surveyUrlArg = surveyUrl(pigeon_instanceArg) |
| 5065 | + val titleArg = title(pigeon_instanceArg) |
| 5066 | + val traffickingParametersArg = traffickingParameters(pigeon_instanceArg) |
| 5067 | + val uiElementsArg = uiElements(pigeon_instanceArg) |
| 5068 | + val universalAdIdsArg = universalAdIds(pigeon_instanceArg) |
| 5069 | + val vastMediaBitrateArg = vastMediaBitrate(pigeon_instanceArg) |
| 5070 | + val vastMediaHeightArg = vastMediaHeight(pigeon_instanceArg) |
| 5071 | + val vastMediaWidthArg = vastMediaWidth(pigeon_instanceArg) |
| 5072 | + val widthArg = width(pigeon_instanceArg) |
| 5073 | + val isLinearArg = isLinear(pigeon_instanceArg) |
| 5074 | + val isSkippableArg = isSkippable(pigeon_instanceArg) |
| 5075 | + val binaryMessenger = pigeonRegistrar.binaryMessenger |
| 5076 | + val codec = pigeonRegistrar.codec |
| 5077 | + val channelName = "dev.flutter.pigeon.interactive_media_ads.Ad.pigeon_newInstance" |
| 5078 | + val channel = BasicMessageChannel<Any?>(binaryMessenger, channelName, codec) |
| 5079 | + channel.send( |
| 5080 | + listOf( |
| 5081 | + pigeon_identifierArg, |
| 5082 | + adIdArg, |
| 5083 | + adPodInfoArg, |
| 5084 | + adSystemArg, |
| 5085 | + adWrapperCreativeIdsArg, |
| 5086 | + adWrapperIdsArg, |
| 5087 | + adWrapperSystemsArg, |
| 5088 | + advertiserNameArg, |
| 5089 | + companionAdsArg, |
| 5090 | + contentTypeArg, |
| 5091 | + creativeAdIdArg, |
| 5092 | + creativeIdArg, |
| 5093 | + dealIdArg, |
| 5094 | + descriptionArg, |
| 5095 | + durationArg, |
| 5096 | + heightArg, |
| 5097 | + skipTimeOffsetArg, |
| 5098 | + surveyUrlArg, |
| 5099 | + titleArg, |
| 5100 | + traffickingParametersArg, |
| 5101 | + uiElementsArg, |
| 5102 | + universalAdIdsArg, |
| 5103 | + vastMediaBitrateArg, |
| 5104 | + vastMediaHeightArg, |
| 5105 | + vastMediaWidthArg, |
| 5106 | + widthArg, |
| 5107 | + isLinearArg, |
| 5108 | + isSkippableArg)) { |
| 5109 | + if (it is List<*>) { |
| 5110 | + if (it.size > 1) { |
| 5111 | + callback( |
| 5112 | + Result.failure(FlutterError(it[0] as String, it[1] as String, it[2] as String?))) |
| 5113 | + } else { |
| 5114 | + callback(Result.success(Unit)) |
| 5115 | + } |
| 5116 | + } else { |
| 5117 | + callback(Result.failure(createConnectionError(channelName))) |
| 5118 | + } |
| 5119 | + } |
| 5120 | + } |
| 5121 | +} |
0 commit comments