| | 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 Newtonsoft.Json; |
| | 14 | | using System.Linq; |
| | 15 | |
|
| | 16 | | public partial class OAuth2PermissionGrant |
| | 17 | | { |
| | 18 | | /// <summary> |
| | 19 | | /// Initializes a new instance of the OAuth2PermissionGrant class. |
| | 20 | | /// </summary> |
| 0 | 21 | | public OAuth2PermissionGrant() |
| | 22 | | { |
| | 23 | | CustomInit(); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the OAuth2PermissionGrant class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param |
| | 30 | | /// name="odatatype">Microsoft.DirectoryServices.OAuth2PermissionGrant</param> |
| | 31 | | /// <param name="clientId">The id of the resource's service principal |
| | 32 | | /// granted consent to impersonate the user when accessing the resource |
| | 33 | | /// (represented by the resourceId property).</param> |
| | 34 | | /// <param name="objectId">The id of the permission grant</param> |
| | 35 | | /// <param name="consentType">Indicates if consent was provided by the |
| | 36 | | /// administrator (on behalf of the organization) or by an individual. |
| | 37 | | /// Possible values include: 'AllPrincipals', 'Principal'</param> |
| | 38 | | /// <param name="principalId">When consent type is Principal, this |
| | 39 | | /// property specifies the id of the user that granted consent and |
| | 40 | | /// applies only for that user.</param> |
| | 41 | | /// <param name="resourceId">Object Id of the resource you want to |
| | 42 | | /// grant</param> |
| | 43 | | /// <param name="scope">Specifies the value of the scope claim that the |
| | 44 | | /// resource application should expect in the OAuth 2.0 access token. |
| | 45 | | /// For example, User.Read</param> |
| | 46 | | /// <param name="startTime">Start time for TTL</param> |
| | 47 | | /// <param name="expiryTime">Expiry time for TTL</param> |
| 0 | 48 | | public OAuth2PermissionGrant(string odatatype = default(string), string clientId = default(string), string objec |
| | 49 | | { |
| 0 | 50 | | Odatatype = odatatype; |
| 0 | 51 | | ClientId = clientId; |
| 0 | 52 | | ObjectId = objectId; |
| 0 | 53 | | ConsentType = consentType; |
| 0 | 54 | | PrincipalId = principalId; |
| 0 | 55 | | ResourceId = resourceId; |
| 0 | 56 | | Scope = scope; |
| 0 | 57 | | StartTime = startTime; |
| 0 | 58 | | ExpiryTime = expiryTime; |
| | 59 | | CustomInit(); |
| 0 | 60 | | } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// An initialization method that performs custom operations like setting defaults |
| | 64 | | /// </summary> |
| | 65 | | partial void CustomInit(); |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets microsoft.DirectoryServices.OAuth2PermissionGrant |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "odata.type")] |
| 0 | 71 | | public string Odatatype { get; set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Gets or sets the id of the resource's service principal granted |
| | 75 | | /// consent to impersonate the user when accessing the resource |
| | 76 | | /// (represented by the resourceId property). |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "clientId")] |
| 0 | 79 | | public string ClientId { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets the id of the permission grant |
| | 83 | | /// </summary> |
| | 84 | | [JsonProperty(PropertyName = "objectId")] |
| 0 | 85 | | public string ObjectId { get; set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets or sets indicates if consent was provided by the administrator |
| | 89 | | /// (on behalf of the organization) or by an individual. Possible |
| | 90 | | /// values include: 'AllPrincipals', 'Principal' |
| | 91 | | /// </summary> |
| | 92 | | [JsonProperty(PropertyName = "consentType")] |
| 0 | 93 | | public string ConsentType { get; set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// Gets or sets when consent type is Principal, this property |
| | 97 | | /// specifies the id of the user that granted consent and applies only |
| | 98 | | /// for that user. |
| | 99 | | /// </summary> |
| | 100 | | [JsonProperty(PropertyName = "principalId")] |
| 0 | 101 | | public string PrincipalId { get; set; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets or sets object Id of the resource you want to grant |
| | 105 | | /// </summary> |
| | 106 | | [JsonProperty(PropertyName = "resourceId")] |
| 0 | 107 | | public string ResourceId { get; set; } |
| | 108 | |
|
| | 109 | | /// <summary> |
| | 110 | | /// Gets or sets specifies the value of the scope claim that the |
| | 111 | | /// resource application should expect in the OAuth 2.0 access token. |
| | 112 | | /// For example, User.Read |
| | 113 | | /// </summary> |
| | 114 | | [JsonProperty(PropertyName = "scope")] |
| 0 | 115 | | public string Scope { get; set; } |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// Gets or sets start time for TTL |
| | 119 | | /// </summary> |
| | 120 | | [JsonProperty(PropertyName = "startTime")] |
| 0 | 121 | | public string StartTime { get; set; } |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// Gets or sets expiry time for TTL |
| | 125 | | /// </summary> |
| | 126 | | [JsonProperty(PropertyName = "expiryTime")] |
| 0 | 127 | | public string ExpiryTime { get; set; } |
| | 128 | |
|
| | 129 | | } |
| | 130 | | } |