| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Models; |
| | 15 | | using System.Collections; |
| | 16 | | using System.Collections.Generic; |
| | 17 | | using System.IO; |
| | 18 | | using System.Threading; |
| | 19 | | using System.Threading.Tasks; |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// Extension methods for CustomVisionPredictionClient. |
| | 23 | | /// </summary> |
| | 24 | | public static partial class CustomVisionPredictionClientExtensions |
| | 25 | | { |
| | 26 | | /// <summary> |
| | 27 | | /// Classify an image and saves the result. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='operations'> |
| | 30 | | /// The operations group for this extension method. |
| | 31 | | /// </param> |
| | 32 | | /// <param name='projectId'> |
| | 33 | | /// The project id. |
| | 34 | | /// </param> |
| | 35 | | /// <param name='publishedName'> |
| | 36 | | /// Specifies the name of the model to evaluate against. |
| | 37 | | /// </param> |
| | 38 | | /// <param name='imageData'> |
| | 39 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 40 | | /// images up to 4MB. |
| | 41 | | /// </param> |
| | 42 | | /// <param name='application'> |
| | 43 | | /// Optional. Specifies the name of application using the endpoint. |
| | 44 | | /// </param> |
| | 45 | | public static ImagePrediction ClassifyImage(this ICustomVisionPredictionClient operations, System.Guid proje |
| | 46 | | { |
| 2 | 47 | | return operations.ClassifyImageAsync(projectId, publishedName, imageData, application).GetAwaiter().GetR |
| | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// Classify an image and saves the result. |
| | 52 | | /// </summary> |
| | 53 | | /// <param name='operations'> |
| | 54 | | /// The operations group for this extension method. |
| | 55 | | /// </param> |
| | 56 | | /// <param name='projectId'> |
| | 57 | | /// The project id. |
| | 58 | | /// </param> |
| | 59 | | /// <param name='publishedName'> |
| | 60 | | /// Specifies the name of the model to evaluate against. |
| | 61 | | /// </param> |
| | 62 | | /// <param name='imageData'> |
| | 63 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 64 | | /// images up to 4MB. |
| | 65 | | /// </param> |
| | 66 | | /// <param name='application'> |
| | 67 | | /// Optional. Specifies the name of application using the endpoint. |
| | 68 | | /// </param> |
| | 69 | | /// <param name='cancellationToken'> |
| | 70 | | /// The cancellation token. |
| | 71 | | /// </param> |
| | 72 | | public static async Task<ImagePrediction> ClassifyImageAsync(this ICustomVisionPredictionClient operations, |
| | 73 | | { |
| 2 | 74 | | using (var _result = await operations.ClassifyImageWithHttpMessagesAsync(projectId, publishedName, image |
| | 75 | | { |
| 2 | 76 | | return _result.Body; |
| | 77 | | } |
| 2 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Classify an image and saves the result. |
| | 82 | | /// </summary> |
| | 83 | | /// <param name='operations'> |
| | 84 | | /// The operations group for this extension method. |
| | 85 | | /// </param> |
| | 86 | | /// <param name='projectId'> |
| | 87 | | /// The project id. |
| | 88 | | /// </param> |
| | 89 | | /// <param name='publishedName'> |
| | 90 | | /// Specifies the name of the model to evaluate against. |
| | 91 | | /// </param> |
| | 92 | | /// <param name='imageData'> |
| | 93 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 94 | | /// images up to 4MB. |
| | 95 | | /// </param> |
| | 96 | | /// <param name='application'> |
| | 97 | | /// Optional. Specifies the name of application using the endpoint. |
| | 98 | | /// </param> |
| | 99 | | /// <param name='customHeaders'> |
| | 100 | | /// Headers that will be added to request. |
| | 101 | | /// </param> |
| | 102 | | public static HttpOperationResponse<ImagePrediction> ClassifyImageWithHttpMessages(this ICustomVisionPredict |
| | 103 | | { |
| 0 | 104 | | return operations.ClassifyImageWithHttpMessagesAsync(projectId, publishedName, imageData, application, c |
| | 105 | | } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Classify an image without saving the result. |
| | 109 | | /// </summary> |
| | 110 | | /// <param name='operations'> |
| | 111 | | /// The operations group for this extension method. |
| | 112 | | /// </param> |
| | 113 | | /// <param name='projectId'> |
| | 114 | | /// The project id. |
| | 115 | | /// </param> |
| | 116 | | /// <param name='publishedName'> |
| | 117 | | /// Specifies the name of the model to evaluate against. |
| | 118 | | /// </param> |
| | 119 | | /// <param name='imageData'> |
| | 120 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 121 | | /// images up to 4MB. |
| | 122 | | /// </param> |
| | 123 | | /// <param name='application'> |
| | 124 | | /// Optional. Specifies the name of application using the endpoint. |
| | 125 | | /// </param> |
| | 126 | | public static ImagePrediction ClassifyImageWithNoStore(this ICustomVisionPredictionClient operations, System |
| | 127 | | { |
| 2 | 128 | | return operations.ClassifyImageWithNoStoreAsync(projectId, publishedName, imageData, application).GetAwa |
| | 129 | | } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// Classify an image without saving the result. |
| | 133 | | /// </summary> |
| | 134 | | /// <param name='operations'> |
| | 135 | | /// The operations group for this extension method. |
| | 136 | | /// </param> |
| | 137 | | /// <param name='projectId'> |
| | 138 | | /// The project id. |
| | 139 | | /// </param> |
| | 140 | | /// <param name='publishedName'> |
| | 141 | | /// Specifies the name of the model to evaluate against. |
| | 142 | | /// </param> |
| | 143 | | /// <param name='imageData'> |
| | 144 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 145 | | /// images up to 4MB. |
| | 146 | | /// </param> |
| | 147 | | /// <param name='application'> |
| | 148 | | /// Optional. Specifies the name of application using the endpoint. |
| | 149 | | /// </param> |
| | 150 | | /// <param name='cancellationToken'> |
| | 151 | | /// The cancellation token. |
| | 152 | | /// </param> |
| | 153 | | public static async Task<ImagePrediction> ClassifyImageWithNoStoreAsync(this ICustomVisionPredictionClient o |
| | 154 | | { |
| 2 | 155 | | using (var _result = await operations.ClassifyImageWithNoStoreWithHttpMessagesAsync(projectId, published |
| | 156 | | { |
| 2 | 157 | | return _result.Body; |
| | 158 | | } |
| 2 | 159 | | } |
| | 160 | |
|
| | 161 | | /// <summary> |
| | 162 | | /// Classify an image without saving the result. |
| | 163 | | /// </summary> |
| | 164 | | /// <param name='operations'> |
| | 165 | | /// The operations group for this extension method. |
| | 166 | | /// </param> |
| | 167 | | /// <param name='projectId'> |
| | 168 | | /// The project id. |
| | 169 | | /// </param> |
| | 170 | | /// <param name='publishedName'> |
| | 171 | | /// Specifies the name of the model to evaluate against. |
| | 172 | | /// </param> |
| | 173 | | /// <param name='imageData'> |
| | 174 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 175 | | /// images up to 4MB. |
| | 176 | | /// </param> |
| | 177 | | /// <param name='application'> |
| | 178 | | /// Optional. Specifies the name of application using the endpoint. |
| | 179 | | /// </param> |
| | 180 | | /// <param name='customHeaders'> |
| | 181 | | /// Headers that will be added to request. |
| | 182 | | /// </param> |
| | 183 | | public static HttpOperationResponse<ImagePrediction> ClassifyImageWithNoStoreWithHttpMessages(this ICustomVi |
| | 184 | | { |
| 0 | 185 | | return operations.ClassifyImageWithNoStoreWithHttpMessagesAsync(projectId, publishedName, imageData, app |
| | 186 | | } |
| | 187 | |
|
| | 188 | | /// <summary> |
| | 189 | | /// Classify an image url and saves the result. |
| | 190 | | /// </summary> |
| | 191 | | /// <param name='operations'> |
| | 192 | | /// The operations group for this extension method. |
| | 193 | | /// </param> |
| | 194 | | /// <param name='projectId'> |
| | 195 | | /// The project id. |
| | 196 | | /// </param> |
| | 197 | | /// <param name='publishedName'> |
| | 198 | | /// Specifies the name of the model to evaluate against. |
| | 199 | | /// </param> |
| | 200 | | /// <param name='imageUrl'> |
| | 201 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 202 | | /// </param> |
| | 203 | | /// <param name='application'> |
| | 204 | | /// Optional. Specifies the name of application using the endpoint. |
| | 205 | | /// </param> |
| | 206 | | public static ImagePrediction ClassifyImageUrl(this ICustomVisionPredictionClient operations, System.Guid pr |
| | 207 | | { |
| 2 | 208 | | return operations.ClassifyImageUrlAsync(projectId, publishedName, imageUrl, application).GetAwaiter().Ge |
| | 209 | | } |
| | 210 | |
|
| | 211 | | /// <summary> |
| | 212 | | /// Classify an image url and saves the result. |
| | 213 | | /// </summary> |
| | 214 | | /// <param name='operations'> |
| | 215 | | /// The operations group for this extension method. |
| | 216 | | /// </param> |
| | 217 | | /// <param name='projectId'> |
| | 218 | | /// The project id. |
| | 219 | | /// </param> |
| | 220 | | /// <param name='publishedName'> |
| | 221 | | /// Specifies the name of the model to evaluate against. |
| | 222 | | /// </param> |
| | 223 | | /// <param name='imageUrl'> |
| | 224 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 225 | | /// </param> |
| | 226 | | /// <param name='application'> |
| | 227 | | /// Optional. Specifies the name of application using the endpoint. |
| | 228 | | /// </param> |
| | 229 | | /// <param name='cancellationToken'> |
| | 230 | | /// The cancellation token. |
| | 231 | | /// </param> |
| | 232 | | public static async Task<ImagePrediction> ClassifyImageUrlAsync(this ICustomVisionPredictionClient operation |
| | 233 | | { |
| 2 | 234 | | using (var _result = await operations.ClassifyImageUrlWithHttpMessagesAsync(projectId, publishedName, im |
| | 235 | | { |
| 2 | 236 | | return _result.Body; |
| | 237 | | } |
| 2 | 238 | | } |
| | 239 | |
|
| | 240 | | /// <summary> |
| | 241 | | /// Classify an image url and saves the result. |
| | 242 | | /// </summary> |
| | 243 | | /// <param name='operations'> |
| | 244 | | /// The operations group for this extension method. |
| | 245 | | /// </param> |
| | 246 | | /// <param name='projectId'> |
| | 247 | | /// The project id. |
| | 248 | | /// </param> |
| | 249 | | /// <param name='publishedName'> |
| | 250 | | /// Specifies the name of the model to evaluate against. |
| | 251 | | /// </param> |
| | 252 | | /// <param name='imageUrl'> |
| | 253 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 254 | | /// </param> |
| | 255 | | /// <param name='application'> |
| | 256 | | /// Optional. Specifies the name of application using the endpoint. |
| | 257 | | /// </param> |
| | 258 | | /// <param name='customHeaders'> |
| | 259 | | /// Headers that will be added to request. |
| | 260 | | /// </param> |
| | 261 | | public static HttpOperationResponse<ImagePrediction> ClassifyImageUrlWithHttpMessages(this ICustomVisionPred |
| | 262 | | { |
| 0 | 263 | | return operations.ClassifyImageUrlWithHttpMessagesAsync(projectId, publishedName, imageUrl, application, |
| | 264 | | } |
| | 265 | |
|
| | 266 | | /// <summary> |
| | 267 | | /// Classify an image url without saving the result. |
| | 268 | | /// </summary> |
| | 269 | | /// <param name='operations'> |
| | 270 | | /// The operations group for this extension method. |
| | 271 | | /// </param> |
| | 272 | | /// <param name='projectId'> |
| | 273 | | /// The project id. |
| | 274 | | /// </param> |
| | 275 | | /// <param name='publishedName'> |
| | 276 | | /// Specifies the name of the model to evaluate against. |
| | 277 | | /// </param> |
| | 278 | | /// <param name='imageUrl'> |
| | 279 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 280 | | /// evaluated. |
| | 281 | | /// </param> |
| | 282 | | /// <param name='application'> |
| | 283 | | /// Optional. Specifies the name of application using the endpoint. |
| | 284 | | /// </param> |
| | 285 | | public static ImagePrediction ClassifyImageUrlWithNoStore(this ICustomVisionPredictionClient operations, Sys |
| | 286 | | { |
| 2 | 287 | | return operations.ClassifyImageUrlWithNoStoreAsync(projectId, publishedName, imageUrl, application).GetA |
| | 288 | | } |
| | 289 | |
|
| | 290 | | /// <summary> |
| | 291 | | /// Classify an image url without saving the result. |
| | 292 | | /// </summary> |
| | 293 | | /// <param name='operations'> |
| | 294 | | /// The operations group for this extension method. |
| | 295 | | /// </param> |
| | 296 | | /// <param name='projectId'> |
| | 297 | | /// The project id. |
| | 298 | | /// </param> |
| | 299 | | /// <param name='publishedName'> |
| | 300 | | /// Specifies the name of the model to evaluate against. |
| | 301 | | /// </param> |
| | 302 | | /// <param name='imageUrl'> |
| | 303 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 304 | | /// evaluated. |
| | 305 | | /// </param> |
| | 306 | | /// <param name='application'> |
| | 307 | | /// Optional. Specifies the name of application using the endpoint. |
| | 308 | | /// </param> |
| | 309 | | /// <param name='cancellationToken'> |
| | 310 | | /// The cancellation token. |
| | 311 | | /// </param> |
| | 312 | | public static async Task<ImagePrediction> ClassifyImageUrlWithNoStoreAsync(this ICustomVisionPredictionClien |
| | 313 | | { |
| 2 | 314 | | using (var _result = await operations.ClassifyImageUrlWithNoStoreWithHttpMessagesAsync(projectId, publis |
| | 315 | | { |
| 2 | 316 | | return _result.Body; |
| | 317 | | } |
| 2 | 318 | | } |
| | 319 | |
|
| | 320 | | /// <summary> |
| | 321 | | /// Classify an image url without saving the result. |
| | 322 | | /// </summary> |
| | 323 | | /// <param name='operations'> |
| | 324 | | /// The operations group for this extension method. |
| | 325 | | /// </param> |
| | 326 | | /// <param name='projectId'> |
| | 327 | | /// The project id. |
| | 328 | | /// </param> |
| | 329 | | /// <param name='publishedName'> |
| | 330 | | /// Specifies the name of the model to evaluate against. |
| | 331 | | /// </param> |
| | 332 | | /// <param name='imageUrl'> |
| | 333 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 334 | | /// evaluated. |
| | 335 | | /// </param> |
| | 336 | | /// <param name='application'> |
| | 337 | | /// Optional. Specifies the name of application using the endpoint. |
| | 338 | | /// </param> |
| | 339 | | /// <param name='customHeaders'> |
| | 340 | | /// Headers that will be added to request. |
| | 341 | | /// </param> |
| | 342 | | public static HttpOperationResponse<ImagePrediction> ClassifyImageUrlWithNoStoreWithHttpMessages(this ICusto |
| | 343 | | { |
| 0 | 344 | | return operations.ClassifyImageUrlWithNoStoreWithHttpMessagesAsync(projectId, publishedName, imageUrl, a |
| | 345 | | } |
| | 346 | |
|
| | 347 | | /// <summary> |
| | 348 | | /// Detect objects in an image and saves the result. |
| | 349 | | /// </summary> |
| | 350 | | /// <param name='operations'> |
| | 351 | | /// The operations group for this extension method. |
| | 352 | | /// </param> |
| | 353 | | /// <param name='projectId'> |
| | 354 | | /// The project id. |
| | 355 | | /// </param> |
| | 356 | | /// <param name='publishedName'> |
| | 357 | | /// Specifies the name of the model to evaluate against. |
| | 358 | | /// </param> |
| | 359 | | /// <param name='imageData'> |
| | 360 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 361 | | /// images up to 4MB. |
| | 362 | | /// </param> |
| | 363 | | /// <param name='application'> |
| | 364 | | /// Optional. Specifies the name of application using the endpoint. |
| | 365 | | /// </param> |
| | 366 | | public static ImagePrediction DetectImage(this ICustomVisionPredictionClient operations, System.Guid project |
| | 367 | | { |
| 2 | 368 | | return operations.DetectImageAsync(projectId, publishedName, imageData, application).GetAwaiter().GetRes |
| | 369 | | } |
| | 370 | |
|
| | 371 | | /// <summary> |
| | 372 | | /// Detect objects in an image and saves the result. |
| | 373 | | /// </summary> |
| | 374 | | /// <param name='operations'> |
| | 375 | | /// The operations group for this extension method. |
| | 376 | | /// </param> |
| | 377 | | /// <param name='projectId'> |
| | 378 | | /// The project id. |
| | 379 | | /// </param> |
| | 380 | | /// <param name='publishedName'> |
| | 381 | | /// Specifies the name of the model to evaluate against. |
| | 382 | | /// </param> |
| | 383 | | /// <param name='imageData'> |
| | 384 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 385 | | /// images up to 4MB. |
| | 386 | | /// </param> |
| | 387 | | /// <param name='application'> |
| | 388 | | /// Optional. Specifies the name of application using the endpoint. |
| | 389 | | /// </param> |
| | 390 | | /// <param name='cancellationToken'> |
| | 391 | | /// The cancellation token. |
| | 392 | | /// </param> |
| | 393 | | public static async Task<ImagePrediction> DetectImageAsync(this ICustomVisionPredictionClient operations, Sy |
| | 394 | | { |
| 2 | 395 | | using (var _result = await operations.DetectImageWithHttpMessagesAsync(projectId, publishedName, imageDa |
| | 396 | | { |
| 2 | 397 | | return _result.Body; |
| | 398 | | } |
| 2 | 399 | | } |
| | 400 | |
|
| | 401 | | /// <summary> |
| | 402 | | /// Detect objects in an image and saves the result. |
| | 403 | | /// </summary> |
| | 404 | | /// <param name='operations'> |
| | 405 | | /// The operations group for this extension method. |
| | 406 | | /// </param> |
| | 407 | | /// <param name='projectId'> |
| | 408 | | /// The project id. |
| | 409 | | /// </param> |
| | 410 | | /// <param name='publishedName'> |
| | 411 | | /// Specifies the name of the model to evaluate against. |
| | 412 | | /// </param> |
| | 413 | | /// <param name='imageData'> |
| | 414 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 415 | | /// images up to 4MB. |
| | 416 | | /// </param> |
| | 417 | | /// <param name='application'> |
| | 418 | | /// Optional. Specifies the name of application using the endpoint. |
| | 419 | | /// </param> |
| | 420 | | /// <param name='customHeaders'> |
| | 421 | | /// Headers that will be added to request. |
| | 422 | | /// </param> |
| | 423 | | public static HttpOperationResponse<ImagePrediction> DetectImageWithHttpMessages(this ICustomVisionPredictio |
| | 424 | | { |
| 0 | 425 | | return operations.DetectImageWithHttpMessagesAsync(projectId, publishedName, imageData, application, cus |
| | 426 | | } |
| | 427 | |
|
| | 428 | | /// <summary> |
| | 429 | | /// Detect objects in an image without saving the result. |
| | 430 | | /// </summary> |
| | 431 | | /// <param name='operations'> |
| | 432 | | /// The operations group for this extension method. |
| | 433 | | /// </param> |
| | 434 | | /// <param name='projectId'> |
| | 435 | | /// The project id. |
| | 436 | | /// </param> |
| | 437 | | /// <param name='publishedName'> |
| | 438 | | /// Specifies the name of the model to evaluate against. |
| | 439 | | /// </param> |
| | 440 | | /// <param name='imageData'> |
| | 441 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 442 | | /// images up to 4MB. |
| | 443 | | /// </param> |
| | 444 | | /// <param name='application'> |
| | 445 | | /// Optional. Specifies the name of application using the endpoint. |
| | 446 | | /// </param> |
| | 447 | | public static ImagePrediction DetectImageWithNoStore(this ICustomVisionPredictionClient operations, System.G |
| | 448 | | { |
| 2 | 449 | | return operations.DetectImageWithNoStoreAsync(projectId, publishedName, imageData, application).GetAwait |
| | 450 | | } |
| | 451 | |
|
| | 452 | | /// <summary> |
| | 453 | | /// Detect objects in an image without saving the result. |
| | 454 | | /// </summary> |
| | 455 | | /// <param name='operations'> |
| | 456 | | /// The operations group for this extension method. |
| | 457 | | /// </param> |
| | 458 | | /// <param name='projectId'> |
| | 459 | | /// The project id. |
| | 460 | | /// </param> |
| | 461 | | /// <param name='publishedName'> |
| | 462 | | /// Specifies the name of the model to evaluate against. |
| | 463 | | /// </param> |
| | 464 | | /// <param name='imageData'> |
| | 465 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 466 | | /// images up to 4MB. |
| | 467 | | /// </param> |
| | 468 | | /// <param name='application'> |
| | 469 | | /// Optional. Specifies the name of application using the endpoint. |
| | 470 | | /// </param> |
| | 471 | | /// <param name='cancellationToken'> |
| | 472 | | /// The cancellation token. |
| | 473 | | /// </param> |
| | 474 | | public static async Task<ImagePrediction> DetectImageWithNoStoreAsync(this ICustomVisionPredictionClient ope |
| | 475 | | { |
| 2 | 476 | | using (var _result = await operations.DetectImageWithNoStoreWithHttpMessagesAsync(projectId, publishedNa |
| | 477 | | { |
| 2 | 478 | | return _result.Body; |
| | 479 | | } |
| 2 | 480 | | } |
| | 481 | |
|
| | 482 | | /// <summary> |
| | 483 | | /// Detect objects in an image without saving the result. |
| | 484 | | /// </summary> |
| | 485 | | /// <param name='operations'> |
| | 486 | | /// The operations group for this extension method. |
| | 487 | | /// </param> |
| | 488 | | /// <param name='projectId'> |
| | 489 | | /// The project id. |
| | 490 | | /// </param> |
| | 491 | | /// <param name='publishedName'> |
| | 492 | | /// Specifies the name of the model to evaluate against. |
| | 493 | | /// </param> |
| | 494 | | /// <param name='imageData'> |
| | 495 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 496 | | /// images up to 4MB. |
| | 497 | | /// </param> |
| | 498 | | /// <param name='application'> |
| | 499 | | /// Optional. Specifies the name of application using the endpoint. |
| | 500 | | /// </param> |
| | 501 | | /// <param name='customHeaders'> |
| | 502 | | /// Headers that will be added to request. |
| | 503 | | /// </param> |
| | 504 | | public static HttpOperationResponse<ImagePrediction> DetectImageWithNoStoreWithHttpMessages(this ICustomVisi |
| | 505 | | { |
| 0 | 506 | | return operations.DetectImageWithNoStoreWithHttpMessagesAsync(projectId, publishedName, imageData, appli |
| | 507 | | } |
| | 508 | |
|
| | 509 | | /// <summary> |
| | 510 | | /// Detect objects in an image url and saves the result. |
| | 511 | | /// </summary> |
| | 512 | | /// <param name='operations'> |
| | 513 | | /// The operations group for this extension method. |
| | 514 | | /// </param> |
| | 515 | | /// <param name='projectId'> |
| | 516 | | /// The project id. |
| | 517 | | /// </param> |
| | 518 | | /// <param name='publishedName'> |
| | 519 | | /// Specifies the name of the model to evaluate against. |
| | 520 | | /// </param> |
| | 521 | | /// <param name='imageUrl'> |
| | 522 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 523 | | /// </param> |
| | 524 | | /// <param name='application'> |
| | 525 | | /// Optional. Specifies the name of application using the endpoint. |
| | 526 | | /// </param> |
| | 527 | | public static ImagePrediction DetectImageUrl(this ICustomVisionPredictionClient operations, System.Guid proj |
| | 528 | | { |
| 2 | 529 | | return operations.DetectImageUrlAsync(projectId, publishedName, imageUrl, application).GetAwaiter().GetR |
| | 530 | | } |
| | 531 | |
|
| | 532 | | /// <summary> |
| | 533 | | /// Detect objects in an image url and saves the result. |
| | 534 | | /// </summary> |
| | 535 | | /// <param name='operations'> |
| | 536 | | /// The operations group for this extension method. |
| | 537 | | /// </param> |
| | 538 | | /// <param name='projectId'> |
| | 539 | | /// The project id. |
| | 540 | | /// </param> |
| | 541 | | /// <param name='publishedName'> |
| | 542 | | /// Specifies the name of the model to evaluate against. |
| | 543 | | /// </param> |
| | 544 | | /// <param name='imageUrl'> |
| | 545 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 546 | | /// </param> |
| | 547 | | /// <param name='application'> |
| | 548 | | /// Optional. Specifies the name of application using the endpoint. |
| | 549 | | /// </param> |
| | 550 | | /// <param name='cancellationToken'> |
| | 551 | | /// The cancellation token. |
| | 552 | | /// </param> |
| | 553 | | public static async Task<ImagePrediction> DetectImageUrlAsync(this ICustomVisionPredictionClient operations, |
| | 554 | | { |
| 2 | 555 | | using (var _result = await operations.DetectImageUrlWithHttpMessagesAsync(projectId, publishedName, imag |
| | 556 | | { |
| 2 | 557 | | return _result.Body; |
| | 558 | | } |
| 2 | 559 | | } |
| | 560 | |
|
| | 561 | | /// <summary> |
| | 562 | | /// Detect objects in an image url and saves the result. |
| | 563 | | /// </summary> |
| | 564 | | /// <param name='operations'> |
| | 565 | | /// The operations group for this extension method. |
| | 566 | | /// </param> |
| | 567 | | /// <param name='projectId'> |
| | 568 | | /// The project id. |
| | 569 | | /// </param> |
| | 570 | | /// <param name='publishedName'> |
| | 571 | | /// Specifies the name of the model to evaluate against. |
| | 572 | | /// </param> |
| | 573 | | /// <param name='imageUrl'> |
| | 574 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 575 | | /// </param> |
| | 576 | | /// <param name='application'> |
| | 577 | | /// Optional. Specifies the name of application using the endpoint. |
| | 578 | | /// </param> |
| | 579 | | /// <param name='customHeaders'> |
| | 580 | | /// Headers that will be added to request. |
| | 581 | | /// </param> |
| | 582 | | public static HttpOperationResponse<ImagePrediction> DetectImageUrlWithHttpMessages(this ICustomVisionPredic |
| | 583 | | { |
| 0 | 584 | | return operations.DetectImageUrlWithHttpMessagesAsync(projectId, publishedName, imageUrl, application, c |
| | 585 | | } |
| | 586 | |
|
| | 587 | | /// <summary> |
| | 588 | | /// Detect objects in an image url without saving the result. |
| | 589 | | /// </summary> |
| | 590 | | /// <param name='operations'> |
| | 591 | | /// The operations group for this extension method. |
| | 592 | | /// </param> |
| | 593 | | /// <param name='projectId'> |
| | 594 | | /// The project id. |
| | 595 | | /// </param> |
| | 596 | | /// <param name='publishedName'> |
| | 597 | | /// Specifies the name of the model to evaluate against. |
| | 598 | | /// </param> |
| | 599 | | /// <param name='imageUrl'> |
| | 600 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 601 | | /// evaluated. |
| | 602 | | /// </param> |
| | 603 | | /// <param name='application'> |
| | 604 | | /// Optional. Specifies the name of application using the endpoint. |
| | 605 | | /// </param> |
| | 606 | | public static ImagePrediction DetectImageUrlWithNoStore(this ICustomVisionPredictionClient operations, Syste |
| | 607 | | { |
| 2 | 608 | | return operations.DetectImageUrlWithNoStoreAsync(projectId, publishedName, imageUrl, application).GetAwa |
| | 609 | | } |
| | 610 | |
|
| | 611 | | /// <summary> |
| | 612 | | /// Detect objects in an image url without saving the result. |
| | 613 | | /// </summary> |
| | 614 | | /// <param name='operations'> |
| | 615 | | /// The operations group for this extension method. |
| | 616 | | /// </param> |
| | 617 | | /// <param name='projectId'> |
| | 618 | | /// The project id. |
| | 619 | | /// </param> |
| | 620 | | /// <param name='publishedName'> |
| | 621 | | /// Specifies the name of the model to evaluate against. |
| | 622 | | /// </param> |
| | 623 | | /// <param name='imageUrl'> |
| | 624 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 625 | | /// evaluated. |
| | 626 | | /// </param> |
| | 627 | | /// <param name='application'> |
| | 628 | | /// Optional. Specifies the name of application using the endpoint. |
| | 629 | | /// </param> |
| | 630 | | /// <param name='cancellationToken'> |
| | 631 | | /// The cancellation token. |
| | 632 | | /// </param> |
| | 633 | | public static async Task<ImagePrediction> DetectImageUrlWithNoStoreAsync(this ICustomVisionPredictionClient |
| | 634 | | { |
| 2 | 635 | | using (var _result = await operations.DetectImageUrlWithNoStoreWithHttpMessagesAsync(projectId, publishe |
| | 636 | | { |
| 2 | 637 | | return _result.Body; |
| | 638 | | } |
| 2 | 639 | | } |
| | 640 | |
|
| | 641 | | /// <summary> |
| | 642 | | /// Detect objects in an image url without saving the result. |
| | 643 | | /// </summary> |
| | 644 | | /// <param name='operations'> |
| | 645 | | /// The operations group for this extension method. |
| | 646 | | /// </param> |
| | 647 | | /// <param name='projectId'> |
| | 648 | | /// The project id. |
| | 649 | | /// </param> |
| | 650 | | /// <param name='publishedName'> |
| | 651 | | /// Specifies the name of the model to evaluate against. |
| | 652 | | /// </param> |
| | 653 | | /// <param name='imageUrl'> |
| | 654 | | /// An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be |
| | 655 | | /// evaluated. |
| | 656 | | /// </param> |
| | 657 | | /// <param name='application'> |
| | 658 | | /// Optional. Specifies the name of application using the endpoint. |
| | 659 | | /// </param> |
| | 660 | | /// <param name='customHeaders'> |
| | 661 | | /// Headers that will be added to request. |
| | 662 | | /// </param> |
| | 663 | | public static HttpOperationResponse<ImagePrediction> DetectImageUrlWithNoStoreWithHttpMessages(this ICustomV |
| | 664 | | { |
| 0 | 665 | | return operations.DetectImageUrlWithNoStoreWithHttpMessagesAsync(projectId, publishedName, imageUrl, app |
| | 666 | | } |
| | 667 | |
|
| | 668 | | } |
| | 669 | | } |