1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Metadata {
6 #[prost(string, tag="15")]
7 pub workspace_id: ::prost::alloc::string::String,
8 #[prost(string, tag="2")]
9 pub project_id: ::prost::alloc::string::String,
10 #[prost(string, tag="7")]
11 pub build_id: ::prost::alloc::string::String,
12 #[prost(string, tag="13")]
13 pub reference: ::prost::alloc::string::String,
14 #[prost(string, optional, tag="10")]
15 pub pull_request_number: ::core::option::Option<::prost::alloc::string::String>,
16 #[prost(string, optional, tag="11")]
17 pub tracked_branch_id: ::core::option::Option<::prost::alloc::string::String>,
18 #[prost(string, tag="4")]
19 pub revision_oid: ::prost::alloc::string::String,
20 #[prost(enumeration="AnalysisResult", tag="14")]
21 pub result: i32,
22 #[prost(string, tag="3")]
23 pub branch: ::prost::alloc::string::String,
24 #[prost(bool, tag="23")]
25 pub backfill: bool,
26 #[prost(string, tag="5")]
27 pub root_directory: ::prost::alloc::string::String,
28 #[prost(string, tag="6")]
29 pub repository_clone_url: ::prost::alloc::string::String,
30 #[prost(uint32, optional, tag="12")]
31 pub files_analyzed: ::core::option::Option<u32>,
32 #[prost(message, optional, tag="8")]
33 pub start_time: ::core::option::Option<::pbjson_types::Timestamp>,
34 #[prost(message, optional, tag="9")]
35 pub finish_time: ::core::option::Option<::pbjson_types::Timestamp>,
36 #[prost(string, tag="17")]
37 pub commit_message: ::prost::alloc::string::String,
38 #[prost(message, optional, tag="16")]
39 pub committed_at: ::core::option::Option<::pbjson_types::Timestamp>,
40 #[prost(string, tag="18")]
41 pub committer_email: ::prost::alloc::string::String,
42 #[prost(string, tag="19")]
43 pub committer_name: ::prost::alloc::string::String,
44 #[prost(string, tag="20")]
45 pub author_email: ::prost::alloc::string::String,
46 #[prost(string, tag="21")]
47 pub author_name: ::prost::alloc::string::String,
48 #[prost(message, optional, tag="22")]
49 pub authored_at: ::core::option::Option<::pbjson_types::Timestamp>,
50}
51#[allow(clippy::derive_partial_eq_without_eq)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct Message {
54 #[prost(string, tag="14")]
55 pub workspace_id: ::prost::alloc::string::String,
56 #[prost(string, tag="8")]
57 pub project_id: ::prost::alloc::string::String,
58 #[prost(string, tag="9")]
59 pub reference: ::prost::alloc::string::String,
60 #[prost(string, tag="10")]
61 pub build_id: ::prost::alloc::string::String,
62 #[prost(message, optional, tag="12")]
63 pub build_timestamp: ::core::option::Option<::pbjson_types::Timestamp>,
64 #[prost(string, tag="11")]
65 pub commit_sha: ::prost::alloc::string::String,
66 #[prost(message, optional, tag="2")]
67 pub timestamp: ::core::option::Option<::pbjson_types::Timestamp>,
68 #[prost(string, tag="6")]
69 pub module: ::prost::alloc::string::String,
70 #[prost(string, tag="5")]
72 pub ty: ::prost::alloc::string::String,
73 #[prost(string, tag="3")]
74 pub message: ::prost::alloc::string::String,
75 #[prost(string, tag="13")]
76 pub details: ::prost::alloc::string::String,
77 #[prost(enumeration="MessageLevel", tag="4")]
78 pub level: i32,
79 #[prost(map="string, string", tag="7")]
80 pub tags: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
81}
82#[allow(clippy::derive_partial_eq_without_eq)]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct Stats {
85 #[prost(string, tag="15")]
86 pub workspace_id: ::prost::alloc::string::String,
87 #[prost(string, tag="7")]
88 pub project_id: ::prost::alloc::string::String,
89 #[prost(string, tag="12")]
90 pub reference: ::prost::alloc::string::String,
91 #[prost(string, tag="13")]
92 pub build_id: ::prost::alloc::string::String,
93 #[prost(string, tag="14")]
94 pub commit_sha: ::prost::alloc::string::String,
95 #[prost(string, optional, tag="9")]
96 pub pull_request_number: ::core::option::Option<::prost::alloc::string::String>,
97 #[prost(string, optional, tag="10")]
98 pub tracked_branch_id: ::core::option::Option<::prost::alloc::string::String>,
99 #[prost(message, optional, tag="8")]
100 pub analyzed_at: ::core::option::Option<::pbjson_types::Timestamp>,
101 #[prost(string, tag="2")]
102 pub name: ::prost::alloc::string::String,
103 #[prost(string, tag="3")]
104 pub fully_qualified_name: ::prost::alloc::string::String,
105 #[prost(string, tag="4")]
106 pub path: ::prost::alloc::string::String,
107 #[prost(enumeration="ComponentType", tag="5")]
108 pub kind: i32,
109 #[prost(enumeration="Language", tag="6")]
110 pub language: i32,
111 #[prost(uint32, optional, tag="100")]
112 pub files: ::core::option::Option<u32>,
113 #[prost(uint32, optional, tag="101")]
114 pub classes: ::core::option::Option<u32>,
115 #[prost(uint32, optional, tag="102")]
116 pub functions: ::core::option::Option<u32>,
117 #[prost(uint32, optional, tag="103")]
118 pub fields: ::core::option::Option<u32>,
119 #[prost(uint32, optional, tag="104")]
120 pub lines: ::core::option::Option<u32>,
121 #[prost(uint32, optional, tag="105")]
122 pub code_lines: ::core::option::Option<u32>,
123 #[prost(uint32, optional, tag="106")]
124 pub comment_lines: ::core::option::Option<u32>,
125 #[prost(uint32, optional, tag="107")]
126 pub blank_lines: ::core::option::Option<u32>,
127 #[prost(uint32, optional, tag="108")]
128 pub complexity: ::core::option::Option<u32>,
129 #[prost(uint32, optional, tag="109")]
130 pub cyclomatic: ::core::option::Option<u32>,
131 #[prost(uint32, optional, tag="110")]
132 pub lcom4: ::core::option::Option<u32>,
133}
134#[allow(clippy::derive_partial_eq_without_eq)]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct Invocation {
137 #[prost(string, tag="31")]
138 pub workspace_id: ::prost::alloc::string::String,
139 #[prost(string, tag="26")]
140 pub project_id: ::prost::alloc::string::String,
141 #[prost(string, tag="27")]
142 pub reference: ::prost::alloc::string::String,
143 #[prost(string, tag="28")]
144 pub build_id: ::prost::alloc::string::String,
145 #[prost(message, optional, tag="30")]
146 pub build_timestamp: ::core::option::Option<::pbjson_types::Timestamp>,
147 #[prost(string, tag="29")]
148 pub commit_sha: ::prost::alloc::string::String,
149 #[prost(string, tag="1")]
151 pub id: ::prost::alloc::string::String,
152 #[prost(string, tag="2")]
153 pub qlty_cli_version: ::prost::alloc::string::String,
154 #[prost(string, tag="3")]
155 pub plugin_name: ::prost::alloc::string::String,
156 #[prost(string, tag="4")]
157 pub driver_name: ::prost::alloc::string::String,
158 #[prost(string, tag="32")]
159 pub prefix: ::prost::alloc::string::String,
160 #[prost(string, tag="5")]
161 pub plugin_version: ::prost::alloc::string::String,
162 #[prost(enumeration="ExecutionVerb", tag="6")]
164 pub verb: i32,
165 #[prost(uint32, tag="7")]
166 pub targets_count: u32,
167 #[prost(string, repeated, tag="8")]
168 pub target_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
169 #[prost(string, repeated, tag="9")]
170 pub config_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
171 #[prost(string, tag="10")]
173 pub script: ::prost::alloc::string::String,
174 #[prost(string, tag="11")]
175 pub cwd: ::prost::alloc::string::String,
176 #[prost(map="string, string", tag="12")]
177 pub env: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
178 #[prost(message, optional, tag="13")]
180 pub started_at: ::core::option::Option<::pbjson_types::Timestamp>,
181 #[prost(float, tag="14")]
182 pub duration_secs: f32,
183 #[prost(int64, optional, tag="15")]
185 pub exit_code: ::core::option::Option<i64>,
186 #[prost(string, tag="16")]
187 pub stdout: ::prost::alloc::string::String,
188 #[prost(string, tag="17")]
189 pub stderr: ::prost::alloc::string::String,
190 #[prost(string, optional, tag="18")]
191 pub tmpfile_path: ::core::option::Option<::prost::alloc::string::String>,
192 #[prost(string, optional, tag="19")]
193 pub tmpfile_contents: ::core::option::Option<::prost::alloc::string::String>,
194 #[prost(enumeration="ExitResult", tag="21")]
196 pub exit_result: i32,
197 #[prost(string, optional, tag="23")]
198 pub parser_error: ::core::option::Option<::prost::alloc::string::String>,
199 #[prost(uint32, tag="24")]
200 pub issues_count: u32,
201 #[prost(uint32, tag="25")]
202 pub rewrites_count: u32,
203}
204#[allow(clippy::derive_partial_eq_without_eq)]
205#[derive(Clone, PartialEq, ::prost::Message)]
206pub struct Issue {
207 #[prost(string, tag="39")]
208 pub workspace_id: ::prost::alloc::string::String,
209 #[prost(string, tag="31")]
210 pub project_id: ::prost::alloc::string::String,
211 #[prost(string, tag="1")]
212 pub id: ::prost::alloc::string::String,
213 #[prost(string, tag="36")]
214 pub reference: ::prost::alloc::string::String,
215 #[prost(string, tag="37")]
216 pub build_id: ::prost::alloc::string::String,
217 #[prost(string, tag="38")]
218 pub commit_sha: ::prost::alloc::string::String,
219 #[prost(string, optional, tag="33")]
220 pub pull_request_number: ::core::option::Option<::prost::alloc::string::String>,
221 #[prost(string, optional, tag="34")]
222 pub tracked_branch_id: ::core::option::Option<::prost::alloc::string::String>,
223 #[prost(message, optional, tag="32")]
224 pub analyzed_at: ::core::option::Option<::pbjson_types::Timestamp>,
225 #[prost(string, tag="25")]
226 pub tool: ::prost::alloc::string::String,
227 #[prost(string, tag="26")]
228 pub driver: ::prost::alloc::string::String,
229 #[prost(string, tag="3")]
230 pub rule_key: ::prost::alloc::string::String,
231 #[prost(string, tag="4")]
232 pub message: ::prost::alloc::string::String,
233 #[prost(enumeration="Level", tag="24")]
234 pub level: i32,
235 #[prost(enumeration="Language", tag="7")]
236 pub language: i32,
237 #[prost(string, tag="6")]
238 pub fingerprint: ::prost::alloc::string::String,
239 #[prost(enumeration="Category", tag="19")]
240 pub category: i32,
241 #[prost(string, tag="20")]
242 pub snippet: ::prost::alloc::string::String,
243 #[prost(string, tag="21")]
244 pub snippet_with_context: ::prost::alloc::string::String,
245 #[prost(string, tag="9")]
246 pub replacement: ::prost::alloc::string::String,
247 #[prost(string, tag="30")]
248 pub documentation_url: ::prost::alloc::string::String,
249 #[prost(uint32, tag="10")]
250 pub effort_minutes: u32,
251 #[prost(uint32, tag="27")]
252 pub value: u32,
253 #[prost(uint32, tag="11")]
254 pub value_delta: u32,
255 #[prost(string, tag="12")]
256 pub source_checksum: ::prost::alloc::string::String,
257 #[prost(uint32, tag="13")]
258 pub source_checksum_version: u32,
259 #[prost(string, tag="14")]
260 pub author: ::prost::alloc::string::String,
261 #[prost(message, optional, tag="15")]
262 pub author_time: ::core::option::Option<::pbjson_types::Timestamp>,
263 #[prost(string, repeated, tag="16")]
264 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
265 #[prost(message, optional, tag="29")]
266 pub location: ::core::option::Option<Location>,
267 #[prost(message, repeated, tag="28")]
268 pub other_locations: ::prost::alloc::vec::Vec<Location>,
269 #[prost(message, repeated, tag="40")]
270 pub suggestions: ::prost::alloc::vec::Vec<Suggestion>,
271 #[prost(message, optional, tag="17")]
272 pub properties: ::core::option::Option<::pbjson_types::Struct>,
273 #[prost(map="string, string", tag="18")]
274 pub partial_fingerprints: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
275 #[prost(enumeration="Mode", tag="35")]
276 pub mode: i32,
277 #[prost(bool, tag="41")]
278 pub on_added_line: bool,
279}
280#[allow(clippy::derive_partial_eq_without_eq)]
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct Suggestion {
283 #[prost(string, tag="1")]
284 pub id: ::prost::alloc::string::String,
285 #[prost(string, tag="2")]
286 pub description: ::prost::alloc::string::String,
287 #[prost(string, tag="5")]
288 pub patch: ::prost::alloc::string::String,
289 #[prost(enumeration="SuggestionSource", tag="7")]
290 pub source: i32,
291 #[prost(message, repeated, tag="6")]
292 pub replacements: ::prost::alloc::vec::Vec<Replacement>,
293}
294#[allow(clippy::derive_partial_eq_without_eq)]
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct Replacement {
297 #[prost(string, tag="1")]
298 pub data: ::prost::alloc::string::String,
299 #[prost(message, optional, tag="2")]
300 pub location: ::core::option::Option<Location>,
301}
302#[allow(clippy::derive_partial_eq_without_eq)]
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct Location {
305 #[prost(string, tag="1")]
306 pub path: ::prost::alloc::string::String,
307 #[prost(message, optional, tag="2")]
308 pub range: ::core::option::Option<Range>,
309}
310#[allow(clippy::derive_partial_eq_without_eq)]
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct Range {
313 #[prost(uint32, tag="1")]
314 pub start_line: u32,
315 #[prost(uint32, tag="2")]
316 pub start_column: u32,
317 #[prost(uint32, tag="3")]
318 pub end_line: u32,
319 #[prost(uint32, tag="4")]
320 pub end_column: u32,
321 #[prost(uint32, optional, tag="5")]
322 pub start_byte: ::core::option::Option<u32>,
323 #[prost(uint32, optional, tag="6")]
324 pub end_byte: ::core::option::Option<u32>,
325}
326#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
327#[repr(i32)]
328pub enum ExecutionVerb {
329 Unspecified = 0,
330 Check = 1,
331 Fmt = 2,
332 Validate = 3,
333}
334impl ExecutionVerb {
335 pub fn as_str_name(&self) -> &'static str {
340 match self {
341 ExecutionVerb::Unspecified => "EXECUTION_VERB_UNSPECIFIED",
342 ExecutionVerb::Check => "EXECUTION_VERB_CHECK",
343 ExecutionVerb::Fmt => "EXECUTION_VERB_FMT",
344 ExecutionVerb::Validate => "EXECUTION_VERB_VALIDATE",
345 }
346 }
347 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
349 match value {
350 "EXECUTION_VERB_UNSPECIFIED" => Some(Self::Unspecified),
351 "EXECUTION_VERB_CHECK" => Some(Self::Check),
352 "EXECUTION_VERB_FMT" => Some(Self::Fmt),
353 "EXECUTION_VERB_VALIDATE" => Some(Self::Validate),
354 _ => None,
355 }
356 }
357}
358#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
359#[repr(i32)]
360pub enum Mode {
361 Unspecified = 0,
362 Block = 1,
363 Comment = 2,
364 Monitor = 3,
365 Disabled = 4,
366}
367impl Mode {
368 pub fn as_str_name(&self) -> &'static str {
373 match self {
374 Mode::Unspecified => "MODE_UNSPECIFIED",
375 Mode::Block => "MODE_BLOCK",
376 Mode::Comment => "MODE_COMMENT",
377 Mode::Monitor => "MODE_MONITOR",
378 Mode::Disabled => "MODE_DISABLED",
379 }
380 }
381 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
383 match value {
384 "MODE_UNSPECIFIED" => Some(Self::Unspecified),
385 "MODE_BLOCK" => Some(Self::Block),
386 "MODE_COMMENT" => Some(Self::Comment),
387 "MODE_MONITOR" => Some(Self::Monitor),
388 "MODE_DISABLED" => Some(Self::Disabled),
389 _ => None,
390 }
391 }
392}
393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
394#[repr(i32)]
395pub enum SuggestionSource {
396 Unspecified = 0,
397 Tool = 1,
398 Llm = 2,
399}
400impl SuggestionSource {
401 pub fn as_str_name(&self) -> &'static str {
406 match self {
407 SuggestionSource::Unspecified => "SUGGESTION_SOURCE_UNSPECIFIED",
408 SuggestionSource::Tool => "SUGGESTION_SOURCE_TOOL",
409 SuggestionSource::Llm => "SUGGESTION_SOURCE_LLM",
410 }
411 }
412 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
414 match value {
415 "SUGGESTION_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
416 "SUGGESTION_SOURCE_TOOL" => Some(Self::Tool),
417 "SUGGESTION_SOURCE_LLM" => Some(Self::Llm),
418 _ => None,
419 }
420 }
421}
422#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
423#[repr(i32)]
424pub enum MessageLevel {
425 Unspecified = 0,
426 Debug = 1,
427 Info = 2,
428 Warning = 3,
429 Error = 4,
430 Fatal = 5,
431}
432impl MessageLevel {
433 pub fn as_str_name(&self) -> &'static str {
438 match self {
439 MessageLevel::Unspecified => "MESSAGE_LEVEL_UNSPECIFIED",
440 MessageLevel::Debug => "MESSAGE_LEVEL_DEBUG",
441 MessageLevel::Info => "MESSAGE_LEVEL_INFO",
442 MessageLevel::Warning => "MESSAGE_LEVEL_WARNING",
443 MessageLevel::Error => "MESSAGE_LEVEL_ERROR",
444 MessageLevel::Fatal => "MESSAGE_LEVEL_FATAL",
445 }
446 }
447 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
449 match value {
450 "MESSAGE_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
451 "MESSAGE_LEVEL_DEBUG" => Some(Self::Debug),
452 "MESSAGE_LEVEL_INFO" => Some(Self::Info),
453 "MESSAGE_LEVEL_WARNING" => Some(Self::Warning),
454 "MESSAGE_LEVEL_ERROR" => Some(Self::Error),
455 "MESSAGE_LEVEL_FATAL" => Some(Self::Fatal),
456 _ => None,
457 }
458 }
459}
460#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
461#[repr(i32)]
462pub enum Level {
463 Unspecified = 0,
464 Fmt = 1,
465 Low = 2,
466 Medium = 3,
467 High = 4,
468}
469impl Level {
470 pub fn as_str_name(&self) -> &'static str {
475 match self {
476 Level::Unspecified => "LEVEL_UNSPECIFIED",
477 Level::Fmt => "LEVEL_FMT",
478 Level::Low => "LEVEL_LOW",
479 Level::Medium => "LEVEL_MEDIUM",
480 Level::High => "LEVEL_HIGH",
481 }
482 }
483 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
485 match value {
486 "LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
487 "LEVEL_FMT" => Some(Self::Fmt),
488 "LEVEL_LOW" => Some(Self::Low),
489 "LEVEL_MEDIUM" => Some(Self::Medium),
490 "LEVEL_HIGH" => Some(Self::High),
491 _ => None,
492 }
493 }
494}
495#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
496#[repr(i32)]
497pub enum Category {
498 Unspecified = 0,
499 Bug = 1,
500 Vulnerability = 2,
501 Structure = 3,
502 Duplication = 4,
503 SecurityHotspot = 5,
504 Performance = 6,
505 Documentation = 7,
506 TypeCheck = 8,
507 Style = 9,
508 AntiPattern = 10,
509 Accessibility = 11,
510 DeadCode = 12,
511 Lint = 13,
512}
513impl Category {
514 pub fn as_str_name(&self) -> &'static str {
519 match self {
520 Category::Unspecified => "CATEGORY_UNSPECIFIED",
521 Category::Bug => "CATEGORY_BUG",
522 Category::Vulnerability => "CATEGORY_VULNERABILITY",
523 Category::Structure => "CATEGORY_STRUCTURE",
524 Category::Duplication => "CATEGORY_DUPLICATION",
525 Category::SecurityHotspot => "CATEGORY_SECURITY_HOTSPOT",
526 Category::Performance => "CATEGORY_PERFORMANCE",
527 Category::Documentation => "CATEGORY_DOCUMENTATION",
528 Category::TypeCheck => "CATEGORY_TYPE_CHECK",
529 Category::Style => "CATEGORY_STYLE",
530 Category::AntiPattern => "CATEGORY_ANTI_PATTERN",
531 Category::Accessibility => "CATEGORY_ACCESSIBILITY",
532 Category::DeadCode => "CATEGORY_DEAD_CODE",
533 Category::Lint => "CATEGORY_LINT",
534 }
535 }
536 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
538 match value {
539 "CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
540 "CATEGORY_BUG" => Some(Self::Bug),
541 "CATEGORY_VULNERABILITY" => Some(Self::Vulnerability),
542 "CATEGORY_STRUCTURE" => Some(Self::Structure),
543 "CATEGORY_DUPLICATION" => Some(Self::Duplication),
544 "CATEGORY_SECURITY_HOTSPOT" => Some(Self::SecurityHotspot),
545 "CATEGORY_PERFORMANCE" => Some(Self::Performance),
546 "CATEGORY_DOCUMENTATION" => Some(Self::Documentation),
547 "CATEGORY_TYPE_CHECK" => Some(Self::TypeCheck),
548 "CATEGORY_STYLE" => Some(Self::Style),
549 "CATEGORY_ANTI_PATTERN" => Some(Self::AntiPattern),
550 "CATEGORY_ACCESSIBILITY" => Some(Self::Accessibility),
551 "CATEGORY_DEAD_CODE" => Some(Self::DeadCode),
552 "CATEGORY_LINT" => Some(Self::Lint),
553 _ => None,
554 }
555 }
556}
557#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
558#[repr(i32)]
559pub enum AnalysisResult {
560 Unspecified = 0,
561 Success = 1,
562 Error = 2,
563}
564impl AnalysisResult {
565 pub fn as_str_name(&self) -> &'static str {
570 match self {
571 AnalysisResult::Unspecified => "ANALYSIS_RESULT_UNSPECIFIED",
572 AnalysisResult::Success => "ANALYSIS_RESULT_SUCCESS",
573 AnalysisResult::Error => "ANALYSIS_RESULT_ERROR",
574 }
575 }
576 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
578 match value {
579 "ANALYSIS_RESULT_UNSPECIFIED" => Some(Self::Unspecified),
580 "ANALYSIS_RESULT_SUCCESS" => Some(Self::Success),
581 "ANALYSIS_RESULT_ERROR" => Some(Self::Error),
582 _ => None,
583 }
584 }
585}
586#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
587#[repr(i32)]
588pub enum ExitResult {
589 Unspecified = 0,
590 Success = 1,
591 KnownError = 2,
592 UnknownError = 3,
593 NoIssues = 4,
594}
595impl ExitResult {
596 pub fn as_str_name(&self) -> &'static str {
601 match self {
602 ExitResult::Unspecified => "EXIT_RESULT_UNSPECIFIED",
603 ExitResult::Success => "EXIT_RESULT_SUCCESS",
604 ExitResult::KnownError => "EXIT_RESULT_KNOWN_ERROR",
605 ExitResult::UnknownError => "EXIT_RESULT_UNKNOWN_ERROR",
606 ExitResult::NoIssues => "EXIT_RESULT_NO_ISSUES",
607 }
608 }
609 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
611 match value {
612 "EXIT_RESULT_UNSPECIFIED" => Some(Self::Unspecified),
613 "EXIT_RESULT_SUCCESS" => Some(Self::Success),
614 "EXIT_RESULT_KNOWN_ERROR" => Some(Self::KnownError),
615 "EXIT_RESULT_UNKNOWN_ERROR" => Some(Self::UnknownError),
616 "EXIT_RESULT_NO_ISSUES" => Some(Self::NoIssues),
617 _ => None,
618 }
619 }
620}
621#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
622#[repr(i32)]
623pub enum ComponentType {
624 Unspecified = 0,
625 File = 1,
626 Directory = 2,
627 Project = 3,
628 Module = 5,
629 Class = 6,
630 Function = 7,
631}
632impl ComponentType {
633 pub fn as_str_name(&self) -> &'static str {
638 match self {
639 ComponentType::Unspecified => "COMPONENT_TYPE_UNSPECIFIED",
640 ComponentType::File => "COMPONENT_TYPE_FILE",
641 ComponentType::Directory => "COMPONENT_TYPE_DIRECTORY",
642 ComponentType::Project => "COMPONENT_TYPE_PROJECT",
643 ComponentType::Module => "COMPONENT_TYPE_MODULE",
644 ComponentType::Class => "COMPONENT_TYPE_CLASS",
645 ComponentType::Function => "COMPONENT_TYPE_FUNCTION",
646 }
647 }
648 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
650 match value {
651 "COMPONENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
652 "COMPONENT_TYPE_FILE" => Some(Self::File),
653 "COMPONENT_TYPE_DIRECTORY" => Some(Self::Directory),
654 "COMPONENT_TYPE_PROJECT" => Some(Self::Project),
655 "COMPONENT_TYPE_MODULE" => Some(Self::Module),
656 "COMPONENT_TYPE_CLASS" => Some(Self::Class),
657 "COMPONENT_TYPE_FUNCTION" => Some(Self::Function),
658 _ => None,
659 }
660 }
661}
662#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
663#[repr(i32)]
664pub enum Language {
665 Unspecified = 0,
666 Unknown = 1,
667 Java = 2,
668 Javascript = 3,
669 Typescript = 4,
670 Python = 5,
671 Ruby = 6,
672 Jsx = 7,
673 Tsx = 8,
674 Go = 9,
675 Rust = 10,
676 Kotlin = 11,
677 Php = 12,
678}
679impl Language {
680 pub fn as_str_name(&self) -> &'static str {
685 match self {
686 Language::Unspecified => "LANGUAGE_UNSPECIFIED",
687 Language::Unknown => "LANGUAGE_UNKNOWN",
688 Language::Java => "LANGUAGE_JAVA",
689 Language::Javascript => "LANGUAGE_JAVASCRIPT",
690 Language::Typescript => "LANGUAGE_TYPESCRIPT",
691 Language::Python => "LANGUAGE_PYTHON",
692 Language::Ruby => "LANGUAGE_RUBY",
693 Language::Jsx => "LANGUAGE_JSX",
694 Language::Tsx => "LANGUAGE_TSX",
695 Language::Go => "LANGUAGE_GO",
696 Language::Rust => "LANGUAGE_RUST",
697 Language::Kotlin => "LANGUAGE_KOTLIN",
698 Language::Php => "LANGUAGE_PHP",
699 }
700 }
701 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
703 match value {
704 "LANGUAGE_UNSPECIFIED" => Some(Self::Unspecified),
705 "LANGUAGE_UNKNOWN" => Some(Self::Unknown),
706 "LANGUAGE_JAVA" => Some(Self::Java),
707 "LANGUAGE_JAVASCRIPT" => Some(Self::Javascript),
708 "LANGUAGE_TYPESCRIPT" => Some(Self::Typescript),
709 "LANGUAGE_PYTHON" => Some(Self::Python),
710 "LANGUAGE_RUBY" => Some(Self::Ruby),
711 "LANGUAGE_JSX" => Some(Self::Jsx),
712 "LANGUAGE_TSX" => Some(Self::Tsx),
713 "LANGUAGE_GO" => Some(Self::Go),
714 "LANGUAGE_RUST" => Some(Self::Rust),
715 "LANGUAGE_KOTLIN" => Some(Self::Kotlin),
716 "LANGUAGE_PHP" => Some(Self::Php),
717 _ => None,
718 }
719 }
720}
721include!("qlty.analysis.v1.serde.rs");
722