forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApiDefinition.cs
708 lines (492 loc) · 18.4 KB
/
ApiDefinition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
using System;
using ObjCRuntime;
using Foundation;
using UIKit;
using CoreGraphics;
namespace Google.Analytics
{
[Static]
interface GaiConstants
{
[Field ("kGAIUseSecure", "__Internal")]
NSString UseSecure { get; }
[Field ("kGAIHitType", "__Internal")]
NSString HitType { get; }
[Field ("kGAITrackingId", "__Internal")]
NSString TrackingId { get; }
[Field ("kGAIClientId", "__Internal")]
NSString ClientId { get; }
[Field ("kGAIDataSource", "__Internal")]
NSString DataSource { get; }
[Field ("kGAIAnonymizeIp", "__Internal")]
NSString AnonymizeIp { get; }
[Field ("kGAISessionControl", "__Internal")]
NSString SessionControl { get; }
[Field ("kGAIDeviceModelVersion", "__Internal")]
NSString DeviceModelVersion { get; }
[Field ("kGAIScreenResolution", "__Internal")]
NSString ScreenResolution { get; }
[Field ("kGAIViewportSize", "__Internal")]
NSString ViewportSize { get; }
[Field ("kGAIEncoding", "__Internal")]
NSString Encoding { get; }
[Field ("kGAIScreenColors", "__Internal")]
NSString ScreenColors { get; }
[Field ("kGAILanguage", "__Internal")]
NSString Language { get; }
[Field ("kGAIJavaEnabled", "__Internal")]
NSString JavaEnabled { get; }
[Field ("kGAIFlashVersion", "__Internal")]
NSString FlashVersion { get; }
[Field ("kGAINonInteraction", "__Internal")]
NSString NonInteraction { get; }
[Field ("kGAIReferrer", "__Internal")]
NSString Referrer { get; }
[Field ("kGAILocation", "__Internal")]
NSString Location { get; }
[Field ("kGAIHostname", "__Internal")]
NSString Hostname { get; }
[Field ("kGAIPage", "__Internal")]
NSString Page { get; }
[Field ("kGAIDescription", "__Internal")]
NSString Description { get; }
[Field ("kGAIScreenName", "__Internal")]
NSString ScreenName { get; }
[Field ("kGAITitle", "__Internal")]
NSString Title { get; }
[Field ("kGAIAdMobHitId", "__Internal")]
NSString AdMobHitId { get; }
[Field ("kGAIAppName", "__Internal")]
NSString AppName { get; }
[Field ("kGAIAppVersion", "__Internal")]
NSString AppVersion { get; }
[Field ("kGAIAppId", "__Internal")]
NSString AppId { get; }
[Field ("kGAIAppInstallerId", "__Internal")]
NSString AppInstallerId { get; }
[Field ("kGAIUserId", "__Internal")]
NSString UserId { get; }
[Field ("kGAIEventCategory", "__Internal")]
NSString EventCategory { get; }
[Field ("kGAIEventAction", "__Internal")]
NSString EventAction { get; }
[Field ("kGAIEventLabel", "__Internal")]
NSString EventLabel { get; }
[Field ("kGAIEventValue", "__Internal")]
NSString EventValue { get; }
[Field ("kGAISocialNetwork", "__Internal")]
NSString SocialNetwork { get; }
[Field ("kGAISocialAction", "__Internal")]
NSString SocialAction { get; }
[Field ("kGAISocialTarget", "__Internal")]
NSString SocialTarget { get; }
[Field ("kGAITransactionId", "__Internal")]
NSString TransactionId { get; }
[Field ("kGAITransactionAffiliation", "__Internal")]
NSString TransactionAffiliation { get; }
[Field ("kGAITransactionRevenue", "__Internal")]
NSString TransactionRevenue { get; }
[Field ("kGAITransactionShipping", "__Internal")]
NSString TransactionShipping { get; }
[Field ("kGAITransactionTax", "__Internal")]
NSString TransactionTax { get; }
[Field ("kGAICurrencyCode", "__Internal")]
NSString CurrencyCode { get; }
[Field ("kGAIItemPrice", "__Internal")]
NSString ItemPrice { get; }
[Field ("kGAIItemQuantity", "__Internal")]
NSString ItemQuantity { get; }
[Field ("kGAIItemSku", "__Internal")]
NSString ItemSku { get; }
[Field ("kGAIItemName", "__Internal")]
NSString ItemName { get; }
[Field ("kGAIItemCategory", "__Internal")]
NSString ItemCategory { get; }
[Field ("kGAICampaignSource", "__Internal")]
NSString CampaignSource { get; }
[Field ("kGAICampaignMedium", "__Internal")]
NSString CampaignMedium { get; }
[Field ("kGAICampaignName", "__Internal")]
NSString CampaignName { get; }
[Field ("kGAICampaignKeyword", "__Internal")]
NSString CampaignKeyword { get; }
[Field ("kGAICampaignContent", "__Internal")]
NSString CampaignContent { get; }
[Field ("kGAICampaignId", "__Internal")]
NSString CampaignId { get; }
[Field ("kGAICampaignAdNetworkClickId", "__Internal")]
NSString CampaignAdNetworkClickId { get; }
[Field ("kGAICampaignAdNetworkId", "__Internal")]
NSString CampaignAdNetworkId { get; }
[Field ("kGAITimingCategory", "__Internal")]
NSString TimingCategory { get; }
[Field ("kGAITimingVar", "__Internal")]
NSString TimingVar { get; }
[Field ("kGAITimingValue", "__Internal")]
NSString TimingValue { get; }
[Field ("kGAITimingLabel", "__Internal")]
NSString TimingLabel { get; }
[Field ("kGAIExDescription", "__Internal")]
NSString ExDescription { get; }
[Field ("kGAIExFatal", "__Internal")]
NSString ExFatal { get; }
[Field ("kGAISampleRate", "__Internal")]
NSString SampleRate { get; }
[Field ("kGAIIdfa", "__Internal")]
NSString Idfa { get; }
[Field ("kGAIAdTargetingEnabled", "__Internal")]
NSString AdTargetingEnabled { get; }
[Obsolete ("Use ScreenView property instead")]
[Field ("kGAIAppView", "__Internal")]
NSString AppView { get; }
[Field ("kGAIScreenView", "__Internal")]
NSString ScreenView { get; }
[Field ("kGAIEvent", "__Internal")]
NSString Event { get; }
[Field ("kGAISocial", "__Internal")]
NSString Social { get; }
[Field ("kGAITransaction", "__Internal")]
NSString Transaction { get; }
[Field ("kGAIItem", "__Internal")]
NSString Item { get; }
[Field ("kGAIException", "__Internal")]
NSString Exception { get; }
[Field ("kGAITiming", "__Internal")]
NSString Timing { get; }
[Field ("kGAIProduct", "__Internal")]
NSString Product { get; }
[Field ("kGAIVersion", "__Internal")]
NSString Version { get; }
[Field ("kGAIErrorDomain", "__Internal")]
NSString ErrorDomain { get; }
}
[Static]
interface EcommerceConstants
{
[Field ("kGAIProductId", "__Internal")]
NSString ProductId { get; }
[Field ("kGAIProductName", "__Internal")]
NSString ProductName { get; }
[Field ("kGAIProductBrand", "__Internal")]
NSString ProductBrand { get; }
[Field ("kGAIProductCategory", "__Internal")]
NSString ProductCategory { get; }
[Field ("kGAIProductVariant", "__Internal")]
NSString ProductVariant { get; }
[Field ("kGAIProductPrice", "__Internal")]
NSString ProductPrice { get; }
[Field ("kGAIProductQuantity", "__Internal")]
NSString ProductQuantity { get; }
[Field ("kGAIProductCouponCode", "__Internal")]
NSString ProductCouponCode { get; }
[Field ("kGAIProductPosition", "__Internal")]
NSString ProductPosition { get; }
[Field ("kGAIProductAction", "__Internal")]
NSString ProductAction { get; }
[Field ("kGAIPADetail", "__Internal")]
NSString PADetail { get; }
[Field ("kGAIPAClick", "__Internal")]
NSString PAClick { get; }
[Field ("kGAIPAAdd", "__Internal")]
NSString PAAdd { get; }
[Field ("kGAIPARemove", "__Internal")]
NSString PARemove { get; }
[Field ("kGAIPACheckout", "__Internal")]
NSString PACheckout { get; }
[Field ("kGAIPACheckoutOption", "__Internal")]
NSString PACheckoutOption { get; }
[Field ("kGAIPAPurchase", "__Internal")]
NSString PAPurchase { get; }
[Field ("kGAIPARefund", "__Internal")]
NSString PARefund { get; }
[Field ("kGAIPATransactionId", "__Internal")]
NSString PATransactionId { get; }
[Field ("kGAIPAAffiliation", "__Internal")]
NSString PAAffiliation { get; }
[Field ("kGAIPARevenue", "__Internal")]
NSString PARevenue { get; }
[Field ("kGAIPATax", "__Internal")]
NSString PATax { get; }
[Field ("kGAIPAShipping", "__Internal")]
NSString PAShipping { get; }
[Field ("kGAIPACouponCode", "__Internal")]
NSString PACouponCode { get; }
[Field ("kGAICheckoutStep", "__Internal")]
NSString CheckoutStep { get; }
[Field ("kGAICheckoutOption", "__Internal")]
NSString CheckoutOption { get; }
[Field ("kGAIProductActionList", "__Internal")]
NSString ProductActionList { get; }
[Field ("kGAIProductListSource", "__Internal")]
NSString ProductListSource { get; }
[Field ("kGAIImpressionName", "__Internal")]
NSString ImpressionName { get; }
[Field ("kGAIImpressionListSource", "__Internal")]
NSString ImpressionListSource { get; }
[Field ("kGAIImpressionProduct", "__Internal")]
NSString ImpressionProduct { get; }
[Field ("kGAIImpressionProductId", "__Internal")]
NSString ImpressionProductId { get; }
[Field ("kGAIImpressionProductName", "__Internal")]
NSString ImpressionProductName { get; }
[Field ("kGAIImpressionProductBrand", "__Internal")]
NSString ImpressionProductBrand { get; }
[Field ("kGAIImpressionProductCategory", "__Internal")]
NSString ImpressionProductCategory { get; }
[Field ("kGAIImpressionProductVariant", "__Internal")]
NSString ImpressionProductVariant { get; }
[Field ("kGAIImpressionProductPosition", "__Internal")]
NSString ImpressionProductPosition { get; }
[Field ("kGAIImpressionProductPrice", "__Internal")]
NSString ImpressionProductPrice { get; }
[Field ("kGAIPromotionId", "__Internal")]
NSString PromotionId { get; }
[Field ("kGAIPromotionName", "__Internal")]
NSString PromotionName { get; }
[Field ("kGAIPromotionCreative", "__Internal")]
NSString PromotionCreative { get; }
[Field ("kGAIPromotionPosition", "__Internal")]
NSString PromotionPosition { get; }
[Field ("kGAIPromotionAction", "__Internal")]
NSString PromotionAction { get; }
[Field ("kGAIPromotionView", "__Internal")]
NSString PromotionView { get; }
[Field ("kGAIPromotionClick", "__Internal")]
NSString PromotionClick { get; }
}
delegate void GaiCompletionHandler (DispatchResult result);
[BaseType (typeof(NSObject), Name = "GAI")]
interface Gai
{
[Export ("defaultTracker", ArgumentSemantic.Assign)] [NullAllowed]
ITracker DefaultTracker { get; set; }
[Export ("logger", ArgumentSemantic.Retain)] [NullAllowed]
ILogger Logger { get; set; }
[Export ("optOut", ArgumentSemantic.Assign)]
bool OptOut { get; set; }
[Export ("dispatchInterval", ArgumentSemantic.Assign)]
double DispatchInterval { get; set; }
[Export ("trackUncaughtExceptions", ArgumentSemantic.Assign)]
bool TrackUncaughtExceptions { get; set; }
[Export ("dryRun", ArgumentSemantic.Assign)]
bool DryRun { get; set; }
[Static]
[Export ("sharedInstance")]
Gai SharedInstance { get; }
[Export ("trackerWithName:trackingId:")]
ITracker GetTracker (string name, string trackingId);
[Export ("trackerWithTrackingId:")]
ITracker GetTracker (string trackingId);
[Export ("removeTrackerByName:")]
void RemoveTracker (string name);
[Export ("dispatch")]
void Dispatch ();
[Export ("dispatchWithCompletionHandler:")]
void Dispatch (GaiCompletionHandler completionHandler);
}
[BaseType (typeof(NSObject), Name = "GAIDictionaryBuilder")]
interface DictionaryBuilder
{
[Export ("set:forKey:")]
DictionaryBuilder Set ([NullAllowed] string value, [NullAllowed] string key);
[Export ("setAll:")]
DictionaryBuilder SetAll ([NullAllowed] NSDictionary parameters);
[Export ("get:")]
string Get ([NullAllowed] string paramName);
[Export ("build")]
NSMutableDictionary Build ();
[Export ("setCampaignParametersFromUrl:")]
DictionaryBuilder SetCampaignParameters (string urlString);
[Obsolete ("Use CreateScreenView instead.")]
[Static]
[Export ("createAppView")]
DictionaryBuilder CreateAppView ();
[Static]
[Export ("createScreenView")]
DictionaryBuilder CreateScreenView ();
[Static]
[Export ("createEventWithCategory:action:label:value:")]
DictionaryBuilder CreateEvent ([NullAllowed] string category, [NullAllowed] string action, [NullAllowed] string label, [NullAllowed] NSNumber number);
[Static]
[Export ("createExceptionWithDescription:withFatal:")]
DictionaryBuilder CreateException ([NullAllowed] string description, [NullAllowed] NSNumber fatal);
[Static]
[Export ("createItemWithTransactionId:name:sku:category:price:quantity:currencyCode:")]
DictionaryBuilder CreateItem ([NullAllowed] string transactionId, [NullAllowed] string name, [NullAllowed] string sku, [NullAllowed] string category, [NullAllowed] NSNumber price, [NullAllowed] NSNumber quantity, [NullAllowed] string currencyCode);
[Static]
[Export ("createSocialWithNetwork:action:target:")]
DictionaryBuilder CreateSocial ([NullAllowed] string network, [NullAllowed] string action, [NullAllowed] string target);
[Static]
[Export ("createTimingWithCategory:interval:name:label:")]
DictionaryBuilder CreateTiming ([NullAllowed] string category, [NullAllowed] NSNumber intervalMillis, [NullAllowed] string name, [NullAllowed] string label);
[Static]
[Export ("createTransactionWithId:affiliation:revenue:tax:shipping:currencyCode:")]
DictionaryBuilder CreateTransaction ([NullAllowed] string transactionId, [NullAllowed] string affiliation, [NullAllowed] NSNumber revenue, [NullAllowed] NSNumber tax, [NullAllowed] NSNumber shipping, [NullAllowed] string currencyCode);
[Export ("setProductAction:")]
DictionaryBuilder SetProductAction (EcommerceProductAction productAction);
[Export ("addProduct:")]
DictionaryBuilder AddProduct (EcommerceProduct product);
[Export ("addProductImpression:impressionList:impressionSource:")]
DictionaryBuilder AddProductImpression (EcommerceProduct product, string name, string source);
[Export ("addPromotion:")]
DictionaryBuilder AddPromotion (EcommercePromotion promotion);
}
[BaseType (typeof(NSObject), Name = "GAIFields")]
interface Fields
{
[Static]
[Export ("contentGroupForIndex:")]
string ContentGroup (nuint index);
[Static]
[Export ("customDimensionForIndex:")]
string CustomDimension (nuint index);
[Static]
[Export ("customMetricForIndex:")]
string CustomMetric (nuint index);
}
interface ILogger
{
}
[Protocol]
[Model]
[BaseType (typeof(NSObject), Name = "GAILogger")]
interface Logger
{
[Export ("logLevel")]
LogLevel GetLogLevel ();
[Export ("setLogLevel:")]
void SetLogLevel (LogLevel logLevel);
[Abstract]
[Export ("verbose:")]
void Verbose (string message);
[Abstract]
[Export ("info:")]
void Info (string message);
[Abstract]
[Export ("warning:")]
void Warning (string message);
[Abstract]
[Export ("error:")]
void Error (string message);
}
[BaseType (typeof(UIViewController), Name = "GAITrackedViewController")]
interface TrackedViewController
{
[Export ("tracker", ArgumentSemantic.Assign)] [NullAllowed]
ITracker Tracker { get; set; }
[Export ("screenName", ArgumentSemantic.Copy)] [NullAllowed]
string ScreenName { get; set; }
}
interface ITracker
{
}
[Model]
[Protocol]
[BaseType (typeof(NSObject), Name = "GAITracker")]
interface Tracker
{
[Export ("name")]
string GetName ();
[Export ("allowIDFACollection")]
bool GetAllowIdfaCollection ();
[Export ("setAllowIDFACollection:")]
void SetAllowIdfaCollection (bool allow);
[Abstract]
[Export ("set:value:")]
void Set (string parameterName, [NullAllowed] string value);
[Abstract]
[Export ("get:")]
string Get ([NullAllowed] string parameterName);
[Abstract]
[Export ("send:")]
void Send ([NullAllowed] NSDictionary parameters);
}
[BaseType (typeof(NSObject), Name = "GAIEcommerceFields")]
interface EcommerceFields
{
[Static]
[Export ("productFieldForIndex:suffix:")]
string ProductField (nuint index, string suffix);
[Static]
[Export ("impressionListForIndex:")]
string ImpressionList (nuint index);
[Static]
[Export ("productImpressionForList:index:suffix:")]
string ProductImpression (string list, nuint index, string suffix);
[Static]
[Export ("promotionForIndex:suffix:")]
string Promotion (nuint index, string suffix);
}
[BaseType (typeof(NSObject), Name = "GAIEcommerceProduct")]
interface EcommerceProduct
{
[Export ("setId:")]
EcommerceProduct SetId (string productId);
[Export ("setName:")]
EcommerceProduct SetName (string productName);
[Export ("setBrand:")]
EcommerceProduct SetBrand (string productBrand);
[Export ("setCategory:")]
EcommerceProduct SetCategory (string productCategory);
[Export ("setVariant:")]
EcommerceProduct SetVariant (string productVariant);
[Export ("setPrice:")]
EcommerceProduct SetPrice (NSNumber productPrice);
[Export ("setQuantity:")]
EcommerceProduct SetQuantity (NSNumber productQuantity);
[Export ("setCouponCode:")]
EcommerceProduct SetCouponCode (string productCouponCode);
[Export ("setPosition:")]
EcommerceProduct SetPosition (NSNumber productPosition);
[Export ("setCustomDimension:value:")]
EcommerceProduct SetCustomDimension (nuint index, string value);
[Export ("setCustomMetric:value:")]
EcommerceProduct SetCustomMetric (nuint index, NSNumber value);
[Export ("buildWithIndex:")]
NSDictionary Build (nuint index);
[Export ("buildWithListIndex:index:")]
NSDictionary Build (nuint listIndex, nuint index);
}
[BaseType (typeof(NSObject), Name = "GAIEcommerceProductAction")]
interface EcommerceProductAction
{
[Export ("setAction:")]
EcommerceProductAction SetAction (string productAction);
[Export ("setTransactionId:")]
EcommerceProductAction SetTransactionId (string transactionId);
[Export ("setAffiliation:")]
EcommerceProductAction SetAffiliation (string affiliation);
[Export ("setRevenue:")]
EcommerceProductAction SetRevenue (NSNumber revenue);
[Export ("setTax:")]
EcommerceProductAction SetTax (NSNumber tax);
[Export ("setShipping:")]
EcommerceProductAction SetShipping (NSNumber shipping);
[Export ("setCouponCode:")]
EcommerceProductAction SetCouponCode (string couponCode);
[Export ("setCheckoutStep:")]
EcommerceProductAction SetCheckoutStep (NSNumber checkoutStep);
[Export ("setCheckoutOption:")]
EcommerceProductAction SetCheckoutOption (string checkoutOption);
[Export ("setProductActionList:")]
EcommerceProductAction SetProductActionList (string productActionList);
[Export ("setProductListSource:")]
EcommerceProductAction SetProductListSource (string productListSource);
[Export ("build")]
NSDictionary Build ();
}
[BaseType (typeof(NSObject), Name = "GAIEcommercePromotion")]
interface EcommercePromotion
{
[Export ("setId:")]
EcommercePromotion SetId (string pid);
[Export ("setName:")]
EcommercePromotion SetName (string name);
[Export ("setCreative:")]
EcommercePromotion SetCreative (string creative);
[Export ("setPosition:")]
EcommercePromotion SetPosition (string position);
[Export ("buildWithIndex:")]
NSDictionary Build (nuint index);
}
}