|
5 | 5 | using Newtonsoft.Json; |
6 | 6 |
|
7 | 7 | /// <summary> |
8 | | - /// A personality that a user assumes when performing a specific set of operations. A role |
9 | | - /// includes a set of right and privileges. A user assuming that role inherits those rights |
10 | | - /// and privileges. |
| 8 | + /// This class models the JSON representation of an endpoint template resource in the OpenStack Identity Service V2. |
11 | 9 | /// </summary> |
12 | 10 | /// <remarks> |
13 | | - /// In OpenStack Identity Service, a token that is issued to a user includes the list of |
14 | | - /// roles that user can assume. Services that are being called by that user determine how |
15 | | - /// they interpret the set of roles a user has and to which operations or resources each |
16 | | - /// role grants access. |
| 11 | + /// <para>This object is part of the <c>OS-KSCATALOG</c> extension to the OpenStack Identity Service V2.</para> |
17 | 12 | /// </remarks> |
| 13 | + /// <seealso href="http://developer.openstack.org/api-ref-identity-v2.html#os-kscatalog-ext">OS-KSCATALOG admin extension (Identity API v2.0 - OpenStack Complete API Reference)</seealso> |
18 | 14 | /// <threadsafety static="true" instance="false"/> |
| 15 | + /// <preliminary/> |
19 | 16 | [JsonObject(MemberSerialization.OptIn)] |
20 | 17 | [DebuggerDisplay("{Id, nq}")] |
21 | | - public class EndpointTemplate |
| 18 | + public class EndpointTemplate : ExtensibleJsonObject |
22 | 19 | { |
23 | 20 | /// <summary> |
24 | | - /// Gets the unique identifier for the Endpoint Template. |
| 21 | + /// This is the backing field for the <see cref="Id"/> property. |
25 | 22 | /// </summary> |
26 | | - [JsonProperty("id")] |
27 | | - public string Id { get; private set; } |
| 23 | + [JsonProperty("id", DefaultValueHandling = DefaultValueHandling.Ignore)] |
| 24 | + private EndpointTemplateId _id; |
28 | 25 |
|
29 | | - public EndpointTemplate(string id) |
| 26 | + /// <summary> |
| 27 | + /// Initializes a new instance of the <see cref="EndpointTemplate"/> class |
| 28 | + /// during JSON deserialization. |
| 29 | + /// </summary> |
| 30 | + [JsonConstructor] |
| 31 | + protected EndpointTemplate() |
| 32 | + { |
| 33 | + } |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Initializes a new instance of the <see cref="EndpointTemplate"/> class with the specified endpoint template |
| 37 | + /// identifier. |
| 38 | + /// </summary> |
| 39 | + /// <param name="id">The unique identifier of the endpoint template.</param> |
| 40 | + /// <exception cref="ArgumentNullException">If <paramref name="id"/> is <see langword="null"/>.</exception> |
| 41 | + public EndpointTemplate(EndpointTemplateId id) |
30 | 42 | { |
31 | 43 | if (id == null) |
32 | 44 | throw new ArgumentNullException("id"); |
33 | 45 |
|
34 | | - Id = id; |
| 46 | + _id = id; |
| 47 | + } |
| 48 | + |
| 49 | + /// <summary> |
| 50 | + /// Gets the unique identifier for the endpoint template. |
| 51 | + /// </summary> |
| 52 | + /// <value> |
| 53 | + /// <para>The unique identifier for the endpoint template.</para> |
| 54 | + /// <token>NullIfNotIncluded</token> |
| 55 | + /// </value> |
| 56 | + public EndpointTemplateId Id |
| 57 | + { |
| 58 | + get |
| 59 | + { |
| 60 | + return _id; |
| 61 | + } |
35 | 62 | } |
36 | 63 | } |
37 | 64 | } |
38 | | - |
|
0 commit comments