| | 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 | | /// Request parameters for IsMemberOf API call. |
| | 21 | | /// </summary> |
| | 22 | | public partial class CheckGroupMembershipParameters |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the CheckGroupMembershipParameters |
| | 26 | | /// class. |
| | 27 | | /// </summary> |
| 0 | 28 | | public CheckGroupMembershipParameters() |
| | 29 | | { |
| | 30 | | CustomInit(); |
| 0 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Initializes a new instance of the CheckGroupMembershipParameters |
| | 35 | | /// class. |
| | 36 | | /// </summary> |
| | 37 | | /// <param name="groupId">The object ID of the group to check.</param> |
| | 38 | | /// <param name="memberId">The object ID of the contact, group, user, |
| | 39 | | /// or service principal to check for membership in the specified |
| | 40 | | /// group.</param> |
| | 41 | | /// <param name="additionalProperties">Unmatched properties from the |
| | 42 | | /// message are deserialized this collection</param> |
| 0 | 43 | | public CheckGroupMembershipParameters(string groupId, string memberId, IDictionary<string, object> additionalPro |
| | 44 | | { |
| 0 | 45 | | AdditionalProperties = additionalProperties; |
| 0 | 46 | | GroupId = groupId; |
| 0 | 47 | | MemberId = memberId; |
| | 48 | | CustomInit(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets unmatched properties from the message are deserialized |
| | 58 | | /// this collection |
| | 59 | | /// </summary> |
| | 60 | | [JsonExtensionData] |
| 0 | 61 | | public IDictionary<string, object> AdditionalProperties { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets the object ID of the group to check. |
| | 65 | | /// </summary> |
| | 66 | | [JsonProperty(PropertyName = "groupId")] |
| 0 | 67 | | public string GroupId { get; set; } |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets the object ID of the contact, group, user, or service |
| | 71 | | /// principal to check for membership in the specified group. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "memberId")] |
| 0 | 74 | | public string MemberId { get; set; } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Validate the object. |
| | 78 | | /// </summary> |
| | 79 | | /// <exception cref="ValidationException"> |
| | 80 | | /// Thrown if validation fails |
| | 81 | | /// </exception> |
| | 82 | | public virtual void Validate() |
| | 83 | | { |
| 0 | 84 | | if (GroupId == null) |
| | 85 | | { |
| 0 | 86 | | throw new ValidationException(ValidationRules.CannotBeNull, "GroupId"); |
| | 87 | | } |
| 0 | 88 | | if (MemberId == null) |
| | 89 | | { |
| 0 | 90 | | throw new ValidationException(ValidationRules.CannotBeNull, "MemberId"); |
| | 91 | | } |
| 0 | 92 | | } |
| | 93 | | } |
| | 94 | | } |