Пример #1
0
        public ActivityLogger(SystemData systemData, SystemLogger systemLogger)
        {
            _systemData = systemData;
            _systemLogger = systemLogger;

            _systemData.PositionManager.OrderSubmitted += new EventHandler<OrderUpdatedEventArgs>(PositionManager_OrderSubmitted);
            _systemData.PositionManager.OrderFilled += new EventHandler<OrderFilledEventArgs>(PositionManager_OrderFilled);
            _systemData.PositionManager.OrderUpdated += new EventHandler<OrderUpdatedEventArgs>(PositionManager_OrderUpdated);
            _systemData.PositionManager.SpecialOrderFailed += new EventHandler<OrderUpdatedEventArgs>(PositionManager_SpecialOrderFailed);
        }
        internal static StorageAccountData DeserializeStorageAccountData(JsonElement element)
        {
            Optional <Models.Sku>             sku              = default;
            Optional <Kind>                   kind             = default;
            Optional <ManagedServiceIdentity> identity         = default;
            Optional <ExtendedLocation>       extendedLocation = default;
            IDictionary <string, string>      tags             = default;
            AzureLocation                location              = default;
            ResourceIdentifier           id                  = default;
            string                       name                = default;
            ResourceType                 type                = default;
            SystemData                   systemData          = default;
            Optional <ProvisioningState> provisioningState   = default;
            Optional <Endpoints>         primaryEndpoints    = default;
            Optional <string>            primaryLocation     = default;
            Optional <AccountStatus>     statusOfPrimary     = default;
            Optional <DateTimeOffset>    lastGeoFailoverTime = default;
            Optional <string>            secondaryLocation   = default;
            Optional <AccountStatus>     statusOfSecondary   = default;
            Optional <DateTimeOffset>    creationTime        = default;
            Optional <CustomDomain>      customDomain        = default;
            Optional <SasPolicy>         sasPolicy           = default;
            Optional <KeyPolicy>         keyPolicy           = default;
            Optional <KeyCreationTime>   keyCreationTime     = default;
            Optional <Endpoints>         secondaryEndpoints  = default;
            Optional <Encryption>        encryption          = default;
            Optional <AccessTier>        accessTier          = default;
            Optional <AzureFilesIdentityBasedAuthentication> azureFilesIdentityBasedAuthentication = default;
            Optional <bool>                 supportsHttpsTrafficOnly = default;
            Optional <NetworkRuleSet>       networkAcls          = default;
            Optional <bool>                 isSftpEnabled        = default;
            Optional <bool>                 isLocalUserEnabled   = default;
            Optional <bool>                 isHnsEnabled         = default;
            Optional <GeoReplicationStats>  geoReplicationStats  = default;
            Optional <bool>                 failoverInProgress   = default;
            Optional <LargeFileSharesState> largeFileSharesState = default;
            Optional <IReadOnlyList <PrivateEndpointConnectionData> > privateEndpointConnections = default;
            Optional <RoutingPreference> routingPreference = default;
            Optional <BlobRestoreStatus> blobRestoreStatus = default;
            Optional <bool> allowBlobPublicAccess          = default;
            Optional <MinimumTlsVersion> minimumTlsVersion = default;
            Optional <bool> allowSharedKeyAccess           = default;
            Optional <bool> isNfsV3Enabled = default;
            Optional <bool> allowCrossTenantReplication                       = default;
            Optional <bool> defaultToOAuthAuthentication                      = default;
            Optional <PublicNetworkAccess>     publicNetworkAccess            = default;
            Optional <ImmutableStorageAccount> immutableStorageWithVersioning = default;
            Optional <AllowedCopyScope>        allowedCopyScope               = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("sku"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    sku = Models.Sku.DeserializeSku(property.Value);
                    continue;
                }
                if (property.NameEquals("kind"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    kind = new Kind(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("identity"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    var serializeOptions = new JsonSerializerOptions {
                        Converters = { new ManagedServiceIdentityTypeV3Converter() }
                    };
                    identity = JsonSerializer.Deserialize <ManagedServiceIdentity>(property.Value.ToString(), serializeOptions);
                    continue;
                }
                if (property.NameEquals("extendedLocation"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    extendedLocation = ExtendedLocation.DeserializeExtendedLocation(property.Value);
                    continue;
                }
                if (property.NameEquals("tags"))
                {
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, property0.Value.GetString());
                    }
                    tags = dictionary;
                    continue;
                }
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            provisioningState = property0.Value.GetString().ToProvisioningState();
                            continue;
                        }
                        if (property0.NameEquals("primaryEndpoints"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            primaryEndpoints = Endpoints.DeserializeEndpoints(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("primaryLocation"))
                        {
                            primaryLocation = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("statusOfPrimary"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            statusOfPrimary = property0.Value.GetString().ToAccountStatus();
                            continue;
                        }
                        if (property0.NameEquals("lastGeoFailoverTime"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            lastGeoFailoverTime = property0.Value.GetDateTimeOffset("O");
                            continue;
                        }
                        if (property0.NameEquals("secondaryLocation"))
                        {
                            secondaryLocation = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("statusOfSecondary"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            statusOfSecondary = property0.Value.GetString().ToAccountStatus();
                            continue;
                        }
                        if (property0.NameEquals("creationTime"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            creationTime = property0.Value.GetDateTimeOffset("O");
                            continue;
                        }
                        if (property0.NameEquals("customDomain"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            customDomain = CustomDomain.DeserializeCustomDomain(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("sasPolicy"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            sasPolicy = SasPolicy.DeserializeSasPolicy(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("keyPolicy"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            keyPolicy = KeyPolicy.DeserializeKeyPolicy(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("keyCreationTime"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            keyCreationTime = KeyCreationTime.DeserializeKeyCreationTime(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("secondaryEndpoints"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            secondaryEndpoints = Endpoints.DeserializeEndpoints(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("encryption"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            encryption = Encryption.DeserializeEncryption(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("accessTier"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            accessTier = property0.Value.GetString().ToAccessTier();
                            continue;
                        }
                        if (property0.NameEquals("azureFilesIdentityBasedAuthentication"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            azureFilesIdentityBasedAuthentication = AzureFilesIdentityBasedAuthentication.DeserializeAzureFilesIdentityBasedAuthentication(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("supportsHttpsTrafficOnly"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            supportsHttpsTrafficOnly = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("networkAcls"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            networkAcls = NetworkRuleSet.DeserializeNetworkRuleSet(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("isSftpEnabled"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            isSftpEnabled = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("isLocalUserEnabled"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            isLocalUserEnabled = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("isHnsEnabled"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            isHnsEnabled = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("geoReplicationStats"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            geoReplicationStats = GeoReplicationStats.DeserializeGeoReplicationStats(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("failoverInProgress"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            failoverInProgress = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("largeFileSharesState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            largeFileSharesState = new LargeFileSharesState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("privateEndpointConnections"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <PrivateEndpointConnectionData> array = new List <PrivateEndpointConnectionData>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(PrivateEndpointConnectionData.DeserializePrivateEndpointConnectionData(item));
                            }
                            privateEndpointConnections = array;
                            continue;
                        }
                        if (property0.NameEquals("routingPreference"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            routingPreference = RoutingPreference.DeserializeRoutingPreference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("blobRestoreStatus"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            blobRestoreStatus = BlobRestoreStatus.DeserializeBlobRestoreStatus(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("allowBlobPublicAccess"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            allowBlobPublicAccess = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("minimumTlsVersion"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            minimumTlsVersion = new MinimumTlsVersion(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("allowSharedKeyAccess"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            allowSharedKeyAccess = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("isNfsV3Enabled"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            isNfsV3Enabled = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("allowCrossTenantReplication"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            allowCrossTenantReplication = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("defaultToOAuthAuthentication"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            defaultToOAuthAuthentication = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("publicNetworkAccess"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("immutableStorageWithVersioning"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            immutableStorageWithVersioning = ImmutableStorageAccount.DeserializeImmutableStorageAccount(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("allowedCopyScope"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            allowedCopyScope = new AllowedCopyScope(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new StorageAccountData(id, name, type, systemData, tags, location, sku.Value, Optional.ToNullable(kind), identity, extendedLocation.Value, Optional.ToNullable(provisioningState), primaryEndpoints.Value, primaryLocation.Value, Optional.ToNullable(statusOfPrimary), Optional.ToNullable(lastGeoFailoverTime), secondaryLocation.Value, Optional.ToNullable(statusOfSecondary), Optional.ToNullable(creationTime), customDomain.Value, sasPolicy.Value, keyPolicy.Value, keyCreationTime.Value, secondaryEndpoints.Value, encryption.Value, Optional.ToNullable(accessTier), azureFilesIdentityBasedAuthentication.Value, Optional.ToNullable(supportsHttpsTrafficOnly), networkAcls.Value, Optional.ToNullable(isSftpEnabled), Optional.ToNullable(isLocalUserEnabled), Optional.ToNullable(isHnsEnabled), geoReplicationStats.Value, Optional.ToNullable(failoverInProgress), Optional.ToNullable(largeFileSharesState), Optional.ToList(privateEndpointConnections), routingPreference.Value, blobRestoreStatus.Value, Optional.ToNullable(allowBlobPublicAccess), Optional.ToNullable(minimumTlsVersion), Optional.ToNullable(allowSharedKeyAccess), Optional.ToNullable(isNfsV3Enabled), Optional.ToNullable(allowCrossTenantReplication), Optional.ToNullable(defaultToOAuthAuthentication), Optional.ToNullable(publicNetworkAccess), immutableStorageWithVersioning.Value, Optional.ToNullable(allowedCopyScope)));
        }
Пример #3
0
 internal ConsumerGroupData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, string location, DateTimeOffset?createdAt, DateTimeOffset?updatedAt, string userMetadata) : base(id, name, type, systemData, location)
 {
     CreatedAt    = createdAt;
     UpdatedAt    = updatedAt;
     UserMetadata = userMetadata;
 }
Пример #4
0
 internal ClusterResourceData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, SystemAssignedServiceIdentity identity, ClusterResourceProperties properties) : base(id, name, type, systemData, tags, location, identity)
 {
     Properties = properties;
 }
Пример #5
0
 internal ServerCommunicationLinkData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, string location, string kind, string state, string partnerServer) : base(id, name, type, systemData)
 {
     Location      = location;
     Kind          = kind;
     State         = state;
     PartnerServer = partnerServer;
 }
Пример #6
0
 internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string instanceNo, ResourceIdentifier subnetId, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long?gatewayPort, long?icmHttpPort, long?icmHttpsPort, ResourceIdentifier virtualMachineId, SapVirtualInstanceStatus?status, SapHealthState?health, SapVirtualInstanceProvisioningState?provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location)
 {
     InstanceNo        = instanceNo;
     SubnetId          = subnetId;
     Hostname          = hostname;
     KernelVersion     = kernelVersion;
     KernelPatch       = kernelPatch;
     IPAddress         = ipAddress;
     GatewayPort       = gatewayPort;
     IcmHttpPort       = icmHttpPort;
     IcmHttpsPort      = icmHttpsPort;
     VirtualMachineId  = virtualMachineId;
     Status            = status;
     Health            = health;
     ProvisioningState = provisioningState;
     Errors            = errors;
 }
Пример #7
0
        internal string GetNewSystems(SQLiteDBClass db)
        {
            string json;
            string date = "2010-01-01 00:00:00";
            string lstsyst;

            string retstr = "";


            Application.DoEvents();

            db.GetAllSystems();

            //if (lstsys)


            DateTime NewSystemTime;

            if (SQLiteDBClass.globalSystems == null || SQLiteDBClass.globalSystems.Count == 0)
            {
                lstsyst = "2010-01-01 00:00:00";
            }
            else
            {
                NewSystemTime = SQLiteDBClass.globalSystems.Max(x => x.UpdateDate);
                lstsyst       = NewSystemTime.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
                lstsyst       = db.GetSettingString("EDSMLastSystems", lstsyst);

                if (lstsyst.Equals("2010-01-01 00:00:00"))
                {
                    lstsyst = NewSystemTime.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
                }
            }
            json = RequestSystems(lstsyst);


            List <SystemClass> listNewSystems = SystemClass.ParseEDSM(json, ref date);



            List <SystemClass> systems2Store = new List <SystemClass>();

            foreach (SystemClass system in listNewSystems)
            {
                // Check if sys exists first
                SystemClass sys = SystemData.GetSystem(system.name);
                if (sys == null)
                {
                    systems2Store.Add(system);
                }
                else if (!sys.name.Equals(system.name) || sys.x != system.x || sys.y != system.y || sys.z != system.z)  // Case or position changed
                {
                    systems2Store.Add(system);
                }
            }
            SystemClass.Store(systems2Store);

            retstr = systems2Store.Count.ToString() + " new systems from EDSM." + Environment.NewLine;
            Application.DoEvents();


            db.PutSettingString("EDSMLastSystems", date);

            return(retstr);
        }
Пример #8
0
 public void SendMessage(Object Sender, string Text,SystemData.ChatLogFilters Filter)
 {
     SendMessage(Sender != null ? Sender.Oid : (UInt16)0, Sender != null ? Sender.Name : "", Text, Filter);
 }
        internal static MsDeploy DeserializeMsDeploy(JsonElement element)
        {
            Optional <string>  kind                                = default;
            ResourceIdentifier id                                  = default;
            string             name                                = default;
            ResourceType       type                                = default;
            SystemData         systemData                          = default;
            Optional <Uri>     packageUri                          = default;
            Optional <string>  connectionString                    = default;
            Optional <string>  dbType                              = default;
            Optional <Uri>     setParametersXmlFileUri             = default;
            Optional <IDictionary <string, string> > setParameters = default;
            Optional <bool> skipAppData                            = default;
            Optional <bool> appOffline                             = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("packageUri"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                packageUri = null;
                                continue;
                            }
                            packageUri = new Uri(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("connectionString"))
                        {
                            connectionString = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("dbType"))
                        {
                            dbType = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("setParametersXmlFileUri"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                setParametersXmlFileUri = null;
                                continue;
                            }
                            setParametersXmlFileUri = new Uri(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("setParameters"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            Dictionary <string, string> dictionary = new Dictionary <string, string>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, property1.Value.GetString());
                            }
                            setParameters = dictionary;
                            continue;
                        }
                        if (property0.NameEquals("skipAppData"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            skipAppData = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("appOffline"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            appOffline = property0.Value.GetBoolean();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new MsDeploy(id, name, type, systemData, kind.Value, packageUri.Value, connectionString.Value, dbType.Value, setParametersXmlFileUri.Value, Optional.ToDictionary(setParameters), Optional.ToNullable(skipAppData), Optional.ToNullable(appOffline)));
        }
 internal DatabaseSecurityAlertPolicyData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, SecurityAlertsPolicyState?state, IList <string> disabledAlerts, IList <string> emailAddresses, bool?emailAccountAdmins, string storageEndpoint, string storageAccountAccessKey, int?retentionDays, DateTimeOffset?creationTime) : base(id, name, type)
 {
     SystemData              = systemData;
     State                   = state;
     DisabledAlerts          = disabledAlerts;
     EmailAddresses          = emailAddresses;
     EmailAccountAdmins      = emailAccountAdmins;
     StorageEndpoint         = storageEndpoint;
     StorageAccountAccessKey = storageAccountAccessKey;
     RetentionDays           = retentionDays;
     CreationTime            = creationTime;
 }
Пример #11
0
 internal WorkloadGroupData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, int?minResourcePercent, int?maxResourcePercent, double?minResourcePercentPerRequest, double?maxResourcePercentPerRequest, string importance, int?queryExecutionTimeout) : base(id, name, type, systemData)
 {
     MinResourcePercent           = minResourcePercent;
     MaxResourcePercent           = maxResourcePercent;
     MinResourcePercentPerRequest = minResourcePercentPerRequest;
     MaxResourcePercentPerRequest = maxResourcePercentPerRequest;
     Importance            = importance;
     QueryExecutionTimeout = queryExecutionTimeout;
 }
 internal RestorableDroppedManagedDatabaseData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string databaseName, DateTimeOffset?creationDate, DateTimeOffset?deletionDate, DateTimeOffset?earliestRestoreDate) : base(id, name, type, systemData, tags, location)
 {
     DatabaseName        = databaseName;
     CreationDate        = creationDate;
     DeletionDate        = deletionDate;
     EarliestRestoreDate = earliestRestoreDate;
 }
 internal AppServiceDetectorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, DetectorInfo metadata, IList <DiagnosticData> dataset, OperationStatusAutoGenerated status, IList <DataProviderMetadata> dataProvidersMetadata, QueryUtterancesResults suggestedUtterances) : base(id, name, resourceType, systemData, kind)
 {
     Metadata = metadata;
     Dataset  = dataset;
     Status   = status;
     DataProvidersMetadata = dataProvidersMetadata;
     SuggestedUtterances   = suggestedUtterances;
 }
Пример #14
0
        internal static DatabaseSecurityAlertPolicyData DeserializeDatabaseSecurityAlertPolicyData(JsonElement element)
        {
            ResourceIdentifier id         = default;
            string             name       = default;
            ResourceType       type       = default;
            SystemData         systemData = default;
            Optional <SecurityAlertsPolicyState> state          = default;
            Optional <IList <string> >           disabledAlerts = default;
            Optional <IList <string> >           emailAddresses = default;
            Optional <bool>           emailAccountAdmins        = default;
            Optional <string>         storageEndpoint           = default;
            Optional <string>         storageAccountAccessKey   = default;
            Optional <int>            retentionDays             = default;
            Optional <DateTimeOffset> creationTime = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("state"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            state = property0.Value.GetString().ToSecurityAlertsPolicyState();
                            continue;
                        }
                        if (property0.NameEquals("disabledAlerts"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <string> array = new List <string>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetString());
                            }
                            disabledAlerts = array;
                            continue;
                        }
                        if (property0.NameEquals("emailAddresses"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <string> array = new List <string>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetString());
                            }
                            emailAddresses = array;
                            continue;
                        }
                        if (property0.NameEquals("emailAccountAdmins"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            emailAccountAdmins = property0.Value.GetBoolean();
                            continue;
                        }
                        if (property0.NameEquals("storageEndpoint"))
                        {
                            storageEndpoint = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("storageAccountAccessKey"))
                        {
                            storageAccountAccessKey = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("retentionDays"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            retentionDays = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("creationTime"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            creationTime = property0.Value.GetDateTimeOffset("O");
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new DatabaseSecurityAlertPolicyData(id, name, type, systemData, Optional.ToNullable(state), Optional.ToList(disabledAlerts), Optional.ToList(emailAddresses), Optional.ToNullable(emailAccountAdmins), storageEndpoint.Value, storageAccountAccessKey.Value, Optional.ToNullable(retentionDays), Optional.ToNullable(creationTime)));
        }
Пример #15
0
        public virtual void Say(string Msg, SystemData.ChatLogFilters Filter)
        {
            foreach (Player Plr in _PlayerRanged.ToArray())
                if (Plr.Realm == GameData.Realms.REALMS_REALM_ORDER && GetPlayer().Realm == GameData.Realms.REALMS_REALM_ORDER)
                    Plr.SendMessage(this, Msg, Filter);
                else if (Plr.Realm == GameData.Realms.REALMS_REALM_DESTRUCTION && GetPlayer().Realm == GameData.Realms.REALMS_REALM_DESTRUCTION)
                    Plr.SendMessage(this, Msg, Filter);

            GetPlayer().SendMessage(this, Msg, Filter);
        }
Пример #16
0
 public SystemLogger(SystemData systemData)
 {
     _systemData = systemData;
     _systemStartTime = DateTime.Now;
 }
        internal static DnsResolverData DeserializeDnsResolverData(JsonElement element)
        {
            Optional <string>            etag                = default;
            IDictionary <string, string> tags                = default;
            AzureLocation                  location          = default;
            ResourceIdentifier             id                = default;
            string                         name              = default;
            ResourceType                   type              = default;
            SystemData                     systemData        = default;
            Optional <WritableSubResource> virtualNetwork    = default;
            Optional <DnsResolverState>    dnsResolverState  = default;
            Optional <ProvisioningState>   provisioningState = default;
            Optional <string>              resourceGuid      = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("etag"))
                {
                    etag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("tags"))
                {
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, property0.Value.GetString());
                    }
                    tags = dictionary;
                    continue;
                }
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("virtualNetwork"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            virtualNetwork = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString());
                            continue;
                        }
                        if (property0.NameEquals("dnsResolverState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            dnsResolverState = new DnsResolverState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("resourceGuid"))
                        {
                            resourceGuid = property0.Value.GetString();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new DnsResolverData(id, name, type, systemData, tags, location, etag.Value, virtualNetwork, Optional.ToNullable(dnsResolverState), Optional.ToNullable(provisioningState), resourceGuid.Value));
        }
Пример #18
0
        internal static ApplicationData DeserializeApplicationData(JsonElement element)
        {
            Optional <ArmPlan> plan = default;
            string             kind = default;
            Optional <ApplicationManagedIdentity> identity = default;
            Optional <string>            managedBy         = default;
            Optional <ApplicationSku>    sku                                    = default;
            IDictionary <string, string> tags                                   = default;
            AzureLocation                location                               = default;
            ResourceIdentifier           id                                     = default;
            string                       name                                   = default;
            ResourceType                 type                                   = default;
            SystemData                   systemData                             = default;
            Optional <string>            managedResourceGroupId                 = default;
            Optional <string>            applicationDefinitionId                = default;
            Optional <object>            parameters                             = default;
            Optional <object>            outputs                                = default;
            Optional <ProvisioningState> provisioningState                      = default;
            Optional <ApplicationBillingDetailsDefinition> billingDetails       = default;
            Optional <ApplicationJitAccessPolicy>          jitAccessPolicy      = default;
            Optional <string> publisherTenantId                                 = default;
            Optional <IReadOnlyList <ApplicationAuthorization> > authorizations = default;
            Optional <ApplicationManagementMode>            managementMode      = default;
            Optional <ApplicationPackageContact>            customerSupport     = default;
            Optional <ApplicationPackageSupportUrls>        supportUrls         = default;
            Optional <IReadOnlyList <ApplicationArtifact> > artifacts           = default;
            Optional <ApplicationClientDetails>             createdBy           = default;
            Optional <ApplicationClientDetails>             updatedBy           = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("plan"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    plan = JsonSerializer.Deserialize <ArmPlan>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("identity"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    identity = ApplicationManagedIdentity.DeserializeApplicationManagedIdentity(property.Value);
                    continue;
                }
                if (property.NameEquals("managedBy"))
                {
                    managedBy = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("sku"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    sku = ApplicationSku.DeserializeApplicationSku(property.Value);
                    continue;
                }
                if (property.NameEquals("tags"))
                {
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, property0.Value.GetString());
                    }
                    tags = dictionary;
                    continue;
                }
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("managedResourceGroupId"))
                        {
                            managedResourceGroupId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("applicationDefinitionId"))
                        {
                            applicationDefinitionId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("parameters"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            parameters = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("outputs"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            outputs = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            provisioningState = new ProvisioningState(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("billingDetails"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            billingDetails = ApplicationBillingDetailsDefinition.DeserializeApplicationBillingDetailsDefinition(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("jitAccessPolicy"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            jitAccessPolicy = ApplicationJitAccessPolicy.DeserializeApplicationJitAccessPolicy(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("publisherTenantId"))
                        {
                            publisherTenantId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("authorizations"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <ApplicationAuthorization> array = new List <ApplicationAuthorization>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(ApplicationAuthorization.DeserializeApplicationAuthorization(item));
                            }
                            authorizations = array;
                            continue;
                        }
                        if (property0.NameEquals("managementMode"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            managementMode = new ApplicationManagementMode(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("customerSupport"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            customerSupport = ApplicationPackageContact.DeserializeApplicationPackageContact(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("supportUrls"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            supportUrls = ApplicationPackageSupportUrls.DeserializeApplicationPackageSupportUrls(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("artifacts"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <ApplicationArtifact> array = new List <ApplicationArtifact>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(ApplicationArtifact.DeserializeApplicationArtifact(item));
                            }
                            artifacts = array;
                            continue;
                        }
                        if (property0.NameEquals("createdBy"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            createdBy = ApplicationClientDetails.DeserializeApplicationClientDetails(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("updatedBy"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            updatedBy = ApplicationClientDetails.DeserializeApplicationClientDetails(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new ApplicationData(id, name, type, systemData, tags, location, managedBy.Value, sku.Value, plan, kind, identity.Value, managedResourceGroupId.Value, applicationDefinitionId.Value, parameters.Value, outputs.Value, Optional.ToNullable(provisioningState), billingDetails.Value, jitAccessPolicy.Value, publisherTenantId.Value, Optional.ToList(authorizations), Optional.ToNullable(managementMode), customerSupport.Value, supportUrls.Value, Optional.ToList(artifacts), createdBy.Value, updatedBy.Value));
        }
Пример #19
0
        internal static FunctionAppStack DeserializeFunctionAppStack(JsonElement element)
        {
            Optional <string>  location    = default;
            Optional <string>  kind        = default;
            ResourceIdentifier id          = default;
            string             name        = default;
            ResourceType       type        = default;
            SystemData         systemData  = default;
            Optional <string>  displayText = default;
            Optional <string>  value       = default;
            Optional <IReadOnlyList <FunctionAppMajorVersion> > majorVersions = default;
            Optional <StackPreferredOS> preferredOs = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = new ResourceType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("displayText"))
                        {
                            displayText = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("value"))
                        {
                            value = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("majorVersions"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <FunctionAppMajorVersion> array = new List <FunctionAppMajorVersion>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(FunctionAppMajorVersion.DeserializeFunctionAppMajorVersion(item));
                            }
                            majorVersions = array;
                            continue;
                        }
                        if (property0.NameEquals("preferredOs"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            preferredOs = property0.Value.GetString().ToStackPreferredOS();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new FunctionAppStack(id, name, type, systemData, kind.Value, location.Value, displayText.Value, value.Value, Optional.ToList(majorVersions), Optional.ToNullable(preferredOs)));
        }
Пример #20
0
 internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, PrivateEndpointProperty privateEndpoint, PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState, string groupId, string provisioningState) : base(id, name, type, systemData)
 {
     PrivateEndpoint = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
     GroupId           = groupId;
     ProvisioningState = provisioningState;
 }
Пример #21
0
 internal DescendantInfo(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, DescendantParentGroupInfo parent) : base(id, name, resourceType, systemData)
 {
     DisplayName = displayName;
     Parent      = parent;
 }
Пример #22
0
 internal ContainerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, IList <string> zones, ManagedServiceIdentity identity, string provisioningState, IList <ContainerInstanceContainer> containers, IList <ImageRegistryCredential> imageRegistryCredentials, ContainerGroupRestartPolicy?restartPolicy, IPAddress ipAddress, OperatingSystemTypes osType, IList <ContainerInstanceVolume> volumes, ContainerGroupPropertiesInstanceView instanceView, ContainerGroupDiagnostics diagnostics, IList <ContainerGroupSubnetId> subnetIds, DnsConfiguration dnsConfig, ContainerGroupSku?sku, Models.EncryptionProperties encryptionProperties, IList <InitContainerDefinitionContent> initContainers) : base(id, name, resourceType, systemData, tags, location, zones)
 {
     Identity                 = identity;
     ProvisioningState        = provisioningState;
     Containers               = containers;
     ImageRegistryCredentials = imageRegistryCredentials;
     RestartPolicy            = restartPolicy;
     IPAddress                = ipAddress;
     OSType               = osType;
     Volumes              = volumes;
     InstanceView         = instanceView;
     Diagnostics          = diagnostics;
     SubnetIds            = subnetIds;
     DnsConfig            = dnsConfig;
     Sku                  = sku;
     EncryptionProperties = encryptionProperties;
     InitContainers       = initContainers;
 }
 internal PrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, PrivateLinkResourceProperties properties) : base(id, name, type, systemData)
 {
     Properties = properties;
 }
Пример #24
0
 internal AfdSecretData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, AfdProvisioningState?provisioningState, DeploymentStatus?deploymentStatus, SecretParameters parameters) : base(id, name, type, systemData)
 {
     ProvisioningState = provisioningState;
     DeploymentStatus  = deploymentStatus;
     Parameters        = parameters;
 }
        internal static AuthorizationRuleData DeserializeAuthorizationRuleData(JsonElement element)
        {
            Optional <string>  location             = default;
            ResourceIdentifier id                   = default;
            string             name                 = default;
            ResourceType       type                 = default;
            SystemData         systemData           = default;
            Optional <IList <AccessRights> > rights = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("rights"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <AccessRights> array = new List <AccessRights>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(new AccessRights(item.GetString()));
                            }
                            rights = array;
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new AuthorizationRuleData(id, name, type, systemData, location.Value, Optional.ToList(rights)));
        }
 internal AddressResourceData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ShippingAddress shippingAddress, ContactDetails contactDetails, AddressValidationStatus?addressValidationStatus) : base(id, name, type, systemData, tags, location)
 {
     ShippingAddress         = shippingAddress;
     ContactDetails          = contactDetails;
     AddressValidationStatus = addressValidationStatus;
 }
        internal static HostNameBindingData DeserializeHostNameBindingData(JsonElement element)
        {
            Optional <string>                      kind                        = default;
            ResourceIdentifier                     id                          = default;
            string                                 name                        = default;
            ResourceType                           type                        = default;
            SystemData                             systemData                  = default;
            Optional <string>                      siteName                    = default;
            Optional <string>                      domainId                    = default;
            Optional <string>                      azureResourceName           = default;
            Optional <AzureResourceType>           azureResourceType           = default;
            Optional <CustomHostNameDnsRecordType> customHostNameDnsRecordType = default;
            Optional <HostNameType>                hostNameType                = default;
            Optional <SslState>                    sslState                    = default;
            Optional <string>                      thumbprint                  = default;
            Optional <string>                      virtualIP                   = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("siteName"))
                        {
                            siteName = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("domainId"))
                        {
                            domainId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("azureResourceName"))
                        {
                            azureResourceName = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("azureResourceType"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            azureResourceType = property0.Value.GetString().ToAzureResourceType();
                            continue;
                        }
                        if (property0.NameEquals("customHostNameDnsRecordType"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            customHostNameDnsRecordType = property0.Value.GetString().ToCustomHostNameDnsRecordType();
                            continue;
                        }
                        if (property0.NameEquals("hostNameType"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            hostNameType = property0.Value.GetString().ToHostNameType();
                            continue;
                        }
                        if (property0.NameEquals("sslState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            sslState = property0.Value.GetString().ToSslState();
                            continue;
                        }
                        if (property0.NameEquals("thumbprint"))
                        {
                            thumbprint = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("virtualIP"))
                        {
                            virtualIP = property0.Value.GetString();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new HostNameBindingData(id, name, type, systemData, kind.Value, siteName.Value, domainId.Value, azureResourceName.Value, Optional.ToNullable(azureResourceType), Optional.ToNullable(customHostNameDnsRecordType), Optional.ToNullable(hostNameType), Optional.ToNullable(sslState), thumbprint.Value, virtualIP.Value));
        }
 internal RecommendationRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, string recommendationName, string displayName, string message, Guid?recommendationId, string description, string actionName, NotificationLevel?level, Channels?channels, IReadOnlyList <string> categoryTags, bool?isDynamic, string extensionName, string bladeName, string forwardLink) : base(id, name, resourceType, systemData, kind)
 {
     RecommendationName = recommendationName;
     DisplayName        = displayName;
     Message            = message;
     RecommendationId   = recommendationId;
     Description        = description;
     ActionName         = actionName;
     Level         = level;
     Channels      = channels;
     CategoryTags  = categoryTags;
     IsDynamic     = isDynamic;
     ExtensionName = extensionName;
     BladeName     = bladeName;
     ForwardLink   = forwardLink;
 }
Пример #29
0
        internal static MigrateMySqlContent DeserializeMigrateMySqlContent(JsonElement element)
        {
            Optional <string>             kind             = default;
            ResourceIdentifier            id               = default;
            string                        name             = default;
            ResourceType                  type             = default;
            SystemData                    systemData       = default;
            Optional <string>             connectionString = default;
            Optional <MySqlMigrationType> migrationType    = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("kind"))
                {
                    kind = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("connectionString"))
                        {
                            connectionString = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("migrationType"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            migrationType = property0.Value.GetString().ToMySqlMigrationType();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new MigrateMySqlContent(id, name, type, systemData, kind.Value, connectionString.Value, Optional.ToNullable(migrationType)));
        }
 public GuiCursorHudTextFactory_System(SystemData data, IntelLevel intelLevel) : base(data, intelLevel) { }
Пример #31
0
 internal DedicatedHostData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ComputeSku sku, int?platformFaultDomain, bool?autoReplaceOnFailure, string hostId, IReadOnlyList <Resources.Models.SubResource> virtualMachines, DedicatedHostLicenseTypes?licenseType, DateTimeOffset?provisioningTime, string provisioningState, DedicatedHostInstanceView instanceView) : base(id, name, resourceType, systemData, tags, location)
 {
     Sku = sku;
     PlatformFaultDomain  = platformFaultDomain;
     AutoReplaceOnFailure = autoReplaceOnFailure;
     HostId            = hostId;
     VirtualMachines   = virtualMachines;
     LicenseType       = licenseType;
     ProvisioningTime  = provisioningTime;
     ProvisioningState = provisioningState;
     InstanceView      = instanceView;
 }
Пример #32
0
        public void SendMessage(UInt16 Oid, string NameSender, string Text, SystemData.ChatLogFilters Filter)
        {
            PacketOut Out = new PacketOut((byte)Opcodes.F_CHAT);
            Out.WriteUInt16(Oid);
            Out.WriteByte((byte)Filter);
            Out.Fill(0, 4);
            Out.WritePascalString(NameSender);
            Out.WriteUInt16((ushort)(Text.Length + 1));
            Out.WriteStringBytes(Text);
            Out.WriteByte(0);

            int a = Text.IndexOf("<LINK");
            int b = Text.IndexOf("ITEM:");
            if (a >= 0 && b > 0)
            {
                Out.WriteByte(1);
                long p = Out.Position;
                Out.WriteByte(0);

                int Count = 0;
                while (a >= 0 && b >= 0)
                {
                    int Pos = b + 5;
                    int LastPos = Text.IndexOf(" ", Pos) - 1;
                    string Value = Text.Substring(Pos, LastPos - Pos);
                    uint ItemId = uint.Parse(Value);
                    Item_Info Info = WorldMgr.GetItem_Info(ItemId);
                    if (Info != null)
                    {
                        ++Count;
                        Out.WriteByte(3);
                        Item.BuildItem(ref Out, null, Info, 0, 1);
                    }

                    a = Text.IndexOf("<LINK", Pos);
                    b = Text.IndexOf("ITEM:", Pos);
                }

                Out.Position = p;
                Out.WriteByte((byte)Count);
                Out.Position = Out.Length;
            }

            SendPacket(Out);
        }
        internal static PrivateEndpointConnectionProxyData DeserializePrivateEndpointConnectionProxyData(JsonElement element)
        {
            Optional <string> eTag = default;
            Optional <RemotePrivateEndpoint> remotePrivateEndpoint = default;
            Optional <PrivateEndpointConnectionProxyProvisioningState> provisioningState = default;
            Optional <string>  status     = default;
            ResourceIdentifier id         = default;
            string             name       = default;
            ResourceType       type       = default;
            SystemData         systemData = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("eTag"))
                {
                    eTag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("remotePrivateEndpoint"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    remotePrivateEndpoint = RemotePrivateEndpoint.DeserializeRemotePrivateEndpoint(property.Value);
                    continue;
                }
                if (property.NameEquals("provisioningState"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    provisioningState = new PrivateEndpointConnectionProxyProvisioningState(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("status"))
                {
                    status = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("systemData"))
                {
                    systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString());
                    continue;
                }
            }
            return(new PrivateEndpointConnectionProxyData(id, name, type, systemData, eTag.Value, remotePrivateEndpoint.Value, Optional.ToNullable(provisioningState), status.Value));
        }
Пример #34
0
        public void SendMessage(UInt16 Oid, string NameSender, string Text, SystemData.ChatLogFilters Filter)
        {
            if (Text.IndexOf("<LINK") >= 0 && Text.IndexOf("ITEM:") > 0)
            {
                int Pos = Text.IndexOf("ITEM:")+5;
                int LastPos = Text.IndexOf(" ",Pos)-1;
                string Value = Text.Substring(Pos, LastPos-Pos);
                uint ItemId = uint.Parse(Value);
                Item_Info Info = WorldMgr.GetItem_Info(ItemId);
                if (Info != null)
                {

                }
            }

            PacketOut Out = new PacketOut((byte)Opcodes.F_CHAT);
            Out.WriteUInt16(Oid);
            Out.WriteByte((byte)Filter);
            Out.Fill(0, 4);
            Out.WritePascalString(NameSender);
            Out.WriteByte(0);
            Out.WritePascalString(Text);
            Out.WriteByte(0);
            SendPacket(Out);
        }
Пример #35
0
 internal StorageAccountData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, Models.Sku sku, Kind?kind, ManagedServiceIdentity identity, ExtendedLocation extendedLocation, ProvisioningState?provisioningState, Endpoints primaryEndpoints, string primaryLocation, AccountStatus?statusOfPrimary, DateTimeOffset?lastGeoFailoverTime, string secondaryLocation, AccountStatus?statusOfSecondary, DateTimeOffset?creationTime, CustomDomain customDomain, SasPolicy sasPolicy, KeyPolicy keyPolicy, KeyCreationTime keyCreationTime, Endpoints secondaryEndpoints, Encryption encryption, AccessTier?accessTier, AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication, bool?enableHttpsTrafficOnly, NetworkRuleSet networkRuleSet, bool?isSftpEnabled, bool?isLocalUserEnabled, bool?isHnsEnabled, GeoReplicationStats geoReplicationStats, bool?failoverInProgress, LargeFileSharesState?largeFileSharesState, IReadOnlyList <PrivateEndpointConnectionData> privateEndpointConnections, RoutingPreference routingPreference, BlobRestoreStatus blobRestoreStatus, bool?allowBlobPublicAccess, MinimumTlsVersion?minimumTlsVersion, bool?allowSharedKeyAccess, bool?enableNfsV3, bool?allowCrossTenantReplication, bool?defaultToOAuthAuthentication, PublicNetworkAccess?publicNetworkAccess, ImmutableStorageAccount immutableStorageWithVersioning, AllowedCopyScope?allowedCopyScope) : base(id, name, type, systemData, tags, location)
 {
     Sku                 = sku;
     Kind                = kind;
     Identity            = identity;
     ExtendedLocation    = extendedLocation;
     ProvisioningState   = provisioningState;
     PrimaryEndpoints    = primaryEndpoints;
     PrimaryLocation     = primaryLocation;
     StatusOfPrimary     = statusOfPrimary;
     LastGeoFailoverTime = lastGeoFailoverTime;
     SecondaryLocation   = secondaryLocation;
     StatusOfSecondary   = statusOfSecondary;
     CreationTime        = creationTime;
     CustomDomain        = customDomain;
     SasPolicy           = sasPolicy;
     KeyPolicy           = keyPolicy;
     KeyCreationTime     = keyCreationTime;
     SecondaryEndpoints  = secondaryEndpoints;
     Encryption          = encryption;
     AccessTier          = accessTier;
     AzureFilesIdentityBasedAuthentication = azureFilesIdentityBasedAuthentication;
     EnableHttpsTrafficOnly     = enableHttpsTrafficOnly;
     NetworkRuleSet             = networkRuleSet;
     IsSftpEnabled              = isSftpEnabled;
     IsLocalUserEnabled         = isLocalUserEnabled;
     IsHnsEnabled               = isHnsEnabled;
     GeoReplicationStats        = geoReplicationStats;
     FailoverInProgress         = failoverInProgress;
     LargeFileSharesState       = largeFileSharesState;
     PrivateEndpointConnections = privateEndpointConnections;
     RoutingPreference          = routingPreference;
     BlobRestoreStatus          = blobRestoreStatus;
     AllowBlobPublicAccess      = allowBlobPublicAccess;
     MinimumTlsVersion          = minimumTlsVersion;
     AllowSharedKeyAccess       = allowSharedKeyAccess;
     EnableNfsV3 = enableNfsV3;
     AllowCrossTenantReplication    = allowCrossTenantReplication;
     DefaultToOAuthAuthentication   = defaultToOAuthAuthentication;
     PublicNetworkAccess            = publicNetworkAccess;
     ImmutableStorageWithVersioning = immutableStorageWithVersioning;
     AllowedCopyScope = allowedCopyScope;
 }
 internal ServiceBusQueueData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, MessageCountDetails countDetails, DateTimeOffset?createdAt, DateTimeOffset?updatedAt, DateTimeOffset?accessedAt, long?sizeInBytes, long?messageCount, TimeSpan?lockDuration, int?maxSizeInMegabytes, long?maxMessageSizeInKilobytes, bool?requiresDuplicateDetection, bool?requiresSession, TimeSpan?defaultMessageTimeToLive, bool?deadLetteringOnMessageExpiration, TimeSpan?duplicateDetectionHistoryTimeWindow, int?maxDeliveryCount, EntityStatus?status, bool?enableBatchedOperations, TimeSpan?autoDeleteOnIdle, bool?enablePartitioning, bool?enableExpress, string forwardTo, string forwardDeadLetteredMessagesTo) : base(id, name, type)
 {
     SystemData                          = systemData;
     CountDetails                        = countDetails;
     CreatedAt                           = createdAt;
     UpdatedAt                           = updatedAt;
     AccessedAt                          = accessedAt;
     SizeInBytes                         = sizeInBytes;
     MessageCount                        = messageCount;
     LockDuration                        = lockDuration;
     MaxSizeInMegabytes                  = maxSizeInMegabytes;
     MaxMessageSizeInKilobytes           = maxMessageSizeInKilobytes;
     RequiresDuplicateDetection          = requiresDuplicateDetection;
     RequiresSession                     = requiresSession;
     DefaultMessageTimeToLive            = defaultMessageTimeToLive;
     DeadLetteringOnMessageExpiration    = deadLetteringOnMessageExpiration;
     DuplicateDetectionHistoryTimeWindow = duplicateDetectionHistoryTimeWindow;
     MaxDeliveryCount                    = maxDeliveryCount;
     Status = status;
     EnableBatchedOperations = enableBatchedOperations;
     AutoDeleteOnIdle        = autoDeleteOnIdle;
     EnablePartitioning      = enablePartitioning;
     EnableExpress           = enableExpress;
     ForwardTo = forwardTo;
     ForwardDeadLetteredMessagesTo = forwardDeadLetteredMessagesTo;
 }
 internal DdosProtectionPlanData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, string etag, string resourceGuid, ProvisioningState?provisioningState, IReadOnlyList <WritableSubResource> virtualNetworks) : base(id, name, type, systemData, tags, location)
 {
     Etag              = etag;
     ResourceGuid      = resourceGuid;
     ProvisioningState = provisioningState;
     VirtualNetworks   = virtualNetworks;
 }