Example #1
0
 internal VpnConnection(string id, string name, string etag, SubResource remoteVpnSite, int?routingWeight, int?dpdTimeoutSeconds, VpnConnectionStatus?connectionStatus, VirtualNetworkGatewayConnectionProtocol?vpnConnectionProtocolType, long?ingressBytesTransferred, long?egressBytesTransferred, int?connectionBandwidth, string sharedKey, bool?enableBgp, bool?usePolicyBasedTrafficSelectors, IList <IpsecPolicy> ipsecPolicies, bool?enableRateLimiting, bool?enableInternetSecurity, bool?useLocalAzureIpAddress, ProvisioningState?provisioningState, IList <VpnSiteLinkConnection> vpnLinkConnections, RoutingConfiguration routingConfiguration) : base(id)
 {
     Name                           = name;
     Etag                           = etag;
     RemoteVpnSite                  = remoteVpnSite;
     RoutingWeight                  = routingWeight;
     DpdTimeoutSeconds              = dpdTimeoutSeconds;
     ConnectionStatus               = connectionStatus;
     VpnConnectionProtocolType      = vpnConnectionProtocolType;
     IngressBytesTransferred        = ingressBytesTransferred;
     EgressBytesTransferred         = egressBytesTransferred;
     ConnectionBandwidth            = connectionBandwidth;
     SharedKey                      = sharedKey;
     EnableBgp                      = enableBgp;
     UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors;
     IpsecPolicies                  = ipsecPolicies;
     EnableRateLimiting             = enableRateLimiting;
     EnableInternetSecurity         = enableInternetSecurity;
     UseLocalAzureIpAddress         = useLocalAzureIpAddress;
     ProvisioningState              = provisioningState;
     VpnLinkConnections             = vpnLinkConnections;
     RoutingConfiguration           = routingConfiguration;
 }
        internal static VpnConnection DeserializeVpnConnection(JsonElement element)
        {
            Optional <string>              name              = default;
            Optional <string>              etag              = default;
            Optional <string>              id                = default;
            Optional <SubResource>         remoteVpnSite     = default;
            Optional <int>                 routingWeight     = default;
            Optional <int>                 dpdTimeoutSeconds = default;
            Optional <VpnConnectionStatus> connectionStatus  = default;
            Optional <VirtualNetworkGatewayConnectionProtocol> vpnConnectionProtocolType = default;
            Optional <long>   ingressBytesTransferred = default;
            Optional <long>   egressBytesTransferred  = default;
            Optional <int>    connectionBandwidth     = default;
            Optional <string> sharedKey = default;
            Optional <bool>   enableBgp = default;
            Optional <bool>   usePolicyBasedTrafficSelectors = default;
            Optional <IList <IpsecPolicy> > ipsecPolicies    = default;
            Optional <bool> enableRateLimiting             = default;
            Optional <bool> enableInternetSecurity         = default;
            Optional <bool> useLocalAzureIpAddress         = default;
            Optional <ProvisioningState> provisioningState = default;
            Optional <IList <VpnSiteLinkConnection> > vpnLinkConnections   = default;
            Optional <RoutingConfiguration>           routingConfiguration = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("remoteVpnSite"))
                        {
                            remoteVpnSite = DeserializeSubResource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("routingWeight"))
                        {
                            routingWeight = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("dpdTimeoutSeconds"))
                        {
                            dpdTimeoutSeconds = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("connectionStatus"))
                        {
                            connectionStatus = new VpnConnectionStatus(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("vpnConnectionProtocolType"))
                        {
                            vpnConnectionProtocolType = new VirtualNetworkGatewayConnectionProtocol(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("ingressBytesTransferred"))
                        {
                            ingressBytesTransferred = property0.Value.GetInt64();
                            continue;
                        }
                        if (property0.NameEquals("egressBytesTransferred"))
                        {
                            egressBytesTransferred = property0.Value.GetInt64();
                            continue;
                        }
                        if (property0.NameEquals("connectionBandwidth"))
                        {
                            connectionBandwidth = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("sharedKey"))
                        {
                            sharedKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("enableBgp"))
                        {
                            enableBgp = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("usePolicyBasedTrafficSelectors"))
                        {
                            usePolicyBasedTrafficSelectors = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("ipsecPolicies"))
                        {
                            List <IpsecPolicy> array = new List <IpsecPolicy>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(IpsecPolicy.DeserializeIpsecPolicy(item));
                            }
                            ipsecPolicies = array;
                            continue;
                        }
                        if (property0.NameEquals("enableRateLimiting"))
                        {
                            enableRateLimiting = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("enableInternetSecurity"))
                        {
                            enableInternetSecurity = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("useLocalAzureIpAddress"))
                        {
                            useLocalAzureIpAddress = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("vpnLinkConnections"))
                        {
                            List <VpnSiteLinkConnection> array = new List <VpnSiteLinkConnection>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(VpnSiteLinkConnection.DeserializeVpnSiteLinkConnection(item));
                            }
                            vpnLinkConnections = array;
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new VpnConnection(id.Value, name.Value, etag.Value, remoteVpnSite.Value, Optional.ToNullable(routingWeight), Optional.ToNullable(dpdTimeoutSeconds), Optional.ToNullable(connectionStatus), Optional.ToNullable(vpnConnectionProtocolType), Optional.ToNullable(ingressBytesTransferred), Optional.ToNullable(egressBytesTransferred), Optional.ToNullable(connectionBandwidth), sharedKey.Value, Optional.ToNullable(enableBgp), Optional.ToNullable(usePolicyBasedTrafficSelectors), Optional.ToList(ipsecPolicies), Optional.ToNullable(enableRateLimiting), Optional.ToNullable(enableInternetSecurity), Optional.ToNullable(useLocalAzureIpAddress), Optional.ToNullable(provisioningState), Optional.ToList(vpnLinkConnections), routingConfiguration.Value));
        }
