apimatic-semgrep-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +205 -0
- data/bin/console +15 -0
- data/lib/semgrep_web_app/api_helper.rb +10 -0
- data/lib/semgrep_web_app/apis/base_api.rb +67 -0
- data/lib/semgrep_web_app/apis/deployments_service_api.rb +29 -0
- data/lib/semgrep_web_app/apis/findings_service_api.rb +107 -0
- data/lib/semgrep_web_app/apis/misc_service_api.rb +47 -0
- data/lib/semgrep_web_app/apis/policies_service_api.rb +97 -0
- data/lib/semgrep_web_app/apis/projects_service_api.rb +238 -0
- data/lib/semgrep_web_app/apis/scans_service_api.rb +65 -0
- data/lib/semgrep_web_app/apis/secrets_service_api.rb +55 -0
- data/lib/semgrep_web_app/apis/supply_chain_service_api.rb +154 -0
- data/lib/semgrep_web_app/apis/ticketing_service_api.rb +144 -0
- data/lib/semgrep_web_app/apis/triage_service_api.rb +43 -0
- data/lib/semgrep_web_app/client.rb +136 -0
- data/lib/semgrep_web_app/configuration.rb +178 -0
- data/lib/semgrep_web_app/exceptions/api_exception.rb +21 -0
- data/lib/semgrep_web_app/http/api_response.rb +19 -0
- data/lib/semgrep_web_app/http/auth/semgrep_admin_jwt.rb +53 -0
- data/lib/semgrep_web_app/http/auth/semgrep_jwt.rb +53 -0
- data/lib/semgrep_web_app/http/auth/semgrep_web_token.rb +53 -0
- data/lib/semgrep_web_app/http/http_call_back.rb +10 -0
- data/lib/semgrep_web_app/http/http_method_enum.rb +10 -0
- data/lib/semgrep_web_app/http/http_request.rb +10 -0
- data/lib/semgrep_web_app/http/http_response.rb +10 -0
- data/lib/semgrep_web_app/http/proxy_settings.rb +22 -0
- data/lib/semgrep_web_app/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/semgrep_web_app/logging/sdk_logger.rb +17 -0
- data/lib/semgrep_web_app/models/add_project_tags_request.rb +96 -0
- data/lib/semgrep_web_app/models/add_project_tags_response.rb +73 -0
- data/lib/semgrep_web_app/models/ai_powered_scan_finding.rb +426 -0
- data/lib/semgrep_web_app/models/ai_sast_findings.rb +85 -0
- data/lib/semgrep_web_app/models/api_v1_deployments_findings_response.rb +87 -0
- data/lib/semgrep_web_app/models/assistant.rb +127 -0
- data/lib/semgrep_web_app/models/autofix.rb +98 -0
- data/lib/semgrep_web_app/models/autotriage.rb +98 -0
- data/lib/semgrep_web_app/models/autotriage_verdict.rb +36 -0
- data/lib/semgrep_web_app/models/autotriage_verdict2.rb +38 -0
- data/lib/semgrep_web_app/models/base_model.rb +110 -0
- data/lib/semgrep_web_app/models/bulk_triage_request.rb +393 -0
- data/lib/semgrep_web_app/models/bulk_triage_response.rb +83 -0
- data/lib/semgrep_web_app/models/click_to_fix_failure.rb +95 -0
- data/lib/semgrep_web_app/models/click_to_fix_pr.rb +95 -0
- data/lib/semgrep_web_app/models/click_to_fix_pr_state.rb +38 -0
- data/lib/semgrep_web_app/models/component.rb +95 -0
- data/lib/semgrep_web_app/models/confidence.rb +42 -0
- data/lib/semgrep_web_app/models/confidence1.rb +40 -0
- data/lib/semgrep_web_app/models/confidence2.rb +40 -0
- data/lib/semgrep_web_app/models/confidence3.rb +40 -0
- data/lib/semgrep_web_app/models/confidence7.rb +41 -0
- data/lib/semgrep_web_app/models/confidence8.rb +42 -0
- data/lib/semgrep_web_app/models/create_sbom_export_request.rb +176 -0
- data/lib/semgrep_web_app/models/create_sbom_export_response.rb +74 -0
- data/lib/semgrep_web_app/models/create_ticket_request.rb +393 -0
- data/lib/semgrep_web_app/models/cyclonedx_version.rb +48 -0
- data/lib/semgrep_web_app/models/delete_project_response.rb +74 -0
- data/lib/semgrep_web_app/models/delete_project_tags_response.rb +73 -0
- data/lib/semgrep_web_app/models/deployment.rb +102 -0
- data/lib/semgrep_web_app/models/ecosystem.rb +91 -0
- data/lib/semgrep_web_app/models/ecosystem1.rb +92 -0
- data/lib/semgrep_web_app/models/ecosystem2.rb +76 -0
- data/lib/semgrep_web_app/models/endpoint_reference.rb +72 -0
- data/lib/semgrep_web_app/models/epss_probability.rb +45 -0
- data/lib/semgrep_web_app/models/epss_score.rb +95 -0
- data/lib/semgrep_web_app/models/exposures.rb +50 -0
- data/lib/semgrep_web_app/models/exposures2.rb +51 -0
- data/lib/semgrep_web_app/models/external_ticket.rb +116 -0
- data/lib/semgrep_web_app/models/finding_location.rb +126 -0
- data/lib/semgrep_web_app/models/finding_repository.rb +95 -0
- data/lib/semgrep_web_app/models/finding_rule.rb +158 -0
- data/lib/semgrep_web_app/models/fix_recommendation.rb +95 -0
- data/lib/semgrep_web_app/models/float_range.rb +85 -0
- data/lib/semgrep_web_app/models/format.rb +27 -0
- data/lib/semgrep_web_app/models/found_dependency.rb +128 -0
- data/lib/semgrep_web_app/models/get_project_response.rb +73 -0
- data/lib/semgrep_web_app/models/get_sbom_export_response.rb +100 -0
- data/lib/semgrep_web_app/models/guidance.rb +98 -0
- data/lib/semgrep_web_app/models/issue_type.rb +40 -0
- data/lib/semgrep_web_app/models/issue_type1.rb +40 -0
- data/lib/semgrep_web_app/models/issue_type2.rb +42 -0
- data/lib/semgrep_web_app/models/license_policy_settings.rb +42 -0
- data/lib/semgrep_web_app/models/link_ticket_request.rb +93 -0
- data/lib/semgrep_web_app/models/list_dependencies_request.rb +108 -0
- data/lib/semgrep_web_app/models/list_dependencies_response.rb +102 -0
- data/lib/semgrep_web_app/models/list_findings_response.rb +100 -0
- data/lib/semgrep_web_app/models/list_lockfiles_for_dependencies_request.rb +118 -0
- data/lib/semgrep_web_app/models/list_lockfiles_for_dependencies_response.rb +103 -0
- data/lib/semgrep_web_app/models/list_project.rb +145 -0
- data/lib/semgrep_web_app/models/list_projects_response.rb +82 -0
- data/lib/semgrep_web_app/models/list_repositories_for_dependencies_request.rb +107 -0
- data/lib/semgrep_web_app/models/list_repositories_for_dependencies_response.rb +103 -0
- data/lib/semgrep_web_app/models/managed_scan_config.rb +85 -0
- data/lib/semgrep_web_app/models/metadata_component_type.rb +101 -0
- data/lib/semgrep_web_app/models/mode.rb +48 -0
- data/lib/semgrep_web_app/models/new_triage_reason.rb +48 -0
- data/lib/semgrep_web_app/models/new_triage_state.rb +48 -0
- data/lib/semgrep_web_app/models/policy.rb +118 -0
- data/lib/semgrep_web_app/models/policy_mode.rb +48 -0
- data/lib/semgrep_web_app/models/policy_mode1.rb +40 -0
- data/lib/semgrep_web_app/models/policy_mode3.rb +51 -0
- data/lib/semgrep_web_app/models/policy_reference.rb +105 -0
- data/lib/semgrep_web_app/models/product_type.rb +38 -0
- data/lib/semgrep_web_app/models/products.rb +46 -0
- data/lib/semgrep_web_app/models/project.rb +157 -0
- data/lib/semgrep_web_app/models/protos_ai_v1_autotriage.rb +154 -0
- data/lib/semgrep_web_app/models/protos_ai_v1_autotriage_feedback.rb +98 -0
- data/lib/semgrep_web_app/models/protos_common_v1_review_comment.rb +90 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_create_ticket_response.rb +123 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_create_ticket_response_ticket_creation_failed.rb +85 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_create_ticket_response_ticket_creation_skipped.rb +85 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_create_ticket_response_ticket_creation_success.rb +106 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_delete_ticket_response.rb +76 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_diff_scan.rb +75 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_full_scan.rb +75 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_get_bootstrap_sms_vpc_response.rb +130 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_get_scan_response.rb +168 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_get_scan_response_scan_meta.rb +256 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_link_ticket_response.rb +119 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_list_deployments_response.rb +85 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_list_policies_response.rb +84 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_list_policy_rules_response.rb +104 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_list_secrets_path_response.rb +104 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_search_scans_response.rb +94 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_unlink_ticket_response.rb +77 -0
- data/lib/semgrep_web_app/models/protos_openapi_v1_update_policy_response.rb +88 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_code_location.rb +144 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_dependency.rb +87 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_dependency_filter.rb +199 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_found_dependency.rb +174 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_lockfile_dependency_summary.rb +87 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_package_filter.rb +124 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_repository_dependency_summary.rb +111 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_sbom_format_version.rb +109 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_sbom_metadata_contact.rb +95 -0
- data/lib/semgrep_web_app/models/protos_sca_v1_sbom_metadata_supplier.rb +95 -0
- data/lib/semgrep_web_app/models/protos_scan_v1_scan_findings_counts.rb +105 -0
- data/lib/semgrep_web_app/models/protos_scan_v1_scan_public.rb +228 -0
- data/lib/semgrep_web_app/models/protos_secrets_v1_historical_info.rb +116 -0
- data/lib/semgrep_web_app/models/protos_secrets_v1_secrets_finding.rb +320 -0
- data/lib/semgrep_web_app/models/protos_secrets_v1_secrets_finding_repository.rb +121 -0
- data/lib/semgrep_web_app/models/protos_ticketing_v1_external_ticket.rb +106 -0
- data/lib/semgrep_web_app/models/rating.rb +38 -0
- data/lib/semgrep_web_app/models/reachability.rb +48 -0
- data/lib/semgrep_web_app/models/repository_visibility.rb +40 -0
- data/lib/semgrep_web_app/models/review_comment.rb +100 -0
- data/lib/semgrep_web_app/models/risk.rb +40 -0
- data/lib/semgrep_web_app/models/rule.rb +292 -0
- data/lib/semgrep_web_app/models/rule_explanation.rb +98 -0
- data/lib/semgrep_web_app/models/sast_finding.rb +426 -0
- data/lib/semgrep_web_app/models/sast_findings.rb +84 -0
- data/lib/semgrep_web_app/models/sbom_output_format.rb +37 -0
- data/lib/semgrep_web_app/models/sca_finding.rb +458 -0
- data/lib/semgrep_web_app/models/sca_findings.rb +85 -0
- data/lib/semgrep_web_app/models/scm_type.rb +70 -0
- data/lib/semgrep_web_app/models/search_scans_request.rb +202 -0
- data/lib/semgrep_web_app/models/severities.rb +44 -0
- data/lib/semgrep_web_app/models/severities2.rb +45 -0
- data/lib/semgrep_web_app/models/severity.rb +46 -0
- data/lib/semgrep_web_app/models/severity1.rb +45 -0
- data/lib/semgrep_web_app/models/severity4.rb +46 -0
- data/lib/semgrep_web_app/models/severity5.rb +48 -0
- data/lib/semgrep_web_app/models/source.rb +42 -0
- data/lib/semgrep_web_app/models/state.rb +42 -0
- data/lib/semgrep_web_app/models/status.rb +55 -0
- data/lib/semgrep_web_app/models/status1.rb +52 -0
- data/lib/semgrep_web_app/models/status3.rb +44 -0
- data/lib/semgrep_web_app/models/status6.rb +55 -0
- data/lib/semgrep_web_app/models/status7.rb +59 -0
- data/lib/semgrep_web_app/models/status8.rb +61 -0
- data/lib/semgrep_web_app/models/status9.rb +55 -0
- data/lib/semgrep_web_app/models/statuses.rb +63 -0
- data/lib/semgrep_web_app/models/toggle_project_managed_scan_request.rb +108 -0
- data/lib/semgrep_web_app/models/toggle_project_managed_scan_response.rb +73 -0
- data/lib/semgrep_web_app/models/transitivities.rb +40 -0
- data/lib/semgrep_web_app/models/transitivities2.rb +42 -0
- data/lib/semgrep_web_app/models/transitivity.rb +41 -0
- data/lib/semgrep_web_app/models/transitivity1.rb +42 -0
- data/lib/semgrep_web_app/models/transitivity2.rb +40 -0
- data/lib/semgrep_web_app/models/triage_reason.rb +48 -0
- data/lib/semgrep_web_app/models/triage_reasons.rb +48 -0
- data/lib/semgrep_web_app/models/triage_reasons2.rb +50 -0
- data/lib/semgrep_web_app/models/triage_state.rb +54 -0
- data/lib/semgrep_web_app/models/unlink_ticket_request.rb +83 -0
- data/lib/semgrep_web_app/models/update_policy_request.rb +113 -0
- data/lib/semgrep_web_app/models/update_project_request.rb +121 -0
- data/lib/semgrep_web_app/models/update_project_response.rb +73 -0
- data/lib/semgrep_web_app/models/usage.rb +99 -0
- data/lib/semgrep_web_app/models/validation_state.rb +45 -0
- data/lib/semgrep_web_app/models/validation_state2.rb +47 -0
- data/lib/semgrep_web_app/models/validation_state3.rb +48 -0
- data/lib/semgrep_web_app/models/verdict.rb +41 -0
- data/lib/semgrep_web_app/models/verdict1.rb +38 -0
- data/lib/semgrep_web_app/models/visibility.rb +42 -0
- data/lib/semgrep_web_app/utilities/date_time_helper.rb +11 -0
- data/lib/semgrep_web_app/utilities/file_wrapper.rb +28 -0
- data/lib/semgrep_web_app/utilities/union_type_lookup.rb +34 -0
- data/lib/semgrep_web_app.rb +245 -0
- metadata +283 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
# semgrep_web_app
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SemgrepWebApp
|
|
7
|
+
# An AI-powered scan finding that Semgrep has identified in your organization
|
|
8
|
+
class AiPoweredScanFinding < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# AI-generated description of the potential impact if this vulnerability is
|
|
13
|
+
# exploited
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :ai_impact
|
|
16
|
+
|
|
17
|
+
# Semgrep Assistant data. Only present if Assistant is enabled
|
|
18
|
+
# @return [Assistant]
|
|
19
|
+
attr_accessor :assistant
|
|
20
|
+
|
|
21
|
+
# Failed PR creation attempts by Semgrep's autofix feature (Click to Fix)
|
|
22
|
+
# for this finding
|
|
23
|
+
# @return [Array[ClickToFixFailure]]
|
|
24
|
+
attr_accessor :click_to_fix_failures
|
|
25
|
+
|
|
26
|
+
# Pull requests created by Semgrep's autofix feature (Click to Fix) for this
|
|
27
|
+
# finding
|
|
28
|
+
# @return [Array[ClickToFixPr]]
|
|
29
|
+
attr_accessor :click_to_fix_prs
|
|
30
|
+
|
|
31
|
+
# Confidence of the finding, derived from the rule that triggered it
|
|
32
|
+
# @return [Confidence1]
|
|
33
|
+
attr_accessor :confidence
|
|
34
|
+
|
|
35
|
+
# The timestamp when this finding was created
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :created_at
|
|
38
|
+
|
|
39
|
+
# External ticket associated with finding
|
|
40
|
+
# @return [ExternalTicket]
|
|
41
|
+
attr_accessor :external_ticket
|
|
42
|
+
|
|
43
|
+
# Unique ID of the Semgrep scan that first identified this finding
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
attr_accessor :first_seen_scan_id
|
|
46
|
+
|
|
47
|
+
# Unique ID of this finding
|
|
48
|
+
# @return [Integer]
|
|
49
|
+
attr_accessor :id
|
|
50
|
+
|
|
51
|
+
# The source URL including file and line number
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :line_of_code_url
|
|
54
|
+
|
|
55
|
+
# Location of the record in a file, as reported by Semgrep. If null, then
|
|
56
|
+
# the information does not exist or lacks integrity (older or broken scans)
|
|
57
|
+
# @return [FindingLocation]
|
|
58
|
+
attr_accessor :location
|
|
59
|
+
|
|
60
|
+
# ID calculated based on a finding's file path, rule identifier and pattern,
|
|
61
|
+
# and index
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :match_based_id
|
|
64
|
+
|
|
65
|
+
# External reference to the source of this finding (e.g. PR)
|
|
66
|
+
# @return [String]
|
|
67
|
+
attr_accessor :ref
|
|
68
|
+
|
|
69
|
+
# The timestamp when this finding was detected by Semgrep (the first time,
|
|
70
|
+
# or when reintroduced)
|
|
71
|
+
# @return [String]
|
|
72
|
+
attr_accessor :relevant_since
|
|
73
|
+
|
|
74
|
+
# Which repository this finding was identified in
|
|
75
|
+
# @return [FindingRepository]
|
|
76
|
+
attr_accessor :repository
|
|
77
|
+
|
|
78
|
+
# List of external review comment information associated with a finding
|
|
79
|
+
# @return [Array[ReviewComment]]
|
|
80
|
+
attr_accessor :review_comments
|
|
81
|
+
|
|
82
|
+
# Rule that applies to this finding
|
|
83
|
+
# @return [FindingRule]
|
|
84
|
+
attr_accessor :rule
|
|
85
|
+
|
|
86
|
+
# Deprecated in favor of rule.message. Rule message at the time of finding
|
|
87
|
+
# identification. Older findings may not have a value for this field
|
|
88
|
+
# @return [String]
|
|
89
|
+
attr_accessor :rule_message
|
|
90
|
+
|
|
91
|
+
# Deprecated in favor of rule.name
|
|
92
|
+
# @return [String]
|
|
93
|
+
attr_accessor :rule_name
|
|
94
|
+
|
|
95
|
+
# Severity of the finding, derived from the rule that triggered it. Low is
|
|
96
|
+
# equivalent to INFO, Medium to WARNING, and High to ERROR
|
|
97
|
+
# @return [Severity1]
|
|
98
|
+
attr_accessor :severity
|
|
99
|
+
|
|
100
|
+
# Reference to a policy, with some basic information. If null, then the
|
|
101
|
+
# information does not exist or lacks integrity (older or broken scans)
|
|
102
|
+
# @return [PolicyReference]
|
|
103
|
+
attr_accessor :sourcing_policy
|
|
104
|
+
|
|
105
|
+
# The finding's resolution state. Managed only by changes detected at scan
|
|
106
|
+
# time, the `state` is combined with `triage_state` to ultimately determine
|
|
107
|
+
# a final `status` which is exposed in the UI and API
|
|
108
|
+
# @return [State]
|
|
109
|
+
attr_accessor :state
|
|
110
|
+
|
|
111
|
+
# When this issue's `state` (resolution state) was last updated, as distinct
|
|
112
|
+
# from when the issue was triaged (`triaged_at`)
|
|
113
|
+
# @return [String]
|
|
114
|
+
attr_accessor :state_updated_at
|
|
115
|
+
|
|
116
|
+
# The finding's status as exposed in the UI. Status is a derived property
|
|
117
|
+
# combining information from the finding `state` and `triage_state`. The
|
|
118
|
+
# `triage_state` can be used to override the scan state if the finding is
|
|
119
|
+
# still detected
|
|
120
|
+
# @return [Status]
|
|
121
|
+
attr_accessor :status
|
|
122
|
+
|
|
123
|
+
# ID calculated based on a finding's file path, rule identifier and matched
|
|
124
|
+
# code, and index. Prefer `match_based_id`
|
|
125
|
+
# @return [String]
|
|
126
|
+
attr_accessor :syntactic_id
|
|
127
|
+
|
|
128
|
+
# The detailed comment provided during triage
|
|
129
|
+
# @return [String]
|
|
130
|
+
attr_accessor :triage_comment
|
|
131
|
+
|
|
132
|
+
# Reason provided when this issue was triaged
|
|
133
|
+
# @return [TriageReason]
|
|
134
|
+
attr_accessor :triage_reason
|
|
135
|
+
|
|
136
|
+
# The finding's triage state. Note: "reviewing" and "fixing" are only in
|
|
137
|
+
# private beta. Set by the user and used along with state to generate the
|
|
138
|
+
# final "status" viewable in the UI
|
|
139
|
+
# @return [TriageState]
|
|
140
|
+
attr_accessor :triage_state
|
|
141
|
+
|
|
142
|
+
# When the finding was triaged
|
|
143
|
+
# @return [String]
|
|
144
|
+
attr_accessor :triaged_at
|
|
145
|
+
|
|
146
|
+
# A mapping from model property names to API property names.
|
|
147
|
+
def self.names
|
|
148
|
+
@_hash = {} if @_hash.nil?
|
|
149
|
+
@_hash['ai_impact'] = 'ai_impact'
|
|
150
|
+
@_hash['assistant'] = 'assistant'
|
|
151
|
+
@_hash['click_to_fix_failures'] = 'click_to_fix_failures'
|
|
152
|
+
@_hash['click_to_fix_prs'] = 'click_to_fix_prs'
|
|
153
|
+
@_hash['confidence'] = 'confidence'
|
|
154
|
+
@_hash['created_at'] = 'created_at'
|
|
155
|
+
@_hash['external_ticket'] = 'external_ticket'
|
|
156
|
+
@_hash['first_seen_scan_id'] = 'first_seen_scan_id'
|
|
157
|
+
@_hash['id'] = 'id'
|
|
158
|
+
@_hash['line_of_code_url'] = 'line_of_code_url'
|
|
159
|
+
@_hash['location'] = 'location'
|
|
160
|
+
@_hash['match_based_id'] = 'match_based_id'
|
|
161
|
+
@_hash['ref'] = 'ref'
|
|
162
|
+
@_hash['relevant_since'] = 'relevant_since'
|
|
163
|
+
@_hash['repository'] = 'repository'
|
|
164
|
+
@_hash['review_comments'] = 'review_comments'
|
|
165
|
+
@_hash['rule'] = 'rule'
|
|
166
|
+
@_hash['rule_message'] = 'rule_message'
|
|
167
|
+
@_hash['rule_name'] = 'rule_name'
|
|
168
|
+
@_hash['severity'] = 'severity'
|
|
169
|
+
@_hash['sourcing_policy'] = 'sourcing_policy'
|
|
170
|
+
@_hash['state'] = 'state'
|
|
171
|
+
@_hash['state_updated_at'] = 'state_updated_at'
|
|
172
|
+
@_hash['status'] = 'status'
|
|
173
|
+
@_hash['syntactic_id'] = 'syntactic_id'
|
|
174
|
+
@_hash['triage_comment'] = 'triage_comment'
|
|
175
|
+
@_hash['triage_reason'] = 'triage_reason'
|
|
176
|
+
@_hash['triage_state'] = 'triage_state'
|
|
177
|
+
@_hash['triaged_at'] = 'triaged_at'
|
|
178
|
+
@_hash
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# An array for optional fields
|
|
182
|
+
def self.optionals
|
|
183
|
+
%w[
|
|
184
|
+
ai_impact
|
|
185
|
+
assistant
|
|
186
|
+
click_to_fix_failures
|
|
187
|
+
click_to_fix_prs
|
|
188
|
+
confidence
|
|
189
|
+
created_at
|
|
190
|
+
external_ticket
|
|
191
|
+
first_seen_scan_id
|
|
192
|
+
id
|
|
193
|
+
line_of_code_url
|
|
194
|
+
location
|
|
195
|
+
match_based_id
|
|
196
|
+
ref
|
|
197
|
+
relevant_since
|
|
198
|
+
repository
|
|
199
|
+
review_comments
|
|
200
|
+
rule
|
|
201
|
+
rule_message
|
|
202
|
+
rule_name
|
|
203
|
+
severity
|
|
204
|
+
sourcing_policy
|
|
205
|
+
state
|
|
206
|
+
state_updated_at
|
|
207
|
+
status
|
|
208
|
+
syntactic_id
|
|
209
|
+
triage_comment
|
|
210
|
+
triage_reason
|
|
211
|
+
triage_state
|
|
212
|
+
triaged_at
|
|
213
|
+
]
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# An array for nullable fields
|
|
217
|
+
def self.nullables
|
|
218
|
+
[]
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
def initialize(ai_impact: SKIP, assistant: SKIP,
|
|
222
|
+
click_to_fix_failures: SKIP, click_to_fix_prs: SKIP,
|
|
223
|
+
confidence: SKIP, created_at: SKIP, external_ticket: SKIP,
|
|
224
|
+
first_seen_scan_id: SKIP, id: SKIP, line_of_code_url: SKIP,
|
|
225
|
+
location: SKIP, match_based_id: SKIP, ref: SKIP,
|
|
226
|
+
relevant_since: SKIP, repository: SKIP,
|
|
227
|
+
review_comments: SKIP, rule: SKIP, rule_message: SKIP,
|
|
228
|
+
rule_name: SKIP, severity: SKIP, sourcing_policy: SKIP,
|
|
229
|
+
state: SKIP, state_updated_at: SKIP, status: SKIP,
|
|
230
|
+
syntactic_id: SKIP, triage_comment: SKIP,
|
|
231
|
+
triage_reason: SKIP, triage_state: SKIP, triaged_at: SKIP,
|
|
232
|
+
additional_properties: nil)
|
|
233
|
+
# Add additional model properties to the instance
|
|
234
|
+
additional_properties = {} if additional_properties.nil?
|
|
235
|
+
|
|
236
|
+
@ai_impact = ai_impact unless ai_impact == SKIP
|
|
237
|
+
@assistant = assistant unless assistant == SKIP
|
|
238
|
+
@click_to_fix_failures = click_to_fix_failures unless click_to_fix_failures == SKIP
|
|
239
|
+
@click_to_fix_prs = click_to_fix_prs unless click_to_fix_prs == SKIP
|
|
240
|
+
@confidence = confidence unless confidence == SKIP
|
|
241
|
+
@created_at = created_at unless created_at == SKIP
|
|
242
|
+
@external_ticket = external_ticket unless external_ticket == SKIP
|
|
243
|
+
@first_seen_scan_id = first_seen_scan_id unless first_seen_scan_id == SKIP
|
|
244
|
+
@id = id unless id == SKIP
|
|
245
|
+
@line_of_code_url = line_of_code_url unless line_of_code_url == SKIP
|
|
246
|
+
@location = location unless location == SKIP
|
|
247
|
+
@match_based_id = match_based_id unless match_based_id == SKIP
|
|
248
|
+
@ref = ref unless ref == SKIP
|
|
249
|
+
@relevant_since = relevant_since unless relevant_since == SKIP
|
|
250
|
+
@repository = repository unless repository == SKIP
|
|
251
|
+
@review_comments = review_comments unless review_comments == SKIP
|
|
252
|
+
@rule = rule unless rule == SKIP
|
|
253
|
+
@rule_message = rule_message unless rule_message == SKIP
|
|
254
|
+
@rule_name = rule_name unless rule_name == SKIP
|
|
255
|
+
@severity = severity unless severity == SKIP
|
|
256
|
+
@sourcing_policy = sourcing_policy unless sourcing_policy == SKIP
|
|
257
|
+
@state = state unless state == SKIP
|
|
258
|
+
@state_updated_at = state_updated_at unless state_updated_at == SKIP
|
|
259
|
+
@status = status unless status == SKIP
|
|
260
|
+
@syntactic_id = syntactic_id unless syntactic_id == SKIP
|
|
261
|
+
@triage_comment = triage_comment unless triage_comment == SKIP
|
|
262
|
+
@triage_reason = triage_reason unless triage_reason == SKIP
|
|
263
|
+
@triage_state = triage_state unless triage_state == SKIP
|
|
264
|
+
@triaged_at = triaged_at unless triaged_at == SKIP
|
|
265
|
+
@additional_properties = additional_properties
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Creates an instance of the object from a hash.
|
|
269
|
+
def self.from_hash(hash)
|
|
270
|
+
return nil unless hash
|
|
271
|
+
|
|
272
|
+
# Extract variables from the hash.
|
|
273
|
+
ai_impact = hash.key?('ai_impact') ? hash['ai_impact'] : SKIP
|
|
274
|
+
assistant = Assistant.from_hash(hash['assistant']) if hash['assistant']
|
|
275
|
+
# Parameter is an array, so we need to iterate through it
|
|
276
|
+
click_to_fix_failures = nil
|
|
277
|
+
unless hash['click_to_fix_failures'].nil?
|
|
278
|
+
click_to_fix_failures = []
|
|
279
|
+
hash['click_to_fix_failures'].each do |structure|
|
|
280
|
+
click_to_fix_failures << (ClickToFixFailure.from_hash(structure) if structure)
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
click_to_fix_failures = SKIP unless hash.key?('click_to_fix_failures')
|
|
285
|
+
# Parameter is an array, so we need to iterate through it
|
|
286
|
+
click_to_fix_prs = nil
|
|
287
|
+
unless hash['click_to_fix_prs'].nil?
|
|
288
|
+
click_to_fix_prs = []
|
|
289
|
+
hash['click_to_fix_prs'].each do |structure|
|
|
290
|
+
click_to_fix_prs << (ClickToFixPr.from_hash(structure) if structure)
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
click_to_fix_prs = SKIP unless hash.key?('click_to_fix_prs')
|
|
295
|
+
confidence = hash.key?('confidence') ? hash['confidence'] : SKIP
|
|
296
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : SKIP
|
|
297
|
+
external_ticket = ExternalTicket.from_hash(hash['external_ticket']) if
|
|
298
|
+
hash['external_ticket']
|
|
299
|
+
first_seen_scan_id =
|
|
300
|
+
hash.key?('first_seen_scan_id') ? hash['first_seen_scan_id'] : SKIP
|
|
301
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
302
|
+
line_of_code_url =
|
|
303
|
+
hash.key?('line_of_code_url') ? hash['line_of_code_url'] : SKIP
|
|
304
|
+
location = FindingLocation.from_hash(hash['location']) if hash['location']
|
|
305
|
+
match_based_id =
|
|
306
|
+
hash.key?('match_based_id') ? hash['match_based_id'] : SKIP
|
|
307
|
+
ref = hash.key?('ref') ? hash['ref'] : SKIP
|
|
308
|
+
relevant_since =
|
|
309
|
+
hash.key?('relevant_since') ? hash['relevant_since'] : SKIP
|
|
310
|
+
repository = FindingRepository.from_hash(hash['repository']) if hash['repository']
|
|
311
|
+
# Parameter is an array, so we need to iterate through it
|
|
312
|
+
review_comments = nil
|
|
313
|
+
unless hash['review_comments'].nil?
|
|
314
|
+
review_comments = []
|
|
315
|
+
hash['review_comments'].each do |structure|
|
|
316
|
+
review_comments << (ReviewComment.from_hash(structure) if structure)
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
review_comments = SKIP unless hash.key?('review_comments')
|
|
321
|
+
rule = FindingRule.from_hash(hash['rule']) if hash['rule']
|
|
322
|
+
rule_message = hash.key?('rule_message') ? hash['rule_message'] : SKIP
|
|
323
|
+
rule_name = hash.key?('rule_name') ? hash['rule_name'] : SKIP
|
|
324
|
+
severity = hash.key?('severity') ? hash['severity'] : SKIP
|
|
325
|
+
sourcing_policy = PolicyReference.from_hash(hash['sourcing_policy']) if
|
|
326
|
+
hash['sourcing_policy']
|
|
327
|
+
state = hash.key?('state') ? hash['state'] : SKIP
|
|
328
|
+
state_updated_at =
|
|
329
|
+
hash.key?('state_updated_at') ? hash['state_updated_at'] : SKIP
|
|
330
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
331
|
+
syntactic_id = hash.key?('syntactic_id') ? hash['syntactic_id'] : SKIP
|
|
332
|
+
triage_comment =
|
|
333
|
+
hash.key?('triage_comment') ? hash['triage_comment'] : SKIP
|
|
334
|
+
triage_reason = hash.key?('triage_reason') ? hash['triage_reason'] : SKIP
|
|
335
|
+
triage_state = hash.key?('triage_state') ? hash['triage_state'] : SKIP
|
|
336
|
+
triaged_at = hash.key?('triaged_at') ? hash['triaged_at'] : SKIP
|
|
337
|
+
|
|
338
|
+
# Create a new hash for additional properties, removing known properties.
|
|
339
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
340
|
+
|
|
341
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
342
|
+
new_hash, proc { |value| value }
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
# Create object from extracted values.
|
|
346
|
+
AiPoweredScanFinding.new(ai_impact: ai_impact,
|
|
347
|
+
assistant: assistant,
|
|
348
|
+
click_to_fix_failures: click_to_fix_failures,
|
|
349
|
+
click_to_fix_prs: click_to_fix_prs,
|
|
350
|
+
confidence: confidence,
|
|
351
|
+
created_at: created_at,
|
|
352
|
+
external_ticket: external_ticket,
|
|
353
|
+
first_seen_scan_id: first_seen_scan_id,
|
|
354
|
+
id: id,
|
|
355
|
+
line_of_code_url: line_of_code_url,
|
|
356
|
+
location: location,
|
|
357
|
+
match_based_id: match_based_id,
|
|
358
|
+
ref: ref,
|
|
359
|
+
relevant_since: relevant_since,
|
|
360
|
+
repository: repository,
|
|
361
|
+
review_comments: review_comments,
|
|
362
|
+
rule: rule,
|
|
363
|
+
rule_message: rule_message,
|
|
364
|
+
rule_name: rule_name,
|
|
365
|
+
severity: severity,
|
|
366
|
+
sourcing_policy: sourcing_policy,
|
|
367
|
+
state: state,
|
|
368
|
+
state_updated_at: state_updated_at,
|
|
369
|
+
status: status,
|
|
370
|
+
syntactic_id: syntactic_id,
|
|
371
|
+
triage_comment: triage_comment,
|
|
372
|
+
triage_reason: triage_reason,
|
|
373
|
+
triage_state: triage_state,
|
|
374
|
+
triaged_at: triaged_at,
|
|
375
|
+
additional_properties: additional_properties)
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Validates an instance of the object from a given value.
|
|
379
|
+
# @param [AiPoweredScanFinding | Hash] The value against the validation is performed.
|
|
380
|
+
def self.validate(value)
|
|
381
|
+
return true if value.instance_of? self
|
|
382
|
+
|
|
383
|
+
return false unless value.instance_of? Hash
|
|
384
|
+
|
|
385
|
+
true
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Provides a human-readable string representation of the object.
|
|
389
|
+
def to_s
|
|
390
|
+
class_name = self.class.name.split('::').last
|
|
391
|
+
"<#{class_name} ai_impact: #{@ai_impact}, assistant: #{@assistant}, click_to_fix_failures:"\
|
|
392
|
+
" #{@click_to_fix_failures}, click_to_fix_prs: #{@click_to_fix_prs}, confidence:"\
|
|
393
|
+
" #{@confidence}, created_at: #{@created_at}, external_ticket: #{@external_ticket},"\
|
|
394
|
+
" first_seen_scan_id: #{@first_seen_scan_id}, id: #{@id}, line_of_code_url:"\
|
|
395
|
+
" #{@line_of_code_url}, location: #{@location}, match_based_id: #{@match_based_id}, ref:"\
|
|
396
|
+
" #{@ref}, relevant_since: #{@relevant_since}, repository: #{@repository}, review_comments:"\
|
|
397
|
+
" #{@review_comments}, rule: #{@rule}, rule_message: #{@rule_message}, rule_name:"\
|
|
398
|
+
" #{@rule_name}, severity: #{@severity}, sourcing_policy: #{@sourcing_policy}, state:"\
|
|
399
|
+
" #{@state}, state_updated_at: #{@state_updated_at}, status: #{@status}, syntactic_id:"\
|
|
400
|
+
" #{@syntactic_id}, triage_comment: #{@triage_comment}, triage_reason: #{@triage_reason},"\
|
|
401
|
+
" triage_state: #{@triage_state}, triaged_at: #{@triaged_at}, additional_properties:"\
|
|
402
|
+
" #{@additional_properties}>"
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
406
|
+
def inspect
|
|
407
|
+
class_name = self.class.name.split('::').last
|
|
408
|
+
"<#{class_name} ai_impact: #{@ai_impact.inspect}, assistant: #{@assistant.inspect},"\
|
|
409
|
+
" click_to_fix_failures: #{@click_to_fix_failures.inspect}, click_to_fix_prs:"\
|
|
410
|
+
" #{@click_to_fix_prs.inspect}, confidence: #{@confidence.inspect}, created_at:"\
|
|
411
|
+
" #{@created_at.inspect}, external_ticket: #{@external_ticket.inspect}, first_seen_scan_id:"\
|
|
412
|
+
" #{@first_seen_scan_id.inspect}, id: #{@id.inspect}, line_of_code_url:"\
|
|
413
|
+
" #{@line_of_code_url.inspect}, location: #{@location.inspect}, match_based_id:"\
|
|
414
|
+
" #{@match_based_id.inspect}, ref: #{@ref.inspect}, relevant_since:"\
|
|
415
|
+
" #{@relevant_since.inspect}, repository: #{@repository.inspect}, review_comments:"\
|
|
416
|
+
" #{@review_comments.inspect}, rule: #{@rule.inspect}, rule_message:"\
|
|
417
|
+
" #{@rule_message.inspect}, rule_name: #{@rule_name.inspect}, severity:"\
|
|
418
|
+
" #{@severity.inspect}, sourcing_policy: #{@sourcing_policy.inspect}, state:"\
|
|
419
|
+
" #{@state.inspect}, state_updated_at: #{@state_updated_at.inspect}, status:"\
|
|
420
|
+
" #{@status.inspect}, syntactic_id: #{@syntactic_id.inspect}, triage_comment:"\
|
|
421
|
+
" #{@triage_comment.inspect}, triage_reason: #{@triage_reason.inspect}, triage_state:"\
|
|
422
|
+
" #{@triage_state.inspect}, triaged_at: #{@triaged_at.inspect}, additional_properties:"\
|
|
423
|
+
" #{@additional_properties}>"
|
|
424
|
+
end
|
|
425
|
+
end
|
|
426
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# semgrep_web_app
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SemgrepWebApp
|
|
7
|
+
# A list of AI-powered scan findings that Semgrep has identified in your
|
|
8
|
+
# organization
|
|
9
|
+
class AiSastFindings < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# A list of AI-powered scan findings.
|
|
14
|
+
# @return [Array[AiPoweredScanFinding]]
|
|
15
|
+
attr_accessor :findings
|
|
16
|
+
|
|
17
|
+
# A mapping from model property names to API property names.
|
|
18
|
+
def self.names
|
|
19
|
+
@_hash = {} if @_hash.nil?
|
|
20
|
+
@_hash['findings'] = 'findings'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
%w[
|
|
27
|
+
findings
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(findings: SKIP, additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
40
|
+
@findings = findings unless findings == SKIP
|
|
41
|
+
@additional_properties = additional_properties
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
# Parameter is an array, so we need to iterate through it
|
|
50
|
+
findings = nil
|
|
51
|
+
unless hash['findings'].nil?
|
|
52
|
+
findings = []
|
|
53
|
+
hash['findings'].each do |structure|
|
|
54
|
+
findings << (AiPoweredScanFinding.from_hash(structure) if structure)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
findings = SKIP unless hash.key?('findings')
|
|
59
|
+
|
|
60
|
+
# Create a new hash for additional properties, removing known properties.
|
|
61
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
new_hash, proc { |value| value }
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Create object from extracted values.
|
|
68
|
+
AiSastFindings.new(findings: findings,
|
|
69
|
+
additional_properties: additional_properties)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Provides a human-readable string representation of the object.
|
|
73
|
+
def to_s
|
|
74
|
+
class_name = self.class.name.split('::').last
|
|
75
|
+
"<#{class_name} findings: #{@findings}, additional_properties: #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} findings: #{@findings.inspect}, additional_properties:"\
|
|
82
|
+
" #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# semgrep_web_app
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SemgrepWebApp
|
|
7
|
+
# ApiV1DeploymentsFindingsResponse Model.
|
|
8
|
+
class ApiV1DeploymentsFindingsResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[Object]]
|
|
14
|
+
attr_accessor :findings
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['findings'] = 'findings'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
findings
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(findings: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@findings = findings unless findings == SKIP
|
|
40
|
+
@additional_properties = additional_properties
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
findings = hash.key?('findings') ? APIHelper.deserialize_union_type(
|
|
49
|
+
UnionTypeLookUp.get(:ApiV1DeploymentsFindingsResponseFindings), hash['findings']
|
|
50
|
+
) : SKIP
|
|
51
|
+
|
|
52
|
+
# Create a new hash for additional properties, removing known properties.
|
|
53
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
54
|
+
|
|
55
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
56
|
+
new_hash, proc { |value| value }
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
ApiV1DeploymentsFindingsResponse.new(findings: findings,
|
|
61
|
+
additional_properties: additional_properties)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Validates an instance of the object from a given value.
|
|
65
|
+
# @param [ApiV1DeploymentsFindingsResponse | Hash] The value against the validation is performed.
|
|
66
|
+
def self.validate(value)
|
|
67
|
+
return true if value.instance_of? self
|
|
68
|
+
|
|
69
|
+
return false unless value.instance_of? Hash
|
|
70
|
+
|
|
71
|
+
true
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Provides a human-readable string representation of the object.
|
|
75
|
+
def to_s
|
|
76
|
+
class_name = self.class.name.split('::').last
|
|
77
|
+
"<#{class_name} findings: #{@findings}, additional_properties: #{@additional_properties}>"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
81
|
+
def inspect
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} findings: #{@findings.inspect}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|