aiscanned_proto_rust/generated/
aiscanned.v1.common.rs

1// This file is @generated by prost-build.
2/// Generic Error message
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Error {
5    #[prost(enumeration = "ErrorCode", tag = "1")]
6    pub code: i32,
7    /// Human-readable description
8    #[prost(string, tag = "2")]
9    pub message: ::prost::alloc::string::String,
10    /// Optional structured details
11    #[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/// Standard error codes
18#[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    /// String value of the enum field names used in the ProtoBuf definition.
31    ///
32    /// The values are not transformed in any way and thus are considered stable
33    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
34    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    /// Creates an enum from field names used in the ProtoBuf definition.
46    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/// Address structure
60#[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    /// Standardized geographical location
75    #[prost(message, optional, tag = "7")]
76    pub location: ::core::option::Option<super::super::super::google::r#type::LatLng>,
77}
78/// Generic Money type
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct Money {
81    #[prost(double, tag = "1")]
82    pub amount: f64,
83    /// ISO 4217, e.g., USD, EUR, INR
84    #[prost(string, tag = "2")]
85    pub currency: ::prost::alloc::string::String,
86}
87/// Generic time range for filtering/searching
88#[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/// Pagination
96#[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/// Generic key-value tag
111#[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/// Status enum for entities
119#[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    /// String value of the enum field names used in the ProtoBuf definition.
129    ///
130    /// The values are not transformed in any way and thus are considered stable
131    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
132    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    /// Creates an enum from field names used in the ProtoBuf definition.
141    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/// Gender enum (useful for profile/dating applications)
152#[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    /// String value of the enum field names used in the ProtoBuf definition.
162    ///
163    /// The values are not transformed in any way and thus are considered stable
164    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
165    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    /// Creates an enum from field names used in the ProtoBuf definition.
174    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/// Metadata shared across entities
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct Metadata {
187    /// Unique entity ID
188    #[prost(string, tag = "1")]
189    pub id: ::prost::alloc::string::String,
190    /// User or system who created it
191    #[prost(string, tag = "2")]
192    pub created_by: ::prost::alloc::string::String,
193    /// Creation timestamp
194    #[prost(message, optional, tag = "3")]
195    pub created_at: ::core::option::Option<prost_types::Timestamp>,
196    /// User/system who last updated
197    #[prost(string, tag = "4")]
198    pub updated_by: ::prost::alloc::string::String,
199    /// Last update timestamp
200    #[prost(message, optional, tag = "5")]
201    pub updated_at: ::core::option::Option<prost_types::Timestamp>,
202    /// Optimistic locking / version
203    #[prost(int32, tag = "6")]
204    pub version: i32,
205    /// Soft-delete flag
206    #[prost(bool, tag = "7")]
207    pub deleted: bool,
208}