| | 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 adding a member to a group. |
| | 21 | | /// </summary> |
| | 22 | | public partial class GroupAddMemberParameters |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the GroupAddMemberParameters class. |
| | 26 | | /// </summary> |
| 0 | 27 | | public GroupAddMemberParameters() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the GroupAddMemberParameters class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="url">A member object URL, such as |
| | 36 | | /// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293 |
| | 37 | | /// where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and |
| | 38 | | /// "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the |
| | 39 | | /// member (user, application, servicePrincipal, group) to be |
| | 40 | | /// added.</param> |
| | 41 | | /// <param name="additionalProperties">Unmatched properties from the |
| | 42 | | /// message are deserialized this collection</param> |
| 2 | 43 | | public GroupAddMemberParameters(string url, IDictionary<string, object> additionalProperties = default(IDictiona |
| | 44 | | { |
| 2 | 45 | | AdditionalProperties = additionalProperties; |
| 2 | 46 | | Url = url; |
| | 47 | | CustomInit(); |
| 2 | 48 | | } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// An initialization method that performs custom operations like setting defaults |
| | 52 | | /// </summary> |
| | 53 | | partial void CustomInit(); |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// Gets or sets unmatched properties from the message are deserialized |
| | 57 | | /// this collection |
| | 58 | | /// </summary> |
| | 59 | | [JsonExtensionData] |
| 4 | 60 | | public IDictionary<string, object> AdditionalProperties { get; set; } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Gets or sets a member object URL, such as |
| | 64 | | /// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293 |
| | 65 | | /// where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and |
| | 66 | | /// "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the |
| | 67 | | /// member (user, application, servicePrincipal, group) to be added. |
| | 68 | | /// </summary> |
| | 69 | | [JsonProperty(PropertyName = "url")] |
| 6 | 70 | | public string Url { get; set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Validate the object. |
| | 74 | | /// </summary> |
| | 75 | | /// <exception cref="ValidationException"> |
| | 76 | | /// Thrown if validation fails |
| | 77 | | /// </exception> |
| | 78 | | public virtual void Validate() |
| | 79 | | { |
| 2 | 80 | | if (Url == null) |
| | 81 | | { |
| 0 | 82 | | throw new ValidationException(ValidationRules.CannotBeNull, "Url"); |
| | 83 | | } |
| 2 | 84 | | } |
| | 85 | | } |
| | 86 | | } |