11using System . Collections . Generic ;
22using Newtonsoft . Json ;
3+ using Newtonsoft . Json . Linq ;
4+ using OpenStack . Serialization ;
35
46namespace OpenStack . Networking . v2
57{
@@ -10,7 +12,8 @@ namespace OpenStack.Networking.v2
1012 /// </para>
1113 /// </summary>
1214 /// <threadsafety static="true" instance="false"/>
13- public class Network : NetworkDefinition
15+ [ JsonConverterWithConstructor ( typeof ( RootWrapperConverter ) , "network" ) ]
16+ public class Network : IHaveExtraData , IServiceResource
1417 {
1518 /// <summary>
1619 /// The network identifier.
@@ -19,23 +22,29 @@ public class Network : NetworkDefinition
1922 public Identifier Id { get ; set ; }
2023
2124 /// <summary>
22- /// The administrative state of the network.
25+ /// The network name .
2326 /// </summary>
24- [ JsonProperty ( "admin_state_up " ) ]
25- public bool IsUp { get ; set ; }
27+ [ JsonProperty ( "name " ) ]
28+ public string Name { get ; set ; }
2629
2730 /// <summary>
28- /// The tenant identifier .
31+ /// The administrative state of the network .
2932 /// </summary>
30- [ JsonProperty ( "tenant_id " ) ]
31- public string TenantId { get ; set ; }
33+ [ JsonProperty ( "admin_state_up " ) ]
34+ public bool IsUp { get ; set ; }
3235
3336 /// <summary>
3437 /// Indicates whether this network is shared across all tenants.
3538 /// </summary>
3639 [ JsonProperty ( "shared" ) ]
3740 public bool IsShared { get ; set ; }
3841
42+ /// <summary>
43+ /// Indicates whether this network is externally accessible.
44+ /// </summary>
45+ [ JsonProperty ( "router:external" ) ]
46+ public bool IsExternal { get ; set ; }
47+
3948 /// <summary>
4049 /// The network status.
4150 /// </summary>
@@ -46,6 +55,11 @@ public class Network : NetworkDefinition
4655 /// The associated subnet identifiers.
4756 /// </summary>
4857 [ JsonProperty ( "subnets" ) ]
49- public IList < Identifier > Subnets { get ; set ; }
58+ public IList < Identifier > Subnets { get ; set ; }
59+
60+ [ JsonExtensionData ]
61+ IDictionary < string , JToken > IHaveExtraData . Data { get ; set ; } = new Dictionary < string , JToken > ( ) ;
62+
63+ object IServiceResource . Owner { get ; set ; }
5064 }
5165}
0 commit comments