| | | 1 | | // <auto-generated> |
| | | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | | 4 | | // license information. |
| | | 5 | | // |
| | | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | | 8 | | // regenerated. |
| | | 9 | | // </auto-generated> |
| | | 10 | | |
| | | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models |
| | | 12 | | { |
| | | 13 | | using Newtonsoft.Json; |
| | | 14 | | using System.Linq; |
| | | 15 | | |
| | | 16 | | /// <summary> |
| | | 17 | | /// Prediction result. |
| | | 18 | | /// </summary> |
| | | 19 | | public partial class PredictionModel |
| | | 20 | | { |
| | | 21 | | /// <summary> |
| | | 22 | | /// Initializes a new instance of the PredictionModel class. |
| | | 23 | | /// </summary> |
| | 48 | 24 | | public PredictionModel() |
| | | 25 | | { |
| | | 26 | | CustomInit(); |
| | 48 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Initializes a new instance of the PredictionModel class. |
| | | 31 | | /// </summary> |
| | | 32 | | /// <param name="probability">Probability of the tag.</param> |
| | | 33 | | /// <param name="tagId">Id of the predicted tag.</param> |
| | | 34 | | /// <param name="tagName">Name of the predicted tag.</param> |
| | | 35 | | /// <param name="boundingBox">Bounding box of the prediction.</param> |
| | | 36 | | /// <param name="tagType">Type of the predicted tag. Possible values |
| | | 37 | | /// include: 'Regular', 'Negative', 'GeneralProduct'</param> |
| | 0 | 38 | | public PredictionModel(double probability = default(double), System.Guid tagId = default(System.Guid), string ta |
| | | 39 | | { |
| | 0 | 40 | | Probability = probability; |
| | 0 | 41 | | TagId = tagId; |
| | 0 | 42 | | TagName = tagName; |
| | 0 | 43 | | BoundingBox = boundingBox; |
| | 0 | 44 | | TagType = tagType; |
| | | 45 | | CustomInit(); |
| | 0 | 46 | | } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// An initialization method that performs custom operations like setting defaults |
| | | 50 | | /// </summary> |
| | | 51 | | partial void CustomInit(); |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets probability of the tag. |
| | | 55 | | /// </summary> |
| | | 56 | | [JsonProperty(PropertyName = "probability")] |
| | 96 | 57 | | public double Probability { get; private set; } |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Gets id of the predicted tag. |
| | | 61 | | /// </summary> |
| | | 62 | | [JsonProperty(PropertyName = "tagId")] |
| | 96 | 63 | | public System.Guid TagId { get; private set; } |
| | | 64 | | |
| | | 65 | | /// <summary> |
| | | 66 | | /// Gets name of the predicted tag. |
| | | 67 | | /// </summary> |
| | | 68 | | [JsonProperty(PropertyName = "tagName")] |
| | 96 | 69 | | public string TagName { get; private set; } |
| | | 70 | | |
| | | 71 | | /// <summary> |
| | | 72 | | /// Gets bounding box of the prediction. |
| | | 73 | | /// </summary> |
| | | 74 | | [JsonProperty(PropertyName = "boundingBox")] |
| | 240 | 75 | | public BoundingBox BoundingBox { get; private set; } |
| | | 76 | | |
| | | 77 | | /// <summary> |
| | | 78 | | /// Gets type of the predicted tag. Possible values include: 'Regular', |
| | | 79 | | /// 'Negative', 'GeneralProduct' |
| | | 80 | | /// </summary> |
| | | 81 | | [JsonProperty(PropertyName = "tagType")] |
| | 96 | 82 | | public string TagType { get; private set; } |
| | | 83 | | |
| | | 84 | | /// <summary> |
| | | 85 | | /// Validate the object. |
| | | 86 | | /// </summary> |
| | | 87 | | /// <exception cref="Rest.ValidationException"> |
| | | 88 | | /// Thrown if validation fails |
| | | 89 | | /// </exception> |
| | | 90 | | public virtual void Validate() |
| | | 91 | | { |
| | 0 | 92 | | if (BoundingBox != null) |
| | | 93 | | { |
| | 0 | 94 | | BoundingBox.Validate(); |
| | | 95 | | } |
| | 0 | 96 | | } |
| | | 97 | | } |
| | | 98 | | } |