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