Class: SemgrepWebApp::ProtosAiV1Autotriage
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SemgrepWebApp::ProtosAiV1Autotriage
- Defined in:
- lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb
Overview
ProtosAiV1Autotriage Model.
Instance Attribute Summary collapse
-
#feedback ⇒ ProtosAiV1AutotriageFeedback
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#issue_id ⇒ String
TODO: Write general description for this method.
-
#match_based_id ⇒ String
TODO: Write general description for this method.
-
#memory_ids_referenced ⇒ Array[String]
TODO: Write general description for this method.
-
#memory_ids_rendered ⇒ Array[String]
TODO: Write general description for this method.
-
#reason ⇒ String
The reasoning for a false positive verdict, explaining why you might want to ignore the finding.
-
#verdict ⇒ Verdict
| value | description | |-------|---------------| | VERDICT_TRUE_POSITIVE | | | VERDICT_FALSE_POSITIVE | | | VERDICT_NO_VERDICT | |.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(feedback: SKIP, id: SKIP, issue_id: SKIP, match_based_id: SKIP, memory_ids_referenced: SKIP, memory_ids_rendered: SKIP, reason: SKIP, verdict: SKIP, additional_properties: nil) ⇒ ProtosAiV1Autotriage
constructor
A new instance of ProtosAiV1Autotriage.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(feedback: SKIP, id: SKIP, issue_id: SKIP, match_based_id: SKIP, memory_ids_referenced: SKIP, memory_ids_rendered: SKIP, reason: SKIP, verdict: SKIP, additional_properties: nil) ⇒ ProtosAiV1Autotriage
Returns a new instance of ProtosAiV1Autotriage.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 82 def initialize(feedback: SKIP, id: SKIP, issue_id: SKIP, match_based_id: SKIP, memory_ids_referenced: SKIP, memory_ids_rendered: SKIP, reason: SKIP, verdict: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @feedback = feedback unless feedback == SKIP @id = id unless id == SKIP @issue_id = issue_id unless issue_id == SKIP @match_based_id = match_based_id unless match_based_id == SKIP @memory_ids_referenced = memory_ids_referenced unless memory_ids_referenced == SKIP @memory_ids_rendered = memory_ids_rendered unless memory_ids_rendered == SKIP @reason = reason unless reason == SKIP @verdict = verdict unless verdict == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#feedback ⇒ ProtosAiV1AutotriageFeedback
TODO: Write general description for this method
14 15 16 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 14 def feedback @feedback end |
#id ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 18 def id @id end |
#issue_id ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 22 def issue_id @issue_id end |
#match_based_id ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 26 def match_based_id @match_based_id end |
#memory_ids_referenced ⇒ Array[String]
TODO: Write general description for this method
30 31 32 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 30 def memory_ids_referenced @memory_ids_referenced end |
#memory_ids_rendered ⇒ Array[String]
TODO: Write general description for this method
34 35 36 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 34 def memory_ids_rendered @memory_ids_rendered end |
#reason ⇒ String
The reasoning for a false positive verdict, explaining why you might want to ignore the finding. Empty string if verdict is true positive.
39 40 41 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 39 def reason @reason end |
#verdict ⇒ Verdict
| value | description |
|---|---|
| VERDICT_TRUE_POSITIVE | |
| VERDICT_FALSE_POSITIVE | |
| VERDICT_NO_VERDICT |
47 48 49 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 47 def verdict @verdict end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 101 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. feedback = ProtosAiV1AutotriageFeedback.from_hash(hash['feedback']) if hash['feedback'] id = hash.key?('id') ? hash['id'] : SKIP issue_id = hash.key?('issueId') ? hash['issueId'] : SKIP match_based_id = hash.key?('matchBasedId') ? hash['matchBasedId'] : SKIP memory_ids_referenced = hash.key?('memoryIdsReferenced') ? hash['memoryIdsReferenced'] : SKIP memory_ids_rendered = hash.key?('memoryIdsRendered') ? hash['memoryIdsRendered'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP verdict = hash.key?('verdict') ? hash['verdict'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ProtosAiV1Autotriage.new(feedback: feedback, id: id, issue_id: issue_id, match_based_id: match_based_id, memory_ids_referenced: memory_ids_referenced, memory_ids_rendered: memory_ids_rendered, reason: reason, verdict: verdict, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 50 def self.names @_hash = {} if @_hash.nil? @_hash['feedback'] = 'feedback' @_hash['id'] = 'id' @_hash['issue_id'] = 'issueId' @_hash['match_based_id'] = 'matchBasedId' @_hash['memory_ids_referenced'] = 'memoryIdsReferenced' @_hash['memory_ids_rendered'] = 'memoryIdsRendered' @_hash['reason'] = 'reason' @_hash['verdict'] = 'verdict' @_hash end |
.nullables ⇒ Object
An array for nullable fields
78 79 80 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 78 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 64 def self.optionals %w[ feedback id issue_id match_based_id memory_ids_referenced memory_ids_rendered reason verdict ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
145 146 147 148 149 150 151 152 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 145 def inspect class_name = self.class.name.split('::').last "<#{class_name} feedback: #{@feedback.inspect}, id: #{@id.inspect}, issue_id:"\ " #{@issue_id.inspect}, match_based_id: #{@match_based_id.inspect}, memory_ids_referenced:"\ " #{@memory_ids_referenced.inspect}, memory_ids_rendered: #{@memory_ids_rendered.inspect},"\ " reason: #{@reason.inspect}, verdict: #{@verdict.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
136 137 138 139 140 141 142 |
# File 'lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb', line 136 def to_s class_name = self.class.name.split('::').last "<#{class_name} feedback: #{@feedback}, id: #{@id}, issue_id: #{@issue_id}, match_based_id:"\ " #{@match_based_id}, memory_ids_referenced: #{@memory_ids_referenced}, memory_ids_rendered:"\ " #{@memory_ids_rendered}, reason: #{@reason}, verdict: #{@verdict}, additional_properties:"\ " #{@additional_properties}>" end |