| | 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.Training |
| | 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 CustomVisionTrainingClient. |
| | 23 | | /// </summary> |
| | 24 | | public static partial class CustomVisionTrainingClientExtensions |
| | 25 | | { |
| | 26 | | /// <summary> |
| | 27 | | /// Get a list of the available domains. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='operations'> |
| | 30 | | /// The operations group for this extension method. |
| | 31 | | /// </param> |
| | 32 | | public static IList<Domain> GetDomains(this ICustomVisionTrainingClient operations) |
| | 33 | | { |
| 0 | 34 | | return operations.GetDomainsAsync().GetAwaiter().GetResult(); |
| | 35 | | } |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// Get a list of the available domains. |
| | 39 | | /// </summary> |
| | 40 | | /// <param name='operations'> |
| | 41 | | /// The operations group for this extension method. |
| | 42 | | /// </param> |
| | 43 | | /// <param name='cancellationToken'> |
| | 44 | | /// The cancellation token. |
| | 45 | | /// </param> |
| | 46 | | public static async Task<IList<Domain>> GetDomainsAsync(this ICustomVisionTrainingClient operations, Cancell |
| | 47 | | { |
| 2 | 48 | | using (var _result = await operations.GetDomainsWithHttpMessagesAsync(null, cancellationToken).Configure |
| | 49 | | { |
| 2 | 50 | | return _result.Body; |
| | 51 | | } |
| 2 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Get a list of the available domains. |
| | 56 | | /// </summary> |
| | 57 | | /// <param name='operations'> |
| | 58 | | /// The operations group for this extension method. |
| | 59 | | /// </param> |
| | 60 | | /// <param name='customHeaders'> |
| | 61 | | /// Headers that will be added to request. |
| | 62 | | /// </param> |
| | 63 | | public static HttpOperationResponse<IList<Domain>> GetDomainsWithHttpMessages(this ICustomVisionTrainingClie |
| | 64 | | { |
| 0 | 65 | | return operations.GetDomainsWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwait( |
| | 66 | | } |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Get information about a specific domain. |
| | 70 | | /// </summary> |
| | 71 | | /// <param name='operations'> |
| | 72 | | /// The operations group for this extension method. |
| | 73 | | /// </param> |
| | 74 | | /// <param name='domainId'> |
| | 75 | | /// The id of the domain to get information about. |
| | 76 | | /// </param> |
| | 77 | | public static Domain GetDomain(this ICustomVisionTrainingClient operations, System.Guid domainId) |
| | 78 | | { |
| 0 | 79 | | return operations.GetDomainAsync(domainId).GetAwaiter().GetResult(); |
| | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Get information about a specific domain. |
| | 84 | | /// </summary> |
| | 85 | | /// <param name='operations'> |
| | 86 | | /// The operations group for this extension method. |
| | 87 | | /// </param> |
| | 88 | | /// <param name='domainId'> |
| | 89 | | /// The id of the domain to get information about. |
| | 90 | | /// </param> |
| | 91 | | /// <param name='cancellationToken'> |
| | 92 | | /// The cancellation token. |
| | 93 | | /// </param> |
| | 94 | | public static async Task<Domain> GetDomainAsync(this ICustomVisionTrainingClient operations, System.Guid dom |
| | 95 | | { |
| 2 | 96 | | using (var _result = await operations.GetDomainWithHttpMessagesAsync(domainId, null, cancellationToken). |
| | 97 | | { |
| 2 | 98 | | return _result.Body; |
| | 99 | | } |
| 2 | 100 | | } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Get information about a specific domain. |
| | 104 | | /// </summary> |
| | 105 | | /// <param name='operations'> |
| | 106 | | /// The operations group for this extension method. |
| | 107 | | /// </param> |
| | 108 | | /// <param name='domainId'> |
| | 109 | | /// The id of the domain to get information about. |
| | 110 | | /// </param> |
| | 111 | | /// <param name='customHeaders'> |
| | 112 | | /// Headers that will be added to request. |
| | 113 | | /// </param> |
| | 114 | | public static HttpOperationResponse<Domain> GetDomainWithHttpMessages(this ICustomVisionTrainingClient opera |
| | 115 | | { |
| 0 | 116 | | return operations.GetDomainWithHttpMessagesAsync(domainId, customHeaders, CancellationToken.None).Config |
| | 117 | | } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Get your projects. |
| | 121 | | /// </summary> |
| | 122 | | /// <param name='operations'> |
| | 123 | | /// The operations group for this extension method. |
| | 124 | | /// </param> |
| | 125 | | public static IList<Project> GetProjects(this ICustomVisionTrainingClient operations) |
| | 126 | | { |
| 0 | 127 | | return operations.GetProjectsAsync().GetAwaiter().GetResult(); |
| | 128 | | } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Get your projects. |
| | 132 | | /// </summary> |
| | 133 | | /// <param name='operations'> |
| | 134 | | /// The operations group for this extension method. |
| | 135 | | /// </param> |
| | 136 | | /// <param name='cancellationToken'> |
| | 137 | | /// The cancellation token. |
| | 138 | | /// </param> |
| | 139 | | public static async Task<IList<Project>> GetProjectsAsync(this ICustomVisionTrainingClient operations, Cance |
| | 140 | | { |
| 2 | 141 | | using (var _result = await operations.GetProjectsWithHttpMessagesAsync(null, cancellationToken).Configur |
| | 142 | | { |
| 2 | 143 | | return _result.Body; |
| | 144 | | } |
| 2 | 145 | | } |
| | 146 | |
|
| | 147 | | /// <summary> |
| | 148 | | /// Get your projects. |
| | 149 | | /// </summary> |
| | 150 | | /// <param name='operations'> |
| | 151 | | /// The operations group for this extension method. |
| | 152 | | /// </param> |
| | 153 | | /// <param name='customHeaders'> |
| | 154 | | /// Headers that will be added to request. |
| | 155 | | /// </param> |
| | 156 | | public static HttpOperationResponse<IList<Project>> GetProjectsWithHttpMessages(this ICustomVisionTrainingCl |
| | 157 | | { |
| 0 | 158 | | return operations.GetProjectsWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwait |
| | 159 | | } |
| | 160 | |
|
| | 161 | | /// <summary> |
| | 162 | | /// Create a project. |
| | 163 | | /// </summary> |
| | 164 | | /// <param name='operations'> |
| | 165 | | /// The operations group for this extension method. |
| | 166 | | /// </param> |
| | 167 | | /// <param name='name'> |
| | 168 | | /// Name of the project. |
| | 169 | | /// </param> |
| | 170 | | /// <param name='description'> |
| | 171 | | /// The description of the project. |
| | 172 | | /// </param> |
| | 173 | | /// <param name='domainId'> |
| | 174 | | /// The id of the domain to use for this project. Defaults to General. |
| | 175 | | /// </param> |
| | 176 | | /// <param name='classificationType'> |
| | 177 | | /// The type of classifier to create for this project. Possible values include: |
| | 178 | | /// 'Multiclass', 'Multilabel' |
| | 179 | | /// </param> |
| | 180 | | /// <param name='targetExportPlatforms'> |
| | 181 | | /// List of platforms the trained model is intending exporting to. |
| | 182 | | /// </param> |
| | 183 | | public static Project CreateProject(this ICustomVisionTrainingClient operations, string name, string descrip |
| | 184 | | { |
| 0 | 185 | | return operations.CreateProjectAsync(name, description, domainId, classificationType, targetExportPlatfo |
| | 186 | | } |
| | 187 | |
|
| | 188 | | /// <summary> |
| | 189 | | /// Create a project. |
| | 190 | | /// </summary> |
| | 191 | | /// <param name='operations'> |
| | 192 | | /// The operations group for this extension method. |
| | 193 | | /// </param> |
| | 194 | | /// <param name='name'> |
| | 195 | | /// Name of the project. |
| | 196 | | /// </param> |
| | 197 | | /// <param name='description'> |
| | 198 | | /// The description of the project. |
| | 199 | | /// </param> |
| | 200 | | /// <param name='domainId'> |
| | 201 | | /// The id of the domain to use for this project. Defaults to General. |
| | 202 | | /// </param> |
| | 203 | | /// <param name='classificationType'> |
| | 204 | | /// The type of classifier to create for this project. Possible values include: |
| | 205 | | /// 'Multiclass', 'Multilabel' |
| | 206 | | /// </param> |
| | 207 | | /// <param name='targetExportPlatforms'> |
| | 208 | | /// List of platforms the trained model is intending exporting to. |
| | 209 | | /// </param> |
| | 210 | | /// <param name='cancellationToken'> |
| | 211 | | /// The cancellation token. |
| | 212 | | /// </param> |
| | 213 | | public static async Task<Project> CreateProjectAsync(this ICustomVisionTrainingClient operations, string nam |
| | 214 | | { |
| 18 | 215 | | using (var _result = await operations.CreateProjectWithHttpMessagesAsync(name, description, domainId, cl |
| | 216 | | { |
| 18 | 217 | | return _result.Body; |
| | 218 | | } |
| 18 | 219 | | } |
| | 220 | |
|
| | 221 | | /// <summary> |
| | 222 | | /// Create a project. |
| | 223 | | /// </summary> |
| | 224 | | /// <param name='operations'> |
| | 225 | | /// The operations group for this extension method. |
| | 226 | | /// </param> |
| | 227 | | /// <param name='name'> |
| | 228 | | /// Name of the project. |
| | 229 | | /// </param> |
| | 230 | | /// <param name='description'> |
| | 231 | | /// The description of the project. |
| | 232 | | /// </param> |
| | 233 | | /// <param name='domainId'> |
| | 234 | | /// The id of the domain to use for this project. Defaults to General. |
| | 235 | | /// </param> |
| | 236 | | /// <param name='classificationType'> |
| | 237 | | /// The type of classifier to create for this project. Possible values include: |
| | 238 | | /// 'Multiclass', 'Multilabel' |
| | 239 | | /// </param> |
| | 240 | | /// <param name='targetExportPlatforms'> |
| | 241 | | /// List of platforms the trained model is intending exporting to. |
| | 242 | | /// </param> |
| | 243 | | /// <param name='customHeaders'> |
| | 244 | | /// Headers that will be added to request. |
| | 245 | | /// </param> |
| | 246 | | public static HttpOperationResponse<Project> CreateProjectWithHttpMessages(this ICustomVisionTrainingClient |
| | 247 | | { |
| 0 | 248 | | return operations.CreateProjectWithHttpMessagesAsync(name, description, domainId, classificationType, ta |
| | 249 | | } |
| | 250 | |
|
| | 251 | | /// <summary> |
| | 252 | | /// Get a specific project. |
| | 253 | | /// </summary> |
| | 254 | | /// <param name='operations'> |
| | 255 | | /// The operations group for this extension method. |
| | 256 | | /// </param> |
| | 257 | | /// <param name='projectId'> |
| | 258 | | /// The id of the project to get. |
| | 259 | | /// </param> |
| | 260 | | public static Project GetProject(this ICustomVisionTrainingClient operations, System.Guid projectId) |
| | 261 | | { |
| 0 | 262 | | return operations.GetProjectAsync(projectId).GetAwaiter().GetResult(); |
| | 263 | | } |
| | 264 | |
|
| | 265 | | /// <summary> |
| | 266 | | /// Get a specific project. |
| | 267 | | /// </summary> |
| | 268 | | /// <param name='operations'> |
| | 269 | | /// The operations group for this extension method. |
| | 270 | | /// </param> |
| | 271 | | /// <param name='projectId'> |
| | 272 | | /// The id of the project to get. |
| | 273 | | /// </param> |
| | 274 | | /// <param name='cancellationToken'> |
| | 275 | | /// The cancellation token. |
| | 276 | | /// </param> |
| | 277 | | public static async Task<Project> GetProjectAsync(this ICustomVisionTrainingClient operations, System.Guid p |
| | 278 | | { |
| 4 | 279 | | using (var _result = await operations.GetProjectWithHttpMessagesAsync(projectId, null, cancellationToken |
| | 280 | | { |
| 4 | 281 | | return _result.Body; |
| | 282 | | } |
| 4 | 283 | | } |
| | 284 | |
|
| | 285 | | /// <summary> |
| | 286 | | /// Get a specific project. |
| | 287 | | /// </summary> |
| | 288 | | /// <param name='operations'> |
| | 289 | | /// The operations group for this extension method. |
| | 290 | | /// </param> |
| | 291 | | /// <param name='projectId'> |
| | 292 | | /// The id of the project to get. |
| | 293 | | /// </param> |
| | 294 | | /// <param name='customHeaders'> |
| | 295 | | /// Headers that will be added to request. |
| | 296 | | /// </param> |
| | 297 | | public static HttpOperationResponse<Project> GetProjectWithHttpMessages(this ICustomVisionTrainingClient ope |
| | 298 | | { |
| 0 | 299 | | return operations.GetProjectWithHttpMessagesAsync(projectId, customHeaders, CancellationToken.None).Conf |
| | 300 | | } |
| | 301 | |
|
| | 302 | | /// <summary> |
| | 303 | | /// Delete a specific project. |
| | 304 | | /// </summary> |
| | 305 | | /// <param name='operations'> |
| | 306 | | /// The operations group for this extension method. |
| | 307 | | /// </param> |
| | 308 | | /// <param name='projectId'> |
| | 309 | | /// The project id. |
| | 310 | | /// </param> |
| | 311 | | public static void DeleteProject(this ICustomVisionTrainingClient operations, System.Guid projectId) |
| | 312 | | { |
| 0 | 313 | | operations.DeleteProjectAsync(projectId).GetAwaiter().GetResult(); |
| 0 | 314 | | } |
| | 315 | |
|
| | 316 | | /// <summary> |
| | 317 | | /// Delete a specific project. |
| | 318 | | /// </summary> |
| | 319 | | /// <param name='operations'> |
| | 320 | | /// The operations group for this extension method. |
| | 321 | | /// </param> |
| | 322 | | /// <param name='projectId'> |
| | 323 | | /// The project id. |
| | 324 | | /// </param> |
| | 325 | | /// <param name='cancellationToken'> |
| | 326 | | /// The cancellation token. |
| | 327 | | /// </param> |
| | 328 | | public static async Task DeleteProjectAsync(this ICustomVisionTrainingClient operations, System.Guid project |
| | 329 | | { |
| 18 | 330 | | (await operations.DeleteProjectWithHttpMessagesAsync(projectId, null, cancellationToken).ConfigureAwait( |
| 18 | 331 | | } |
| | 332 | |
|
| | 333 | | /// <summary> |
| | 334 | | /// Delete a specific project. |
| | 335 | | /// </summary> |
| | 336 | | /// <param name='operations'> |
| | 337 | | /// The operations group for this extension method. |
| | 338 | | /// </param> |
| | 339 | | /// <param name='projectId'> |
| | 340 | | /// The project id. |
| | 341 | | /// </param> |
| | 342 | | /// <param name='customHeaders'> |
| | 343 | | /// Headers that will be added to request. |
| | 344 | | /// </param> |
| | 345 | | public static HttpOperationResponse DeleteProjectWithHttpMessages(this ICustomVisionTrainingClient operation |
| | 346 | | { |
| 0 | 347 | | return operations.DeleteProjectWithHttpMessagesAsync(projectId, customHeaders, CancellationToken.None).C |
| | 348 | | } |
| | 349 | |
|
| | 350 | | /// <summary> |
| | 351 | | /// Update a specific project. |
| | 352 | | /// </summary> |
| | 353 | | /// <param name='operations'> |
| | 354 | | /// The operations group for this extension method. |
| | 355 | | /// </param> |
| | 356 | | /// <param name='projectId'> |
| | 357 | | /// The id of the project to update. |
| | 358 | | /// </param> |
| | 359 | | /// <param name='updatedProject'> |
| | 360 | | /// The updated project model. |
| | 361 | | /// </param> |
| | 362 | | public static Project UpdateProject(this ICustomVisionTrainingClient operations, System.Guid projectId, Proj |
| | 363 | | { |
| 0 | 364 | | return operations.UpdateProjectAsync(projectId, updatedProject).GetAwaiter().GetResult(); |
| | 365 | | } |
| | 366 | |
|
| | 367 | | /// <summary> |
| | 368 | | /// Update a specific project. |
| | 369 | | /// </summary> |
| | 370 | | /// <param name='operations'> |
| | 371 | | /// The operations group for this extension method. |
| | 372 | | /// </param> |
| | 373 | | /// <param name='projectId'> |
| | 374 | | /// The id of the project to update. |
| | 375 | | /// </param> |
| | 376 | | /// <param name='updatedProject'> |
| | 377 | | /// The updated project model. |
| | 378 | | /// </param> |
| | 379 | | /// <param name='cancellationToken'> |
| | 380 | | /// The cancellation token. |
| | 381 | | /// </param> |
| | 382 | | public static async Task<Project> UpdateProjectAsync(this ICustomVisionTrainingClient operations, System.Gui |
| | 383 | | { |
| 2 | 384 | | using (var _result = await operations.UpdateProjectWithHttpMessagesAsync(projectId, updatedProject, null |
| | 385 | | { |
| 2 | 386 | | return _result.Body; |
| | 387 | | } |
| 2 | 388 | | } |
| | 389 | |
|
| | 390 | | /// <summary> |
| | 391 | | /// Update a specific project. |
| | 392 | | /// </summary> |
| | 393 | | /// <param name='operations'> |
| | 394 | | /// The operations group for this extension method. |
| | 395 | | /// </param> |
| | 396 | | /// <param name='projectId'> |
| | 397 | | /// The id of the project to update. |
| | 398 | | /// </param> |
| | 399 | | /// <param name='updatedProject'> |
| | 400 | | /// The updated project model. |
| | 401 | | /// </param> |
| | 402 | | /// <param name='customHeaders'> |
| | 403 | | /// Headers that will be added to request. |
| | 404 | | /// </param> |
| | 405 | | public static HttpOperationResponse<Project> UpdateProjectWithHttpMessages(this ICustomVisionTrainingClient |
| | 406 | | { |
| 0 | 407 | | return operations.UpdateProjectWithHttpMessagesAsync(projectId, updatedProject, customHeaders, Cancellat |
| | 408 | | } |
| | 409 | |
|
| | 410 | | /// <summary> |
| | 411 | | /// Get artifact content from blob storage, based on artifact relative path in |
| | 412 | | /// the blob. |
| | 413 | | /// </summary> |
| | 414 | | /// <param name='operations'> |
| | 415 | | /// The operations group for this extension method. |
| | 416 | | /// </param> |
| | 417 | | /// <param name='projectId'> |
| | 418 | | /// The project id. |
| | 419 | | /// </param> |
| | 420 | | /// <param name='path'> |
| | 421 | | /// The relative path for artifact. |
| | 422 | | /// </param> |
| | 423 | | public static Stream GetArtifact(this ICustomVisionTrainingClient operations, System.Guid projectId, string |
| | 424 | | { |
| 0 | 425 | | return operations.GetArtifactAsync(projectId, path).GetAwaiter().GetResult(); |
| | 426 | | } |
| | 427 | |
|
| | 428 | | /// <summary> |
| | 429 | | /// Get artifact content from blob storage, based on artifact relative path in |
| | 430 | | /// the blob. |
| | 431 | | /// </summary> |
| | 432 | | /// <param name='operations'> |
| | 433 | | /// The operations group for this extension method. |
| | 434 | | /// </param> |
| | 435 | | /// <param name='projectId'> |
| | 436 | | /// The project id. |
| | 437 | | /// </param> |
| | 438 | | /// <param name='path'> |
| | 439 | | /// The relative path for artifact. |
| | 440 | | /// </param> |
| | 441 | | /// <param name='cancellationToken'> |
| | 442 | | /// The cancellation token. |
| | 443 | | /// </param> |
| | 444 | | public static async Task<Stream> GetArtifactAsync(this ICustomVisionTrainingClient operations, System.Guid p |
| | 445 | | { |
| 2 | 446 | | var _result = await operations.GetArtifactWithHttpMessagesAsync(projectId, path, null, cancellationToken |
| 2 | 447 | | _result.Request.Dispose(); |
| 2 | 448 | | return _result.Body; |
| 2 | 449 | | } |
| | 450 | |
|
| | 451 | | /// <summary> |
| | 452 | | /// Get artifact content from blob storage, based on artifact relative path in |
| | 453 | | /// the blob. |
| | 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='path'> |
| | 462 | | /// The relative path for artifact. |
| | 463 | | /// </param> |
| | 464 | | /// <param name='customHeaders'> |
| | 465 | | /// Headers that will be added to request. |
| | 466 | | /// </param> |
| | 467 | | public static HttpOperationResponse<Stream> GetArtifactWithHttpMessages(this ICustomVisionTrainingClient ope |
| | 468 | | { |
| 0 | 469 | | return operations.GetArtifactWithHttpMessagesAsync(projectId, path, customHeaders, CancellationToken.Non |
| | 470 | | } |
| | 471 | |
|
| | 472 | | /// <summary> |
| | 473 | | /// Exports a project. |
| | 474 | | /// </summary> |
| | 475 | | /// <param name='operations'> |
| | 476 | | /// The operations group for this extension method. |
| | 477 | | /// </param> |
| | 478 | | /// <param name='projectId'> |
| | 479 | | /// The project id of the project to export. |
| | 480 | | /// </param> |
| | 481 | | public static ProjectExport ExportProject(this ICustomVisionTrainingClient operations, System.Guid projectId |
| | 482 | | { |
| 0 | 483 | | return operations.ExportProjectAsync(projectId).GetAwaiter().GetResult(); |
| | 484 | | } |
| | 485 | |
|
| | 486 | | /// <summary> |
| | 487 | | /// Exports a project. |
| | 488 | | /// </summary> |
| | 489 | | /// <param name='operations'> |
| | 490 | | /// The operations group for this extension method. |
| | 491 | | /// </param> |
| | 492 | | /// <param name='projectId'> |
| | 493 | | /// The project id of the project to export. |
| | 494 | | /// </param> |
| | 495 | | /// <param name='cancellationToken'> |
| | 496 | | /// The cancellation token. |
| | 497 | | /// </param> |
| | 498 | | public static async Task<ProjectExport> ExportProjectAsync(this ICustomVisionTrainingClient operations, Syst |
| | 499 | | { |
| 2 | 500 | | using (var _result = await operations.ExportProjectWithHttpMessagesAsync(projectId, null, cancellationTo |
| | 501 | | { |
| 2 | 502 | | return _result.Body; |
| | 503 | | } |
| 2 | 504 | | } |
| | 505 | |
|
| | 506 | | /// <summary> |
| | 507 | | /// Exports a project. |
| | 508 | | /// </summary> |
| | 509 | | /// <param name='operations'> |
| | 510 | | /// The operations group for this extension method. |
| | 511 | | /// </param> |
| | 512 | | /// <param name='projectId'> |
| | 513 | | /// The project id of the project to export. |
| | 514 | | /// </param> |
| | 515 | | /// <param name='customHeaders'> |
| | 516 | | /// Headers that will be added to request. |
| | 517 | | /// </param> |
| | 518 | | public static HttpOperationResponse<ProjectExport> ExportProjectWithHttpMessages(this ICustomVisionTrainingC |
| | 519 | | { |
| 0 | 520 | | return operations.ExportProjectWithHttpMessagesAsync(projectId, customHeaders, CancellationToken.None).C |
| | 521 | | } |
| | 522 | |
|
| | 523 | | /// <summary> |
| | 524 | | /// Get images for a given project iteration or workspace. |
| | 525 | | /// </summary> |
| | 526 | | /// <remarks> |
| | 527 | | /// This API supports batching and range selection. By default it will only |
| | 528 | | /// return first 50 images matching images. |
| | 529 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 530 | | /// in a given batch. |
| | 531 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 532 | | /// tag ids are for the "Dog" and |
| | 533 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 534 | | /// </remarks> |
| | 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='iterationId'> |
| | 542 | | /// The iteration id. Defaults to workspace. |
| | 543 | | /// </param> |
| | 544 | | /// <param name='tagIds'> |
| | 545 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 546 | | /// null. Limited to 20. |
| | 547 | | /// </param> |
| | 548 | | /// <param name='taggingStatus'> |
| | 549 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 550 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 551 | | /// </param> |
| | 552 | | /// <param name='filter'> |
| | 553 | | /// An expression to filter the images against image metadata. Only images |
| | 554 | | /// where the expression evaluates to true are included in the response. |
| | 555 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 556 | | /// (Logical or) operators. |
| | 557 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 558 | | /// </param> |
| | 559 | | /// <param name='orderBy'> |
| | 560 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 561 | | /// 'Oldest' |
| | 562 | | /// </param> |
| | 563 | | /// <param name='take'> |
| | 564 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 565 | | /// </param> |
| | 566 | | /// <param name='skip'> |
| | 567 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 568 | | /// </param> |
| | 569 | | public static IList<Image> GetImages(this ICustomVisionTrainingClient operations, System.Guid projectId, Sys |
| | 570 | | { |
| 0 | 571 | | return operations.GetImagesAsync(projectId, iterationId, tagIds, taggingStatus, filter, orderBy, take, s |
| | 572 | | } |
| | 573 | |
|
| | 574 | | /// <summary> |
| | 575 | | /// Get images for a given project iteration or workspace. |
| | 576 | | /// </summary> |
| | 577 | | /// <remarks> |
| | 578 | | /// This API supports batching and range selection. By default it will only |
| | 579 | | /// return first 50 images matching images. |
| | 580 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 581 | | /// in a given batch. |
| | 582 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 583 | | /// tag ids are for the "Dog" and |
| | 584 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 585 | | /// </remarks> |
| | 586 | | /// <param name='operations'> |
| | 587 | | /// The operations group for this extension method. |
| | 588 | | /// </param> |
| | 589 | | /// <param name='projectId'> |
| | 590 | | /// The project id. |
| | 591 | | /// </param> |
| | 592 | | /// <param name='iterationId'> |
| | 593 | | /// The iteration id. Defaults to workspace. |
| | 594 | | /// </param> |
| | 595 | | /// <param name='tagIds'> |
| | 596 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 597 | | /// null. Limited to 20. |
| | 598 | | /// </param> |
| | 599 | | /// <param name='taggingStatus'> |
| | 600 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 601 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 602 | | /// </param> |
| | 603 | | /// <param name='filter'> |
| | 604 | | /// An expression to filter the images against image metadata. Only images |
| | 605 | | /// where the expression evaluates to true are included in the response. |
| | 606 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 607 | | /// (Logical or) operators. |
| | 608 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 609 | | /// </param> |
| | 610 | | /// <param name='orderBy'> |
| | 611 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 612 | | /// 'Oldest' |
| | 613 | | /// </param> |
| | 614 | | /// <param name='take'> |
| | 615 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 616 | | /// </param> |
| | 617 | | /// <param name='skip'> |
| | 618 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 619 | | /// </param> |
| | 620 | | /// <param name='cancellationToken'> |
| | 621 | | /// The cancellation token. |
| | 622 | | /// </param> |
| | 623 | | public static async Task<IList<Image>> GetImagesAsync(this ICustomVisionTrainingClient operations, System.Gu |
| | 624 | | { |
| 6 | 625 | | using (var _result = await operations.GetImagesWithHttpMessagesAsync(projectId, iterationId, tagIds, tag |
| | 626 | | { |
| 6 | 627 | | return _result.Body; |
| | 628 | | } |
| 6 | 629 | | } |
| | 630 | |
|
| | 631 | | /// <summary> |
| | 632 | | /// Get images for a given project iteration or workspace. |
| | 633 | | /// </summary> |
| | 634 | | /// <remarks> |
| | 635 | | /// This API supports batching and range selection. By default it will only |
| | 636 | | /// return first 50 images matching images. |
| | 637 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 638 | | /// in a given batch. |
| | 639 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 640 | | /// tag ids are for the "Dog" and |
| | 641 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 642 | | /// </remarks> |
| | 643 | | /// <param name='operations'> |
| | 644 | | /// The operations group for this extension method. |
| | 645 | | /// </param> |
| | 646 | | /// <param name='projectId'> |
| | 647 | | /// The project id. |
| | 648 | | /// </param> |
| | 649 | | /// <param name='iterationId'> |
| | 650 | | /// The iteration id. Defaults to workspace. |
| | 651 | | /// </param> |
| | 652 | | /// <param name='tagIds'> |
| | 653 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 654 | | /// null. Limited to 20. |
| | 655 | | /// </param> |
| | 656 | | /// <param name='taggingStatus'> |
| | 657 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 658 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 659 | | /// </param> |
| | 660 | | /// <param name='filter'> |
| | 661 | | /// An expression to filter the images against image metadata. Only images |
| | 662 | | /// where the expression evaluates to true are included in the response. |
| | 663 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 664 | | /// (Logical or) operators. |
| | 665 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 666 | | /// </param> |
| | 667 | | /// <param name='orderBy'> |
| | 668 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 669 | | /// 'Oldest' |
| | 670 | | /// </param> |
| | 671 | | /// <param name='take'> |
| | 672 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 673 | | /// </param> |
| | 674 | | /// <param name='skip'> |
| | 675 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 676 | | /// </param> |
| | 677 | | /// <param name='customHeaders'> |
| | 678 | | /// Headers that will be added to request. |
| | 679 | | /// </param> |
| | 680 | | public static HttpOperationResponse<IList<Image>> GetImagesWithHttpMessages(this ICustomVisionTrainingClient |
| | 681 | | { |
| 0 | 682 | | return operations.GetImagesWithHttpMessagesAsync(projectId, iterationId, tagIds, taggingStatus, filter, |
| | 683 | | } |
| | 684 | |
|
| | 685 | | /// <summary> |
| | 686 | | /// Add the provided images to the set of training images. |
| | 687 | | /// </summary> |
| | 688 | | /// <remarks> |
| | 689 | | /// This API accepts body content as multipart/form-data and |
| | 690 | | /// application/octet-stream. When using multipart |
| | 691 | | /// multiple image files can be sent at once, with a maximum of 64 files. |
| | 692 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 693 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 694 | | /// status for each image will be listed in the response payload. |
| | 695 | | /// </remarks> |
| | 696 | | /// <param name='operations'> |
| | 697 | | /// The operations group for this extension method. |
| | 698 | | /// </param> |
| | 699 | | /// <param name='projectId'> |
| | 700 | | /// The project id. |
| | 701 | | /// </param> |
| | 702 | | /// <param name='imageData'> |
| | 703 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 704 | | /// images up to 6MB. |
| | 705 | | /// </param> |
| | 706 | | /// <param name='tagIds'> |
| | 707 | | /// The tags ids with which to tag each image. Limited to 20. |
| | 708 | | /// </param> |
| | 709 | | public static ImageCreateSummary CreateImagesFromData(this ICustomVisionTrainingClient operations, System.Gu |
| | 710 | | { |
| 0 | 711 | | return operations.CreateImagesFromDataAsync(projectId, imageData, tagIds).GetAwaiter().GetResult(); |
| | 712 | | } |
| | 713 | |
|
| | 714 | | /// <summary> |
| | 715 | | /// Add the provided images to the set of training images. |
| | 716 | | /// </summary> |
| | 717 | | /// <remarks> |
| | 718 | | /// This API accepts body content as multipart/form-data and |
| | 719 | | /// application/octet-stream. When using multipart |
| | 720 | | /// multiple image files can be sent at once, with a maximum of 64 files. |
| | 721 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 722 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 723 | | /// status for each image will be listed in the response payload. |
| | 724 | | /// </remarks> |
| | 725 | | /// <param name='operations'> |
| | 726 | | /// The operations group for this extension method. |
| | 727 | | /// </param> |
| | 728 | | /// <param name='projectId'> |
| | 729 | | /// The project id. |
| | 730 | | /// </param> |
| | 731 | | /// <param name='imageData'> |
| | 732 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 733 | | /// images up to 6MB. |
| | 734 | | /// </param> |
| | 735 | | /// <param name='tagIds'> |
| | 736 | | /// The tags ids with which to tag each image. Limited to 20. |
| | 737 | | /// </param> |
| | 738 | | /// <param name='cancellationToken'> |
| | 739 | | /// The cancellation token. |
| | 740 | | /// </param> |
| | 741 | | public static async Task<ImageCreateSummary> CreateImagesFromDataAsync(this ICustomVisionTrainingClient oper |
| | 742 | | { |
| 2 | 743 | | using (var _result = await operations.CreateImagesFromDataWithHttpMessagesAsync(projectId, imageData, ta |
| | 744 | | { |
| 2 | 745 | | return _result.Body; |
| | 746 | | } |
| 2 | 747 | | } |
| | 748 | |
|
| | 749 | | /// <summary> |
| | 750 | | /// Add the provided images to the set of training images. |
| | 751 | | /// </summary> |
| | 752 | | /// <remarks> |
| | 753 | | /// This API accepts body content as multipart/form-data and |
| | 754 | | /// application/octet-stream. When using multipart |
| | 755 | | /// multiple image files can be sent at once, with a maximum of 64 files. |
| | 756 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 757 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 758 | | /// status for each image will be listed in the response payload. |
| | 759 | | /// </remarks> |
| | 760 | | /// <param name='operations'> |
| | 761 | | /// The operations group for this extension method. |
| | 762 | | /// </param> |
| | 763 | | /// <param name='projectId'> |
| | 764 | | /// The project id. |
| | 765 | | /// </param> |
| | 766 | | /// <param name='imageData'> |
| | 767 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 768 | | /// images up to 6MB. |
| | 769 | | /// </param> |
| | 770 | | /// <param name='tagIds'> |
| | 771 | | /// The tags ids with which to tag each image. Limited to 20. |
| | 772 | | /// </param> |
| | 773 | | /// <param name='customHeaders'> |
| | 774 | | /// Headers that will be added to request. |
| | 775 | | /// </param> |
| | 776 | | public static HttpOperationResponse<ImageCreateSummary> CreateImagesFromDataWithHttpMessages(this ICustomVis |
| | 777 | | { |
| 0 | 778 | | return operations.CreateImagesFromDataWithHttpMessagesAsync(projectId, imageData, tagIds, customHeaders, |
| | 779 | | } |
| | 780 | |
|
| | 781 | | /// <summary> |
| | 782 | | /// Delete images from the set of training images. |
| | 783 | | /// </summary> |
| | 784 | | /// <param name='operations'> |
| | 785 | | /// The operations group for this extension method. |
| | 786 | | /// </param> |
| | 787 | | /// <param name='projectId'> |
| | 788 | | /// The project id. |
| | 789 | | /// </param> |
| | 790 | | /// <param name='imageIds'> |
| | 791 | | /// Ids of the images to be deleted. Limited to 256 images per batch. |
| | 792 | | /// </param> |
| | 793 | | /// <param name='allImages'> |
| | 794 | | /// Flag to specify delete all images, specify this flag or a list of images. |
| | 795 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 796 | | /// deleted. |
| | 797 | | /// </param> |
| | 798 | | /// <param name='allIterations'> |
| | 799 | | /// Removes these images from all iterations, not just the current workspace. |
| | 800 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 801 | | /// deleted. |
| | 802 | | /// </param> |
| | 803 | | public static void DeleteImages(this ICustomVisionTrainingClient operations, System.Guid projectId, IList<Sy |
| | 804 | | { |
| 0 | 805 | | operations.DeleteImagesAsync(projectId, imageIds, allImages, allIterations).GetAwaiter().GetResult(); |
| 0 | 806 | | } |
| | 807 | |
|
| | 808 | | /// <summary> |
| | 809 | | /// Delete images from the set of training images. |
| | 810 | | /// </summary> |
| | 811 | | /// <param name='operations'> |
| | 812 | | /// The operations group for this extension method. |
| | 813 | | /// </param> |
| | 814 | | /// <param name='projectId'> |
| | 815 | | /// The project id. |
| | 816 | | /// </param> |
| | 817 | | /// <param name='imageIds'> |
| | 818 | | /// Ids of the images to be deleted. Limited to 256 images per batch. |
| | 819 | | /// </param> |
| | 820 | | /// <param name='allImages'> |
| | 821 | | /// Flag to specify delete all images, specify this flag or a list of images. |
| | 822 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 823 | | /// deleted. |
| | 824 | | /// </param> |
| | 825 | | /// <param name='allIterations'> |
| | 826 | | /// Removes these images from all iterations, not just the current workspace. |
| | 827 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 828 | | /// deleted. |
| | 829 | | /// </param> |
| | 830 | | /// <param name='cancellationToken'> |
| | 831 | | /// The cancellation token. |
| | 832 | | /// </param> |
| | 833 | | public static async Task DeleteImagesAsync(this ICustomVisionTrainingClient operations, System.Guid projectI |
| | 834 | | { |
| 2 | 835 | | (await operations.DeleteImagesWithHttpMessagesAsync(projectId, imageIds, allImages, allIterations, null, |
| 2 | 836 | | } |
| | 837 | |
|
| | 838 | | /// <summary> |
| | 839 | | /// Delete images from the set of training images. |
| | 840 | | /// </summary> |
| | 841 | | /// <param name='operations'> |
| | 842 | | /// The operations group for this extension method. |
| | 843 | | /// </param> |
| | 844 | | /// <param name='projectId'> |
| | 845 | | /// The project id. |
| | 846 | | /// </param> |
| | 847 | | /// <param name='imageIds'> |
| | 848 | | /// Ids of the images to be deleted. Limited to 256 images per batch. |
| | 849 | | /// </param> |
| | 850 | | /// <param name='allImages'> |
| | 851 | | /// Flag to specify delete all images, specify this flag or a list of images. |
| | 852 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 853 | | /// deleted. |
| | 854 | | /// </param> |
| | 855 | | /// <param name='allIterations'> |
| | 856 | | /// Removes these images from all iterations, not just the current workspace. |
| | 857 | | /// Using this flag will return a 202 response to indicate the images are being |
| | 858 | | /// deleted. |
| | 859 | | /// </param> |
| | 860 | | /// <param name='customHeaders'> |
| | 861 | | /// Headers that will be added to request. |
| | 862 | | /// </param> |
| | 863 | | public static HttpOperationResponse DeleteImagesWithHttpMessages(this ICustomVisionTrainingClient operations |
| | 864 | | { |
| 0 | 865 | | return operations.DeleteImagesWithHttpMessagesAsync(projectId, imageIds, allImages, allIterations, custo |
| | 866 | | } |
| | 867 | |
|
| | 868 | | /// <summary> |
| | 869 | | /// Get region proposals for an image. Returns empty array if no proposals are |
| | 870 | | /// found. |
| | 871 | | /// </summary> |
| | 872 | | /// <remarks> |
| | 873 | | /// This API will get region proposals for an image along with confidences for |
| | 874 | | /// the region. It returns an empty array if no proposals are found. |
| | 875 | | /// </remarks> |
| | 876 | | /// <param name='operations'> |
| | 877 | | /// The operations group for this extension method. |
| | 878 | | /// </param> |
| | 879 | | /// <param name='projectId'> |
| | 880 | | /// The project id. |
| | 881 | | /// </param> |
| | 882 | | /// <param name='imageId'> |
| | 883 | | /// The image id. |
| | 884 | | /// </param> |
| | 885 | | public static ImageRegionProposal GetImageRegionProposals(this ICustomVisionTrainingClient operations, Syste |
| | 886 | | { |
| 0 | 887 | | return operations.GetImageRegionProposalsAsync(projectId, imageId).GetAwaiter().GetResult(); |
| | 888 | | } |
| | 889 | |
|
| | 890 | | /// <summary> |
| | 891 | | /// Get region proposals for an image. Returns empty array if no proposals are |
| | 892 | | /// found. |
| | 893 | | /// </summary> |
| | 894 | | /// <remarks> |
| | 895 | | /// This API will get region proposals for an image along with confidences for |
| | 896 | | /// the region. It returns an empty array if no proposals are found. |
| | 897 | | /// </remarks> |
| | 898 | | /// <param name='operations'> |
| | 899 | | /// The operations group for this extension method. |
| | 900 | | /// </param> |
| | 901 | | /// <param name='projectId'> |
| | 902 | | /// The project id. |
| | 903 | | /// </param> |
| | 904 | | /// <param name='imageId'> |
| | 905 | | /// The image id. |
| | 906 | | /// </param> |
| | 907 | | /// <param name='cancellationToken'> |
| | 908 | | /// The cancellation token. |
| | 909 | | /// </param> |
| | 910 | | public static async Task<ImageRegionProposal> GetImageRegionProposalsAsync(this ICustomVisionTrainingClient |
| | 911 | | { |
| 2 | 912 | | using (var _result = await operations.GetImageRegionProposalsWithHttpMessagesAsync(projectId, imageId, n |
| | 913 | | { |
| 2 | 914 | | return _result.Body; |
| | 915 | | } |
| 2 | 916 | | } |
| | 917 | |
|
| | 918 | | /// <summary> |
| | 919 | | /// Get region proposals for an image. Returns empty array if no proposals are |
| | 920 | | /// found. |
| | 921 | | /// </summary> |
| | 922 | | /// <remarks> |
| | 923 | | /// This API will get region proposals for an image along with confidences for |
| | 924 | | /// the region. It returns an empty array if no proposals are found. |
| | 925 | | /// </remarks> |
| | 926 | | /// <param name='operations'> |
| | 927 | | /// The operations group for this extension method. |
| | 928 | | /// </param> |
| | 929 | | /// <param name='projectId'> |
| | 930 | | /// The project id. |
| | 931 | | /// </param> |
| | 932 | | /// <param name='imageId'> |
| | 933 | | /// The image id. |
| | 934 | | /// </param> |
| | 935 | | /// <param name='customHeaders'> |
| | 936 | | /// Headers that will be added to request. |
| | 937 | | /// </param> |
| | 938 | | public static HttpOperationResponse<ImageRegionProposal> GetImageRegionProposalsWithHttpMessages(this ICusto |
| | 939 | | { |
| 0 | 940 | | return operations.GetImageRegionProposalsWithHttpMessagesAsync(projectId, imageId, customHeaders, Cancel |
| | 941 | | } |
| | 942 | |
|
| | 943 | | /// <summary> |
| | 944 | | /// Get the number of images. |
| | 945 | | /// </summary> |
| | 946 | | /// <remarks> |
| | 947 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 948 | | /// tag ids are for the "Dog" and |
| | 949 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 950 | | /// </remarks> |
| | 951 | | /// <param name='operations'> |
| | 952 | | /// The operations group for this extension method. |
| | 953 | | /// </param> |
| | 954 | | /// <param name='projectId'> |
| | 955 | | /// The project id. |
| | 956 | | /// </param> |
| | 957 | | /// <param name='iterationId'> |
| | 958 | | /// The iteration id. Defaults to workspace. |
| | 959 | | /// </param> |
| | 960 | | /// <param name='taggingStatus'> |
| | 961 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 962 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 963 | | /// </param> |
| | 964 | | /// <param name='filter'> |
| | 965 | | /// An expression to filter the images against image metadata. Only images |
| | 966 | | /// where the expression evaluates to true are included in the response. |
| | 967 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 968 | | /// (Logical or) operators. |
| | 969 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 970 | | /// </param> |
| | 971 | | /// <param name='tagIds'> |
| | 972 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 973 | | /// null. |
| | 974 | | /// </param> |
| | 975 | | public static int? GetImageCount(this ICustomVisionTrainingClient operations, System.Guid projectId, System. |
| | 976 | | { |
| 0 | 977 | | return operations.GetImageCountAsync(projectId, iterationId, taggingStatus, filter, tagIds).GetAwaiter() |
| | 978 | | } |
| | 979 | |
|
| | 980 | | /// <summary> |
| | 981 | | /// Get the number of images. |
| | 982 | | /// </summary> |
| | 983 | | /// <remarks> |
| | 984 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 985 | | /// tag ids are for the "Dog" and |
| | 986 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 987 | | /// </remarks> |
| | 988 | | /// <param name='operations'> |
| | 989 | | /// The operations group for this extension method. |
| | 990 | | /// </param> |
| | 991 | | /// <param name='projectId'> |
| | 992 | | /// The project id. |
| | 993 | | /// </param> |
| | 994 | | /// <param name='iterationId'> |
| | 995 | | /// The iteration id. Defaults to workspace. |
| | 996 | | /// </param> |
| | 997 | | /// <param name='taggingStatus'> |
| | 998 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 999 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 1000 | | /// </param> |
| | 1001 | | /// <param name='filter'> |
| | 1002 | | /// An expression to filter the images against image metadata. Only images |
| | 1003 | | /// where the expression evaluates to true are included in the response. |
| | 1004 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 1005 | | /// (Logical or) operators. |
| | 1006 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 1007 | | /// </param> |
| | 1008 | | /// <param name='tagIds'> |
| | 1009 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 1010 | | /// null. |
| | 1011 | | /// </param> |
| | 1012 | | /// <param name='cancellationToken'> |
| | 1013 | | /// The cancellation token. |
| | 1014 | | /// </param> |
| | 1015 | | public static async Task<int?> GetImageCountAsync(this ICustomVisionTrainingClient operations, System.Guid p |
| | 1016 | | { |
| 2 | 1017 | | using (var _result = await operations.GetImageCountWithHttpMessagesAsync(projectId, iterationId, tagging |
| | 1018 | | { |
| 2 | 1019 | | return _result.Body; |
| | 1020 | | } |
| 2 | 1021 | | } |
| | 1022 | |
|
| | 1023 | | /// <summary> |
| | 1024 | | /// Get the number of images. |
| | 1025 | | /// </summary> |
| | 1026 | | /// <remarks> |
| | 1027 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1028 | | /// tag ids are for the "Dog" and |
| | 1029 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1030 | | /// </remarks> |
| | 1031 | | /// <param name='operations'> |
| | 1032 | | /// The operations group for this extension method. |
| | 1033 | | /// </param> |
| | 1034 | | /// <param name='projectId'> |
| | 1035 | | /// The project id. |
| | 1036 | | /// </param> |
| | 1037 | | /// <param name='iterationId'> |
| | 1038 | | /// The iteration id. Defaults to workspace. |
| | 1039 | | /// </param> |
| | 1040 | | /// <param name='taggingStatus'> |
| | 1041 | | /// The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. |
| | 1042 | | /// Defaults to 'All'. Possible values include: 'All', 'Tagged', 'Untagged' |
| | 1043 | | /// </param> |
| | 1044 | | /// <param name='filter'> |
| | 1045 | | /// An expression to filter the images against image metadata. Only images |
| | 1046 | | /// where the expression evaluates to true are included in the response. |
| | 1047 | | /// The expression supports eq (Equal), ne (Not equal), and (Logical and), or |
| | 1048 | | /// (Logical or) operators. |
| | 1049 | | /// Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. |
| | 1050 | | /// </param> |
| | 1051 | | /// <param name='tagIds'> |
| | 1052 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 1053 | | /// null. |
| | 1054 | | /// </param> |
| | 1055 | | /// <param name='customHeaders'> |
| | 1056 | | /// Headers that will be added to request. |
| | 1057 | | /// </param> |
| | 1058 | | public static HttpOperationResponse<int?> GetImageCountWithHttpMessages(this ICustomVisionTrainingClient ope |
| | 1059 | | { |
| 0 | 1060 | | return operations.GetImageCountWithHttpMessagesAsync(projectId, iterationId, taggingStatus, filter, tagI |
| | 1061 | | } |
| | 1062 | |
|
| | 1063 | | /// <summary> |
| | 1064 | | /// Add the provided batch of images to the set of training images. |
| | 1065 | | /// </summary> |
| | 1066 | | /// <remarks> |
| | 1067 | | /// This API accepts a batch of files, and optionally tags, to create images. |
| | 1068 | | /// There is a limit of 64 images and 20 tags. |
| | 1069 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1070 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1071 | | /// status for each image will be listed in the response payload. |
| | 1072 | | /// </remarks> |
| | 1073 | | /// <param name='operations'> |
| | 1074 | | /// The operations group for this extension method. |
| | 1075 | | /// </param> |
| | 1076 | | /// <param name='projectId'> |
| | 1077 | | /// The project id. |
| | 1078 | | /// </param> |
| | 1079 | | /// <param name='batch'> |
| | 1080 | | /// The batch of image files to add. Limited to 64 images and 20 tags per |
| | 1081 | | /// batch. |
| | 1082 | | /// </param> |
| | 1083 | | public static ImageCreateSummary CreateImagesFromFiles(this ICustomVisionTrainingClient operations, System.G |
| | 1084 | | { |
| 0 | 1085 | | return operations.CreateImagesFromFilesAsync(projectId, batch).GetAwaiter().GetResult(); |
| | 1086 | | } |
| | 1087 | |
|
| | 1088 | | /// <summary> |
| | 1089 | | /// Add the provided batch of images to the set of training images. |
| | 1090 | | /// </summary> |
| | 1091 | | /// <remarks> |
| | 1092 | | /// This API accepts a batch of files, and optionally tags, to create images. |
| | 1093 | | /// There is a limit of 64 images and 20 tags. |
| | 1094 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1095 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1096 | | /// status for each image will be listed in the response payload. |
| | 1097 | | /// </remarks> |
| | 1098 | | /// <param name='operations'> |
| | 1099 | | /// The operations group for this extension method. |
| | 1100 | | /// </param> |
| | 1101 | | /// <param name='projectId'> |
| | 1102 | | /// The project id. |
| | 1103 | | /// </param> |
| | 1104 | | /// <param name='batch'> |
| | 1105 | | /// The batch of image files to add. Limited to 64 images and 20 tags per |
| | 1106 | | /// batch. |
| | 1107 | | /// </param> |
| | 1108 | | /// <param name='cancellationToken'> |
| | 1109 | | /// The cancellation token. |
| | 1110 | | /// </param> |
| | 1111 | | public static async Task<ImageCreateSummary> CreateImagesFromFilesAsync(this ICustomVisionTrainingClient ope |
| | 1112 | | { |
| 8 | 1113 | | using (var _result = await operations.CreateImagesFromFilesWithHttpMessagesAsync(projectId, batch, null, |
| | 1114 | | { |
| 8 | 1115 | | return _result.Body; |
| | 1116 | | } |
| 8 | 1117 | | } |
| | 1118 | |
|
| | 1119 | | /// <summary> |
| | 1120 | | /// Add the provided batch of images to the set of training images. |
| | 1121 | | /// </summary> |
| | 1122 | | /// <remarks> |
| | 1123 | | /// This API accepts a batch of files, and optionally tags, to create images. |
| | 1124 | | /// There is a limit of 64 images and 20 tags. |
| | 1125 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1126 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1127 | | /// status for each image will be listed in the response payload. |
| | 1128 | | /// </remarks> |
| | 1129 | | /// <param name='operations'> |
| | 1130 | | /// The operations group for this extension method. |
| | 1131 | | /// </param> |
| | 1132 | | /// <param name='projectId'> |
| | 1133 | | /// The project id. |
| | 1134 | | /// </param> |
| | 1135 | | /// <param name='batch'> |
| | 1136 | | /// The batch of image files to add. Limited to 64 images and 20 tags per |
| | 1137 | | /// batch. |
| | 1138 | | /// </param> |
| | 1139 | | /// <param name='customHeaders'> |
| | 1140 | | /// Headers that will be added to request. |
| | 1141 | | /// </param> |
| | 1142 | | public static HttpOperationResponse<ImageCreateSummary> CreateImagesFromFilesWithHttpMessages(this ICustomVi |
| | 1143 | | { |
| 0 | 1144 | | return operations.CreateImagesFromFilesWithHttpMessagesAsync(projectId, batch, customHeaders, Cancellati |
| | 1145 | | } |
| | 1146 | |
|
| | 1147 | | /// <summary> |
| | 1148 | | /// Get images by id for a given project iteration. |
| | 1149 | | /// </summary> |
| | 1150 | | /// <remarks> |
| | 1151 | | /// This API will return a set of Images for the specified tags and optionally |
| | 1152 | | /// iteration. If no iteration is specified the |
| | 1153 | | /// current workspace is used. |
| | 1154 | | /// </remarks> |
| | 1155 | | /// <param name='operations'> |
| | 1156 | | /// The operations group for this extension method. |
| | 1157 | | /// </param> |
| | 1158 | | /// <param name='projectId'> |
| | 1159 | | /// The project id. |
| | 1160 | | /// </param> |
| | 1161 | | /// <param name='imageIds'> |
| | 1162 | | /// The list of image ids to retrieve. Limited to 256. |
| | 1163 | | /// </param> |
| | 1164 | | /// <param name='iterationId'> |
| | 1165 | | /// The iteration id. Defaults to workspace. |
| | 1166 | | /// </param> |
| | 1167 | | public static IList<Image> GetImagesByIds(this ICustomVisionTrainingClient operations, System.Guid projectId |
| | 1168 | | { |
| 0 | 1169 | | return operations.GetImagesByIdsAsync(projectId, imageIds, iterationId).GetAwaiter().GetResult(); |
| | 1170 | | } |
| | 1171 | |
|
| | 1172 | | /// <summary> |
| | 1173 | | /// Get images by id for a given project iteration. |
| | 1174 | | /// </summary> |
| | 1175 | | /// <remarks> |
| | 1176 | | /// This API will return a set of Images for the specified tags and optionally |
| | 1177 | | /// iteration. If no iteration is specified the |
| | 1178 | | /// current workspace is used. |
| | 1179 | | /// </remarks> |
| | 1180 | | /// <param name='operations'> |
| | 1181 | | /// The operations group for this extension method. |
| | 1182 | | /// </param> |
| | 1183 | | /// <param name='projectId'> |
| | 1184 | | /// The project id. |
| | 1185 | | /// </param> |
| | 1186 | | /// <param name='imageIds'> |
| | 1187 | | /// The list of image ids to retrieve. Limited to 256. |
| | 1188 | | /// </param> |
| | 1189 | | /// <param name='iterationId'> |
| | 1190 | | /// The iteration id. Defaults to workspace. |
| | 1191 | | /// </param> |
| | 1192 | | /// <param name='cancellationToken'> |
| | 1193 | | /// The cancellation token. |
| | 1194 | | /// </param> |
| | 1195 | | public static async Task<IList<Image>> GetImagesByIdsAsync(this ICustomVisionTrainingClient operations, Syst |
| | 1196 | | { |
| 6 | 1197 | | using (var _result = await operations.GetImagesByIdsWithHttpMessagesAsync(projectId, imageIds, iteration |
| | 1198 | | { |
| 6 | 1199 | | return _result.Body; |
| | 1200 | | } |
| 6 | 1201 | | } |
| | 1202 | |
|
| | 1203 | | /// <summary> |
| | 1204 | | /// Get images by id for a given project iteration. |
| | 1205 | | /// </summary> |
| | 1206 | | /// <remarks> |
| | 1207 | | /// This API will return a set of Images for the specified tags and optionally |
| | 1208 | | /// iteration. If no iteration is specified the |
| | 1209 | | /// current workspace is used. |
| | 1210 | | /// </remarks> |
| | 1211 | | /// <param name='operations'> |
| | 1212 | | /// The operations group for this extension method. |
| | 1213 | | /// </param> |
| | 1214 | | /// <param name='projectId'> |
| | 1215 | | /// The project id. |
| | 1216 | | /// </param> |
| | 1217 | | /// <param name='imageIds'> |
| | 1218 | | /// The list of image ids to retrieve. Limited to 256. |
| | 1219 | | /// </param> |
| | 1220 | | /// <param name='iterationId'> |
| | 1221 | | /// The iteration id. Defaults to workspace. |
| | 1222 | | /// </param> |
| | 1223 | | /// <param name='customHeaders'> |
| | 1224 | | /// Headers that will be added to request. |
| | 1225 | | /// </param> |
| | 1226 | | public static HttpOperationResponse<IList<Image>> GetImagesByIdsWithHttpMessages(this ICustomVisionTrainingC |
| | 1227 | | { |
| 0 | 1228 | | return operations.GetImagesByIdsWithHttpMessagesAsync(projectId, imageIds, iterationId, customHeaders, C |
| | 1229 | | } |
| | 1230 | |
|
| | 1231 | | /// <summary> |
| | 1232 | | /// Update metadata of images. |
| | 1233 | | /// </summary> |
| | 1234 | | /// <remarks> |
| | 1235 | | /// This API accepts a batch of image Ids, and metadata, to update images. |
| | 1236 | | /// There is a limit of 64 images. |
| | 1237 | | /// </remarks> |
| | 1238 | | /// <param name='operations'> |
| | 1239 | | /// The operations group for this extension method. |
| | 1240 | | /// </param> |
| | 1241 | | /// <param name='projectId'> |
| | 1242 | | /// The project id. |
| | 1243 | | /// </param> |
| | 1244 | | /// <param name='imageIds'> |
| | 1245 | | /// The list of image ids to update. Limited to 64. |
| | 1246 | | /// </param> |
| | 1247 | | /// <param name='metadata'> |
| | 1248 | | /// The metadata to be updated to the specified images. Limited to 50 key-value |
| | 1249 | | /// pairs per image. The length of key is limited to 256. The length of value |
| | 1250 | | /// is limited to 512. |
| | 1251 | | /// </param> |
| | 1252 | | public static ImageMetadataUpdateSummary UpdateImageMetadata(this ICustomVisionTrainingClient operations, Sy |
| | 1253 | | { |
| 0 | 1254 | | return operations.UpdateImageMetadataAsync(projectId, imageIds, metadata).GetAwaiter().GetResult(); |
| | 1255 | | } |
| | 1256 | |
|
| | 1257 | | /// <summary> |
| | 1258 | | /// Update metadata of images. |
| | 1259 | | /// </summary> |
| | 1260 | | /// <remarks> |
| | 1261 | | /// This API accepts a batch of image Ids, and metadata, to update images. |
| | 1262 | | /// There is a limit of 64 images. |
| | 1263 | | /// </remarks> |
| | 1264 | | /// <param name='operations'> |
| | 1265 | | /// The operations group for this extension method. |
| | 1266 | | /// </param> |
| | 1267 | | /// <param name='projectId'> |
| | 1268 | | /// The project id. |
| | 1269 | | /// </param> |
| | 1270 | | /// <param name='imageIds'> |
| | 1271 | | /// The list of image ids to update. Limited to 64. |
| | 1272 | | /// </param> |
| | 1273 | | /// <param name='metadata'> |
| | 1274 | | /// The metadata to be updated to the specified images. Limited to 50 key-value |
| | 1275 | | /// pairs per image. The length of key is limited to 256. The length of value |
| | 1276 | | /// is limited to 512. |
| | 1277 | | /// </param> |
| | 1278 | | /// <param name='cancellationToken'> |
| | 1279 | | /// The cancellation token. |
| | 1280 | | /// </param> |
| | 1281 | | public static async Task<ImageMetadataUpdateSummary> UpdateImageMetadataAsync(this ICustomVisionTrainingClie |
| | 1282 | | { |
| 2 | 1283 | | using (var _result = await operations.UpdateImageMetadataWithHttpMessagesAsync(projectId, imageIds, meta |
| | 1284 | | { |
| 2 | 1285 | | return _result.Body; |
| | 1286 | | } |
| 2 | 1287 | | } |
| | 1288 | |
|
| | 1289 | | /// <summary> |
| | 1290 | | /// Update metadata of images. |
| | 1291 | | /// </summary> |
| | 1292 | | /// <remarks> |
| | 1293 | | /// This API accepts a batch of image Ids, and metadata, to update images. |
| | 1294 | | /// There is a limit of 64 images. |
| | 1295 | | /// </remarks> |
| | 1296 | | /// <param name='operations'> |
| | 1297 | | /// The operations group for this extension method. |
| | 1298 | | /// </param> |
| | 1299 | | /// <param name='projectId'> |
| | 1300 | | /// The project id. |
| | 1301 | | /// </param> |
| | 1302 | | /// <param name='imageIds'> |
| | 1303 | | /// The list of image ids to update. Limited to 64. |
| | 1304 | | /// </param> |
| | 1305 | | /// <param name='metadata'> |
| | 1306 | | /// The metadata to be updated to the specified images. Limited to 50 key-value |
| | 1307 | | /// pairs per image. The length of key is limited to 256. The length of value |
| | 1308 | | /// is limited to 512. |
| | 1309 | | /// </param> |
| | 1310 | | /// <param name='customHeaders'> |
| | 1311 | | /// Headers that will be added to request. |
| | 1312 | | /// </param> |
| | 1313 | | public static HttpOperationResponse<ImageMetadataUpdateSummary> UpdateImageMetadataWithHttpMessages(this ICu |
| | 1314 | | { |
| 0 | 1315 | | return operations.UpdateImageMetadataWithHttpMessagesAsync(projectId, imageIds, metadata, customHeaders, |
| | 1316 | | } |
| | 1317 | |
|
| | 1318 | | /// <summary> |
| | 1319 | | /// Add the specified predicted images to the set of training images. |
| | 1320 | | /// </summary> |
| | 1321 | | /// <remarks> |
| | 1322 | | /// This API creates a batch of images from predicted images specified. There |
| | 1323 | | /// is a limit of 64 images and 20 tags. |
| | 1324 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1325 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1326 | | /// status for each image will be listed in the response payload. |
| | 1327 | | /// </remarks> |
| | 1328 | | /// <param name='operations'> |
| | 1329 | | /// The operations group for this extension method. |
| | 1330 | | /// </param> |
| | 1331 | | /// <param name='projectId'> |
| | 1332 | | /// The project id. |
| | 1333 | | /// </param> |
| | 1334 | | /// <param name='batch'> |
| | 1335 | | /// Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. |
| | 1336 | | /// </param> |
| | 1337 | | public static ImageCreateSummary CreateImagesFromPredictions(this ICustomVisionTrainingClient operations, Sy |
| | 1338 | | { |
| 0 | 1339 | | return operations.CreateImagesFromPredictionsAsync(projectId, batch).GetAwaiter().GetResult(); |
| | 1340 | | } |
| | 1341 | |
|
| | 1342 | | /// <summary> |
| | 1343 | | /// Add the specified predicted images to the set of training images. |
| | 1344 | | /// </summary> |
| | 1345 | | /// <remarks> |
| | 1346 | | /// This API creates a batch of images from predicted images specified. There |
| | 1347 | | /// is a limit of 64 images and 20 tags. |
| | 1348 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1349 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1350 | | /// status for each image will be listed in the response payload. |
| | 1351 | | /// </remarks> |
| | 1352 | | /// <param name='operations'> |
| | 1353 | | /// The operations group for this extension method. |
| | 1354 | | /// </param> |
| | 1355 | | /// <param name='projectId'> |
| | 1356 | | /// The project id. |
| | 1357 | | /// </param> |
| | 1358 | | /// <param name='batch'> |
| | 1359 | | /// Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. |
| | 1360 | | /// </param> |
| | 1361 | | /// <param name='cancellationToken'> |
| | 1362 | | /// The cancellation token. |
| | 1363 | | /// </param> |
| | 1364 | | public static async Task<ImageCreateSummary> CreateImagesFromPredictionsAsync(this ICustomVisionTrainingClie |
| | 1365 | | { |
| 2 | 1366 | | using (var _result = await operations.CreateImagesFromPredictionsWithHttpMessagesAsync(projectId, batch, |
| | 1367 | | { |
| 2 | 1368 | | return _result.Body; |
| | 1369 | | } |
| 2 | 1370 | | } |
| | 1371 | |
|
| | 1372 | | /// <summary> |
| | 1373 | | /// Add the specified predicted images to the set of training images. |
| | 1374 | | /// </summary> |
| | 1375 | | /// <remarks> |
| | 1376 | | /// This API creates a batch of images from predicted images specified. There |
| | 1377 | | /// is a limit of 64 images and 20 tags. |
| | 1378 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 1379 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1380 | | /// status for each image will be listed in the response payload. |
| | 1381 | | /// </remarks> |
| | 1382 | | /// <param name='operations'> |
| | 1383 | | /// The operations group for this extension method. |
| | 1384 | | /// </param> |
| | 1385 | | /// <param name='projectId'> |
| | 1386 | | /// The project id. |
| | 1387 | | /// </param> |
| | 1388 | | /// <param name='batch'> |
| | 1389 | | /// Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. |
| | 1390 | | /// </param> |
| | 1391 | | /// <param name='customHeaders'> |
| | 1392 | | /// Headers that will be added to request. |
| | 1393 | | /// </param> |
| | 1394 | | public static HttpOperationResponse<ImageCreateSummary> CreateImagesFromPredictionsWithHttpMessages(this ICu |
| | 1395 | | { |
| 0 | 1396 | | return operations.CreateImagesFromPredictionsWithHttpMessagesAsync(projectId, batch, customHeaders, Canc |
| | 1397 | | } |
| | 1398 | |
|
| | 1399 | | /// <summary> |
| | 1400 | | /// Create a set of image regions. |
| | 1401 | | /// </summary> |
| | 1402 | | /// <remarks> |
| | 1403 | | /// This API accepts a batch of image regions, and optionally tags, to update |
| | 1404 | | /// existing images with region information. |
| | 1405 | | /// There is a limit of 64 entries in the batch. |
| | 1406 | | /// If all regions are successful created, 200(OK) status code will be |
| | 1407 | | /// returned. |
| | 1408 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1409 | | /// status for each region will be listed in the response payload. |
| | 1410 | | /// </remarks> |
| | 1411 | | /// <param name='operations'> |
| | 1412 | | /// The operations group for this extension method. |
| | 1413 | | /// </param> |
| | 1414 | | /// <param name='projectId'> |
| | 1415 | | /// The project id. |
| | 1416 | | /// </param> |
| | 1417 | | /// <param name='batch'> |
| | 1418 | | /// Batch of image regions which include a tag and bounding box. Limited to 64. |
| | 1419 | | /// </param> |
| | 1420 | | public static ImageRegionCreateSummary CreateImageRegions(this ICustomVisionTrainingClient operations, Syste |
| | 1421 | | { |
| 0 | 1422 | | return operations.CreateImageRegionsAsync(projectId, batch).GetAwaiter().GetResult(); |
| | 1423 | | } |
| | 1424 | |
|
| | 1425 | | /// <summary> |
| | 1426 | | /// Create a set of image regions. |
| | 1427 | | /// </summary> |
| | 1428 | | /// <remarks> |
| | 1429 | | /// This API accepts a batch of image regions, and optionally tags, to update |
| | 1430 | | /// existing images with region information. |
| | 1431 | | /// There is a limit of 64 entries in the batch. |
| | 1432 | | /// If all regions are successful created, 200(OK) status code will be |
| | 1433 | | /// returned. |
| | 1434 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1435 | | /// status for each region will be listed in the response payload. |
| | 1436 | | /// </remarks> |
| | 1437 | | /// <param name='operations'> |
| | 1438 | | /// The operations group for this extension method. |
| | 1439 | | /// </param> |
| | 1440 | | /// <param name='projectId'> |
| | 1441 | | /// The project id. |
| | 1442 | | /// </param> |
| | 1443 | | /// <param name='batch'> |
| | 1444 | | /// Batch of image regions which include a tag and bounding box. Limited to 64. |
| | 1445 | | /// </param> |
| | 1446 | | /// <param name='cancellationToken'> |
| | 1447 | | /// The cancellation token. |
| | 1448 | | /// </param> |
| | 1449 | | public static async Task<ImageRegionCreateSummary> CreateImageRegionsAsync(this ICustomVisionTrainingClient |
| | 1450 | | { |
| 2 | 1451 | | using (var _result = await operations.CreateImageRegionsWithHttpMessagesAsync(projectId, batch, null, ca |
| | 1452 | | { |
| 2 | 1453 | | return _result.Body; |
| | 1454 | | } |
| 2 | 1455 | | } |
| | 1456 | |
|
| | 1457 | | /// <summary> |
| | 1458 | | /// Create a set of image regions. |
| | 1459 | | /// </summary> |
| | 1460 | | /// <remarks> |
| | 1461 | | /// This API accepts a batch of image regions, and optionally tags, to update |
| | 1462 | | /// existing images with region information. |
| | 1463 | | /// There is a limit of 64 entries in the batch. |
| | 1464 | | /// If all regions are successful created, 200(OK) status code will be |
| | 1465 | | /// returned. |
| | 1466 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 1467 | | /// status for each region will be listed in the response payload. |
| | 1468 | | /// </remarks> |
| | 1469 | | /// <param name='operations'> |
| | 1470 | | /// The operations group for this extension method. |
| | 1471 | | /// </param> |
| | 1472 | | /// <param name='projectId'> |
| | 1473 | | /// The project id. |
| | 1474 | | /// </param> |
| | 1475 | | /// <param name='batch'> |
| | 1476 | | /// Batch of image regions which include a tag and bounding box. Limited to 64. |
| | 1477 | | /// </param> |
| | 1478 | | /// <param name='customHeaders'> |
| | 1479 | | /// Headers that will be added to request. |
| | 1480 | | /// </param> |
| | 1481 | | public static HttpOperationResponse<ImageRegionCreateSummary> CreateImageRegionsWithHttpMessages(this ICusto |
| | 1482 | | { |
| 0 | 1483 | | return operations.CreateImageRegionsWithHttpMessagesAsync(projectId, batch, customHeaders, CancellationT |
| | 1484 | | } |
| | 1485 | |
|
| | 1486 | | /// <summary> |
| | 1487 | | /// Delete a set of image regions. |
| | 1488 | | /// </summary> |
| | 1489 | | /// <param name='operations'> |
| | 1490 | | /// The operations group for this extension method. |
| | 1491 | | /// </param> |
| | 1492 | | /// <param name='projectId'> |
| | 1493 | | /// The project id. |
| | 1494 | | /// </param> |
| | 1495 | | /// <param name='regionIds'> |
| | 1496 | | /// Regions to delete. Limited to 64. |
| | 1497 | | /// </param> |
| | 1498 | | public static void DeleteImageRegions(this ICustomVisionTrainingClient operations, System.Guid projectId, IL |
| | 1499 | | { |
| 0 | 1500 | | operations.DeleteImageRegionsAsync(projectId, regionIds).GetAwaiter().GetResult(); |
| 0 | 1501 | | } |
| | 1502 | |
|
| | 1503 | | /// <summary> |
| | 1504 | | /// Delete a set of image regions. |
| | 1505 | | /// </summary> |
| | 1506 | | /// <param name='operations'> |
| | 1507 | | /// The operations group for this extension method. |
| | 1508 | | /// </param> |
| | 1509 | | /// <param name='projectId'> |
| | 1510 | | /// The project id. |
| | 1511 | | /// </param> |
| | 1512 | | /// <param name='regionIds'> |
| | 1513 | | /// Regions to delete. Limited to 64. |
| | 1514 | | /// </param> |
| | 1515 | | /// <param name='cancellationToken'> |
| | 1516 | | /// The cancellation token. |
| | 1517 | | /// </param> |
| | 1518 | | public static async Task DeleteImageRegionsAsync(this ICustomVisionTrainingClient operations, System.Guid pr |
| | 1519 | | { |
| 2 | 1520 | | (await operations.DeleteImageRegionsWithHttpMessagesAsync(projectId, regionIds, null, cancellationToken) |
| 2 | 1521 | | } |
| | 1522 | |
|
| | 1523 | | /// <summary> |
| | 1524 | | /// Delete a set of image regions. |
| | 1525 | | /// </summary> |
| | 1526 | | /// <param name='operations'> |
| | 1527 | | /// The operations group for this extension method. |
| | 1528 | | /// </param> |
| | 1529 | | /// <param name='projectId'> |
| | 1530 | | /// The project id. |
| | 1531 | | /// </param> |
| | 1532 | | /// <param name='regionIds'> |
| | 1533 | | /// Regions to delete. Limited to 64. |
| | 1534 | | /// </param> |
| | 1535 | | /// <param name='customHeaders'> |
| | 1536 | | /// Headers that will be added to request. |
| | 1537 | | /// </param> |
| | 1538 | | public static HttpOperationResponse DeleteImageRegionsWithHttpMessages(this ICustomVisionTrainingClient oper |
| | 1539 | | { |
| 0 | 1540 | | return operations.DeleteImageRegionsWithHttpMessagesAsync(projectId, regionIds, customHeaders, Cancellat |
| | 1541 | | } |
| | 1542 | |
|
| | 1543 | | /// <summary> |
| | 1544 | | /// Get untagged images whose suggested tags match given tags. Returns empty |
| | 1545 | | /// array if no images are found. |
| | 1546 | | /// </summary> |
| | 1547 | | /// <remarks> |
| | 1548 | | /// This API will fetch untagged images filtered by suggested tags Ids. It |
| | 1549 | | /// returns an empty array if no images are found. |
| | 1550 | | /// </remarks> |
| | 1551 | | /// <param name='operations'> |
| | 1552 | | /// The operations group for this extension method. |
| | 1553 | | /// </param> |
| | 1554 | | /// <param name='projectId'> |
| | 1555 | | /// The project id. |
| | 1556 | | /// </param> |
| | 1557 | | /// <param name='iterationId'> |
| | 1558 | | /// IterationId to use for the suggested tags and regions. |
| | 1559 | | /// </param> |
| | 1560 | | /// <param name='query'> |
| | 1561 | | /// Contains properties we need to query suggested images. |
| | 1562 | | /// </param> |
| | 1563 | | public static SuggestedTagAndRegionQuery QuerySuggestedImages(this ICustomVisionTrainingClient operations, S |
| | 1564 | | { |
| 0 | 1565 | | return operations.QuerySuggestedImagesAsync(projectId, iterationId, query).GetAwaiter().GetResult(); |
| | 1566 | | } |
| | 1567 | |
|
| | 1568 | | /// <summary> |
| | 1569 | | /// Get untagged images whose suggested tags match given tags. Returns empty |
| | 1570 | | /// array if no images are found. |
| | 1571 | | /// </summary> |
| | 1572 | | /// <remarks> |
| | 1573 | | /// This API will fetch untagged images filtered by suggested tags Ids. It |
| | 1574 | | /// returns an empty array if no images are found. |
| | 1575 | | /// </remarks> |
| | 1576 | | /// <param name='operations'> |
| | 1577 | | /// The operations group for this extension method. |
| | 1578 | | /// </param> |
| | 1579 | | /// <param name='projectId'> |
| | 1580 | | /// The project id. |
| | 1581 | | /// </param> |
| | 1582 | | /// <param name='iterationId'> |
| | 1583 | | /// IterationId to use for the suggested tags and regions. |
| | 1584 | | /// </param> |
| | 1585 | | /// <param name='query'> |
| | 1586 | | /// Contains properties we need to query suggested images. |
| | 1587 | | /// </param> |
| | 1588 | | /// <param name='cancellationToken'> |
| | 1589 | | /// The cancellation token. |
| | 1590 | | /// </param> |
| | 1591 | | public static async Task<SuggestedTagAndRegionQuery> QuerySuggestedImagesAsync(this ICustomVisionTrainingCli |
| | 1592 | | { |
| 2 | 1593 | | using (var _result = await operations.QuerySuggestedImagesWithHttpMessagesAsync(projectId, iterationId, |
| | 1594 | | { |
| 2 | 1595 | | return _result.Body; |
| | 1596 | | } |
| 2 | 1597 | | } |
| | 1598 | |
|
| | 1599 | | /// <summary> |
| | 1600 | | /// Get untagged images whose suggested tags match given tags. Returns empty |
| | 1601 | | /// array if no images are found. |
| | 1602 | | /// </summary> |
| | 1603 | | /// <remarks> |
| | 1604 | | /// This API will fetch untagged images filtered by suggested tags Ids. It |
| | 1605 | | /// returns an empty array if no images are found. |
| | 1606 | | /// </remarks> |
| | 1607 | | /// <param name='operations'> |
| | 1608 | | /// The operations group for this extension method. |
| | 1609 | | /// </param> |
| | 1610 | | /// <param name='projectId'> |
| | 1611 | | /// The project id. |
| | 1612 | | /// </param> |
| | 1613 | | /// <param name='iterationId'> |
| | 1614 | | /// IterationId to use for the suggested tags and regions. |
| | 1615 | | /// </param> |
| | 1616 | | /// <param name='query'> |
| | 1617 | | /// Contains properties we need to query suggested images. |
| | 1618 | | /// </param> |
| | 1619 | | /// <param name='customHeaders'> |
| | 1620 | | /// Headers that will be added to request. |
| | 1621 | | /// </param> |
| | 1622 | | public static HttpOperationResponse<SuggestedTagAndRegionQuery> QuerySuggestedImagesWithHttpMessages(this IC |
| | 1623 | | { |
| 0 | 1624 | | return operations.QuerySuggestedImagesWithHttpMessagesAsync(projectId, iterationId, query, customHeaders |
| | 1625 | | } |
| | 1626 | |
|
| | 1627 | | /// <summary> |
| | 1628 | | /// Get count of images whose suggested tags match given tags and their |
| | 1629 | | /// probabilities are greater than or equal to the given threshold. Returns |
| | 1630 | | /// count as 0 if none found. |
| | 1631 | | /// </summary> |
| | 1632 | | /// <remarks> |
| | 1633 | | /// This API takes in tagIds to get count of untagged images per suggested tags |
| | 1634 | | /// for a given threshold. |
| | 1635 | | /// </remarks> |
| | 1636 | | /// <param name='operations'> |
| | 1637 | | /// The operations group for this extension method. |
| | 1638 | | /// </param> |
| | 1639 | | /// <param name='projectId'> |
| | 1640 | | /// The project id. |
| | 1641 | | /// </param> |
| | 1642 | | /// <param name='iterationId'> |
| | 1643 | | /// IterationId to use for the suggested tags and regions. |
| | 1644 | | /// </param> |
| | 1645 | | /// <param name='query'> |
| | 1646 | | /// Model that contains tagIds, threshold and projectType to query by. |
| | 1647 | | /// </param> |
| | 1648 | | public static IDictionary<string, int?> QuerySuggestedImageCount(this ICustomVisionTrainingClient operations |
| | 1649 | | { |
| 0 | 1650 | | return operations.QuerySuggestedImageCountAsync(projectId, iterationId, query).GetAwaiter().GetResult(); |
| | 1651 | | } |
| | 1652 | |
|
| | 1653 | | /// <summary> |
| | 1654 | | /// Get count of images whose suggested tags match given tags and their |
| | 1655 | | /// probabilities are greater than or equal to the given threshold. Returns |
| | 1656 | | /// count as 0 if none found. |
| | 1657 | | /// </summary> |
| | 1658 | | /// <remarks> |
| | 1659 | | /// This API takes in tagIds to get count of untagged images per suggested tags |
| | 1660 | | /// for a given threshold. |
| | 1661 | | /// </remarks> |
| | 1662 | | /// <param name='operations'> |
| | 1663 | | /// The operations group for this extension method. |
| | 1664 | | /// </param> |
| | 1665 | | /// <param name='projectId'> |
| | 1666 | | /// The project id. |
| | 1667 | | /// </param> |
| | 1668 | | /// <param name='iterationId'> |
| | 1669 | | /// IterationId to use for the suggested tags and regions. |
| | 1670 | | /// </param> |
| | 1671 | | /// <param name='query'> |
| | 1672 | | /// Model that contains tagIds, threshold and projectType to query by. |
| | 1673 | | /// </param> |
| | 1674 | | /// <param name='cancellationToken'> |
| | 1675 | | /// The cancellation token. |
| | 1676 | | /// </param> |
| | 1677 | | public static async Task<IDictionary<string, int?>> QuerySuggestedImageCountAsync(this ICustomVisionTraining |
| | 1678 | | { |
| 6 | 1679 | | using (var _result = await operations.QuerySuggestedImageCountWithHttpMessagesAsync(projectId, iteration |
| | 1680 | | { |
| 6 | 1681 | | return _result.Body; |
| | 1682 | | } |
| 6 | 1683 | | } |
| | 1684 | |
|
| | 1685 | | /// <summary> |
| | 1686 | | /// Get count of images whose suggested tags match given tags and their |
| | 1687 | | /// probabilities are greater than or equal to the given threshold. Returns |
| | 1688 | | /// count as 0 if none found. |
| | 1689 | | /// </summary> |
| | 1690 | | /// <remarks> |
| | 1691 | | /// This API takes in tagIds to get count of untagged images per suggested tags |
| | 1692 | | /// for a given threshold. |
| | 1693 | | /// </remarks> |
| | 1694 | | /// <param name='operations'> |
| | 1695 | | /// The operations group for this extension method. |
| | 1696 | | /// </param> |
| | 1697 | | /// <param name='projectId'> |
| | 1698 | | /// The project id. |
| | 1699 | | /// </param> |
| | 1700 | | /// <param name='iterationId'> |
| | 1701 | | /// IterationId to use for the suggested tags and regions. |
| | 1702 | | /// </param> |
| | 1703 | | /// <param name='query'> |
| | 1704 | | /// Model that contains tagIds, threshold and projectType to query by. |
| | 1705 | | /// </param> |
| | 1706 | | /// <param name='customHeaders'> |
| | 1707 | | /// Headers that will be added to request. |
| | 1708 | | /// </param> |
| | 1709 | | public static HttpOperationResponse<IDictionary<string, int?>> QuerySuggestedImageCountWithHttpMessages(this |
| | 1710 | | { |
| 0 | 1711 | | return operations.QuerySuggestedImageCountWithHttpMessagesAsync(projectId, iterationId, query, customHea |
| | 1712 | | } |
| | 1713 | |
|
| | 1714 | | /// <summary> |
| | 1715 | | /// Get tagged images for a given project iteration. |
| | 1716 | | /// </summary> |
| | 1717 | | /// <remarks> |
| | 1718 | | /// This API supports batching and range selection. By default it will only |
| | 1719 | | /// return first 50 images matching images. |
| | 1720 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 1721 | | /// in a given batch. |
| | 1722 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1723 | | /// tag ids are for the "Dog" and |
| | 1724 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1725 | | /// </remarks> |
| | 1726 | | /// <param name='operations'> |
| | 1727 | | /// The operations group for this extension method. |
| | 1728 | | /// </param> |
| | 1729 | | /// <param name='projectId'> |
| | 1730 | | /// The project id. |
| | 1731 | | /// </param> |
| | 1732 | | /// <param name='iterationId'> |
| | 1733 | | /// The iteration id. Defaults to workspace. |
| | 1734 | | /// </param> |
| | 1735 | | /// <param name='tagIds'> |
| | 1736 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 1737 | | /// null. Limited to 20. |
| | 1738 | | /// </param> |
| | 1739 | | /// <param name='orderBy'> |
| | 1740 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 1741 | | /// 'Oldest' |
| | 1742 | | /// </param> |
| | 1743 | | /// <param name='take'> |
| | 1744 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 1745 | | /// </param> |
| | 1746 | | /// <param name='skip'> |
| | 1747 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 1748 | | /// </param> |
| | 1749 | | public static IList<Image> GetTaggedImages(this ICustomVisionTrainingClient operations, System.Guid projectI |
| | 1750 | | { |
| 0 | 1751 | | return operations.GetTaggedImagesAsync(projectId, iterationId, tagIds, orderBy, take, skip).GetAwaiter() |
| | 1752 | | } |
| | 1753 | |
|
| | 1754 | | /// <summary> |
| | 1755 | | /// Get tagged images for a given project iteration. |
| | 1756 | | /// </summary> |
| | 1757 | | /// <remarks> |
| | 1758 | | /// This API supports batching and range selection. By default it will only |
| | 1759 | | /// return first 50 images matching images. |
| | 1760 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 1761 | | /// in a given batch. |
| | 1762 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1763 | | /// tag ids are for the "Dog" and |
| | 1764 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1765 | | /// </remarks> |
| | 1766 | | /// <param name='operations'> |
| | 1767 | | /// The operations group for this extension method. |
| | 1768 | | /// </param> |
| | 1769 | | /// <param name='projectId'> |
| | 1770 | | /// The project id. |
| | 1771 | | /// </param> |
| | 1772 | | /// <param name='iterationId'> |
| | 1773 | | /// The iteration id. Defaults to workspace. |
| | 1774 | | /// </param> |
| | 1775 | | /// <param name='tagIds'> |
| | 1776 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 1777 | | /// null. Limited to 20. |
| | 1778 | | /// </param> |
| | 1779 | | /// <param name='orderBy'> |
| | 1780 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 1781 | | /// 'Oldest' |
| | 1782 | | /// </param> |
| | 1783 | | /// <param name='take'> |
| | 1784 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 1785 | | /// </param> |
| | 1786 | | /// <param name='skip'> |
| | 1787 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 1788 | | /// </param> |
| | 1789 | | /// <param name='cancellationToken'> |
| | 1790 | | /// The cancellation token. |
| | 1791 | | /// </param> |
| | 1792 | | public static async Task<IList<Image>> GetTaggedImagesAsync(this ICustomVisionTrainingClient operations, Sys |
| | 1793 | | { |
| 12 | 1794 | | using (var _result = await operations.GetTaggedImagesWithHttpMessagesAsync(projectId, iterationId, tagId |
| | 1795 | | { |
| 12 | 1796 | | return _result.Body; |
| | 1797 | | } |
| 12 | 1798 | | } |
| | 1799 | |
|
| | 1800 | | /// <summary> |
| | 1801 | | /// Get tagged images for a given project iteration. |
| | 1802 | | /// </summary> |
| | 1803 | | /// <remarks> |
| | 1804 | | /// This API supports batching and range selection. By default it will only |
| | 1805 | | /// return first 50 images matching images. |
| | 1806 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 1807 | | /// in a given batch. |
| | 1808 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1809 | | /// tag ids are for the "Dog" and |
| | 1810 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1811 | | /// </remarks> |
| | 1812 | | /// <param name='operations'> |
| | 1813 | | /// The operations group for this extension method. |
| | 1814 | | /// </param> |
| | 1815 | | /// <param name='projectId'> |
| | 1816 | | /// The project id. |
| | 1817 | | /// </param> |
| | 1818 | | /// <param name='iterationId'> |
| | 1819 | | /// The iteration id. Defaults to workspace. |
| | 1820 | | /// </param> |
| | 1821 | | /// <param name='tagIds'> |
| | 1822 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 1823 | | /// null. Limited to 20. |
| | 1824 | | /// </param> |
| | 1825 | | /// <param name='orderBy'> |
| | 1826 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 1827 | | /// 'Oldest' |
| | 1828 | | /// </param> |
| | 1829 | | /// <param name='take'> |
| | 1830 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 1831 | | /// </param> |
| | 1832 | | /// <param name='skip'> |
| | 1833 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 1834 | | /// </param> |
| | 1835 | | /// <param name='customHeaders'> |
| | 1836 | | /// Headers that will be added to request. |
| | 1837 | | /// </param> |
| | 1838 | | public static HttpOperationResponse<IList<Image>> GetTaggedImagesWithHttpMessages(this ICustomVisionTraining |
| | 1839 | | { |
| 0 | 1840 | | return operations.GetTaggedImagesWithHttpMessagesAsync(projectId, iterationId, tagIds, orderBy, take, sk |
| | 1841 | | } |
| | 1842 | |
|
| | 1843 | | /// <summary> |
| | 1844 | | /// Gets the number of images tagged with the provided {tagIds}. |
| | 1845 | | /// </summary> |
| | 1846 | | /// <remarks> |
| | 1847 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1848 | | /// tag ids are for the "Dog" and |
| | 1849 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1850 | | /// </remarks> |
| | 1851 | | /// <param name='operations'> |
| | 1852 | | /// The operations group for this extension method. |
| | 1853 | | /// </param> |
| | 1854 | | /// <param name='projectId'> |
| | 1855 | | /// The project id. |
| | 1856 | | /// </param> |
| | 1857 | | /// <param name='iterationId'> |
| | 1858 | | /// The iteration id. Defaults to workspace. |
| | 1859 | | /// </param> |
| | 1860 | | /// <param name='tagIds'> |
| | 1861 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 1862 | | /// null. |
| | 1863 | | /// </param> |
| | 1864 | | public static int? GetTaggedImageCount(this ICustomVisionTrainingClient operations, System.Guid projectId, S |
| | 1865 | | { |
| 4 | 1866 | | return operations.GetTaggedImageCountAsync(projectId, iterationId, tagIds).GetAwaiter().GetResult(); |
| | 1867 | | } |
| | 1868 | |
|
| | 1869 | | /// <summary> |
| | 1870 | | /// Gets the number of images tagged with the provided {tagIds}. |
| | 1871 | | /// </summary> |
| | 1872 | | /// <remarks> |
| | 1873 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1874 | | /// tag ids are for the "Dog" and |
| | 1875 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1876 | | /// </remarks> |
| | 1877 | | /// <param name='operations'> |
| | 1878 | | /// The operations group for this extension method. |
| | 1879 | | /// </param> |
| | 1880 | | /// <param name='projectId'> |
| | 1881 | | /// The project id. |
| | 1882 | | /// </param> |
| | 1883 | | /// <param name='iterationId'> |
| | 1884 | | /// The iteration id. Defaults to workspace. |
| | 1885 | | /// </param> |
| | 1886 | | /// <param name='tagIds'> |
| | 1887 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 1888 | | /// null. |
| | 1889 | | /// </param> |
| | 1890 | | /// <param name='cancellationToken'> |
| | 1891 | | /// The cancellation token. |
| | 1892 | | /// </param> |
| | 1893 | | public static async Task<int?> GetTaggedImageCountAsync(this ICustomVisionTrainingClient operations, System. |
| | 1894 | | { |
| 6 | 1895 | | using (var _result = await operations.GetTaggedImageCountWithHttpMessagesAsync(projectId, iterationId, t |
| | 1896 | | { |
| 6 | 1897 | | return _result.Body; |
| | 1898 | | } |
| 6 | 1899 | | } |
| | 1900 | |
|
| | 1901 | | /// <summary> |
| | 1902 | | /// Gets the number of images tagged with the provided {tagIds}. |
| | 1903 | | /// </summary> |
| | 1904 | | /// <remarks> |
| | 1905 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 1906 | | /// tag ids are for the "Dog" and |
| | 1907 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 1908 | | /// </remarks> |
| | 1909 | | /// <param name='operations'> |
| | 1910 | | /// The operations group for this extension method. |
| | 1911 | | /// </param> |
| | 1912 | | /// <param name='projectId'> |
| | 1913 | | /// The project id. |
| | 1914 | | /// </param> |
| | 1915 | | /// <param name='iterationId'> |
| | 1916 | | /// The iteration id. Defaults to workspace. |
| | 1917 | | /// </param> |
| | 1918 | | /// <param name='tagIds'> |
| | 1919 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 1920 | | /// null. |
| | 1921 | | /// </param> |
| | 1922 | | /// <param name='customHeaders'> |
| | 1923 | | /// Headers that will be added to request. |
| | 1924 | | /// </param> |
| | 1925 | | public static HttpOperationResponse<int?> GetTaggedImageCountWithHttpMessages(this ICustomVisionTrainingClie |
| | 1926 | | { |
| 0 | 1927 | | return operations.GetTaggedImageCountWithHttpMessagesAsync(projectId, iterationId, tagIds, customHeaders |
| | 1928 | | } |
| | 1929 | |
|
| | 1930 | | /// <summary> |
| | 1931 | | /// Associate a set of images with a set of tags. |
| | 1932 | | /// </summary> |
| | 1933 | | /// <param name='operations'> |
| | 1934 | | /// The operations group for this extension method. |
| | 1935 | | /// </param> |
| | 1936 | | /// <param name='projectId'> |
| | 1937 | | /// The project id. |
| | 1938 | | /// </param> |
| | 1939 | | /// <param name='batch'> |
| | 1940 | | /// Batch of image tags. Limited to 128 tags per batch. |
| | 1941 | | /// </param> |
| | 1942 | | public static ImageTagCreateSummary CreateImageTags(this ICustomVisionTrainingClient operations, System.Guid |
| | 1943 | | { |
| 0 | 1944 | | return operations.CreateImageTagsAsync(projectId, batch).GetAwaiter().GetResult(); |
| | 1945 | | } |
| | 1946 | |
|
| | 1947 | | /// <summary> |
| | 1948 | | /// Associate a set of images with a set of tags. |
| | 1949 | | /// </summary> |
| | 1950 | | /// <param name='operations'> |
| | 1951 | | /// The operations group for this extension method. |
| | 1952 | | /// </param> |
| | 1953 | | /// <param name='projectId'> |
| | 1954 | | /// The project id. |
| | 1955 | | /// </param> |
| | 1956 | | /// <param name='batch'> |
| | 1957 | | /// Batch of image tags. Limited to 128 tags per batch. |
| | 1958 | | /// </param> |
| | 1959 | | /// <param name='cancellationToken'> |
| | 1960 | | /// The cancellation token. |
| | 1961 | | /// </param> |
| | 1962 | | public static async Task<ImageTagCreateSummary> CreateImageTagsAsync(this ICustomVisionTrainingClient operat |
| | 1963 | | { |
| 2 | 1964 | | using (var _result = await operations.CreateImageTagsWithHttpMessagesAsync(projectId, batch, null, cance |
| | 1965 | | { |
| 2 | 1966 | | return _result.Body; |
| | 1967 | | } |
| 2 | 1968 | | } |
| | 1969 | |
|
| | 1970 | | /// <summary> |
| | 1971 | | /// Associate a set of images with a set of tags. |
| | 1972 | | /// </summary> |
| | 1973 | | /// <param name='operations'> |
| | 1974 | | /// The operations group for this extension method. |
| | 1975 | | /// </param> |
| | 1976 | | /// <param name='projectId'> |
| | 1977 | | /// The project id. |
| | 1978 | | /// </param> |
| | 1979 | | /// <param name='batch'> |
| | 1980 | | /// Batch of image tags. Limited to 128 tags per batch. |
| | 1981 | | /// </param> |
| | 1982 | | /// <param name='customHeaders'> |
| | 1983 | | /// Headers that will be added to request. |
| | 1984 | | /// </param> |
| | 1985 | | public static HttpOperationResponse<ImageTagCreateSummary> CreateImageTagsWithHttpMessages(this ICustomVisio |
| | 1986 | | { |
| 0 | 1987 | | return operations.CreateImageTagsWithHttpMessagesAsync(projectId, batch, customHeaders, CancellationToke |
| | 1988 | | } |
| | 1989 | |
|
| | 1990 | | /// <summary> |
| | 1991 | | /// Remove a set of tags from a set of images. |
| | 1992 | | /// </summary> |
| | 1993 | | /// <param name='operations'> |
| | 1994 | | /// The operations group for this extension method. |
| | 1995 | | /// </param> |
| | 1996 | | /// <param name='projectId'> |
| | 1997 | | /// The project id. |
| | 1998 | | /// </param> |
| | 1999 | | /// <param name='imageIds'> |
| | 2000 | | /// Image ids. Limited to 64 images. |
| | 2001 | | /// </param> |
| | 2002 | | /// <param name='tagIds'> |
| | 2003 | | /// Tags to be deleted from the specified images. Limited to 20 tags. |
| | 2004 | | /// </param> |
| | 2005 | | public static void DeleteImageTags(this ICustomVisionTrainingClient operations, System.Guid projectId, IList |
| | 2006 | | { |
| 0 | 2007 | | operations.DeleteImageTagsAsync(projectId, imageIds, tagIds).GetAwaiter().GetResult(); |
| 0 | 2008 | | } |
| | 2009 | |
|
| | 2010 | | /// <summary> |
| | 2011 | | /// Remove a set of tags from a set of images. |
| | 2012 | | /// </summary> |
| | 2013 | | /// <param name='operations'> |
| | 2014 | | /// The operations group for this extension method. |
| | 2015 | | /// </param> |
| | 2016 | | /// <param name='projectId'> |
| | 2017 | | /// The project id. |
| | 2018 | | /// </param> |
| | 2019 | | /// <param name='imageIds'> |
| | 2020 | | /// Image ids. Limited to 64 images. |
| | 2021 | | /// </param> |
| | 2022 | | /// <param name='tagIds'> |
| | 2023 | | /// Tags to be deleted from the specified images. Limited to 20 tags. |
| | 2024 | | /// </param> |
| | 2025 | | /// <param name='cancellationToken'> |
| | 2026 | | /// The cancellation token. |
| | 2027 | | /// </param> |
| | 2028 | | public static async Task DeleteImageTagsAsync(this ICustomVisionTrainingClient operations, System.Guid proje |
| | 2029 | | { |
| 2 | 2030 | | (await operations.DeleteImageTagsWithHttpMessagesAsync(projectId, imageIds, tagIds, null, cancellationTo |
| 2 | 2031 | | } |
| | 2032 | |
|
| | 2033 | | /// <summary> |
| | 2034 | | /// Remove a set of tags from a set of images. |
| | 2035 | | /// </summary> |
| | 2036 | | /// <param name='operations'> |
| | 2037 | | /// The operations group for this extension method. |
| | 2038 | | /// </param> |
| | 2039 | | /// <param name='projectId'> |
| | 2040 | | /// The project id. |
| | 2041 | | /// </param> |
| | 2042 | | /// <param name='imageIds'> |
| | 2043 | | /// Image ids. Limited to 64 images. |
| | 2044 | | /// </param> |
| | 2045 | | /// <param name='tagIds'> |
| | 2046 | | /// Tags to be deleted from the specified images. Limited to 20 tags. |
| | 2047 | | /// </param> |
| | 2048 | | /// <param name='customHeaders'> |
| | 2049 | | /// Headers that will be added to request. |
| | 2050 | | /// </param> |
| | 2051 | | public static HttpOperationResponse DeleteImageTagsWithHttpMessages(this ICustomVisionTrainingClient operati |
| | 2052 | | { |
| 0 | 2053 | | return operations.DeleteImageTagsWithHttpMessagesAsync(projectId, imageIds, tagIds, customHeaders, Cance |
| | 2054 | | } |
| | 2055 | |
|
| | 2056 | | /// <summary> |
| | 2057 | | /// Get untagged images for a given project iteration. |
| | 2058 | | /// </summary> |
| | 2059 | | /// <remarks> |
| | 2060 | | /// This API supports batching and range selection. By default it will only |
| | 2061 | | /// return first 50 images matching images. |
| | 2062 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2063 | | /// in a given batch. |
| | 2064 | | /// </remarks> |
| | 2065 | | /// <param name='operations'> |
| | 2066 | | /// The operations group for this extension method. |
| | 2067 | | /// </param> |
| | 2068 | | /// <param name='projectId'> |
| | 2069 | | /// The project id. |
| | 2070 | | /// </param> |
| | 2071 | | /// <param name='iterationId'> |
| | 2072 | | /// The iteration id. Defaults to workspace. |
| | 2073 | | /// </param> |
| | 2074 | | /// <param name='orderBy'> |
| | 2075 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2076 | | /// 'Oldest' |
| | 2077 | | /// </param> |
| | 2078 | | /// <param name='take'> |
| | 2079 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2080 | | /// </param> |
| | 2081 | | /// <param name='skip'> |
| | 2082 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2083 | | /// </param> |
| | 2084 | | public static IList<Image> GetUntaggedImages(this ICustomVisionTrainingClient operations, System.Guid projec |
| | 2085 | | { |
| 0 | 2086 | | return operations.GetUntaggedImagesAsync(projectId, iterationId, orderBy, take, skip).GetAwaiter().GetRe |
| | 2087 | | } |
| | 2088 | |
|
| | 2089 | | /// <summary> |
| | 2090 | | /// Get untagged images for a given project iteration. |
| | 2091 | | /// </summary> |
| | 2092 | | /// <remarks> |
| | 2093 | | /// This API supports batching and range selection. By default it will only |
| | 2094 | | /// return first 50 images matching images. |
| | 2095 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2096 | | /// in a given batch. |
| | 2097 | | /// </remarks> |
| | 2098 | | /// <param name='operations'> |
| | 2099 | | /// The operations group for this extension method. |
| | 2100 | | /// </param> |
| | 2101 | | /// <param name='projectId'> |
| | 2102 | | /// The project id. |
| | 2103 | | /// </param> |
| | 2104 | | /// <param name='iterationId'> |
| | 2105 | | /// The iteration id. Defaults to workspace. |
| | 2106 | | /// </param> |
| | 2107 | | /// <param name='orderBy'> |
| | 2108 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2109 | | /// 'Oldest' |
| | 2110 | | /// </param> |
| | 2111 | | /// <param name='take'> |
| | 2112 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2113 | | /// </param> |
| | 2114 | | /// <param name='skip'> |
| | 2115 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2116 | | /// </param> |
| | 2117 | | /// <param name='cancellationToken'> |
| | 2118 | | /// The cancellation token. |
| | 2119 | | /// </param> |
| | 2120 | | public static async Task<IList<Image>> GetUntaggedImagesAsync(this ICustomVisionTrainingClient operations, S |
| | 2121 | | { |
| 6 | 2122 | | using (var _result = await operations.GetUntaggedImagesWithHttpMessagesAsync(projectId, iterationId, ord |
| | 2123 | | { |
| 6 | 2124 | | return _result.Body; |
| | 2125 | | } |
| 6 | 2126 | | } |
| | 2127 | |
|
| | 2128 | | /// <summary> |
| | 2129 | | /// Get untagged images for a given project iteration. |
| | 2130 | | /// </summary> |
| | 2131 | | /// <remarks> |
| | 2132 | | /// This API supports batching and range selection. By default it will only |
| | 2133 | | /// return first 50 images matching images. |
| | 2134 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2135 | | /// in a given batch. |
| | 2136 | | /// </remarks> |
| | 2137 | | /// <param name='operations'> |
| | 2138 | | /// The operations group for this extension method. |
| | 2139 | | /// </param> |
| | 2140 | | /// <param name='projectId'> |
| | 2141 | | /// The project id. |
| | 2142 | | /// </param> |
| | 2143 | | /// <param name='iterationId'> |
| | 2144 | | /// The iteration id. Defaults to workspace. |
| | 2145 | | /// </param> |
| | 2146 | | /// <param name='orderBy'> |
| | 2147 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2148 | | /// 'Oldest' |
| | 2149 | | /// </param> |
| | 2150 | | /// <param name='take'> |
| | 2151 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2152 | | /// </param> |
| | 2153 | | /// <param name='skip'> |
| | 2154 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2155 | | /// </param> |
| | 2156 | | /// <param name='customHeaders'> |
| | 2157 | | /// Headers that will be added to request. |
| | 2158 | | /// </param> |
| | 2159 | | public static HttpOperationResponse<IList<Image>> GetUntaggedImagesWithHttpMessages(this ICustomVisionTraini |
| | 2160 | | { |
| 0 | 2161 | | return operations.GetUntaggedImagesWithHttpMessagesAsync(projectId, iterationId, orderBy, take, skip, cu |
| | 2162 | | } |
| | 2163 | |
|
| | 2164 | | /// <summary> |
| | 2165 | | /// Gets the number of untagged images. |
| | 2166 | | /// </summary> |
| | 2167 | | /// <remarks> |
| | 2168 | | /// This API returns the images which have no tags for a given project and |
| | 2169 | | /// optionally an iteration. If no iteration is specified the |
| | 2170 | | /// current workspace is used. |
| | 2171 | | /// </remarks> |
| | 2172 | | /// <param name='operations'> |
| | 2173 | | /// The operations group for this extension method. |
| | 2174 | | /// </param> |
| | 2175 | | /// <param name='projectId'> |
| | 2176 | | /// The project id. |
| | 2177 | | /// </param> |
| | 2178 | | /// <param name='iterationId'> |
| | 2179 | | /// The iteration id. Defaults to workspace. |
| | 2180 | | /// </param> |
| | 2181 | | public static int? GetUntaggedImageCount(this ICustomVisionTrainingClient operations, System.Guid projectId, |
| | 2182 | | { |
| 0 | 2183 | | return operations.GetUntaggedImageCountAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| | 2184 | | } |
| | 2185 | |
|
| | 2186 | | /// <summary> |
| | 2187 | | /// Gets the number of untagged images. |
| | 2188 | | /// </summary> |
| | 2189 | | /// <remarks> |
| | 2190 | | /// This API returns the images which have no tags for a given project and |
| | 2191 | | /// optionally an iteration. If no iteration is specified the |
| | 2192 | | /// current workspace is used. |
| | 2193 | | /// </remarks> |
| | 2194 | | /// <param name='operations'> |
| | 2195 | | /// The operations group for this extension method. |
| | 2196 | | /// </param> |
| | 2197 | | /// <param name='projectId'> |
| | 2198 | | /// The project id. |
| | 2199 | | /// </param> |
| | 2200 | | /// <param name='iterationId'> |
| | 2201 | | /// The iteration id. Defaults to workspace. |
| | 2202 | | /// </param> |
| | 2203 | | /// <param name='cancellationToken'> |
| | 2204 | | /// The cancellation token. |
| | 2205 | | /// </param> |
| | 2206 | | public static async Task<int?> GetUntaggedImageCountAsync(this ICustomVisionTrainingClient operations, Syste |
| | 2207 | | { |
| 2 | 2208 | | using (var _result = await operations.GetUntaggedImageCountWithHttpMessagesAsync(projectId, iterationId, |
| | 2209 | | { |
| 2 | 2210 | | return _result.Body; |
| | 2211 | | } |
| 2 | 2212 | | } |
| | 2213 | |
|
| | 2214 | | /// <summary> |
| | 2215 | | /// Gets the number of untagged images. |
| | 2216 | | /// </summary> |
| | 2217 | | /// <remarks> |
| | 2218 | | /// This API returns the images which have no tags for a given project and |
| | 2219 | | /// optionally an iteration. If no iteration is specified the |
| | 2220 | | /// current workspace is used. |
| | 2221 | | /// </remarks> |
| | 2222 | | /// <param name='operations'> |
| | 2223 | | /// The operations group for this extension method. |
| | 2224 | | /// </param> |
| | 2225 | | /// <param name='projectId'> |
| | 2226 | | /// The project id. |
| | 2227 | | /// </param> |
| | 2228 | | /// <param name='iterationId'> |
| | 2229 | | /// The iteration id. Defaults to workspace. |
| | 2230 | | /// </param> |
| | 2231 | | /// <param name='customHeaders'> |
| | 2232 | | /// Headers that will be added to request. |
| | 2233 | | /// </param> |
| | 2234 | | public static HttpOperationResponse<int?> GetUntaggedImageCountWithHttpMessages(this ICustomVisionTrainingCl |
| | 2235 | | { |
| 0 | 2236 | | return operations.GetUntaggedImageCountWithHttpMessagesAsync(projectId, iterationId, customHeaders, Canc |
| | 2237 | | } |
| | 2238 | |
|
| | 2239 | | /// <summary> |
| | 2240 | | /// Add the provided images urls to the set of training images. |
| | 2241 | | /// </summary> |
| | 2242 | | /// <remarks> |
| | 2243 | | /// This API accepts a batch of urls, and optionally tags, to create images. |
| | 2244 | | /// There is a limit of 64 images and 20 tags. |
| | 2245 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 2246 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 2247 | | /// status for each image will be listed in the response payload. |
| | 2248 | | /// </remarks> |
| | 2249 | | /// <param name='operations'> |
| | 2250 | | /// The operations group for this extension method. |
| | 2251 | | /// </param> |
| | 2252 | | /// <param name='projectId'> |
| | 2253 | | /// The project id. |
| | 2254 | | /// </param> |
| | 2255 | | /// <param name='batch'> |
| | 2256 | | /// Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per |
| | 2257 | | /// batch. |
| | 2258 | | /// </param> |
| | 2259 | | public static ImageCreateSummary CreateImagesFromUrls(this ICustomVisionTrainingClient operations, System.Gu |
| | 2260 | | { |
| 0 | 2261 | | return operations.CreateImagesFromUrlsAsync(projectId, batch).GetAwaiter().GetResult(); |
| | 2262 | | } |
| | 2263 | |
|
| | 2264 | | /// <summary> |
| | 2265 | | /// Add the provided images urls to the set of training images. |
| | 2266 | | /// </summary> |
| | 2267 | | /// <remarks> |
| | 2268 | | /// This API accepts a batch of urls, and optionally tags, to create images. |
| | 2269 | | /// There is a limit of 64 images and 20 tags. |
| | 2270 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 2271 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 2272 | | /// status for each image will be listed in the response payload. |
| | 2273 | | /// </remarks> |
| | 2274 | | /// <param name='operations'> |
| | 2275 | | /// The operations group for this extension method. |
| | 2276 | | /// </param> |
| | 2277 | | /// <param name='projectId'> |
| | 2278 | | /// The project id. |
| | 2279 | | /// </param> |
| | 2280 | | /// <param name='batch'> |
| | 2281 | | /// Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per |
| | 2282 | | /// batch. |
| | 2283 | | /// </param> |
| | 2284 | | /// <param name='cancellationToken'> |
| | 2285 | | /// The cancellation token. |
| | 2286 | | /// </param> |
| | 2287 | | public static async Task<ImageCreateSummary> CreateImagesFromUrlsAsync(this ICustomVisionTrainingClient oper |
| | 2288 | | { |
| 4 | 2289 | | using (var _result = await operations.CreateImagesFromUrlsWithHttpMessagesAsync(projectId, batch, null, |
| | 2290 | | { |
| 4 | 2291 | | return _result.Body; |
| | 2292 | | } |
| 4 | 2293 | | } |
| | 2294 | |
|
| | 2295 | | /// <summary> |
| | 2296 | | /// Add the provided images urls to the set of training images. |
| | 2297 | | /// </summary> |
| | 2298 | | /// <remarks> |
| | 2299 | | /// This API accepts a batch of urls, and optionally tags, to create images. |
| | 2300 | | /// There is a limit of 64 images and 20 tags. |
| | 2301 | | /// If all images are successful created, 200(OK) status code will be returned. |
| | 2302 | | /// Otherwise, 207 (Multi-Status) status code will be returned and detail |
| | 2303 | | /// status for each image will be listed in the response payload. |
| | 2304 | | /// </remarks> |
| | 2305 | | /// <param name='operations'> |
| | 2306 | | /// The operations group for this extension method. |
| | 2307 | | /// </param> |
| | 2308 | | /// <param name='projectId'> |
| | 2309 | | /// The project id. |
| | 2310 | | /// </param> |
| | 2311 | | /// <param name='batch'> |
| | 2312 | | /// Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per |
| | 2313 | | /// batch. |
| | 2314 | | /// </param> |
| | 2315 | | /// <param name='customHeaders'> |
| | 2316 | | /// Headers that will be added to request. |
| | 2317 | | /// </param> |
| | 2318 | | public static HttpOperationResponse<ImageCreateSummary> CreateImagesFromUrlsWithHttpMessages(this ICustomVis |
| | 2319 | | { |
| 0 | 2320 | | return operations.CreateImagesFromUrlsWithHttpMessagesAsync(projectId, batch, customHeaders, Cancellatio |
| | 2321 | | } |
| | 2322 | |
|
| | 2323 | | /// <summary> |
| | 2324 | | /// Get iterations for the project. |
| | 2325 | | /// </summary> |
| | 2326 | | /// <param name='operations'> |
| | 2327 | | /// The operations group for this extension method. |
| | 2328 | | /// </param> |
| | 2329 | | /// <param name='projectId'> |
| | 2330 | | /// The project id. |
| | 2331 | | /// </param> |
| | 2332 | | public static IList<Iteration> GetIterations(this ICustomVisionTrainingClient operations, System.Guid projec |
| | 2333 | | { |
| 4 | 2334 | | return operations.GetIterationsAsync(projectId).GetAwaiter().GetResult(); |
| | 2335 | | } |
| | 2336 | |
|
| | 2337 | | /// <summary> |
| | 2338 | | /// Get iterations for the project. |
| | 2339 | | /// </summary> |
| | 2340 | | /// <param name='operations'> |
| | 2341 | | /// The operations group for this extension method. |
| | 2342 | | /// </param> |
| | 2343 | | /// <param name='projectId'> |
| | 2344 | | /// The project id. |
| | 2345 | | /// </param> |
| | 2346 | | /// <param name='cancellationToken'> |
| | 2347 | | /// The cancellation token. |
| | 2348 | | /// </param> |
| | 2349 | | public static async Task<IList<Iteration>> GetIterationsAsync(this ICustomVisionTrainingClient operations, S |
| | 2350 | | { |
| 12 | 2351 | | using (var _result = await operations.GetIterationsWithHttpMessagesAsync(projectId, null, cancellationTo |
| | 2352 | | { |
| 12 | 2353 | | return _result.Body; |
| | 2354 | | } |
| 12 | 2355 | | } |
| | 2356 | |
|
| | 2357 | | /// <summary> |
| | 2358 | | /// Get iterations for the project. |
| | 2359 | | /// </summary> |
| | 2360 | | /// <param name='operations'> |
| | 2361 | | /// The operations group for this extension method. |
| | 2362 | | /// </param> |
| | 2363 | | /// <param name='projectId'> |
| | 2364 | | /// The project id. |
| | 2365 | | /// </param> |
| | 2366 | | /// <param name='customHeaders'> |
| | 2367 | | /// Headers that will be added to request. |
| | 2368 | | /// </param> |
| | 2369 | | public static HttpOperationResponse<IList<Iteration>> GetIterationsWithHttpMessages(this ICustomVisionTraini |
| | 2370 | | { |
| 0 | 2371 | | return operations.GetIterationsWithHttpMessagesAsync(projectId, customHeaders, CancellationToken.None).C |
| | 2372 | | } |
| | 2373 | |
|
| | 2374 | | /// <summary> |
| | 2375 | | /// Get a specific iteration. |
| | 2376 | | /// </summary> |
| | 2377 | | /// <param name='operations'> |
| | 2378 | | /// The operations group for this extension method. |
| | 2379 | | /// </param> |
| | 2380 | | /// <param name='projectId'> |
| | 2381 | | /// The id of the project the iteration belongs to. |
| | 2382 | | /// </param> |
| | 2383 | | /// <param name='iterationId'> |
| | 2384 | | /// The id of the iteration to get. |
| | 2385 | | /// </param> |
| | 2386 | | public static Iteration GetIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, Sys |
| | 2387 | | { |
| 30 | 2388 | | return operations.GetIterationAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| | 2389 | | } |
| | 2390 | |
|
| | 2391 | | /// <summary> |
| | 2392 | | /// Get a specific iteration. |
| | 2393 | | /// </summary> |
| | 2394 | | /// <param name='operations'> |
| | 2395 | | /// The operations group for this extension method. |
| | 2396 | | /// </param> |
| | 2397 | | /// <param name='projectId'> |
| | 2398 | | /// The id of the project the iteration belongs to. |
| | 2399 | | /// </param> |
| | 2400 | | /// <param name='iterationId'> |
| | 2401 | | /// The id of the iteration to get. |
| | 2402 | | /// </param> |
| | 2403 | | /// <param name='cancellationToken'> |
| | 2404 | | /// The cancellation token. |
| | 2405 | | /// </param> |
| | 2406 | | public static async Task<Iteration> GetIterationAsync(this ICustomVisionTrainingClient operations, System.Gu |
| | 2407 | | { |
| 32 | 2408 | | using (var _result = await operations.GetIterationWithHttpMessagesAsync(projectId, iterationId, null, ca |
| | 2409 | | { |
| 32 | 2410 | | return _result.Body; |
| | 2411 | | } |
| 32 | 2412 | | } |
| | 2413 | |
|
| | 2414 | | /// <summary> |
| | 2415 | | /// Get a specific iteration. |
| | 2416 | | /// </summary> |
| | 2417 | | /// <param name='operations'> |
| | 2418 | | /// The operations group for this extension method. |
| | 2419 | | /// </param> |
| | 2420 | | /// <param name='projectId'> |
| | 2421 | | /// The id of the project the iteration belongs to. |
| | 2422 | | /// </param> |
| | 2423 | | /// <param name='iterationId'> |
| | 2424 | | /// The id of the iteration to get. |
| | 2425 | | /// </param> |
| | 2426 | | /// <param name='customHeaders'> |
| | 2427 | | /// Headers that will be added to request. |
| | 2428 | | /// </param> |
| | 2429 | | public static HttpOperationResponse<Iteration> GetIterationWithHttpMessages(this ICustomVisionTrainingClient |
| | 2430 | | { |
| 0 | 2431 | | return operations.GetIterationWithHttpMessagesAsync(projectId, iterationId, customHeaders, CancellationT |
| | 2432 | | } |
| | 2433 | |
|
| | 2434 | | /// <summary> |
| | 2435 | | /// Delete a specific iteration of a project. |
| | 2436 | | /// </summary> |
| | 2437 | | /// <param name='operations'> |
| | 2438 | | /// The operations group for this extension method. |
| | 2439 | | /// </param> |
| | 2440 | | /// <param name='projectId'> |
| | 2441 | | /// The project id. |
| | 2442 | | /// </param> |
| | 2443 | | /// <param name='iterationId'> |
| | 2444 | | /// The iteration id. |
| | 2445 | | /// </param> |
| | 2446 | | public static void DeleteIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, Syste |
| | 2447 | | { |
| 0 | 2448 | | operations.DeleteIterationAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| 0 | 2449 | | } |
| | 2450 | |
|
| | 2451 | | /// <summary> |
| | 2452 | | /// Delete a specific iteration of a project. |
| | 2453 | | /// </summary> |
| | 2454 | | /// <param name='operations'> |
| | 2455 | | /// The operations group for this extension method. |
| | 2456 | | /// </param> |
| | 2457 | | /// <param name='projectId'> |
| | 2458 | | /// The project id. |
| | 2459 | | /// </param> |
| | 2460 | | /// <param name='iterationId'> |
| | 2461 | | /// The iteration id. |
| | 2462 | | /// </param> |
| | 2463 | | /// <param name='cancellationToken'> |
| | 2464 | | /// The cancellation token. |
| | 2465 | | /// </param> |
| | 2466 | | public static async Task DeleteIterationAsync(this ICustomVisionTrainingClient operations, System.Guid proje |
| | 2467 | | { |
| 2 | 2468 | | (await operations.DeleteIterationWithHttpMessagesAsync(projectId, iterationId, null, cancellationToken). |
| 2 | 2469 | | } |
| | 2470 | |
|
| | 2471 | | /// <summary> |
| | 2472 | | /// Delete a specific iteration of a project. |
| | 2473 | | /// </summary> |
| | 2474 | | /// <param name='operations'> |
| | 2475 | | /// The operations group for this extension method. |
| | 2476 | | /// </param> |
| | 2477 | | /// <param name='projectId'> |
| | 2478 | | /// The project id. |
| | 2479 | | /// </param> |
| | 2480 | | /// <param name='iterationId'> |
| | 2481 | | /// The iteration id. |
| | 2482 | | /// </param> |
| | 2483 | | /// <param name='customHeaders'> |
| | 2484 | | /// Headers that will be added to request. |
| | 2485 | | /// </param> |
| | 2486 | | public static HttpOperationResponse DeleteIterationWithHttpMessages(this ICustomVisionTrainingClient operati |
| | 2487 | | { |
| 0 | 2488 | | return operations.DeleteIterationWithHttpMessagesAsync(projectId, iterationId, customHeaders, Cancellati |
| | 2489 | | } |
| | 2490 | |
|
| | 2491 | | /// <summary> |
| | 2492 | | /// Update a specific iteration. |
| | 2493 | | /// </summary> |
| | 2494 | | /// <param name='operations'> |
| | 2495 | | /// The operations group for this extension method. |
| | 2496 | | /// </param> |
| | 2497 | | /// <param name='projectId'> |
| | 2498 | | /// Project id. |
| | 2499 | | /// </param> |
| | 2500 | | /// <param name='iterationId'> |
| | 2501 | | /// Iteration id. |
| | 2502 | | /// </param> |
| | 2503 | | /// <param name='updatedIteration'> |
| | 2504 | | /// The updated iteration model. |
| | 2505 | | /// </param> |
| | 2506 | | public static Iteration UpdateIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, |
| | 2507 | | { |
| 0 | 2508 | | return operations.UpdateIterationAsync(projectId, iterationId, updatedIteration).GetAwaiter().GetResult( |
| | 2509 | | } |
| | 2510 | |
|
| | 2511 | | /// <summary> |
| | 2512 | | /// Update a specific iteration. |
| | 2513 | | /// </summary> |
| | 2514 | | /// <param name='operations'> |
| | 2515 | | /// The operations group for this extension method. |
| | 2516 | | /// </param> |
| | 2517 | | /// <param name='projectId'> |
| | 2518 | | /// Project id. |
| | 2519 | | /// </param> |
| | 2520 | | /// <param name='iterationId'> |
| | 2521 | | /// Iteration id. |
| | 2522 | | /// </param> |
| | 2523 | | /// <param name='updatedIteration'> |
| | 2524 | | /// The updated iteration model. |
| | 2525 | | /// </param> |
| | 2526 | | /// <param name='cancellationToken'> |
| | 2527 | | /// The cancellation token. |
| | 2528 | | /// </param> |
| | 2529 | | public static async Task<Iteration> UpdateIterationAsync(this ICustomVisionTrainingClient operations, System |
| | 2530 | | { |
| 2 | 2531 | | using (var _result = await operations.UpdateIterationWithHttpMessagesAsync(projectId, iterationId, updat |
| | 2532 | | { |
| 2 | 2533 | | return _result.Body; |
| | 2534 | | } |
| 2 | 2535 | | } |
| | 2536 | |
|
| | 2537 | | /// <summary> |
| | 2538 | | /// Update a specific iteration. |
| | 2539 | | /// </summary> |
| | 2540 | | /// <param name='operations'> |
| | 2541 | | /// The operations group for this extension method. |
| | 2542 | | /// </param> |
| | 2543 | | /// <param name='projectId'> |
| | 2544 | | /// Project id. |
| | 2545 | | /// </param> |
| | 2546 | | /// <param name='iterationId'> |
| | 2547 | | /// Iteration id. |
| | 2548 | | /// </param> |
| | 2549 | | /// <param name='updatedIteration'> |
| | 2550 | | /// The updated iteration model. |
| | 2551 | | /// </param> |
| | 2552 | | /// <param name='customHeaders'> |
| | 2553 | | /// Headers that will be added to request. |
| | 2554 | | /// </param> |
| | 2555 | | public static HttpOperationResponse<Iteration> UpdateIterationWithHttpMessages(this ICustomVisionTrainingCli |
| | 2556 | | { |
| 0 | 2557 | | return operations.UpdateIterationWithHttpMessagesAsync(projectId, iterationId, updatedIteration, customH |
| | 2558 | | } |
| | 2559 | |
|
| | 2560 | | /// <summary> |
| | 2561 | | /// Get the list of exports for a specific iteration. |
| | 2562 | | /// </summary> |
| | 2563 | | /// <param name='operations'> |
| | 2564 | | /// The operations group for this extension method. |
| | 2565 | | /// </param> |
| | 2566 | | /// <param name='projectId'> |
| | 2567 | | /// The project id. |
| | 2568 | | /// </param> |
| | 2569 | | /// <param name='iterationId'> |
| | 2570 | | /// The iteration id. |
| | 2571 | | /// </param> |
| | 2572 | | public static IList<Export> GetExports(this ICustomVisionTrainingClient operations, System.Guid projectId, S |
| | 2573 | | { |
| 0 | 2574 | | return operations.GetExportsAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| | 2575 | | } |
| | 2576 | |
|
| | 2577 | | /// <summary> |
| | 2578 | | /// Get the list of exports for a specific iteration. |
| | 2579 | | /// </summary> |
| | 2580 | | /// <param name='operations'> |
| | 2581 | | /// The operations group for this extension method. |
| | 2582 | | /// </param> |
| | 2583 | | /// <param name='projectId'> |
| | 2584 | | /// The project id. |
| | 2585 | | /// </param> |
| | 2586 | | /// <param name='iterationId'> |
| | 2587 | | /// The iteration id. |
| | 2588 | | /// </param> |
| | 2589 | | /// <param name='cancellationToken'> |
| | 2590 | | /// The cancellation token. |
| | 2591 | | /// </param> |
| | 2592 | | public static async Task<IList<Export>> GetExportsAsync(this ICustomVisionTrainingClient operations, System. |
| | 2593 | | { |
| 12 | 2594 | | using (var _result = await operations.GetExportsWithHttpMessagesAsync(projectId, iterationId, null, canc |
| | 2595 | | { |
| 12 | 2596 | | return _result.Body; |
| | 2597 | | } |
| 12 | 2598 | | } |
| | 2599 | |
|
| | 2600 | | /// <summary> |
| | 2601 | | /// Get the list of exports for a specific iteration. |
| | 2602 | | /// </summary> |
| | 2603 | | /// <param name='operations'> |
| | 2604 | | /// The operations group for this extension method. |
| | 2605 | | /// </param> |
| | 2606 | | /// <param name='projectId'> |
| | 2607 | | /// The project id. |
| | 2608 | | /// </param> |
| | 2609 | | /// <param name='iterationId'> |
| | 2610 | | /// The iteration id. |
| | 2611 | | /// </param> |
| | 2612 | | /// <param name='customHeaders'> |
| | 2613 | | /// Headers that will be added to request. |
| | 2614 | | /// </param> |
| | 2615 | | public static HttpOperationResponse<IList<Export>> GetExportsWithHttpMessages(this ICustomVisionTrainingClie |
| | 2616 | | { |
| 0 | 2617 | | return operations.GetExportsWithHttpMessagesAsync(projectId, iterationId, customHeaders, CancellationTok |
| | 2618 | | } |
| | 2619 | |
|
| | 2620 | | /// <summary> |
| | 2621 | | /// Export a trained iteration. |
| | 2622 | | /// </summary> |
| | 2623 | | /// <param name='operations'> |
| | 2624 | | /// The operations group for this extension method. |
| | 2625 | | /// </param> |
| | 2626 | | /// <param name='projectId'> |
| | 2627 | | /// The project id. |
| | 2628 | | /// </param> |
| | 2629 | | /// <param name='iterationId'> |
| | 2630 | | /// The iteration id. |
| | 2631 | | /// </param> |
| | 2632 | | /// <param name='platform'> |
| | 2633 | | /// The target platform. Possible values include: 'CoreML', 'TensorFlow', |
| | 2634 | | /// 'DockerFile', 'ONNX', 'VAIDK' |
| | 2635 | | /// </param> |
| | 2636 | | /// <param name='flavor'> |
| | 2637 | | /// The flavor of the target platform. Possible values include: 'Linux', |
| | 2638 | | /// 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' |
| | 2639 | | /// </param> |
| | 2640 | | public static Export ExportIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, Sys |
| | 2641 | | { |
| 0 | 2642 | | return operations.ExportIterationAsync(projectId, iterationId, platform, flavor).GetAwaiter().GetResult( |
| | 2643 | | } |
| | 2644 | |
|
| | 2645 | | /// <summary> |
| | 2646 | | /// Export a trained iteration. |
| | 2647 | | /// </summary> |
| | 2648 | | /// <param name='operations'> |
| | 2649 | | /// The operations group for this extension method. |
| | 2650 | | /// </param> |
| | 2651 | | /// <param name='projectId'> |
| | 2652 | | /// The project id. |
| | 2653 | | /// </param> |
| | 2654 | | /// <param name='iterationId'> |
| | 2655 | | /// The iteration id. |
| | 2656 | | /// </param> |
| | 2657 | | /// <param name='platform'> |
| | 2658 | | /// The target platform. Possible values include: 'CoreML', 'TensorFlow', |
| | 2659 | | /// 'DockerFile', 'ONNX', 'VAIDK' |
| | 2660 | | /// </param> |
| | 2661 | | /// <param name='flavor'> |
| | 2662 | | /// The flavor of the target platform. Possible values include: 'Linux', |
| | 2663 | | /// 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' |
| | 2664 | | /// </param> |
| | 2665 | | /// <param name='cancellationToken'> |
| | 2666 | | /// The cancellation token. |
| | 2667 | | /// </param> |
| | 2668 | | public static async Task<Export> ExportIterationAsync(this ICustomVisionTrainingClient operations, System.Gu |
| | 2669 | | { |
| 2 | 2670 | | using (var _result = await operations.ExportIterationWithHttpMessagesAsync(projectId, iterationId, platf |
| | 2671 | | { |
| 2 | 2672 | | return _result.Body; |
| | 2673 | | } |
| 2 | 2674 | | } |
| | 2675 | |
|
| | 2676 | | /// <summary> |
| | 2677 | | /// Export a trained iteration. |
| | 2678 | | /// </summary> |
| | 2679 | | /// <param name='operations'> |
| | 2680 | | /// The operations group for this extension method. |
| | 2681 | | /// </param> |
| | 2682 | | /// <param name='projectId'> |
| | 2683 | | /// The project id. |
| | 2684 | | /// </param> |
| | 2685 | | /// <param name='iterationId'> |
| | 2686 | | /// The iteration id. |
| | 2687 | | /// </param> |
| | 2688 | | /// <param name='platform'> |
| | 2689 | | /// The target platform. Possible values include: 'CoreML', 'TensorFlow', |
| | 2690 | | /// 'DockerFile', 'ONNX', 'VAIDK' |
| | 2691 | | /// </param> |
| | 2692 | | /// <param name='flavor'> |
| | 2693 | | /// The flavor of the target platform. Possible values include: 'Linux', |
| | 2694 | | /// 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' |
| | 2695 | | /// </param> |
| | 2696 | | /// <param name='customHeaders'> |
| | 2697 | | /// Headers that will be added to request. |
| | 2698 | | /// </param> |
| | 2699 | | public static HttpOperationResponse<Export> ExportIterationWithHttpMessages(this ICustomVisionTrainingClient |
| | 2700 | | { |
| 0 | 2701 | | return operations.ExportIterationWithHttpMessagesAsync(projectId, iterationId, platform, flavor, customH |
| | 2702 | | } |
| | 2703 | |
|
| | 2704 | | /// <summary> |
| | 2705 | | /// Get detailed performance information about an iteration. |
| | 2706 | | /// </summary> |
| | 2707 | | /// <param name='operations'> |
| | 2708 | | /// The operations group for this extension method. |
| | 2709 | | /// </param> |
| | 2710 | | /// <param name='projectId'> |
| | 2711 | | /// The id of the project the iteration belongs to. |
| | 2712 | | /// </param> |
| | 2713 | | /// <param name='iterationId'> |
| | 2714 | | /// The id of the iteration to get. |
| | 2715 | | /// </param> |
| | 2716 | | /// <param name='threshold'> |
| | 2717 | | /// The threshold used to determine true predictions. |
| | 2718 | | /// </param> |
| | 2719 | | /// <param name='overlapThreshold'> |
| | 2720 | | /// If applicable, the bounding box overlap threshold used to determine true |
| | 2721 | | /// predictions. |
| | 2722 | | /// </param> |
| | 2723 | | public static IterationPerformance GetIterationPerformance(this ICustomVisionTrainingClient operations, Syst |
| | 2724 | | { |
| 0 | 2725 | | return operations.GetIterationPerformanceAsync(projectId, iterationId, threshold, overlapThreshold).GetA |
| | 2726 | | } |
| | 2727 | |
|
| | 2728 | | /// <summary> |
| | 2729 | | /// Get detailed performance information about an iteration. |
| | 2730 | | /// </summary> |
| | 2731 | | /// <param name='operations'> |
| | 2732 | | /// The operations group for this extension method. |
| | 2733 | | /// </param> |
| | 2734 | | /// <param name='projectId'> |
| | 2735 | | /// The id of the project the iteration belongs to. |
| | 2736 | | /// </param> |
| | 2737 | | /// <param name='iterationId'> |
| | 2738 | | /// The id of the iteration to get. |
| | 2739 | | /// </param> |
| | 2740 | | /// <param name='threshold'> |
| | 2741 | | /// The threshold used to determine true predictions. |
| | 2742 | | /// </param> |
| | 2743 | | /// <param name='overlapThreshold'> |
| | 2744 | | /// If applicable, the bounding box overlap threshold used to determine true |
| | 2745 | | /// predictions. |
| | 2746 | | /// </param> |
| | 2747 | | /// <param name='cancellationToken'> |
| | 2748 | | /// The cancellation token. |
| | 2749 | | /// </param> |
| | 2750 | | public static async Task<IterationPerformance> GetIterationPerformanceAsync(this ICustomVisionTrainingClient |
| | 2751 | | { |
| 2 | 2752 | | using (var _result = await operations.GetIterationPerformanceWithHttpMessagesAsync(projectId, iterationI |
| | 2753 | | { |
| 2 | 2754 | | return _result.Body; |
| | 2755 | | } |
| 2 | 2756 | | } |
| | 2757 | |
|
| | 2758 | | /// <summary> |
| | 2759 | | /// Get detailed performance information about an iteration. |
| | 2760 | | /// </summary> |
| | 2761 | | /// <param name='operations'> |
| | 2762 | | /// The operations group for this extension method. |
| | 2763 | | /// </param> |
| | 2764 | | /// <param name='projectId'> |
| | 2765 | | /// The id of the project the iteration belongs to. |
| | 2766 | | /// </param> |
| | 2767 | | /// <param name='iterationId'> |
| | 2768 | | /// The id of the iteration to get. |
| | 2769 | | /// </param> |
| | 2770 | | /// <param name='threshold'> |
| | 2771 | | /// The threshold used to determine true predictions. |
| | 2772 | | /// </param> |
| | 2773 | | /// <param name='overlapThreshold'> |
| | 2774 | | /// If applicable, the bounding box overlap threshold used to determine true |
| | 2775 | | /// predictions. |
| | 2776 | | /// </param> |
| | 2777 | | /// <param name='customHeaders'> |
| | 2778 | | /// Headers that will be added to request. |
| | 2779 | | /// </param> |
| | 2780 | | public static HttpOperationResponse<IterationPerformance> GetIterationPerformanceWithHttpMessages(this ICust |
| | 2781 | | { |
| 0 | 2782 | | return operations.GetIterationPerformanceWithHttpMessagesAsync(projectId, iterationId, threshold, overla |
| | 2783 | | } |
| | 2784 | |
|
| | 2785 | | /// <summary> |
| | 2786 | | /// Get image with its prediction for a given project iteration. |
| | 2787 | | /// </summary> |
| | 2788 | | /// <remarks> |
| | 2789 | | /// This API supports batching and range selection. By default it will only |
| | 2790 | | /// return first 50 images matching images. |
| | 2791 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2792 | | /// in a given batch. |
| | 2793 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2794 | | /// tag ids are for the "Dog" and |
| | 2795 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2796 | | /// </remarks> |
| | 2797 | | /// <param name='operations'> |
| | 2798 | | /// The operations group for this extension method. |
| | 2799 | | /// </param> |
| | 2800 | | /// <param name='projectId'> |
| | 2801 | | /// The project id. |
| | 2802 | | /// </param> |
| | 2803 | | /// <param name='iterationId'> |
| | 2804 | | /// The iteration id. Defaults to workspace. |
| | 2805 | | /// </param> |
| | 2806 | | /// <param name='tagIds'> |
| | 2807 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 2808 | | /// null. Limited to 20. |
| | 2809 | | /// </param> |
| | 2810 | | /// <param name='orderBy'> |
| | 2811 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2812 | | /// 'Oldest' |
| | 2813 | | /// </param> |
| | 2814 | | /// <param name='take'> |
| | 2815 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2816 | | /// </param> |
| | 2817 | | /// <param name='skip'> |
| | 2818 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2819 | | /// </param> |
| | 2820 | | public static IList<ImagePerformance> GetImagePerformances(this ICustomVisionTrainingClient operations, Syst |
| | 2821 | | { |
| 0 | 2822 | | return operations.GetImagePerformancesAsync(projectId, iterationId, tagIds, orderBy, take, skip).GetAwai |
| | 2823 | | } |
| | 2824 | |
|
| | 2825 | | /// <summary> |
| | 2826 | | /// Get image with its prediction for a given project iteration. |
| | 2827 | | /// </summary> |
| | 2828 | | /// <remarks> |
| | 2829 | | /// This API supports batching and range selection. By default it will only |
| | 2830 | | /// return first 50 images matching images. |
| | 2831 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2832 | | /// in a given batch. |
| | 2833 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2834 | | /// tag ids are for the "Dog" and |
| | 2835 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2836 | | /// </remarks> |
| | 2837 | | /// <param name='operations'> |
| | 2838 | | /// The operations group for this extension method. |
| | 2839 | | /// </param> |
| | 2840 | | /// <param name='projectId'> |
| | 2841 | | /// The project id. |
| | 2842 | | /// </param> |
| | 2843 | | /// <param name='iterationId'> |
| | 2844 | | /// The iteration id. Defaults to workspace. |
| | 2845 | | /// </param> |
| | 2846 | | /// <param name='tagIds'> |
| | 2847 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 2848 | | /// null. Limited to 20. |
| | 2849 | | /// </param> |
| | 2850 | | /// <param name='orderBy'> |
| | 2851 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2852 | | /// 'Oldest' |
| | 2853 | | /// </param> |
| | 2854 | | /// <param name='take'> |
| | 2855 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2856 | | /// </param> |
| | 2857 | | /// <param name='skip'> |
| | 2858 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2859 | | /// </param> |
| | 2860 | | /// <param name='cancellationToken'> |
| | 2861 | | /// The cancellation token. |
| | 2862 | | /// </param> |
| | 2863 | | public static async Task<IList<ImagePerformance>> GetImagePerformancesAsync(this ICustomVisionTrainingClient |
| | 2864 | | { |
| 0 | 2865 | | using (var _result = await operations.GetImagePerformancesWithHttpMessagesAsync(projectId, iterationId, |
| | 2866 | | { |
| 0 | 2867 | | return _result.Body; |
| | 2868 | | } |
| 0 | 2869 | | } |
| | 2870 | |
|
| | 2871 | | /// <summary> |
| | 2872 | | /// Get image with its prediction for a given project iteration. |
| | 2873 | | /// </summary> |
| | 2874 | | /// <remarks> |
| | 2875 | | /// This API supports batching and range selection. By default it will only |
| | 2876 | | /// return first 50 images matching images. |
| | 2877 | | /// Use the {take} and {skip} parameters to control how many images to return |
| | 2878 | | /// in a given batch. |
| | 2879 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2880 | | /// tag ids are for the "Dog" and |
| | 2881 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2882 | | /// </remarks> |
| | 2883 | | /// <param name='operations'> |
| | 2884 | | /// The operations group for this extension method. |
| | 2885 | | /// </param> |
| | 2886 | | /// <param name='projectId'> |
| | 2887 | | /// The project id. |
| | 2888 | | /// </param> |
| | 2889 | | /// <param name='iterationId'> |
| | 2890 | | /// The iteration id. Defaults to workspace. |
| | 2891 | | /// </param> |
| | 2892 | | /// <param name='tagIds'> |
| | 2893 | | /// A list of tags ids to filter the images. Defaults to all tagged images when |
| | 2894 | | /// null. Limited to 20. |
| | 2895 | | /// </param> |
| | 2896 | | /// <param name='orderBy'> |
| | 2897 | | /// The ordering. Defaults to newest. Possible values include: 'Newest', |
| | 2898 | | /// 'Oldest' |
| | 2899 | | /// </param> |
| | 2900 | | /// <param name='take'> |
| | 2901 | | /// Maximum number of images to return. Defaults to 50, limited to 256. |
| | 2902 | | /// </param> |
| | 2903 | | /// <param name='skip'> |
| | 2904 | | /// Number of images to skip before beginning the image batch. Defaults to 0. |
| | 2905 | | /// </param> |
| | 2906 | | /// <param name='customHeaders'> |
| | 2907 | | /// Headers that will be added to request. |
| | 2908 | | /// </param> |
| | 2909 | | public static HttpOperationResponse<IList<ImagePerformance>> GetImagePerformancesWithHttpMessages(this ICust |
| | 2910 | | { |
| 0 | 2911 | | return operations.GetImagePerformancesWithHttpMessagesAsync(projectId, iterationId, tagIds, orderBy, tak |
| | 2912 | | } |
| | 2913 | |
|
| | 2914 | | /// <summary> |
| | 2915 | | /// Gets the number of images tagged with the provided {tagIds} that have |
| | 2916 | | /// prediction results from |
| | 2917 | | /// training for the provided iteration {iterationId}. |
| | 2918 | | /// </summary> |
| | 2919 | | /// <remarks> |
| | 2920 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2921 | | /// tag ids are for the "Dog" and |
| | 2922 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2923 | | /// </remarks> |
| | 2924 | | /// <param name='operations'> |
| | 2925 | | /// The operations group for this extension method. |
| | 2926 | | /// </param> |
| | 2927 | | /// <param name='projectId'> |
| | 2928 | | /// The project id. |
| | 2929 | | /// </param> |
| | 2930 | | /// <param name='iterationId'> |
| | 2931 | | /// The iteration id. Defaults to workspace. |
| | 2932 | | /// </param> |
| | 2933 | | /// <param name='tagIds'> |
| | 2934 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 2935 | | /// null. |
| | 2936 | | /// </param> |
| | 2937 | | public static int? GetImagePerformanceCount(this ICustomVisionTrainingClient operations, System.Guid project |
| | 2938 | | { |
| 0 | 2939 | | return operations.GetImagePerformanceCountAsync(projectId, iterationId, tagIds).GetAwaiter().GetResult() |
| | 2940 | | } |
| | 2941 | |
|
| | 2942 | | /// <summary> |
| | 2943 | | /// Gets the number of images tagged with the provided {tagIds} that have |
| | 2944 | | /// prediction results from |
| | 2945 | | /// training for the provided iteration {iterationId}. |
| | 2946 | | /// </summary> |
| | 2947 | | /// <remarks> |
| | 2948 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2949 | | /// tag ids are for the "Dog" and |
| | 2950 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2951 | | /// </remarks> |
| | 2952 | | /// <param name='operations'> |
| | 2953 | | /// The operations group for this extension method. |
| | 2954 | | /// </param> |
| | 2955 | | /// <param name='projectId'> |
| | 2956 | | /// The project id. |
| | 2957 | | /// </param> |
| | 2958 | | /// <param name='iterationId'> |
| | 2959 | | /// The iteration id. Defaults to workspace. |
| | 2960 | | /// </param> |
| | 2961 | | /// <param name='tagIds'> |
| | 2962 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 2963 | | /// null. |
| | 2964 | | /// </param> |
| | 2965 | | /// <param name='cancellationToken'> |
| | 2966 | | /// The cancellation token. |
| | 2967 | | /// </param> |
| | 2968 | | public static async Task<int?> GetImagePerformanceCountAsync(this ICustomVisionTrainingClient operations, Sy |
| | 2969 | | { |
| 2 | 2970 | | using (var _result = await operations.GetImagePerformanceCountWithHttpMessagesAsync(projectId, iteration |
| | 2971 | | { |
| 2 | 2972 | | return _result.Body; |
| | 2973 | | } |
| 2 | 2974 | | } |
| | 2975 | |
|
| | 2976 | | /// <summary> |
| | 2977 | | /// Gets the number of images tagged with the provided {tagIds} that have |
| | 2978 | | /// prediction results from |
| | 2979 | | /// training for the provided iteration {iterationId}. |
| | 2980 | | /// </summary> |
| | 2981 | | /// <remarks> |
| | 2982 | | /// The filtering is on an and/or relationship. For example, if the provided |
| | 2983 | | /// tag ids are for the "Dog" and |
| | 2984 | | /// "Cat" tags, then only images tagged with Dog and/or Cat will be returned |
| | 2985 | | /// </remarks> |
| | 2986 | | /// <param name='operations'> |
| | 2987 | | /// The operations group for this extension method. |
| | 2988 | | /// </param> |
| | 2989 | | /// <param name='projectId'> |
| | 2990 | | /// The project id. |
| | 2991 | | /// </param> |
| | 2992 | | /// <param name='iterationId'> |
| | 2993 | | /// The iteration id. Defaults to workspace. |
| | 2994 | | /// </param> |
| | 2995 | | /// <param name='tagIds'> |
| | 2996 | | /// A list of tags ids to filter the images to count. Defaults to all tags when |
| | 2997 | | /// null. |
| | 2998 | | /// </param> |
| | 2999 | | /// <param name='customHeaders'> |
| | 3000 | | /// Headers that will be added to request. |
| | 3001 | | /// </param> |
| | 3002 | | public static HttpOperationResponse<int?> GetImagePerformanceCountWithHttpMessages(this ICustomVisionTrainin |
| | 3003 | | { |
| 0 | 3004 | | return operations.GetImagePerformanceCountWithHttpMessagesAsync(projectId, iterationId, tagIds, customHe |
| | 3005 | | } |
| | 3006 | |
|
| | 3007 | | /// <summary> |
| | 3008 | | /// Publish a specific iteration. |
| | 3009 | | /// </summary> |
| | 3010 | | /// <param name='operations'> |
| | 3011 | | /// The operations group for this extension method. |
| | 3012 | | /// </param> |
| | 3013 | | /// <param name='projectId'> |
| | 3014 | | /// The project id. |
| | 3015 | | /// </param> |
| | 3016 | | /// <param name='iterationId'> |
| | 3017 | | /// The iteration id. |
| | 3018 | | /// </param> |
| | 3019 | | /// <param name='publishName'> |
| | 3020 | | /// The name to give the published iteration. |
| | 3021 | | /// </param> |
| | 3022 | | /// <param name='predictionId'> |
| | 3023 | | /// The id of the prediction resource to publish to. |
| | 3024 | | /// </param> |
| | 3025 | | /// <param name='overwrite'> |
| | 3026 | | /// Whether to overwrite the published model with the given name (default: |
| | 3027 | | /// false). |
| | 3028 | | /// </param> |
| | 3029 | | public static bool? PublishIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, Sys |
| | 3030 | | { |
| 2 | 3031 | | return operations.PublishIterationAsync(projectId, iterationId, publishName, predictionId, overwrite).Ge |
| | 3032 | | } |
| | 3033 | |
|
| | 3034 | | /// <summary> |
| | 3035 | | /// Publish a specific iteration. |
| | 3036 | | /// </summary> |
| | 3037 | | /// <param name='operations'> |
| | 3038 | | /// The operations group for this extension method. |
| | 3039 | | /// </param> |
| | 3040 | | /// <param name='projectId'> |
| | 3041 | | /// The project id. |
| | 3042 | | /// </param> |
| | 3043 | | /// <param name='iterationId'> |
| | 3044 | | /// The iteration id. |
| | 3045 | | /// </param> |
| | 3046 | | /// <param name='publishName'> |
| | 3047 | | /// The name to give the published iteration. |
| | 3048 | | /// </param> |
| | 3049 | | /// <param name='predictionId'> |
| | 3050 | | /// The id of the prediction resource to publish to. |
| | 3051 | | /// </param> |
| | 3052 | | /// <param name='overwrite'> |
| | 3053 | | /// Whether to overwrite the published model with the given name (default: |
| | 3054 | | /// false). |
| | 3055 | | /// </param> |
| | 3056 | | /// <param name='cancellationToken'> |
| | 3057 | | /// The cancellation token. |
| | 3058 | | /// </param> |
| | 3059 | | public static async Task<bool?> PublishIterationAsync(this ICustomVisionTrainingClient operations, System.Gu |
| | 3060 | | { |
| 2 | 3061 | | using (var _result = await operations.PublishIterationWithHttpMessagesAsync(projectId, iterationId, publ |
| | 3062 | | { |
| 2 | 3063 | | return _result.Body; |
| | 3064 | | } |
| 2 | 3065 | | } |
| | 3066 | |
|
| | 3067 | | /// <summary> |
| | 3068 | | /// Publish a specific iteration. |
| | 3069 | | /// </summary> |
| | 3070 | | /// <param name='operations'> |
| | 3071 | | /// The operations group for this extension method. |
| | 3072 | | /// </param> |
| | 3073 | | /// <param name='projectId'> |
| | 3074 | | /// The project id. |
| | 3075 | | /// </param> |
| | 3076 | | /// <param name='iterationId'> |
| | 3077 | | /// The iteration id. |
| | 3078 | | /// </param> |
| | 3079 | | /// <param name='publishName'> |
| | 3080 | | /// The name to give the published iteration. |
| | 3081 | | /// </param> |
| | 3082 | | /// <param name='predictionId'> |
| | 3083 | | /// The id of the prediction resource to publish to. |
| | 3084 | | /// </param> |
| | 3085 | | /// <param name='overwrite'> |
| | 3086 | | /// Whether to overwrite the published model with the given name (default: |
| | 3087 | | /// false). |
| | 3088 | | /// </param> |
| | 3089 | | /// <param name='customHeaders'> |
| | 3090 | | /// Headers that will be added to request. |
| | 3091 | | /// </param> |
| | 3092 | | public static HttpOperationResponse<bool?> PublishIterationWithHttpMessages(this ICustomVisionTrainingClient |
| | 3093 | | { |
| 0 | 3094 | | return operations.PublishIterationWithHttpMessagesAsync(projectId, iterationId, publishName, predictionI |
| | 3095 | | } |
| | 3096 | |
|
| | 3097 | | /// <summary> |
| | 3098 | | /// Unpublish a specific iteration. |
| | 3099 | | /// </summary> |
| | 3100 | | /// <param name='operations'> |
| | 3101 | | /// The operations group for this extension method. |
| | 3102 | | /// </param> |
| | 3103 | | /// <param name='projectId'> |
| | 3104 | | /// The project id. |
| | 3105 | | /// </param> |
| | 3106 | | /// <param name='iterationId'> |
| | 3107 | | /// The iteration id. |
| | 3108 | | /// </param> |
| | 3109 | | public static void UnpublishIteration(this ICustomVisionTrainingClient operations, System.Guid projectId, Sy |
| | 3110 | | { |
| 0 | 3111 | | operations.UnpublishIterationAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| 0 | 3112 | | } |
| | 3113 | |
|
| | 3114 | | /// <summary> |
| | 3115 | | /// Unpublish a specific iteration. |
| | 3116 | | /// </summary> |
| | 3117 | | /// <param name='operations'> |
| | 3118 | | /// The operations group for this extension method. |
| | 3119 | | /// </param> |
| | 3120 | | /// <param name='projectId'> |
| | 3121 | | /// The project id. |
| | 3122 | | /// </param> |
| | 3123 | | /// <param name='iterationId'> |
| | 3124 | | /// The iteration id. |
| | 3125 | | /// </param> |
| | 3126 | | /// <param name='cancellationToken'> |
| | 3127 | | /// The cancellation token. |
| | 3128 | | /// </param> |
| | 3129 | | public static async Task UnpublishIterationAsync(this ICustomVisionTrainingClient operations, System.Guid pr |
| | 3130 | | { |
| 2 | 3131 | | (await operations.UnpublishIterationWithHttpMessagesAsync(projectId, iterationId, null, cancellationToke |
| 2 | 3132 | | } |
| | 3133 | |
|
| | 3134 | | /// <summary> |
| | 3135 | | /// Unpublish a specific iteration. |
| | 3136 | | /// </summary> |
| | 3137 | | /// <param name='operations'> |
| | 3138 | | /// The operations group for this extension method. |
| | 3139 | | /// </param> |
| | 3140 | | /// <param name='projectId'> |
| | 3141 | | /// The project id. |
| | 3142 | | /// </param> |
| | 3143 | | /// <param name='iterationId'> |
| | 3144 | | /// The iteration id. |
| | 3145 | | /// </param> |
| | 3146 | | /// <param name='customHeaders'> |
| | 3147 | | /// Headers that will be added to request. |
| | 3148 | | /// </param> |
| | 3149 | | public static HttpOperationResponse UnpublishIterationWithHttpMessages(this ICustomVisionTrainingClient oper |
| | 3150 | | { |
| 0 | 3151 | | return operations.UnpublishIterationWithHttpMessagesAsync(projectId, iterationId, customHeaders, Cancell |
| | 3152 | | } |
| | 3153 | |
|
| | 3154 | | /// <summary> |
| | 3155 | | /// Delete a set of predicted images and their associated prediction results. |
| | 3156 | | /// </summary> |
| | 3157 | | /// <param name='operations'> |
| | 3158 | | /// The operations group for this extension method. |
| | 3159 | | /// </param> |
| | 3160 | | /// <param name='projectId'> |
| | 3161 | | /// The project id. |
| | 3162 | | /// </param> |
| | 3163 | | /// <param name='ids'> |
| | 3164 | | /// The prediction ids. Limited to 64. |
| | 3165 | | /// </param> |
| | 3166 | | public static void DeletePrediction(this ICustomVisionTrainingClient operations, System.Guid projectId, ILis |
| | 3167 | | { |
| 0 | 3168 | | operations.DeletePredictionAsync(projectId, ids).GetAwaiter().GetResult(); |
| 0 | 3169 | | } |
| | 3170 | |
|
| | 3171 | | /// <summary> |
| | 3172 | | /// Delete a set of predicted images and their associated prediction results. |
| | 3173 | | /// </summary> |
| | 3174 | | /// <param name='operations'> |
| | 3175 | | /// The operations group for this extension method. |
| | 3176 | | /// </param> |
| | 3177 | | /// <param name='projectId'> |
| | 3178 | | /// The project id. |
| | 3179 | | /// </param> |
| | 3180 | | /// <param name='ids'> |
| | 3181 | | /// The prediction ids. Limited to 64. |
| | 3182 | | /// </param> |
| | 3183 | | /// <param name='cancellationToken'> |
| | 3184 | | /// The cancellation token. |
| | 3185 | | /// </param> |
| | 3186 | | public static async Task DeletePredictionAsync(this ICustomVisionTrainingClient operations, System.Guid proj |
| | 3187 | | { |
| 2 | 3188 | | (await operations.DeletePredictionWithHttpMessagesAsync(projectId, ids, null, cancellationToken).Configu |
| 2 | 3189 | | } |
| | 3190 | |
|
| | 3191 | | /// <summary> |
| | 3192 | | /// Delete a set of predicted images and their associated prediction results. |
| | 3193 | | /// </summary> |
| | 3194 | | /// <param name='operations'> |
| | 3195 | | /// The operations group for this extension method. |
| | 3196 | | /// </param> |
| | 3197 | | /// <param name='projectId'> |
| | 3198 | | /// The project id. |
| | 3199 | | /// </param> |
| | 3200 | | /// <param name='ids'> |
| | 3201 | | /// The prediction ids. Limited to 64. |
| | 3202 | | /// </param> |
| | 3203 | | /// <param name='customHeaders'> |
| | 3204 | | /// Headers that will be added to request. |
| | 3205 | | /// </param> |
| | 3206 | | public static HttpOperationResponse DeletePredictionWithHttpMessages(this ICustomVisionTrainingClient operat |
| | 3207 | | { |
| 0 | 3208 | | return operations.DeletePredictionWithHttpMessagesAsync(projectId, ids, customHeaders, CancellationToken |
| | 3209 | | } |
| | 3210 | |
|
| | 3211 | | /// <summary> |
| | 3212 | | /// Get images that were sent to your prediction endpoint. |
| | 3213 | | /// </summary> |
| | 3214 | | /// <param name='operations'> |
| | 3215 | | /// The operations group for this extension method. |
| | 3216 | | /// </param> |
| | 3217 | | /// <param name='projectId'> |
| | 3218 | | /// The project id. |
| | 3219 | | /// </param> |
| | 3220 | | /// <param name='query'> |
| | 3221 | | /// Parameters used to query the predictions. Limited to combining 2 tags. |
| | 3222 | | /// </param> |
| | 3223 | | public static PredictionQueryResult QueryPredictions(this ICustomVisionTrainingClient operations, System.Gui |
| | 3224 | | { |
| 0 | 3225 | | return operations.QueryPredictionsAsync(projectId, query).GetAwaiter().GetResult(); |
| | 3226 | | } |
| | 3227 | |
|
| | 3228 | | /// <summary> |
| | 3229 | | /// Get images that were sent to your prediction endpoint. |
| | 3230 | | /// </summary> |
| | 3231 | | /// <param name='operations'> |
| | 3232 | | /// The operations group for this extension method. |
| | 3233 | | /// </param> |
| | 3234 | | /// <param name='projectId'> |
| | 3235 | | /// The project id. |
| | 3236 | | /// </param> |
| | 3237 | | /// <param name='query'> |
| | 3238 | | /// Parameters used to query the predictions. Limited to combining 2 tags. |
| | 3239 | | /// </param> |
| | 3240 | | /// <param name='cancellationToken'> |
| | 3241 | | /// The cancellation token. |
| | 3242 | | /// </param> |
| | 3243 | | public static async Task<PredictionQueryResult> QueryPredictionsAsync(this ICustomVisionTrainingClient opera |
| | 3244 | | { |
| 4 | 3245 | | using (var _result = await operations.QueryPredictionsWithHttpMessagesAsync(projectId, query, null, canc |
| | 3246 | | { |
| 4 | 3247 | | return _result.Body; |
| | 3248 | | } |
| 4 | 3249 | | } |
| | 3250 | |
|
| | 3251 | | /// <summary> |
| | 3252 | | /// Get images that were sent to your prediction endpoint. |
| | 3253 | | /// </summary> |
| | 3254 | | /// <param name='operations'> |
| | 3255 | | /// The operations group for this extension method. |
| | 3256 | | /// </param> |
| | 3257 | | /// <param name='projectId'> |
| | 3258 | | /// The project id. |
| | 3259 | | /// </param> |
| | 3260 | | /// <param name='query'> |
| | 3261 | | /// Parameters used to query the predictions. Limited to combining 2 tags. |
| | 3262 | | /// </param> |
| | 3263 | | /// <param name='customHeaders'> |
| | 3264 | | /// Headers that will be added to request. |
| | 3265 | | /// </param> |
| | 3266 | | public static HttpOperationResponse<PredictionQueryResult> QueryPredictionsWithHttpMessages(this ICustomVisi |
| | 3267 | | { |
| 0 | 3268 | | return operations.QueryPredictionsWithHttpMessagesAsync(projectId, query, customHeaders, CancellationTok |
| | 3269 | | } |
| | 3270 | |
|
| | 3271 | | /// <summary> |
| | 3272 | | /// Quick test an image. |
| | 3273 | | /// </summary> |
| | 3274 | | /// <param name='operations'> |
| | 3275 | | /// The operations group for this extension method. |
| | 3276 | | /// </param> |
| | 3277 | | /// <param name='projectId'> |
| | 3278 | | /// The project id. |
| | 3279 | | /// </param> |
| | 3280 | | /// <param name='imageData'> |
| | 3281 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 3282 | | /// images up to 6MB. |
| | 3283 | | /// </param> |
| | 3284 | | /// <param name='iterationId'> |
| | 3285 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3286 | | /// The default iteration for the project will be used when not specified. |
| | 3287 | | /// </param> |
| | 3288 | | /// <param name='store'> |
| | 3289 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3290 | | /// The default is true, to store. |
| | 3291 | | /// </param> |
| | 3292 | | public static ImagePrediction QuickTestImage(this ICustomVisionTrainingClient operations, System.Guid projec |
| | 3293 | | { |
| 0 | 3294 | | return operations.QuickTestImageAsync(projectId, imageData, iterationId, store).GetAwaiter().GetResult() |
| | 3295 | | } |
| | 3296 | |
|
| | 3297 | | /// <summary> |
| | 3298 | | /// Quick test an image. |
| | 3299 | | /// </summary> |
| | 3300 | | /// <param name='operations'> |
| | 3301 | | /// The operations group for this extension method. |
| | 3302 | | /// </param> |
| | 3303 | | /// <param name='projectId'> |
| | 3304 | | /// The project id. |
| | 3305 | | /// </param> |
| | 3306 | | /// <param name='imageData'> |
| | 3307 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 3308 | | /// images up to 6MB. |
| | 3309 | | /// </param> |
| | 3310 | | /// <param name='iterationId'> |
| | 3311 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3312 | | /// The default iteration for the project will be used when not specified. |
| | 3313 | | /// </param> |
| | 3314 | | /// <param name='store'> |
| | 3315 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3316 | | /// The default is true, to store. |
| | 3317 | | /// </param> |
| | 3318 | | /// <param name='cancellationToken'> |
| | 3319 | | /// The cancellation token. |
| | 3320 | | /// </param> |
| | 3321 | | public static async Task<ImagePrediction> QuickTestImageAsync(this ICustomVisionTrainingClient operations, S |
| | 3322 | | { |
| 4 | 3323 | | using (var _result = await operations.QuickTestImageWithHttpMessagesAsync(projectId, imageData, iteratio |
| | 3324 | | { |
| 4 | 3325 | | return _result.Body; |
| | 3326 | | } |
| 4 | 3327 | | } |
| | 3328 | |
|
| | 3329 | | /// <summary> |
| | 3330 | | /// Quick test an image. |
| | 3331 | | /// </summary> |
| | 3332 | | /// <param name='operations'> |
| | 3333 | | /// The operations group for this extension method. |
| | 3334 | | /// </param> |
| | 3335 | | /// <param name='projectId'> |
| | 3336 | | /// The project id. |
| | 3337 | | /// </param> |
| | 3338 | | /// <param name='imageData'> |
| | 3339 | | /// Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports |
| | 3340 | | /// images up to 6MB. |
| | 3341 | | /// </param> |
| | 3342 | | /// <param name='iterationId'> |
| | 3343 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3344 | | /// The default iteration for the project will be used when not specified. |
| | 3345 | | /// </param> |
| | 3346 | | /// <param name='store'> |
| | 3347 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3348 | | /// The default is true, to store. |
| | 3349 | | /// </param> |
| | 3350 | | /// <param name='customHeaders'> |
| | 3351 | | /// Headers that will be added to request. |
| | 3352 | | /// </param> |
| | 3353 | | public static HttpOperationResponse<ImagePrediction> QuickTestImageWithHttpMessages(this ICustomVisionTraini |
| | 3354 | | { |
| 0 | 3355 | | return operations.QuickTestImageWithHttpMessagesAsync(projectId, imageData, iterationId, store, customHe |
| | 3356 | | } |
| | 3357 | |
|
| | 3358 | | /// <summary> |
| | 3359 | | /// Quick test an image url. |
| | 3360 | | /// </summary> |
| | 3361 | | /// <param name='operations'> |
| | 3362 | | /// The operations group for this extension method. |
| | 3363 | | /// </param> |
| | 3364 | | /// <param name='projectId'> |
| | 3365 | | /// The project to evaluate against. |
| | 3366 | | /// </param> |
| | 3367 | | /// <param name='imageUrl'> |
| | 3368 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 3369 | | /// </param> |
| | 3370 | | /// <param name='iterationId'> |
| | 3371 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3372 | | /// The default iteration for the project will be used when not specified. |
| | 3373 | | /// </param> |
| | 3374 | | /// <param name='store'> |
| | 3375 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3376 | | /// The default is true, to store. |
| | 3377 | | /// </param> |
| | 3378 | | public static ImagePrediction QuickTestImageUrl(this ICustomVisionTrainingClient operations, System.Guid pro |
| | 3379 | | { |
| 0 | 3380 | | return operations.QuickTestImageUrlAsync(projectId, imageUrl, iterationId, store).GetAwaiter().GetResult |
| | 3381 | | } |
| | 3382 | |
|
| | 3383 | | /// <summary> |
| | 3384 | | /// Quick test an image url. |
| | 3385 | | /// </summary> |
| | 3386 | | /// <param name='operations'> |
| | 3387 | | /// The operations group for this extension method. |
| | 3388 | | /// </param> |
| | 3389 | | /// <param name='projectId'> |
| | 3390 | | /// The project to evaluate against. |
| | 3391 | | /// </param> |
| | 3392 | | /// <param name='imageUrl'> |
| | 3393 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 3394 | | /// </param> |
| | 3395 | | /// <param name='iterationId'> |
| | 3396 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3397 | | /// The default iteration for the project will be used when not specified. |
| | 3398 | | /// </param> |
| | 3399 | | /// <param name='store'> |
| | 3400 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3401 | | /// The default is true, to store. |
| | 3402 | | /// </param> |
| | 3403 | | /// <param name='cancellationToken'> |
| | 3404 | | /// The cancellation token. |
| | 3405 | | /// </param> |
| | 3406 | | public static async Task<ImagePrediction> QuickTestImageUrlAsync(this ICustomVisionTrainingClient operations |
| | 3407 | | { |
| 4 | 3408 | | using (var _result = await operations.QuickTestImageUrlWithHttpMessagesAsync(projectId, imageUrl, iterat |
| | 3409 | | { |
| 4 | 3410 | | return _result.Body; |
| | 3411 | | } |
| 4 | 3412 | | } |
| | 3413 | |
|
| | 3414 | | /// <summary> |
| | 3415 | | /// Quick test an image url. |
| | 3416 | | /// </summary> |
| | 3417 | | /// <param name='operations'> |
| | 3418 | | /// The operations group for this extension method. |
| | 3419 | | /// </param> |
| | 3420 | | /// <param name='projectId'> |
| | 3421 | | /// The project to evaluate against. |
| | 3422 | | /// </param> |
| | 3423 | | /// <param name='imageUrl'> |
| | 3424 | | /// An ImageUrl that contains the url of the image to be evaluated. |
| | 3425 | | /// </param> |
| | 3426 | | /// <param name='iterationId'> |
| | 3427 | | /// Optional. Specifies the id of a particular iteration to evaluate against. |
| | 3428 | | /// The default iteration for the project will be used when not specified. |
| | 3429 | | /// </param> |
| | 3430 | | /// <param name='store'> |
| | 3431 | | /// Optional. Specifies whether or not to store the result of this prediction. |
| | 3432 | | /// The default is true, to store. |
| | 3433 | | /// </param> |
| | 3434 | | /// <param name='customHeaders'> |
| | 3435 | | /// Headers that will be added to request. |
| | 3436 | | /// </param> |
| | 3437 | | public static HttpOperationResponse<ImagePrediction> QuickTestImageUrlWithHttpMessages(this ICustomVisionTra |
| | 3438 | | { |
| 0 | 3439 | | return operations.QuickTestImageUrlWithHttpMessagesAsync(projectId, imageUrl, iterationId, store, custom |
| | 3440 | | } |
| | 3441 | |
|
| | 3442 | | /// <summary> |
| | 3443 | | /// Get the tags for a given project and iteration. |
| | 3444 | | /// </summary> |
| | 3445 | | /// <param name='operations'> |
| | 3446 | | /// The operations group for this extension method. |
| | 3447 | | /// </param> |
| | 3448 | | /// <param name='projectId'> |
| | 3449 | | /// The project id. |
| | 3450 | | /// </param> |
| | 3451 | | /// <param name='iterationId'> |
| | 3452 | | /// The iteration id. Defaults to workspace. |
| | 3453 | | /// </param> |
| | 3454 | | public static IList<Tag> GetTags(this ICustomVisionTrainingClient operations, System.Guid projectId, System. |
| | 3455 | | { |
| 4 | 3456 | | return operations.GetTagsAsync(projectId, iterationId).GetAwaiter().GetResult(); |
| | 3457 | | } |
| | 3458 | |
|
| | 3459 | | /// <summary> |
| | 3460 | | /// Get the tags for a given project and iteration. |
| | 3461 | | /// </summary> |
| | 3462 | | /// <param name='operations'> |
| | 3463 | | /// The operations group for this extension method. |
| | 3464 | | /// </param> |
| | 3465 | | /// <param name='projectId'> |
| | 3466 | | /// The project id. |
| | 3467 | | /// </param> |
| | 3468 | | /// <param name='iterationId'> |
| | 3469 | | /// The iteration id. Defaults to workspace. |
| | 3470 | | /// </param> |
| | 3471 | | /// <param name='cancellationToken'> |
| | 3472 | | /// The cancellation token. |
| | 3473 | | /// </param> |
| | 3474 | | public static async Task<IList<Tag>> GetTagsAsync(this ICustomVisionTrainingClient operations, System.Guid p |
| | 3475 | | { |
| 12 | 3476 | | using (var _result = await operations.GetTagsWithHttpMessagesAsync(projectId, iterationId, null, cancell |
| | 3477 | | { |
| 12 | 3478 | | return _result.Body; |
| | 3479 | | } |
| 12 | 3480 | | } |
| | 3481 | |
|
| | 3482 | | /// <summary> |
| | 3483 | | /// Get the tags for a given project and iteration. |
| | 3484 | | /// </summary> |
| | 3485 | | /// <param name='operations'> |
| | 3486 | | /// The operations group for this extension method. |
| | 3487 | | /// </param> |
| | 3488 | | /// <param name='projectId'> |
| | 3489 | | /// The project id. |
| | 3490 | | /// </param> |
| | 3491 | | /// <param name='iterationId'> |
| | 3492 | | /// The iteration id. Defaults to workspace. |
| | 3493 | | /// </param> |
| | 3494 | | /// <param name='customHeaders'> |
| | 3495 | | /// Headers that will be added to request. |
| | 3496 | | /// </param> |
| | 3497 | | public static HttpOperationResponse<IList<Tag>> GetTagsWithHttpMessages(this ICustomVisionTrainingClient ope |
| | 3498 | | { |
| 0 | 3499 | | return operations.GetTagsWithHttpMessagesAsync(projectId, iterationId, customHeaders, CancellationToken. |
| | 3500 | | } |
| | 3501 | |
|
| | 3502 | | /// <summary> |
| | 3503 | | /// Create a tag for the project. |
| | 3504 | | /// </summary> |
| | 3505 | | /// <param name='operations'> |
| | 3506 | | /// The operations group for this extension method. |
| | 3507 | | /// </param> |
| | 3508 | | /// <param name='projectId'> |
| | 3509 | | /// The project id. |
| | 3510 | | /// </param> |
| | 3511 | | /// <param name='name'> |
| | 3512 | | /// The tag name. |
| | 3513 | | /// </param> |
| | 3514 | | /// <param name='description'> |
| | 3515 | | /// Optional description for the tag. |
| | 3516 | | /// </param> |
| | 3517 | | /// <param name='type'> |
| | 3518 | | /// Optional type for the tag. Possible values include: 'Regular', 'Negative', |
| | 3519 | | /// 'GeneralProduct' |
| | 3520 | | /// </param> |
| | 3521 | | public static Tag CreateTag(this ICustomVisionTrainingClient operations, System.Guid projectId, string name, |
| | 3522 | | { |
| 0 | 3523 | | return operations.CreateTagAsync(projectId, name, description, type).GetAwaiter().GetResult(); |
| | 3524 | | } |
| | 3525 | |
|
| | 3526 | | /// <summary> |
| | 3527 | | /// Create a tag for the project. |
| | 3528 | | /// </summary> |
| | 3529 | | /// <param name='operations'> |
| | 3530 | | /// The operations group for this extension method. |
| | 3531 | | /// </param> |
| | 3532 | | /// <param name='projectId'> |
| | 3533 | | /// The project id. |
| | 3534 | | /// </param> |
| | 3535 | | /// <param name='name'> |
| | 3536 | | /// The tag name. |
| | 3537 | | /// </param> |
| | 3538 | | /// <param name='description'> |
| | 3539 | | /// Optional description for the tag. |
| | 3540 | | /// </param> |
| | 3541 | | /// <param name='type'> |
| | 3542 | | /// Optional type for the tag. Possible values include: 'Regular', 'Negative', |
| | 3543 | | /// 'GeneralProduct' |
| | 3544 | | /// </param> |
| | 3545 | | /// <param name='cancellationToken'> |
| | 3546 | | /// The cancellation token. |
| | 3547 | | /// </param> |
| | 3548 | | public static async Task<Tag> CreateTagAsync(this ICustomVisionTrainingClient operations, System.Guid projec |
| | 3549 | | { |
| 18 | 3550 | | using (var _result = await operations.CreateTagWithHttpMessagesAsync(projectId, name, description, type, |
| | 3551 | | { |
| 18 | 3552 | | return _result.Body; |
| | 3553 | | } |
| 18 | 3554 | | } |
| | 3555 | |
|
| | 3556 | | /// <summary> |
| | 3557 | | /// Create a tag for the project. |
| | 3558 | | /// </summary> |
| | 3559 | | /// <param name='operations'> |
| | 3560 | | /// The operations group for this extension method. |
| | 3561 | | /// </param> |
| | 3562 | | /// <param name='projectId'> |
| | 3563 | | /// The project id. |
| | 3564 | | /// </param> |
| | 3565 | | /// <param name='name'> |
| | 3566 | | /// The tag name. |
| | 3567 | | /// </param> |
| | 3568 | | /// <param name='description'> |
| | 3569 | | /// Optional description for the tag. |
| | 3570 | | /// </param> |
| | 3571 | | /// <param name='type'> |
| | 3572 | | /// Optional type for the tag. Possible values include: 'Regular', 'Negative', |
| | 3573 | | /// 'GeneralProduct' |
| | 3574 | | /// </param> |
| | 3575 | | /// <param name='customHeaders'> |
| | 3576 | | /// Headers that will be added to request. |
| | 3577 | | /// </param> |
| | 3578 | | public static HttpOperationResponse<Tag> CreateTagWithHttpMessages(this ICustomVisionTrainingClient operatio |
| | 3579 | | { |
| 0 | 3580 | | return operations.CreateTagWithHttpMessagesAsync(projectId, name, description, type, customHeaders, Canc |
| | 3581 | | } |
| | 3582 | |
|
| | 3583 | | /// <summary> |
| | 3584 | | /// Get information about a specific tag. |
| | 3585 | | /// </summary> |
| | 3586 | | /// <param name='operations'> |
| | 3587 | | /// The operations group for this extension method. |
| | 3588 | | /// </param> |
| | 3589 | | /// <param name='projectId'> |
| | 3590 | | /// The project this tag belongs to. |
| | 3591 | | /// </param> |
| | 3592 | | /// <param name='tagId'> |
| | 3593 | | /// The tag id. |
| | 3594 | | /// </param> |
| | 3595 | | /// <param name='iterationId'> |
| | 3596 | | /// The iteration to retrieve this tag from. Optional, defaults to current |
| | 3597 | | /// training set. |
| | 3598 | | /// </param> |
| | 3599 | | public static Tag GetTag(this ICustomVisionTrainingClient operations, System.Guid projectId, System.Guid tag |
| | 3600 | | { |
| 0 | 3601 | | return operations.GetTagAsync(projectId, tagId, iterationId).GetAwaiter().GetResult(); |
| | 3602 | | } |
| | 3603 | |
|
| | 3604 | | /// <summary> |
| | 3605 | | /// Get information about a specific tag. |
| | 3606 | | /// </summary> |
| | 3607 | | /// <param name='operations'> |
| | 3608 | | /// The operations group for this extension method. |
| | 3609 | | /// </param> |
| | 3610 | | /// <param name='projectId'> |
| | 3611 | | /// The project this tag belongs to. |
| | 3612 | | /// </param> |
| | 3613 | | /// <param name='tagId'> |
| | 3614 | | /// The tag id. |
| | 3615 | | /// </param> |
| | 3616 | | /// <param name='iterationId'> |
| | 3617 | | /// The iteration to retrieve this tag from. Optional, defaults to current |
| | 3618 | | /// training set. |
| | 3619 | | /// </param> |
| | 3620 | | /// <param name='cancellationToken'> |
| | 3621 | | /// The cancellation token. |
| | 3622 | | /// </param> |
| | 3623 | | public static async Task<Tag> GetTagAsync(this ICustomVisionTrainingClient operations, System.Guid projectId |
| | 3624 | | { |
| 4 | 3625 | | using (var _result = await operations.GetTagWithHttpMessagesAsync(projectId, tagId, iterationId, null, c |
| | 3626 | | { |
| 4 | 3627 | | return _result.Body; |
| | 3628 | | } |
| 4 | 3629 | | } |
| | 3630 | |
|
| | 3631 | | /// <summary> |
| | 3632 | | /// Get information about a specific tag. |
| | 3633 | | /// </summary> |
| | 3634 | | /// <param name='operations'> |
| | 3635 | | /// The operations group for this extension method. |
| | 3636 | | /// </param> |
| | 3637 | | /// <param name='projectId'> |
| | 3638 | | /// The project this tag belongs to. |
| | 3639 | | /// </param> |
| | 3640 | | /// <param name='tagId'> |
| | 3641 | | /// The tag id. |
| | 3642 | | /// </param> |
| | 3643 | | /// <param name='iterationId'> |
| | 3644 | | /// The iteration to retrieve this tag from. Optional, defaults to current |
| | 3645 | | /// training set. |
| | 3646 | | /// </param> |
| | 3647 | | /// <param name='customHeaders'> |
| | 3648 | | /// Headers that will be added to request. |
| | 3649 | | /// </param> |
| | 3650 | | public static HttpOperationResponse<Tag> GetTagWithHttpMessages(this ICustomVisionTrainingClient operations, |
| | 3651 | | { |
| 0 | 3652 | | return operations.GetTagWithHttpMessagesAsync(projectId, tagId, iterationId, customHeaders, Cancellation |
| | 3653 | | } |
| | 3654 | |
|
| | 3655 | | /// <summary> |
| | 3656 | | /// Delete a tag from the project. |
| | 3657 | | /// </summary> |
| | 3658 | | /// <param name='operations'> |
| | 3659 | | /// The operations group for this extension method. |
| | 3660 | | /// </param> |
| | 3661 | | /// <param name='projectId'> |
| | 3662 | | /// The project id. |
| | 3663 | | /// </param> |
| | 3664 | | /// <param name='tagId'> |
| | 3665 | | /// Id of the tag to be deleted. |
| | 3666 | | /// </param> |
| | 3667 | | public static void DeleteTag(this ICustomVisionTrainingClient operations, System.Guid projectId, System.Guid |
| | 3668 | | { |
| 0 | 3669 | | operations.DeleteTagAsync(projectId, tagId).GetAwaiter().GetResult(); |
| 0 | 3670 | | } |
| | 3671 | |
|
| | 3672 | | /// <summary> |
| | 3673 | | /// Delete a tag from the project. |
| | 3674 | | /// </summary> |
| | 3675 | | /// <param name='operations'> |
| | 3676 | | /// The operations group for this extension method. |
| | 3677 | | /// </param> |
| | 3678 | | /// <param name='projectId'> |
| | 3679 | | /// The project id. |
| | 3680 | | /// </param> |
| | 3681 | | /// <param name='tagId'> |
| | 3682 | | /// Id of the tag to be deleted. |
| | 3683 | | /// </param> |
| | 3684 | | /// <param name='cancellationToken'> |
| | 3685 | | /// The cancellation token. |
| | 3686 | | /// </param> |
| | 3687 | | public static async Task DeleteTagAsync(this ICustomVisionTrainingClient operations, System.Guid projectId, |
| | 3688 | | { |
| 4 | 3689 | | (await operations.DeleteTagWithHttpMessagesAsync(projectId, tagId, null, cancellationToken).ConfigureAwa |
| 4 | 3690 | | } |
| | 3691 | |
|
| | 3692 | | /// <summary> |
| | 3693 | | /// Delete a tag from the project. |
| | 3694 | | /// </summary> |
| | 3695 | | /// <param name='operations'> |
| | 3696 | | /// The operations group for this extension method. |
| | 3697 | | /// </param> |
| | 3698 | | /// <param name='projectId'> |
| | 3699 | | /// The project id. |
| | 3700 | | /// </param> |
| | 3701 | | /// <param name='tagId'> |
| | 3702 | | /// Id of the tag to be deleted. |
| | 3703 | | /// </param> |
| | 3704 | | /// <param name='customHeaders'> |
| | 3705 | | /// Headers that will be added to request. |
| | 3706 | | /// </param> |
| | 3707 | | public static HttpOperationResponse DeleteTagWithHttpMessages(this ICustomVisionTrainingClient operations, S |
| | 3708 | | { |
| 0 | 3709 | | return operations.DeleteTagWithHttpMessagesAsync(projectId, tagId, customHeaders, CancellationToken.None |
| | 3710 | | } |
| | 3711 | |
|
| | 3712 | | /// <summary> |
| | 3713 | | /// Update a tag. |
| | 3714 | | /// </summary> |
| | 3715 | | /// <param name='operations'> |
| | 3716 | | /// The operations group for this extension method. |
| | 3717 | | /// </param> |
| | 3718 | | /// <param name='projectId'> |
| | 3719 | | /// The project id. |
| | 3720 | | /// </param> |
| | 3721 | | /// <param name='tagId'> |
| | 3722 | | /// The id of the target tag. |
| | 3723 | | /// </param> |
| | 3724 | | /// <param name='updatedTag'> |
| | 3725 | | /// The updated tag model. |
| | 3726 | | /// </param> |
| | 3727 | | public static Tag UpdateTag(this ICustomVisionTrainingClient operations, System.Guid projectId, System.Guid |
| | 3728 | | { |
| 0 | 3729 | | return operations.UpdateTagAsync(projectId, tagId, updatedTag).GetAwaiter().GetResult(); |
| | 3730 | | } |
| | 3731 | |
|
| | 3732 | | /// <summary> |
| | 3733 | | /// Update a tag. |
| | 3734 | | /// </summary> |
| | 3735 | | /// <param name='operations'> |
| | 3736 | | /// The operations group for this extension method. |
| | 3737 | | /// </param> |
| | 3738 | | /// <param name='projectId'> |
| | 3739 | | /// The project id. |
| | 3740 | | /// </param> |
| | 3741 | | /// <param name='tagId'> |
| | 3742 | | /// The id of the target tag. |
| | 3743 | | /// </param> |
| | 3744 | | /// <param name='updatedTag'> |
| | 3745 | | /// The updated tag model. |
| | 3746 | | /// </param> |
| | 3747 | | /// <param name='cancellationToken'> |
| | 3748 | | /// The cancellation token. |
| | 3749 | | /// </param> |
| | 3750 | | public static async Task<Tag> UpdateTagAsync(this ICustomVisionTrainingClient operations, System.Guid projec |
| | 3751 | | { |
| 2 | 3752 | | using (var _result = await operations.UpdateTagWithHttpMessagesAsync(projectId, tagId, updatedTag, null, |
| | 3753 | | { |
| 2 | 3754 | | return _result.Body; |
| | 3755 | | } |
| 2 | 3756 | | } |
| | 3757 | |
|
| | 3758 | | /// <summary> |
| | 3759 | | /// Update a tag. |
| | 3760 | | /// </summary> |
| | 3761 | | /// <param name='operations'> |
| | 3762 | | /// The operations group for this extension method. |
| | 3763 | | /// </param> |
| | 3764 | | /// <param name='projectId'> |
| | 3765 | | /// The project id. |
| | 3766 | | /// </param> |
| | 3767 | | /// <param name='tagId'> |
| | 3768 | | /// The id of the target tag. |
| | 3769 | | /// </param> |
| | 3770 | | /// <param name='updatedTag'> |
| | 3771 | | /// The updated tag model. |
| | 3772 | | /// </param> |
| | 3773 | | /// <param name='customHeaders'> |
| | 3774 | | /// Headers that will be added to request. |
| | 3775 | | /// </param> |
| | 3776 | | public static HttpOperationResponse<Tag> UpdateTagWithHttpMessages(this ICustomVisionTrainingClient operatio |
| | 3777 | | { |
| 0 | 3778 | | return operations.UpdateTagWithHttpMessagesAsync(projectId, tagId, updatedTag, customHeaders, Cancellati |
| | 3779 | | } |
| | 3780 | |
|
| | 3781 | | /// <summary> |
| | 3782 | | /// Suggest tags and regions for an array/batch of untagged images. Returns |
| | 3783 | | /// empty array if no tags are found. |
| | 3784 | | /// </summary> |
| | 3785 | | /// <remarks> |
| | 3786 | | /// This API will get suggested tags and regions for an array/batch of untagged |
| | 3787 | | /// images along with confidences for the tags. It returns an empty array if no |
| | 3788 | | /// tags are found. |
| | 3789 | | /// There is a limit of 64 images in the batch. |
| | 3790 | | /// </remarks> |
| | 3791 | | /// <param name='operations'> |
| | 3792 | | /// The operations group for this extension method. |
| | 3793 | | /// </param> |
| | 3794 | | /// <param name='projectId'> |
| | 3795 | | /// The project id. |
| | 3796 | | /// </param> |
| | 3797 | | /// <param name='iterationId'> |
| | 3798 | | /// IterationId to use for tag and region suggestion. |
| | 3799 | | /// </param> |
| | 3800 | | /// <param name='imageIds'> |
| | 3801 | | /// Array of image ids tag suggestion are needed for. Use GetUntaggedImages API |
| | 3802 | | /// to get imageIds. |
| | 3803 | | /// </param> |
| | 3804 | | public static IList<SuggestedTagAndRegion> SuggestTagsAndRegions(this ICustomVisionTrainingClient operations |
| | 3805 | | { |
| 6 | 3806 | | return operations.SuggestTagsAndRegionsAsync(projectId, iterationId, imageIds).GetAwaiter().GetResult(); |
| | 3807 | | } |
| | 3808 | |
|
| | 3809 | | /// <summary> |
| | 3810 | | /// Suggest tags and regions for an array/batch of untagged images. Returns |
| | 3811 | | /// empty array if no tags are found. |
| | 3812 | | /// </summary> |
| | 3813 | | /// <remarks> |
| | 3814 | | /// This API will get suggested tags and regions for an array/batch of untagged |
| | 3815 | | /// images along with confidences for the tags. It returns an empty array if no |
| | 3816 | | /// tags are found. |
| | 3817 | | /// There is a limit of 64 images in the batch. |
| | 3818 | | /// </remarks> |
| | 3819 | | /// <param name='operations'> |
| | 3820 | | /// The operations group for this extension method. |
| | 3821 | | /// </param> |
| | 3822 | | /// <param name='projectId'> |
| | 3823 | | /// The project id. |
| | 3824 | | /// </param> |
| | 3825 | | /// <param name='iterationId'> |
| | 3826 | | /// IterationId to use for tag and region suggestion. |
| | 3827 | | /// </param> |
| | 3828 | | /// <param name='imageIds'> |
| | 3829 | | /// Array of image ids tag suggestion are needed for. Use GetUntaggedImages API |
| | 3830 | | /// to get imageIds. |
| | 3831 | | /// </param> |
| | 3832 | | /// <param name='cancellationToken'> |
| | 3833 | | /// The cancellation token. |
| | 3834 | | /// </param> |
| | 3835 | | public static async Task<IList<SuggestedTagAndRegion>> SuggestTagsAndRegionsAsync(this ICustomVisionTraining |
| | 3836 | | { |
| 6 | 3837 | | using (var _result = await operations.SuggestTagsAndRegionsWithHttpMessagesAsync(projectId, iterationId, |
| | 3838 | | { |
| 6 | 3839 | | return _result.Body; |
| | 3840 | | } |
| 6 | 3841 | | } |
| | 3842 | |
|
| | 3843 | | /// <summary> |
| | 3844 | | /// Suggest tags and regions for an array/batch of untagged images. Returns |
| | 3845 | | /// empty array if no tags are found. |
| | 3846 | | /// </summary> |
| | 3847 | | /// <remarks> |
| | 3848 | | /// This API will get suggested tags and regions for an array/batch of untagged |
| | 3849 | | /// images along with confidences for the tags. It returns an empty array if no |
| | 3850 | | /// tags are found. |
| | 3851 | | /// There is a limit of 64 images in the batch. |
| | 3852 | | /// </remarks> |
| | 3853 | | /// <param name='operations'> |
| | 3854 | | /// The operations group for this extension method. |
| | 3855 | | /// </param> |
| | 3856 | | /// <param name='projectId'> |
| | 3857 | | /// The project id. |
| | 3858 | | /// </param> |
| | 3859 | | /// <param name='iterationId'> |
| | 3860 | | /// IterationId to use for tag and region suggestion. |
| | 3861 | | /// </param> |
| | 3862 | | /// <param name='imageIds'> |
| | 3863 | | /// Array of image ids tag suggestion are needed for. Use GetUntaggedImages API |
| | 3864 | | /// to get imageIds. |
| | 3865 | | /// </param> |
| | 3866 | | /// <param name='customHeaders'> |
| | 3867 | | /// Headers that will be added to request. |
| | 3868 | | /// </param> |
| | 3869 | | public static HttpOperationResponse<IList<SuggestedTagAndRegion>> SuggestTagsAndRegionsWithHttpMessages(this |
| | 3870 | | { |
| 0 | 3871 | | return operations.SuggestTagsAndRegionsWithHttpMessagesAsync(projectId, iterationId, imageIds, customHea |
| | 3872 | | } |
| | 3873 | |
|
| | 3874 | | /// <summary> |
| | 3875 | | /// Queues project for training. |
| | 3876 | | /// </summary> |
| | 3877 | | /// <param name='operations'> |
| | 3878 | | /// The operations group for this extension method. |
| | 3879 | | /// </param> |
| | 3880 | | /// <param name='projectId'> |
| | 3881 | | /// The project id. |
| | 3882 | | /// </param> |
| | 3883 | | /// <param name='trainingType'> |
| | 3884 | | /// The type of training to use to train the project (default: Regular). |
| | 3885 | | /// Possible values include: 'Regular', 'Advanced' |
| | 3886 | | /// </param> |
| | 3887 | | /// <param name='reservedBudgetInHours'> |
| | 3888 | | /// The number of hours reserved as budget for training (if applicable). |
| | 3889 | | /// </param> |
| | 3890 | | /// <param name='forceTrain'> |
| | 3891 | | /// Whether to force train even if dataset and configuration does not change |
| | 3892 | | /// (default: false). |
| | 3893 | | /// </param> |
| | 3894 | | /// <param name='notificationEmailAddress'> |
| | 3895 | | /// The email address to send notification to when training finishes (default: |
| | 3896 | | /// null). |
| | 3897 | | /// </param> |
| | 3898 | | /// <param name='trainingParameters'> |
| | 3899 | | /// Additional training parameters passed in to control how the project is |
| | 3900 | | /// trained. |
| | 3901 | | /// </param> |
| | 3902 | | public static Iteration TrainProject(this ICustomVisionTrainingClient operations, System.Guid projectId, str |
| | 3903 | | { |
| 0 | 3904 | | return operations.TrainProjectAsync(projectId, trainingType, reservedBudgetInHours, forceTrain, notifica |
| | 3905 | | } |
| | 3906 | |
|
| | 3907 | | /// <summary> |
| | 3908 | | /// Queues project for training. |
| | 3909 | | /// </summary> |
| | 3910 | | /// <param name='operations'> |
| | 3911 | | /// The operations group for this extension method. |
| | 3912 | | /// </param> |
| | 3913 | | /// <param name='projectId'> |
| | 3914 | | /// The project id. |
| | 3915 | | /// </param> |
| | 3916 | | /// <param name='trainingType'> |
| | 3917 | | /// The type of training to use to train the project (default: Regular). |
| | 3918 | | /// Possible values include: 'Regular', 'Advanced' |
| | 3919 | | /// </param> |
| | 3920 | | /// <param name='reservedBudgetInHours'> |
| | 3921 | | /// The number of hours reserved as budget for training (if applicable). |
| | 3922 | | /// </param> |
| | 3923 | | /// <param name='forceTrain'> |
| | 3924 | | /// Whether to force train even if dataset and configuration does not change |
| | 3925 | | /// (default: false). |
| | 3926 | | /// </param> |
| | 3927 | | /// <param name='notificationEmailAddress'> |
| | 3928 | | /// The email address to send notification to when training finishes (default: |
| | 3929 | | /// null). |
| | 3930 | | /// </param> |
| | 3931 | | /// <param name='trainingParameters'> |
| | 3932 | | /// Additional training parameters passed in to control how the project is |
| | 3933 | | /// trained. |
| | 3934 | | /// </param> |
| | 3935 | | /// <param name='cancellationToken'> |
| | 3936 | | /// The cancellation token. |
| | 3937 | | /// </param> |
| | 3938 | | public static async Task<Iteration> TrainProjectAsync(this ICustomVisionTrainingClient operations, System.Gu |
| | 3939 | | { |
| 2 | 3940 | | using (var _result = await operations.TrainProjectWithHttpMessagesAsync(projectId, trainingType, reserve |
| | 3941 | | { |
| 2 | 3942 | | return _result.Body; |
| | 3943 | | } |
| 2 | 3944 | | } |
| | 3945 | |
|
| | 3946 | | /// <summary> |
| | 3947 | | /// Queues project for training. |
| | 3948 | | /// </summary> |
| | 3949 | | /// <param name='operations'> |
| | 3950 | | /// The operations group for this extension method. |
| | 3951 | | /// </param> |
| | 3952 | | /// <param name='projectId'> |
| | 3953 | | /// The project id. |
| | 3954 | | /// </param> |
| | 3955 | | /// <param name='trainingType'> |
| | 3956 | | /// The type of training to use to train the project (default: Regular). |
| | 3957 | | /// Possible values include: 'Regular', 'Advanced' |
| | 3958 | | /// </param> |
| | 3959 | | /// <param name='reservedBudgetInHours'> |
| | 3960 | | /// The number of hours reserved as budget for training (if applicable). |
| | 3961 | | /// </param> |
| | 3962 | | /// <param name='forceTrain'> |
| | 3963 | | /// Whether to force train even if dataset and configuration does not change |
| | 3964 | | /// (default: false). |
| | 3965 | | /// </param> |
| | 3966 | | /// <param name='notificationEmailAddress'> |
| | 3967 | | /// The email address to send notification to when training finishes (default: |
| | 3968 | | /// null). |
| | 3969 | | /// </param> |
| | 3970 | | /// <param name='trainingParameters'> |
| | 3971 | | /// Additional training parameters passed in to control how the project is |
| | 3972 | | /// trained. |
| | 3973 | | /// </param> |
| | 3974 | | /// <param name='customHeaders'> |
| | 3975 | | /// Headers that will be added to request. |
| | 3976 | | /// </param> |
| | 3977 | | public static HttpOperationResponse<Iteration> TrainProjectWithHttpMessages(this ICustomVisionTrainingClient |
| | 3978 | | { |
| 0 | 3979 | | return operations.TrainProjectWithHttpMessagesAsync(projectId, trainingType, reservedBudgetInHours, forc |
| | 3980 | | } |
| | 3981 | |
|
| | 3982 | | /// <summary> |
| | 3983 | | /// Imports a project. |
| | 3984 | | /// </summary> |
| | 3985 | | /// <param name='operations'> |
| | 3986 | | /// The operations group for this extension method. |
| | 3987 | | /// </param> |
| | 3988 | | /// <param name='token'> |
| | 3989 | | /// Token generated from the export project call. |
| | 3990 | | /// </param> |
| | 3991 | | /// <param name='name'> |
| | 3992 | | /// Optional, name of the project to use instead of auto-generated name. |
| | 3993 | | /// </param> |
| | 3994 | | public static Project ImportProject(this ICustomVisionTrainingClient operations, string token, string name = |
| | 3995 | | { |
| 0 | 3996 | | return operations.ImportProjectAsync(token, name).GetAwaiter().GetResult(); |
| | 3997 | | } |
| | 3998 | |
|
| | 3999 | | /// <summary> |
| | 4000 | | /// Imports a project. |
| | 4001 | | /// </summary> |
| | 4002 | | /// <param name='operations'> |
| | 4003 | | /// The operations group for this extension method. |
| | 4004 | | /// </param> |
| | 4005 | | /// <param name='token'> |
| | 4006 | | /// Token generated from the export project call. |
| | 4007 | | /// </param> |
| | 4008 | | /// <param name='name'> |
| | 4009 | | /// Optional, name of the project to use instead of auto-generated name. |
| | 4010 | | /// </param> |
| | 4011 | | /// <param name='cancellationToken'> |
| | 4012 | | /// The cancellation token. |
| | 4013 | | /// </param> |
| | 4014 | | public static async Task<Project> ImportProjectAsync(this ICustomVisionTrainingClient operations, string tok |
| | 4015 | | { |
| 2 | 4016 | | using (var _result = await operations.ImportProjectWithHttpMessagesAsync(token, name, null, cancellation |
| | 4017 | | { |
| 2 | 4018 | | return _result.Body; |
| | 4019 | | } |
| 2 | 4020 | | } |
| | 4021 | |
|
| | 4022 | | /// <summary> |
| | 4023 | | /// Imports a project. |
| | 4024 | | /// </summary> |
| | 4025 | | /// <param name='operations'> |
| | 4026 | | /// The operations group for this extension method. |
| | 4027 | | /// </param> |
| | 4028 | | /// <param name='token'> |
| | 4029 | | /// Token generated from the export project call. |
| | 4030 | | /// </param> |
| | 4031 | | /// <param name='name'> |
| | 4032 | | /// Optional, name of the project to use instead of auto-generated name. |
| | 4033 | | /// </param> |
| | 4034 | | /// <param name='customHeaders'> |
| | 4035 | | /// Headers that will be added to request. |
| | 4036 | | /// </param> |
| | 4037 | | public static HttpOperationResponse<Project> ImportProjectWithHttpMessages(this ICustomVisionTrainingClient |
| | 4038 | | { |
| 0 | 4039 | | return operations.ImportProjectWithHttpMessagesAsync(token, name, customHeaders, CancellationToken.None) |
| | 4040 | | } |
| | 4041 | |
|
| | 4042 | | } |
| | 4043 | | } |