forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiDefinition.cs
263 lines (220 loc) · 10.9 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
using System;
using Foundation;
using ObjCRuntime;
namespace Firebase.MLKit.NaturalLanguage
{
// @interface FIRNaturalLanguage : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRNaturalLanguage")]
interface NaturalLanguageApi
{
// @property (getter = isStatsCollectionEnabled, nonatomic) BOOL statsCollectionEnabled;
[Export ("statsCollectionEnabled")]
bool StatsCollectionEnabled { [Bind ("isStatsCollectionEnabled")] get; set; }
// +(instancetype _Nonnull)naturalLanguage __attribute__((swift_name("naturalLanguage()")));
[Static]
[Export("naturalLanguage")]
NaturalLanguageApi DefaultInstance { get; }
// +(instancetype _Nonnull)naturalLanguageForApp:(FIRApp * _Nonnull)app __attribute__((swift_name("naturalLanguage(app:)")));
[Static]
[Export ("naturalLanguageForApp:")]
NaturalLanguageApi From (Core.App app);
///
/// From FIRNaturalLanguage (LanguageID) category
///
// -(FIRLanguageIdentification * _Nonnull)languageIdentification;
[Export ("languageIdentification")]
LanguageId.LanguageIdentification GetLanguageIdentification ();
// -(FIRLanguageIdentification * _Nonnull)languageIdentificationWithOptions:(FIRLanguageIdentificationOptions * _Nonnull)options __attribute__((swift_name("languageIdentification(options:)")));
[Export ("languageIdentificationWithOptions:")]
LanguageId.LanguageIdentification GetLanguageIdentification (LanguageId.LanguageIdentificationOptions options);
///
/// From FIRNaturalLanguage (SmartReply) category
///
// -(FIRSmartReply * _Nonnull)smartReply;
[Export ("smartReply")]
SmartReply.SmartReply GetSmartReply ();
///
/// From FIRNaturalLanguage (SmartReply) category
///
// -(FIRTranslator * _Nonnull)translatorWithOptions:(FIRTranslatorOptions * _Nonnull)options __attribute__((swift_name("translator(options:)")));
[Export ("translatorWithOptions:")]
Translate.Translator GetTranslator (Translate.TranslatorOptions options);
}
}
namespace Firebase.MLKit.NaturalLanguage.LanguageId
{
// @interface FIRIdentifiedLanguage : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRIdentifiedLanguage")]
interface IdentifiedLanguage
{
// @property (readonly, copy, nonatomic) NSString * _Nonnull languageCode;
[Export ("languageCode")]
string LanguageCode { get; }
// @property (readonly, nonatomic) float confidence;
[Export ("confidence")]
float Confidence { get; }
}
// typedef void (^FIRIdentifyLanguageCallback)(NSString * _Nullable, NSError * _Nullable);
delegate void IdentifyLanguageCallbackHandler ([NullAllowed] string languageCode, [NullAllowed] NSError error);
// typedef void (^FIRIdentifyPossibleLanguagesCallback)(NSArray<FIRIdentifiedLanguage *> * _Nullable, NSError * _Nullable);
delegate void IdentifyPossibleLanguagesCallbackHandler ([NullAllowed] IdentifiedLanguage [] identifiedLanguages, [NullAllowed] NSError error);
// @interface FIRLanguageIdentification : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRLanguageIdentification")]
interface LanguageIdentification
{
// extern NSString *const _Nonnull FIRMLKitUndeterminedLanguageCode __attribute__((swift_name("MLKitUndeterminedLanguageCode")));
[Field ("FIRMLKitUndeterminedLanguageCode", "__Internal")]
NSString UndeterminedLanguageCode { get; }
// -(void)identifyLanguageForText:(NSString * _Nonnull)text completion:(FIRIdentifyLanguageCallback _Nonnull)completion __attribute__((swift_name("identifyLanguage(for:completion:)")));
[Async]
[Export ("identifyLanguageForText:completion:")]
void IdentifyLanguage (string text, IdentifyLanguageCallbackHandler completion);
// -(void)identifyPossibleLanguagesForText:(NSString * _Nonnull)text completion:(FIRIdentifyPossibleLanguagesCallback _Nonnull)completion __attribute__((swift_name("identifyPossibleLanguages(for:completion:)")));
[Async]
[Export ("identifyPossibleLanguagesForText:completion:")]
void IdentifyPossibleLanguages (string text, IdentifyPossibleLanguagesCallbackHandler completion);
}
// @interface FIRLanguageIdentificationOptions : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRLanguageIdentificationOptions")]
interface LanguageIdentificationOptions
{
// extern const float FIRDefaultIdentifyLanguageConfidenceThreshold __attribute__((swift_name("DefaultIdentifyLanguageConfidenceThreshold")));
[Field ("FIRDefaultIdentifyLanguageConfidenceThreshold", "__Internal")]
float DefaultIdentifyLanguageConfidenceThreshold { get; }
// extern const float FIRDefaultIdentifyPossibleLanguagesConfidenceThreshold __attribute__((swift_name("DefaultIdentifyPossibleLanguagesConfidenceThreshold")));
[Field ("FIRDefaultIdentifyPossibleLanguagesConfidenceThreshold", "__Internal")]
float DefaultIdentifyPossibleLanguagesConfidenceThreshold { get; }
// @property (readonly, nonatomic) float confidenceThreshold;
[Export ("confidenceThreshold")]
float ConfidenceThreshold { get; }
// -(instancetype _Nonnull)initWithConfidenceThreshold:(float)confidenceThreshold __attribute__((objc_designated_initializer));
[DesignatedInitializer]
[Export ("initWithConfidenceThreshold:")]
IntPtr Constructor (float confidenceThreshold);
}
}
namespace Firebase.MLKit.NaturalLanguage.SmartReply
{
// typedef void (^FIRSmartReplyCallback)(FIRSmartReplySuggestionResult * _Nullable, NSError * _Nullable);
delegate void SmartReplyCallbackHandler ([NullAllowed] SmartReplySuggestionResult result, [NullAllowed] NSError error);
// @interface FIRSmartReply : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRSmartReply")]
interface SmartReply
{
// -(void)suggestRepliesForMessages:(NSArray<FIRTextMessage *> * _Nonnull)messages completion:(FIRSmartReplyCallback _Nonnull)completion __attribute__((swift_name("suggestReplies(for:completion:)")));
[Async]
[Export ("suggestRepliesForMessages:completion:")]
void SuggestReplies (TextMessage [] messages, SmartReplyCallbackHandler completion);
}
// @interface FIRSmartReplySuggestion : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRSmartReplySuggestion")]
interface SmartReplySuggestion
{
// @property (readonly, copy, nonatomic) NSString * _Nonnull text;
[Export ("text")]
string Text { get; }
}
// @interface FIRSmartReplySuggestionResult : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRSmartReplySuggestionResult")]
interface SmartReplySuggestionResult
{
// @property (readonly, copy, nonatomic) NSArray<FIRSmartReplySuggestion *> * _Nonnull suggestions;
[Export ("suggestions", ArgumentSemantic.Copy)]
SmartReplySuggestion [] Suggestions { get; }
// @property (readonly, nonatomic) FIRSmartReplyResultStatus status;
[Export ("status")]
SmartReplyResultStatus Status { get; }
}
// @interface FIRTextMessage : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRTextMessage")]
interface TextMessage
{
// @property (readonly, nonatomic) NSString * _Nonnull text;
[Export ("text")]
string Text { get; }
// @property (readonly, nonatomic) NSTimeInterval timestamp;
[Export ("timestamp")]
double Timestamp { get; }
// @property (readonly, nonatomic) NSString * _Nonnull userID;
[Export ("userID")]
string UserId { get; }
// @property (readonly, nonatomic) BOOL isLocalUser;
[Export ("isLocalUser")]
bool IsLocalUser { get; }
// -(instancetype _Nonnull)initWithText:(NSString * _Nonnull)text timestamp:(NSTimeInterval)timestamp userID:(NSString * _Nonnull)userID isLocalUser:(BOOL)isLocalUser __attribute__((objc_designated_initializer));
[DesignatedInitializer]
[Export ("initWithText:timestamp:userID:isLocalUser:")]
IntPtr Constructor (string text, double timestamp, string userId, bool isLocalUser);
}
}
namespace Firebase.MLKit.NaturalLanguage.Translate
{
// @interface Translate (FIRModelManager)
[Category]
[BaseType (typeof(Common.ModelManager))]
interface FIRModelManager_Translate
{
// @property (readonly, nonatomic) NSSet<FIRTranslateRemoteModel *> * _Nonnull downloadedTranslateModels;
[Export ("downloadedTranslateModels")]
NSSet GetDownloadedTranslateModels ();
}
// @interface FIRTranslateRemoteModel : FIRRemoteModel
[DisableDefaultCtor]
[BaseType (typeof(Common.RemoteModel), Name = "FIRTranslateRemoteModel")]
interface TranslateRemoteModel
{
// @property (readonly, nonatomic) FIRTranslateLanguage language;
[Export ("language")]
TranslateLanguage Language { get; }
// +(FIRTranslateRemoteModel * _Nonnull)translateRemoteModelWithLanguage:(FIRTranslateLanguage)language __attribute__((swift_name("translateRemoteModel(language:)")));
[Static]
[Export ("translateRemoteModelWithLanguage:")]
TranslateRemoteModel Create (TranslateLanguage language);
}
// typedef void (^FIRTranslatorDownloadModelIfNeededCallback)(NSError * _Nullable);
delegate void TranslatorDownloadModelIfNeededCallbackHandler ([NullAllowed] NSError error);
// typedef void (^FIRTranslatorCallback)(NSString * _Nullable, NSError * _Nullable);
delegate void TranslatorCallbackHandler ([NullAllowed] string result, [NullAllowed] NSError error);
// @interface FIRTranslator : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRTranslator")]
interface Translator
{
// -(void)translateText:(NSString * _Nonnull)text completion:(FIRTranslatorCallback _Nonnull)completion __attribute__((swift_name("translate(_:completion:)")));
[Async]
[Export ("translateText:completion:")]
void TranslateText (string text, TranslatorCallbackHandler completion);
// -(void)downloadModelIfNeededWithCompletion:(FIRTranslatorDownloadModelIfNeededCallback _Nonnull)completion;
[Async]
[Export ("downloadModelIfNeededWithCompletion:")]
void DownloadModelIfNeeded (TranslatorDownloadModelIfNeededCallbackHandler completion);
// -(void)downloadModelIfNeededWithConditions:(FIRModelDownloadConditions * _Nonnull)conditions completion:(FIRTranslatorDownloadModelIfNeededCallback _Nonnull)completion;
[Async]
[Export ("downloadModelIfNeededWithConditions:completion:")]
void DownloadModelIfNeeded (Common.ModelDownloadConditions conditions, TranslatorDownloadModelIfNeededCallbackHandler completion);
}
// @interface FIRTranslatorOptions : NSObject
[DisableDefaultCtor]
[BaseType (typeof(NSObject), Name = "FIRTranslatorOptions")]
interface TranslatorOptions
{
// @property (readonly, nonatomic) FIRTranslateLanguage sourceLanguage;
[Export ("sourceLanguage")]
TranslateLanguage SourceLanguage { get; }
// @property (readonly, nonatomic) FIRTranslateLanguage targetLanguage;
[Export ("targetLanguage")]
TranslateLanguage TargetLanguage { get; }
// -(instancetype _Nonnull)initWithSourceLanguage:(FIRTranslateLanguage)sourceLanguage targetLanguage:(FIRTranslateLanguage)targetLanguage __attribute__((objc_designated_initializer));
[DesignatedInitializer]
[Export ("initWithSourceLanguage:targetLanguage:")]
IntPtr Constructor (TranslateLanguage sourceLanguage, TranslateLanguage targetLanguage);
}
}