aiscanned_proto_rust/generated/
aiscanned.v1.common.rs1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Error {
5 #[prost(enumeration = "ErrorCode", tag = "1")]
6 pub code: i32,
7 #[prost(string, tag = "2")]
9 pub message: ::prost::alloc::string::String,
10 #[prost(map = "string, string", tag = "3")]
12 pub details: ::std::collections::HashMap<
13 ::prost::alloc::string::String,
14 ::prost::alloc::string::String,
15 >,
16}
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
19#[repr(i32)]
20pub enum ErrorCode {
21 Unspecified = 0,
22 InvalidArgument = 1,
23 NotFound = 2,
24 PermissionDenied = 3,
25 InternalError = 4,
26 AlreadyExists = 5,
27 Unauthenticated = 6,
28}
29impl ErrorCode {
30 pub fn as_str_name(&self) -> &'static str {
35 match self {
36 Self::Unspecified => "ERROR_CODE_UNSPECIFIED",
37 Self::InvalidArgument => "INVALID_ARGUMENT",
38 Self::NotFound => "NOT_FOUND",
39 Self::PermissionDenied => "PERMISSION_DENIED",
40 Self::InternalError => "INTERNAL_ERROR",
41 Self::AlreadyExists => "ALREADY_EXISTS",
42 Self::Unauthenticated => "UNAUTHENTICATED",
43 }
44 }
45 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
47 match value {
48 "ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
49 "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
50 "NOT_FOUND" => Some(Self::NotFound),
51 "PERMISSION_DENIED" => Some(Self::PermissionDenied),
52 "INTERNAL_ERROR" => Some(Self::InternalError),
53 "ALREADY_EXISTS" => Some(Self::AlreadyExists),
54 "UNAUTHENTICATED" => Some(Self::Unauthenticated),
55 _ => None,
56 }
57 }
58}
59#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct Address {
62 #[prost(string, tag = "1")]
63 pub line1: ::prost::alloc::string::String,
64 #[prost(string, tag = "2")]
65 pub line2: ::prost::alloc::string::String,
66 #[prost(string, tag = "3")]
67 pub city: ::prost::alloc::string::String,
68 #[prost(string, tag = "4")]
69 pub state: ::prost::alloc::string::String,
70 #[prost(string, tag = "5")]
71 pub country: ::prost::alloc::string::String,
72 #[prost(string, tag = "6")]
73 pub postal_code: ::prost::alloc::string::String,
74 #[prost(message, optional, tag = "7")]
76 pub location: ::core::option::Option<super::super::super::google::r#type::LatLng>,
77}
78#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct Money {
81 #[prost(double, tag = "1")]
82 pub amount: f64,
83 #[prost(string, tag = "2")]
85 pub currency: ::prost::alloc::string::String,
86}
87#[derive(Clone, Copy, PartialEq, ::prost::Message)]
89pub struct TimeRange {
90 #[prost(message, optional, tag = "1")]
91 pub start: ::core::option::Option<prost_types::Timestamp>,
92 #[prost(message, optional, tag = "2")]
93 pub end: ::core::option::Option<prost_types::Timestamp>,
94}
95#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct PaginationRequest {
98 #[prost(int32, tag = "1")]
99 pub page_size: i32,
100 #[prost(string, tag = "2")]
101 pub page_token: ::prost::alloc::string::String,
102}
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct PaginationResponse {
105 #[prost(string, tag = "1")]
106 pub next_page_token: ::prost::alloc::string::String,
107 #[prost(int32, tag = "2")]
108 pub total_count: i32,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct Tag {
113 #[prost(string, tag = "1")]
114 pub key: ::prost::alloc::string::String,
115 #[prost(string, tag = "2")]
116 pub value: ::prost::alloc::string::String,
117}
118#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
120#[repr(i32)]
121pub enum Status {
122 Unspecified = 0,
123 Active = 1,
124 Inactive = 2,
125 Deleted = 3,
126}
127impl Status {
128 pub fn as_str_name(&self) -> &'static str {
133 match self {
134 Self::Unspecified => "STATUS_UNSPECIFIED",
135 Self::Active => "ACTIVE",
136 Self::Inactive => "INACTIVE",
137 Self::Deleted => "DELETED",
138 }
139 }
140 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
142 match value {
143 "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
144 "ACTIVE" => Some(Self::Active),
145 "INACTIVE" => Some(Self::Inactive),
146 "DELETED" => Some(Self::Deleted),
147 _ => None,
148 }
149 }
150}
151#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
153#[repr(i32)]
154pub enum Gender {
155 Unspecified = 0,
156 Male = 1,
157 Female = 2,
158 Other = 3,
159}
160impl Gender {
161 pub fn as_str_name(&self) -> &'static str {
166 match self {
167 Self::Unspecified => "GENDER_UNSPECIFIED",
168 Self::Male => "MALE",
169 Self::Female => "FEMALE",
170 Self::Other => "OTHER",
171 }
172 }
173 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
175 match value {
176 "GENDER_UNSPECIFIED" => Some(Self::Unspecified),
177 "MALE" => Some(Self::Male),
178 "FEMALE" => Some(Self::Female),
179 "OTHER" => Some(Self::Other),
180 _ => None,
181 }
182 }
183}
184#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct Metadata {
187 #[prost(string, tag = "1")]
189 pub id: ::prost::alloc::string::String,
190 #[prost(string, tag = "2")]
192 pub created_by: ::prost::alloc::string::String,
193 #[prost(message, optional, tag = "3")]
195 pub created_at: ::core::option::Option<prost_types::Timestamp>,
196 #[prost(string, tag = "4")]
198 pub updated_by: ::prost::alloc::string::String,
199 #[prost(message, optional, tag = "5")]
201 pub updated_at: ::core::option::Option<prost_types::Timestamp>,
202 #[prost(int32, tag = "6")]
204 pub version: i32,
205 #[prost(bool, tag = "7")]
207 pub deleted: bool,
208}