internal static BlobServiceProperties DeserializeBlobServiceProperties(JsonElement element) { Optional <Sku> sku = default; Optional <string> id = default; Optional <string> name = default; Optional <string> type = default; Optional <CorsRules> cors = default; Optional <string> defaultServiceVersion = default; Optional <DeleteRetentionPolicy> deleteRetentionPolicy = default; Optional <bool> isVersioningEnabled = default; Optional <bool> automaticSnapshotPolicyEnabled = default; Optional <ChangeFeed> changeFeed = default; Optional <RestorePolicyProperties> restorePolicy = default; Optional <DeleteRetentionPolicy> containerDeleteRetentionPolicy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku")) { sku = Sku.DeserializeSku(property.Value); continue; } if (property.NameEquals("id")) { id = 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("properties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("cors")) { cors = CorsRules.DeserializeCorsRules(property0.Value); continue; } if (property0.NameEquals("defaultServiceVersion")) { defaultServiceVersion = property0.Value.GetString(); continue; } if (property0.NameEquals("deleteRetentionPolicy")) { deleteRetentionPolicy = DeleteRetentionPolicy.DeserializeDeleteRetentionPolicy(property0.Value); continue; } if (property0.NameEquals("isVersioningEnabled")) { isVersioningEnabled = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("automaticSnapshotPolicyEnabled")) { automaticSnapshotPolicyEnabled = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("changeFeed")) { changeFeed = ChangeFeed.DeserializeChangeFeed(property0.Value); continue; } if (property0.NameEquals("restorePolicy")) { restorePolicy = RestorePolicyProperties.DeserializeRestorePolicyProperties(property0.Value); continue; } if (property0.NameEquals("containerDeleteRetentionPolicy")) { containerDeleteRetentionPolicy = DeleteRetentionPolicy.DeserializeDeleteRetentionPolicy(property0.Value); continue; } } continue; } } return(new BlobServiceProperties(id.Value, name.Value, type.Value, sku.Value, cors.Value, defaultServiceVersion.Value, deleteRetentionPolicy.Value, Optional.ToNullable(isVersioningEnabled), Optional.ToNullable(automaticSnapshotPolicyEnabled), changeFeed.Value, restorePolicy.Value, containerDeleteRetentionPolicy.Value)); }