@@ -100,6 +100,40 @@ pub struct DestroyRequest {
100100#[ allow( clippy:: derive_partial_eq_without_eq) ]
101101#[ derive( Clone , PartialEq , :: prost:: Message ) ]
102102pub struct DestroyResponse { }
103+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
104+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
105+ pub struct ErrorDetails {
106+ #[ prost( enumeration = "ErrorCode" , tag = "1" ) ]
107+ pub code : i32 ,
108+ #[ prost( string, tag = "2" ) ]
109+ pub message : :: prost:: alloc:: string:: String ,
110+ }
111+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
112+ #[ repr( i32 ) ]
113+ pub enum ErrorCode {
114+ InternalError = 0 ,
115+ WriteConflict = 1 ,
116+ }
117+ impl ErrorCode {
118+ /// String value of the enum field names used in the ProtoBuf definition.
119+ ///
120+ /// The values are not transformed in any way and thus are considered stable
121+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
122+ pub fn as_str_name ( & self ) -> & ' static str {
123+ match self {
124+ ErrorCode :: InternalError => "INTERNAL_ERROR" ,
125+ ErrorCode :: WriteConflict => "WRITE_CONFLICT" ,
126+ }
127+ }
128+ /// Creates an enum from field names used in the ProtoBuf definition.
129+ pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
130+ match value {
131+ "INTERNAL_ERROR" => Some ( Self :: InternalError ) ,
132+ "WRITE_CONFLICT" => Some ( Self :: WriteConflict ) ,
133+ _ => None ,
134+ }
135+ }
136+ }
103137/// Generated client implementations.
104138pub mod storage_client {
105139 #![ allow( unused_variables, dead_code, missing_docs, clippy:: let_unit_value) ]
0 commit comments