internal static BlobRestoreStatus DeserializeBlobRestoreStatus(JsonElement element)
        {
            Optional <BlobRestoreProgressStatus> status = default;
            Optional <string> failureReason             = default;
            Optional <string> restoreId = default;
            Optional <BlobRestoreParameters> parameters = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("status"))
                {
                    status = new BlobRestoreProgressStatus(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("failureReason"))
                {
                    failureReason = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("restoreId"))
                {
                    restoreId = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    parameters = BlobRestoreParameters.DeserializeBlobRestoreParameters(property.Value);
                    continue;
                }
            }
            return(new BlobRestoreStatus(Optional.ToNullable(status), failureReason.Value, restoreId.Value, parameters.Value));
        }
        internal static BlobRestoreStatus DeserializeBlobRestoreStatus(JsonElement element)
        {
            BlobRestoreProgressStatus?status = default;
            string failureReason             = default;
            string restoreId = default;
            BlobRestoreParameters parameters = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("status"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    status = new BlobRestoreProgressStatus(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("failureReason"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    failureReason = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("restoreId"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    restoreId = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    parameters = BlobRestoreParameters.DeserializeBlobRestoreParameters(property.Value);
                    continue;
                }
            }
            return(new BlobRestoreStatus(status, failureReason, restoreId, parameters));
        }