| | 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.Graph.RBAC.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Collections; |
| | 16 | | using System.Collections.Generic; |
| | 17 | | using System.Linq; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Active Directory Domain information. |
| | 21 | | /// </summary> |
| | 22 | | public partial class Domain |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the Domain class. |
| | 26 | | /// </summary> |
| 0 | 27 | | public Domain() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the Domain class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="name">the domain name.</param> |
| | 36 | | /// <param name="additionalProperties">Unmatched properties from the |
| | 37 | | /// message are deserialized this collection</param> |
| | 38 | | /// <param name="authenticationType">the type of the authentication |
| | 39 | | /// into the domain.</param> |
| | 40 | | /// <param name="isDefault">if this is the default domain in the |
| | 41 | | /// tenant.</param> |
| | 42 | | /// <param name="isVerified">if this domain's ownership is |
| | 43 | | /// verified.</param> |
| 0 | 44 | | public Domain(string name, IDictionary<string, object> additionalProperties = default(IDictionary<string, object |
| | 45 | | { |
| 0 | 46 | | AdditionalProperties = additionalProperties; |
| 0 | 47 | | AuthenticationType = authenticationType; |
| 0 | 48 | | IsDefault = isDefault; |
| 0 | 49 | | IsVerified = isVerified; |
| 0 | 50 | | Name = name; |
| | 51 | | CustomInit(); |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// An initialization method that performs custom operations like setting defaults |
| | 56 | | /// </summary> |
| | 57 | | partial void CustomInit(); |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// Gets or sets unmatched properties from the message are deserialized |
| | 61 | | /// this collection |
| | 62 | | /// </summary> |
| | 63 | | [JsonExtensionData] |
| 0 | 64 | | public IDictionary<string, object> AdditionalProperties { get; set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets the type of the authentication into the domain. |
| | 68 | | /// </summary> |
| | 69 | | [JsonProperty(PropertyName = "authenticationType")] |
| 0 | 70 | | public string AuthenticationType { get; private set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets if this is the default domain in the tenant. |
| | 74 | | /// </summary> |
| | 75 | | [JsonProperty(PropertyName = "isDefault")] |
| 0 | 76 | | public bool? IsDefault { get; private set; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets if this domain's ownership is verified. |
| | 80 | | /// </summary> |
| | 81 | | [JsonProperty(PropertyName = "isVerified")] |
| 0 | 82 | | public bool? IsVerified { get; private set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets or sets the domain name. |
| | 86 | | /// </summary> |
| | 87 | | [JsonProperty(PropertyName = "name")] |
| 0 | 88 | | public string Name { get; set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Validate the object. |
| | 92 | | /// </summary> |
| | 93 | | /// <exception cref="ValidationException"> |
| | 94 | | /// Thrown if validation fails |
| | 95 | | /// </exception> |
| | 96 | | public virtual void Validate() |
| | 97 | | { |
| 0 | 98 | | if (Name == null) |
| | 99 | | { |
| 0 | 100 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | 101 | | } |
| 0 | 102 | | } |
| | 103 | | } |
| | 104 | | } |