File tree Expand file tree Collapse file tree
sdk/cosmosdb/azure_data_cosmos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ categories = ["api-bindings"]
1818[dependencies ]
1919async-trait.workspace = true
2020azure_core.workspace = true
21+ typespec_client_core.workspace = true
2122time.workspace = true
2223tracing.workspace = true
2324url.workspace = true
@@ -26,7 +27,6 @@ serde.workspace = true
2627[dev-dependencies ]
2728tokio.workspace = true
2829serde_json.workspace = true
29- azure_core.workspace = true
3030azure_identity.workspace = true
3131clap.workspace = true
3232
Original file line number Diff line number Diff line change 11use serde:: { Deserialize , Serialize } ;
22use time:: error:: ComponentRange ;
33use time:: OffsetDateTime ;
4+ use typespec_client_core:: Model ;
45
56#[ cfg( doc) ]
67use crate :: DatabaseClientMethods ;
@@ -25,7 +26,7 @@ impl TryInto<OffsetDateTime> for CosmosTimestamp {
2526/// Properties of a Cosmos DB database.
2627///
2728/// Returned by [`DatabaseClient::read()`](crate::DatabaseClient::read()).
28- #[ derive( Debug , Deserialize ) ]
29+ #[ derive( Model , Debug , Deserialize ) ]
2930pub struct DatabaseProperties {
3031 /// The ID of the database.
3132 pub id : String ,
@@ -46,6 +47,3 @@ pub struct DatabaseProperties {
4647 #[ serde( rename = "_ts" ) ]
4748 pub last_modified : Option < CosmosTimestamp > ,
4849}
49-
50- // TODO: Migrate to derive macro once https://github.com/Azure/azure-sdk-for-rust/pull/1772 lands.
51- azure_core:: json_model!( DatabaseProperties ) ;
You can’t perform that action at this time.
0 commit comments