Class: SemgrepWebApp::ProtosOpenapiV1LinkTicketResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SemgrepWebApp::ProtosOpenapiV1LinkTicketResponse
- Defined in:
- lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb
Overview
ProtosOpenapiV1LinkTicketResponse Model.
Instance Attribute Summary collapse
-
#external_slug ⇒ String
The external slug identifier for the ticket (e.g. SEC-123).
-
#linked_issue_ids ⇒ Array[String]
List of finding IDs that were successfully linked to the ticket.
-
#replaced_issue_ids ⇒ Array[String]
List of finding IDs where an existing ticket link was replaced.
-
#ticket_id ⇒ Integer
The internal ID of the linked ticket record.
-
#ticket_url ⇒ String
The URL of the linked ticket.
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(external_slug: SKIP, linked_issue_ids: SKIP, replaced_issue_ids: SKIP, ticket_id: SKIP, ticket_url: SKIP, additional_properties: nil) ⇒ ProtosOpenapiV1LinkTicketResponse
constructor
A new instance of ProtosOpenapiV1LinkTicketResponse.
-
#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(external_slug: SKIP, linked_issue_ids: SKIP, replaced_issue_ids: SKIP, ticket_id: SKIP, ticket_url: SKIP, additional_properties: nil) ⇒ ProtosOpenapiV1LinkTicketResponse
Returns a new instance of ProtosOpenapiV1LinkTicketResponse.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 59 def initialize(external_slug: SKIP, linked_issue_ids: SKIP, replaced_issue_ids: SKIP, ticket_id: SKIP, ticket_url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @external_slug = external_slug unless external_slug == SKIP @linked_issue_ids = linked_issue_ids unless linked_issue_ids == SKIP @replaced_issue_ids = replaced_issue_ids unless replaced_issue_ids == SKIP @ticket_id = ticket_id unless ticket_id == SKIP @ticket_url = ticket_url unless ticket_url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#external_slug ⇒ String
The external slug identifier for the ticket (e.g. SEC-123)
14 15 16 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 14 def external_slug @external_slug end |
#linked_issue_ids ⇒ Array[String]
List of finding IDs that were successfully linked to the ticket
18 19 20 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 18 def linked_issue_ids @linked_issue_ids end |
#replaced_issue_ids ⇒ Array[String]
List of finding IDs where an existing ticket link was replaced
22 23 24 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 22 def replaced_issue_ids @replaced_issue_ids end |
#ticket_id ⇒ Integer
The internal ID of the linked ticket record
26 27 28 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 26 def ticket_id @ticket_id end |
#ticket_url ⇒ String
The URL of the linked ticket
30 31 32 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 30 def ticket_url @ticket_url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. external_slug = hash.key?('external_slug') ? hash['external_slug'] : SKIP linked_issue_ids = hash.key?('linked_issue_ids') ? hash['linked_issue_ids'] : SKIP replaced_issue_ids = hash.key?('replaced_issue_ids') ? hash['replaced_issue_ids'] : SKIP ticket_id = hash.key?('ticket_id') ? hash['ticket_id'] : SKIP ticket_url = hash.key?('ticket_url') ? hash['ticket_url'] : 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. ProtosOpenapiV1LinkTicketResponse.new(external_slug: external_slug, linked_issue_ids: linked_issue_ids, replaced_issue_ids: replaced_issue_ids, ticket_id: ticket_id, ticket_url: ticket_url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['external_slug'] = 'external_slug' @_hash['linked_issue_ids'] = 'linked_issue_ids' @_hash['replaced_issue_ids'] = 'replaced_issue_ids' @_hash['ticket_id'] = 'ticket_id' @_hash['ticket_url'] = 'ticket_url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 44 def self.optionals %w[ external_slug linked_issue_ids replaced_issue_ids ticket_id ticket_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
111 112 113 114 115 116 117 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 111 def inspect class_name = self.class.name.split('::').last "<#{class_name} external_slug: #{@external_slug.inspect}, linked_issue_ids:"\ " #{@linked_issue_ids.inspect}, replaced_issue_ids: #{@replaced_issue_ids.inspect},"\ " ticket_id: #{@ticket_id.inspect}, ticket_url: #{@ticket_url.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
103 104 105 106 107 108 |
# File 'lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb', line 103 def to_s class_name = self.class.name.split('::').last "<#{class_name} external_slug: #{@external_slug}, linked_issue_ids: #{@linked_issue_ids},"\ " replaced_issue_ids: #{@replaced_issue_ids}, ticket_id: #{@ticket_id}, ticket_url:"\ " #{@ticket_url}, additional_properties: #{@additional_properties}>" end |