@@ -16,6 +16,7 @@ struct PaginationQuery {
1616#[ derive( Debug , Serialize ) ]
1717struct CreateBackupRequest {
1818 r#type : String ,
19+ scope : String ,
1920 #[ serde( skip_serializing_if = "Option::is_none" ) ]
2021 description : Option < String > ,
2122}
@@ -51,14 +52,15 @@ pub fn list(
5152 vec ! [
5253 b[ "id" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
5354 b[ "type" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
55+ b[ "scope" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
5456 b[ "status" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
5557 format_option( & b[ "description" ] . as_str( ) . map( String :: from) ) ,
5658 format_option( & b[ "created_at" ] . as_str( ) . map( String :: from) ) ,
5759 ]
5860 } )
5961 . collect ( ) ;
6062
61- print_table ( vec ! [ "ID" , "Type" , "Status" , "Description" , "Created" ] , rows) ;
63+ print_table ( vec ! [ "ID" , "Type" , "Scope" , " Status", "Description" , "Created" ] , rows) ;
6264
6365 if let Some ( ( current, last, total) ) = extract_pagination ( & response) {
6466 print_pagination ( current, last, total) ;
@@ -88,6 +90,10 @@ pub fn show(
8890 print_key_value ( vec ! [
8991 ( "ID" , backup[ "id" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ) ,
9092 ( "Type" , backup[ "type" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ) ,
93+ (
94+ "Scope" ,
95+ backup[ "scope" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
96+ ) ,
9197 (
9298 "Status" ,
9399 backup[ "status" ] . as_str( ) . unwrap_or( "-" ) . to_string( ) ,
@@ -97,8 +103,12 @@ pub fn show(
97103 format_option( & backup[ "description" ] . as_str( ) . map( String :: from) ) ,
98104 ) ,
99105 (
100- "Snapshot ID" ,
101- format_option( & backup[ "snapshot_id" ] . as_str( ) . map( String :: from) ) ,
106+ "File Snapshot ID" ,
107+ format_option( & backup[ "file_snapshot_id" ] . as_str( ) . map( String :: from) ) ,
108+ ) ,
109+ (
110+ "Database Snapshot ID" ,
111+ format_option( & backup[ "database_snapshot_id" ] . as_str( ) . map( String :: from) ) ,
102112 ) ,
103113 (
104114 "Started At" ,
@@ -124,11 +134,13 @@ pub fn show(
124134pub fn create (
125135 client : & ApiClient ,
126136 site_id : & str ,
137+ scope : & str ,
127138 description : Option < String > ,
128139 format : OutputFormat ,
129140) -> Result < ( ) , ApiError > {
130141 let body = CreateBackupRequest {
131142 r#type : "manual" . to_string ( ) ,
143+ scope : scope. to_string ( ) ,
132144 description,
133145 } ;
134146
0 commit comments