| | 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.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Linq; |
| | 16 | |
|
| | 17 | | /// <summary> |
| | 18 | | /// Represents a project. |
| | 19 | | /// </summary> |
| | 20 | | public partial class Project |
| | 21 | | { |
| | 22 | | /// <summary> |
| | 23 | | /// Initializes a new instance of the Project class. |
| | 24 | | /// </summary> |
| 92 | 25 | | public Project() |
| | 26 | | { |
| | 27 | | CustomInit(); |
| 92 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Initializes a new instance of the Project class. |
| | 32 | | /// </summary> |
| | 33 | | /// <param name="name">Gets or sets the name of the project.</param> |
| | 34 | | /// <param name="description">Gets or sets the description of the |
| | 35 | | /// project.</param> |
| | 36 | | /// <param name="settings">Gets or sets the project settings.</param> |
| | 37 | | /// <param name="id">Gets the project id.</param> |
| | 38 | | /// <param name="created">Gets the date this project was |
| | 39 | | /// created.</param> |
| | 40 | | /// <param name="lastModified">Gets the date this project was last |
| | 41 | | /// modified.</param> |
| | 42 | | /// <param name="thumbnailUri">Gets the thumbnail url representing the |
| | 43 | | /// image. If VNET feature is enabled this will be a relative path to |
| | 44 | | /// be used with GetArtifact, otherwise this will be an absolute URI to |
| | 45 | | /// the resource.</param> |
| | 46 | | /// <param name="drModeEnabled">Gets if the Disaster Recovery (DR) mode |
| | 47 | | /// is on, indicating the project is temporarily read-only.</param> |
| | 48 | | /// <param name="status">Gets the status of the project. Possible |
| | 49 | | /// values include: 'Succeeded', 'Importing', 'Failed'</param> |
| 0 | 50 | | public Project(string name, string description, ProjectSettings settings, System.Guid id = default(System.Guid), |
| | 51 | | { |
| 0 | 52 | | Id = id; |
| 0 | 53 | | Name = name; |
| 0 | 54 | | Description = description; |
| 0 | 55 | | Settings = settings; |
| 0 | 56 | | Created = created; |
| 0 | 57 | | LastModified = lastModified; |
| 0 | 58 | | ThumbnailUri = thumbnailUri; |
| 0 | 59 | | DrModeEnabled = drModeEnabled; |
| 0 | 60 | | Status = status; |
| | 61 | | CustomInit(); |
| 0 | 62 | | } |
| | 63 | |
|
| | 64 | | /// <summary> |
| | 65 | | /// An initialization method that performs custom operations like setting defaults |
| | 66 | | /// </summary> |
| | 67 | | partial void CustomInit(); |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets the project id. |
| | 71 | | /// </summary> |
| | 72 | | [JsonProperty(PropertyName = "id")] |
| 158 | 73 | | public System.Guid Id { get; private set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets the name of the project. |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "name")] |
| 104 | 79 | | public string Name { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets the description of the project. |
| | 83 | | /// </summary> |
| | 84 | | [JsonProperty(PropertyName = "description")] |
| 102 | 85 | | public string Description { get; set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets or sets the project settings. |
| | 89 | | /// </summary> |
| | 90 | | [JsonProperty(PropertyName = "settings")] |
| 208 | 91 | | public ProjectSettings Settings { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets the date this project was created. |
| | 95 | | /// </summary> |
| | 96 | | [JsonProperty(PropertyName = "created")] |
| 0 | 97 | | public System.DateTime Created { get; private set; } |
| | 98 | |
|
| | 99 | | /// <summary> |
| | 100 | | /// Gets the date this project was last modified. |
| | 101 | | /// </summary> |
| | 102 | | [JsonProperty(PropertyName = "lastModified")] |
| 0 | 103 | | public System.DateTime LastModified { get; private set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Gets the thumbnail url representing the image. If VNET feature is |
| | 107 | | /// enabled this will be a relative path to be used with GetArtifact, |
| | 108 | | /// otherwise this will be an absolute URI to the resource. |
| | 109 | | /// </summary> |
| | 110 | | [JsonProperty(PropertyName = "thumbnailUri")] |
| 0 | 111 | | public string ThumbnailUri { get; private set; } |
| | 112 | |
|
| | 113 | | /// <summary> |
| | 114 | | /// Gets if the Disaster Recovery (DR) mode is on, indicating the |
| | 115 | | /// project is temporarily read-only. |
| | 116 | | /// </summary> |
| | 117 | | [JsonProperty(PropertyName = "drModeEnabled")] |
| 96 | 118 | | public bool? DrModeEnabled { get; private set; } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// Gets the status of the project. Possible values include: |
| | 122 | | /// 'Succeeded', 'Importing', 'Failed' |
| | 123 | | /// </summary> |
| | 124 | | [JsonProperty(PropertyName = "status")] |
| 98 | 125 | | public string Status { get; set; } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// Validate the object. |
| | 129 | | /// </summary> |
| | 130 | | /// <exception cref="ValidationException"> |
| | 131 | | /// Thrown if validation fails |
| | 132 | | /// </exception> |
| | 133 | | public virtual void Validate() |
| | 134 | | { |
| 0 | 135 | | if (Name == null) |
| | 136 | | { |
| 0 | 137 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | 138 | | } |
| 0 | 139 | | if (Description == null) |
| | 140 | | { |
| 0 | 141 | | throw new ValidationException(ValidationRules.CannotBeNull, "Description"); |
| | 142 | | } |
| 0 | 143 | | if (Settings == null) |
| | 144 | | { |
| 0 | 145 | | throw new ValidationException(ValidationRules.CannotBeNull, "Settings"); |
| | 146 | | } |
| 0 | 147 | | } |
| | 148 | | } |
| | 149 | | } |