File tree 2 files changed +3
-5
lines changed
sdk/cosmosdb/azure_data_cosmos
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ categories = ["api-bindings"]
18
18
[dependencies ]
19
19
async-trait.workspace = true
20
20
azure_core.workspace = true
21
+ typespec_client_core.workspace = true
21
22
time.workspace = true
22
23
tracing.workspace = true
23
24
url.workspace = true
@@ -26,7 +27,6 @@ serde.workspace = true
26
27
[dev-dependencies ]
27
28
tokio.workspace = true
28
29
serde_json.workspace = true
29
- azure_core.workspace = true
30
30
azure_identity.workspace = true
31
31
clap.workspace = true
32
32
Original file line number Diff line number Diff line change 1
1
use serde:: { Deserialize , Serialize } ;
2
2
use time:: error:: ComponentRange ;
3
3
use time:: OffsetDateTime ;
4
+ use typespec_client_core:: Model ;
4
5
5
6
#[ cfg( doc) ]
6
7
use crate :: DatabaseClientMethods ;
@@ -25,7 +26,7 @@ impl TryInto<OffsetDateTime> for CosmosTimestamp {
25
26
/// Properties of a Cosmos DB database.
26
27
///
27
28
/// Returned by [`DatabaseClient::read()`](crate::DatabaseClient::read()).
28
- #[ derive( Debug , Deserialize ) ]
29
+ #[ derive( Model , Debug , Deserialize ) ]
29
30
pub struct DatabaseProperties {
30
31
/// The ID of the database.
31
32
pub id : String ,
@@ -46,6 +47,3 @@ pub struct DatabaseProperties {
46
47
#[ serde( rename = "_ts" ) ]
47
48
pub last_modified : Option < CosmosTimestamp > ,
48
49
}
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