Example #3
0
        internal static VpnConnection DeserializeVpnConnection(JsonElement element)
        {
            string              name              = default;
            string              etag              = default;
            string              id                = default;
            SubResource         remoteVpnSite     = default;
            int?                routingWeight     = default;
            int?                dpdTimeoutSeconds = default;
            VpnConnectionStatus?connectionStatus  = default;
            VirtualNetworkGatewayConnectionProtocol?vpnConnectionProtocolType = default;
            long?  ingressBytesTransferred = default;
            long?  egressBytesTransferred  = default;
            int?   connectionBandwidth     = default;
            string sharedKey = default;
            bool?  enableBgp = default;
            bool?  usePolicyBasedTrafficSelectors = default;
            IList <IpsecPolicy> ipsecPolicies     = default;
            bool?enableRateLimiting     = default;
            bool?enableInternetSecurity = default;
            bool?useLocalAzureIpAddress = default;
            ProvisioningState?            provisioningState    = default;
            IList <VpnSiteLinkConnection> vpnLinkConnections   = default;
            RoutingConfiguration          routingConfiguration = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("remoteVpnSite"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            remoteVpnSite = DeserializeSubResource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("routingWeight"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            routingWeight = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("dpdTimeoutSeconds"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            dpdTimeoutSeconds = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("connectionStatus"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            connectionStatus = new VpnConnectionStatus(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("vpnConnectionProtocolType"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            vpnConnectionProtocolType = new VirtualNetworkGatewayConnectionProtocol(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("ingressBytesTransferred"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            ingressBytesTransferred = property0.Value.GetInt64();
                            continue;
                        }
                        if (property0.NameEquals("egressBytesTransferred"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            egressBytesTransferred = property0.Value.GetInt64();
                            continue;
                        }
                        if (property0.NameEquals("connectionBandwidth"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            connectionBandwidth = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("sharedKey"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            sharedKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("enableBgp"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            enableBgp = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("usePolicyBasedTrafficSelectors"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            usePolicyBasedTrafficSelectors = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("ipsecPolicies"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <IpsecPolicy> array = new List <IpsecPolicy>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(IpsecPolicy.DeserializeIpsecPolicy(item));
                                }
                            }
                            ipsecPolicies = array;
                            continue;
                        }
                        if (property0.NameEquals("enableRateLimiting"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            enableRateLimiting = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("enableInternetSecurity"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            enableInternetSecurity = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("useLocalAzureIpAddress"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            useLocalAzureIpAddress = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("vpnLinkConnections"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <VpnSiteLinkConnection> array = new List <VpnSiteLinkConnection>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(VpnSiteLinkConnection.DeserializeVpnSiteLinkConnection(item));
                                }
                            }
                            vpnLinkConnections = array;
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new VpnConnection(id, name, etag, remoteVpnSite, routingWeight, dpdTimeoutSeconds, connectionStatus, vpnConnectionProtocolType, ingressBytesTransferred, egressBytesTransferred, connectionBandwidth, sharedKey, enableBgp, usePolicyBasedTrafficSelectors, ipsecPolicies, enableRateLimiting, enableInternetSecurity, useLocalAzureIpAddress, provisioningState, vpnLinkConnections, routingConfiguration));
        }
        internal static ExpressRouteConnection DeserializeExpressRouteConnection(JsonElement element)
        {
            string                                  name = default;
            Optional <string>                       id   = default;
            Optional <ProvisioningState>            provisioningState          = default;
            Optional <ExpressRouteCircuitPeeringId> expressRouteCircuitPeering = default;
            Optional <string>                       authorizationKey           = default;
            Optional <int>                          routingWeight          = default;
            Optional <bool>                         enableInternetSecurity = default;
            Optional <RoutingConfiguration>         routingConfiguration   = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("provisioningState"))
                        {
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("expressRouteCircuitPeering"))
                        {
                            expressRouteCircuitPeering = ExpressRouteCircuitPeeringId.DeserializeExpressRouteCircuitPeeringId(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("authorizationKey"))
                        {
                            authorizationKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("routingWeight"))
                        {
                            routingWeight = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("enableInternetSecurity"))
                        {
                            enableInternetSecurity = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new ExpressRouteConnection(id.Value, name, Optional.ToNullable(provisioningState), expressRouteCircuitPeering.Value, authorizationKey.Value, Optional.ToNullable(routingWeight), Optional.ToNullable(enableInternetSecurity), routingConfiguration.Value));
        }
        internal static HubVirtualNetworkConnection DeserializeHubVirtualNetworkConnection(JsonElement element)
        {
            Optional <string>               name = default;
            Optional <string>               etag = default;
            Optional <string>               id   = default;
            Optional <SubResource>          remoteVirtualNetwork                = default;
            Optional <bool>                 allowHubToRemoteVnetTransit         = default;
            Optional <bool>                 allowRemoteVnetToUseHubVnetGateways = default;
            Optional <bool>                 enableInternetSecurity              = default;
            Optional <RoutingConfiguration> routingConfiguration                = default;
            Optional <ProvisioningState>    provisioningState = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("remoteVirtualNetwork"))
                        {
                            remoteVirtualNetwork = DeserializeSubResource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("allowHubToRemoteVnetTransit"))
                        {
                            allowHubToRemoteVnetTransit = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("allowRemoteVnetToUseHubVnetGateways"))
                        {
                            allowRemoteVnetToUseHubVnetGateways = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("enableInternetSecurity"))
                        {
                            enableInternetSecurity = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new HubVirtualNetworkConnection(id.Value, name.Value, etag.Value, remoteVirtualNetwork.Value, Optional.ToNullable(allowHubToRemoteVnetTransit), Optional.ToNullable(allowRemoteVnetToUseHubVnetGateways), Optional.ToNullable(enableInternetSecurity), routingConfiguration.Value, Optional.ToNullable(provisioningState)));
        }
Example #6
0
        internal static P2SConnectionConfiguration DeserializeP2SConnectionConfiguration(JsonElement element)
        {
            string               name = default;
            string               etag = default;
            string               id   = default;
            AddressSpace         vpnClientAddressPool = default;
            RoutingConfiguration routingConfiguration = default;
            ProvisioningState?   provisioningState    = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("etag"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("vpnClientAddressPool"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            vpnClientAddressPool = AddressSpace.DeserializeAddressSpace(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new P2SConnectionConfiguration(id, name, etag, vpnClientAddressPool, routingConfiguration, provisioningState));
        }
Example #7
0
 internal ExpressRouteConnection(string id, string name, ProvisioningState?provisioningState, ExpressRouteCircuitPeeringId expressRouteCircuitPeering, string authorizationKey, int?routingWeight, bool?enableInternetSecurity, RoutingConfiguration routingConfiguration) : base(id)
 {
     Name = name;
     ProvisioningState          = provisioningState;
     ExpressRouteCircuitPeering = expressRouteCircuitPeering;
     AuthorizationKey           = authorizationKey;
     RoutingWeight          = routingWeight;
     EnableInternetSecurity = enableInternetSecurity;
     RoutingConfiguration   = routingConfiguration;
 }
        internal static ExpressRouteConnection DeserializeExpressRouteConnection(JsonElement element)
        {
            string                       name = default;
            string                       id   = default;
            ProvisioningState?           provisioningState          = default;
            ExpressRouteCircuitPeeringId expressRouteCircuitPeering = default;
            string                       authorizationKey           = default;
            int? routingWeight          = default;
            bool?enableInternetSecurity = default;
            RoutingConfiguration routingConfiguration = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("expressRouteCircuitPeering"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            expressRouteCircuitPeering = ExpressRouteCircuitPeeringId.DeserializeExpressRouteCircuitPeeringId(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("authorizationKey"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            authorizationKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("routingWeight"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            routingWeight = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("enableInternetSecurity"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            enableInternetSecurity = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("routingConfiguration"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            routingConfiguration = RoutingConfiguration.DeserializeRoutingConfiguration(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new ExpressRouteConnection(id, name, provisioningState, expressRouteCircuitPeering, authorizationKey, routingWeight, enableInternetSecurity, routingConfiguration));
        }