From 5aae301242e90f9079d2a1e6d4765d8a645cb501 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Thu, 4 Aug 2022 08:45:34 +0000 Subject: [PATCH] invalid params is added --- src/protobuf/rpc.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/protobuf/rpc.rs b/src/protobuf/rpc.rs index 0809c09..744ce52 100644 --- a/src/protobuf/rpc.rs +++ b/src/protobuf/rpc.rs @@ -18,3 +18,31 @@ impl fmt::Display for Error { ) } } + +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InvalidParamsDetail { + #[prost(string, tag = "1")] + pub location: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub param: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub value: ::prost::alloc::string::String, + #[prost(enumeration = "InvalidParamsType", tag = "4")] + pub error_type: i32, + #[prost(string, tag = "5")] + pub message: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum InvalidParamsType { + DateTime = 0, + Decimal = 1, + EqualsTo = 2, + Float = 3, + Integer = 4, + Range = 5, + RegEx = 6, + Required = 7, + StringLength = 8, + Url = 9, +}