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,104 @@
|
|
|
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
|
+
# ProtosOpenapiV1ListSecretsPathResponse Model.
|
|
8
|
+
class ProtosOpenapiV1ListSecretsPathResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Cursor to paginate through the results.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :cursor
|
|
15
|
+
|
|
16
|
+
# List of Secrets associated with the given Deployment.
|
|
17
|
+
# @return [Array[ProtosSecretsV1SecretsFinding]]
|
|
18
|
+
attr_accessor :findings
|
|
19
|
+
|
|
20
|
+
# Cursor to paginate backwards through the results.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :previous
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['cursor'] = 'cursor'
|
|
28
|
+
@_hash['findings'] = 'findings'
|
|
29
|
+
@_hash['previous'] = 'previous'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
cursor
|
|
37
|
+
findings
|
|
38
|
+
previous
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(cursor: SKIP, findings: SKIP, previous: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@cursor = cursor unless cursor == SKIP
|
|
53
|
+
@findings = findings unless findings == SKIP
|
|
54
|
+
@previous = previous unless previous == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
cursor = hash.key?('cursor') ? hash['cursor'] : SKIP
|
|
64
|
+
# Parameter is an array, so we need to iterate through it
|
|
65
|
+
findings = nil
|
|
66
|
+
unless hash['findings'].nil?
|
|
67
|
+
findings = []
|
|
68
|
+
hash['findings'].each do |structure|
|
|
69
|
+
findings << (ProtosSecretsV1SecretsFinding.from_hash(structure) if structure)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
findings = SKIP unless hash.key?('findings')
|
|
74
|
+
previous = hash.key?('previous') ? hash['previous'] : SKIP
|
|
75
|
+
|
|
76
|
+
# Create a new hash for additional properties, removing known properties.
|
|
77
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
78
|
+
|
|
79
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
80
|
+
new_hash, proc { |value| value }
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Create object from extracted values.
|
|
84
|
+
ProtosOpenapiV1ListSecretsPathResponse.new(cursor: cursor,
|
|
85
|
+
findings: findings,
|
|
86
|
+
previous: previous,
|
|
87
|
+
additional_properties: additional_properties)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a human-readable string representation of the object.
|
|
91
|
+
def to_s
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} cursor: #{@cursor}, findings: #{@findings}, previous: #{@previous},"\
|
|
94
|
+
" additional_properties: #{@additional_properties}>"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
98
|
+
def inspect
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} cursor: #{@cursor.inspect}, findings: #{@findings.inspect}, previous:"\
|
|
101
|
+
" #{@previous.inspect}, additional_properties: #{@additional_properties}>"
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
# ProtosOpenapiV1SearchScansResponse Model.
|
|
8
|
+
class ProtosOpenapiV1SearchScansResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Cursor to retrieve the next page of results.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :cursor
|
|
15
|
+
|
|
16
|
+
# List of scans.
|
|
17
|
+
# @return [Array[ProtosScanV1ScanPublic]]
|
|
18
|
+
attr_accessor :scans
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['cursor'] = 'cursor'
|
|
24
|
+
@_hash['scans'] = 'scans'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
cursor
|
|
32
|
+
scans
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(cursor: SKIP, scans: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@cursor = cursor unless cursor == SKIP
|
|
46
|
+
@scans = scans unless scans == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
cursor = hash.key?('cursor') ? hash['cursor'] : SKIP
|
|
56
|
+
# Parameter is an array, so we need to iterate through it
|
|
57
|
+
scans = nil
|
|
58
|
+
unless hash['scans'].nil?
|
|
59
|
+
scans = []
|
|
60
|
+
hash['scans'].each do |structure|
|
|
61
|
+
scans << (ProtosScanV1ScanPublic.from_hash(structure) if structure)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
scans = SKIP unless hash.key?('scans')
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
ProtosOpenapiV1SearchScansResponse.new(cursor: cursor,
|
|
76
|
+
scans: scans,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} cursor: #{@cursor}, scans: #{@scans}, additional_properties:"\
|
|
84
|
+
" #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} cursor: #{@cursor.inspect}, scans: #{@scans.inspect},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
# ProtosOpenapiV1UnlinkTicketResponse Model.
|
|
8
|
+
class ProtosOpenapiV1UnlinkTicketResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of finding IDs that were successfully unlinked from their tickets
|
|
13
|
+
# @return [Array[String]]
|
|
14
|
+
attr_accessor :unlinked_issue_ids
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['unlinked_issue_ids'] = 'unlinked_issue_ids'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
unlinked_issue_ids
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(unlinked_issue_ids: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@unlinked_issue_ids = unlinked_issue_ids unless unlinked_issue_ids == 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
|
+
unlinked_issue_ids =
|
|
49
|
+
hash.key?('unlinked_issue_ids') ? hash['unlinked_issue_ids'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create a new hash for additional properties, removing known properties.
|
|
52
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
53
|
+
|
|
54
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
55
|
+
new_hash, proc { |value| value }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
ProtosOpenapiV1UnlinkTicketResponse.new(unlinked_issue_ids: unlinked_issue_ids,
|
|
60
|
+
additional_properties: additional_properties)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Provides a human-readable string representation of the object.
|
|
64
|
+
def to_s
|
|
65
|
+
class_name = self.class.name.split('::').last
|
|
66
|
+
"<#{class_name} unlinked_issue_ids: #{@unlinked_issue_ids}, additional_properties:"\
|
|
67
|
+
" #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} unlinked_issue_ids: #{@unlinked_issue_ids.inspect}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
# ProtosOpenapiV1UpdatePolicyResponse Model.
|
|
8
|
+
class ProtosOpenapiV1UpdatePolicyResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Policy ID (numeric). Example: `456`. Can be found at
|
|
13
|
+
# `/deployments/{deploymentId}/policies`.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :policy_id
|
|
16
|
+
|
|
17
|
+
# Policy ID (numeric). Example: `456`. Can be found at
|
|
18
|
+
# `/deployments/{deploymentId}/policies`.
|
|
19
|
+
# @return [Rule]
|
|
20
|
+
attr_accessor :updated_rule
|
|
21
|
+
|
|
22
|
+
# A mapping from model property names to API property names.
|
|
23
|
+
def self.names
|
|
24
|
+
@_hash = {} if @_hash.nil?
|
|
25
|
+
@_hash['policy_id'] = 'policyId'
|
|
26
|
+
@_hash['updated_rule'] = 'updatedRule'
|
|
27
|
+
@_hash
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for optional fields
|
|
31
|
+
def self.optionals
|
|
32
|
+
%w[
|
|
33
|
+
policy_id
|
|
34
|
+
updated_rule
|
|
35
|
+
]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(policy_id: SKIP, updated_rule: SKIP,
|
|
44
|
+
additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@policy_id = policy_id unless policy_id == SKIP
|
|
49
|
+
@updated_rule = updated_rule unless updated_rule == SKIP
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
policy_id = hash.key?('policyId') ? hash['policyId'] : SKIP
|
|
59
|
+
updated_rule = Rule.from_hash(hash['updatedRule']) if hash['updatedRule']
|
|
60
|
+
|
|
61
|
+
# Create a new hash for additional properties, removing known properties.
|
|
62
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
63
|
+
|
|
64
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
65
|
+
new_hash, proc { |value| value }
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# Create object from extracted values.
|
|
69
|
+
ProtosOpenapiV1UpdatePolicyResponse.new(policy_id: policy_id,
|
|
70
|
+
updated_rule: updated_rule,
|
|
71
|
+
additional_properties: additional_properties)
|
|
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} policy_id: #{@policy_id}, updated_rule: #{@updated_rule},"\
|
|
78
|
+
" additional_properties: #{@additional_properties}>"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
82
|
+
def inspect
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} policy_id: #{@policy_id.inspect}, updated_rule: #{@updated_rule.inspect},"\
|
|
85
|
+
" additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# semgrep_web_app
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module SemgrepWebApp
|
|
8
|
+
# Specific location in a file.
|
|
9
|
+
class ProtosScaV1CodeLocation < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Timestamp when code file was last modified, if available.
|
|
14
|
+
# @return [DateTime]
|
|
15
|
+
attr_accessor :committed_at
|
|
16
|
+
|
|
17
|
+
# Ending column number (1 indexed).
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :end_col
|
|
20
|
+
|
|
21
|
+
# Ending line number (1 indexed).
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :end_line
|
|
24
|
+
|
|
25
|
+
# Path to a file.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :path
|
|
28
|
+
|
|
29
|
+
# Starting column number (1 indexed).
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :start_col
|
|
32
|
+
|
|
33
|
+
# Starting line number (1 indexed).
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :start_line
|
|
36
|
+
|
|
37
|
+
# URL to code location if available, otherwise empty.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :url
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['committed_at'] = 'committedAt'
|
|
45
|
+
@_hash['end_col'] = 'endCol'
|
|
46
|
+
@_hash['end_line'] = 'endLine'
|
|
47
|
+
@_hash['path'] = 'path'
|
|
48
|
+
@_hash['start_col'] = 'startCol'
|
|
49
|
+
@_hash['start_line'] = 'startLine'
|
|
50
|
+
@_hash['url'] = 'url'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
%w[
|
|
57
|
+
committed_at
|
|
58
|
+
end_col
|
|
59
|
+
end_line
|
|
60
|
+
path
|
|
61
|
+
start_col
|
|
62
|
+
start_line
|
|
63
|
+
url
|
|
64
|
+
]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# An array for nullable fields
|
|
68
|
+
def self.nullables
|
|
69
|
+
[]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def initialize(committed_at: SKIP, end_col: SKIP, end_line: SKIP,
|
|
73
|
+
path: SKIP, start_col: SKIP, start_line: SKIP, url: SKIP,
|
|
74
|
+
additional_properties: nil)
|
|
75
|
+
# Add additional model properties to the instance
|
|
76
|
+
additional_properties = {} if additional_properties.nil?
|
|
77
|
+
|
|
78
|
+
@committed_at = committed_at unless committed_at == SKIP
|
|
79
|
+
@end_col = end_col unless end_col == SKIP
|
|
80
|
+
@end_line = end_line unless end_line == SKIP
|
|
81
|
+
@path = path unless path == SKIP
|
|
82
|
+
@start_col = start_col unless start_col == SKIP
|
|
83
|
+
@start_line = start_line unless start_line == SKIP
|
|
84
|
+
@url = url unless url == SKIP
|
|
85
|
+
@additional_properties = additional_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Creates an instance of the object from a hash.
|
|
89
|
+
def self.from_hash(hash)
|
|
90
|
+
return nil unless hash
|
|
91
|
+
|
|
92
|
+
# Extract variables from the hash.
|
|
93
|
+
committed_at = if hash.key?('committedAt')
|
|
94
|
+
(DateTimeHelper.from_rfc3339(hash['committedAt']) if hash['committedAt'])
|
|
95
|
+
else
|
|
96
|
+
SKIP
|
|
97
|
+
end
|
|
98
|
+
end_col = hash.key?('endCol') ? hash['endCol'] : SKIP
|
|
99
|
+
end_line = hash.key?('endLine') ? hash['endLine'] : SKIP
|
|
100
|
+
path = hash.key?('path') ? hash['path'] : SKIP
|
|
101
|
+
start_col = hash.key?('startCol') ? hash['startCol'] : SKIP
|
|
102
|
+
start_line = hash.key?('startLine') ? hash['startLine'] : SKIP
|
|
103
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
104
|
+
|
|
105
|
+
# Create a new hash for additional properties, removing known properties.
|
|
106
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
107
|
+
|
|
108
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
109
|
+
new_hash, proc { |value| value }
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# Create object from extracted values.
|
|
113
|
+
ProtosScaV1CodeLocation.new(committed_at: committed_at,
|
|
114
|
+
end_col: end_col,
|
|
115
|
+
end_line: end_line,
|
|
116
|
+
path: path,
|
|
117
|
+
start_col: start_col,
|
|
118
|
+
start_line: start_line,
|
|
119
|
+
url: url,
|
|
120
|
+
additional_properties: additional_properties)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def to_custom_committed_at
|
|
124
|
+
DateTimeHelper.to_rfc3339(committed_at)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Provides a human-readable string representation of the object.
|
|
128
|
+
def to_s
|
|
129
|
+
class_name = self.class.name.split('::').last
|
|
130
|
+
"<#{class_name} committed_at: #{@committed_at}, end_col: #{@end_col}, end_line:"\
|
|
131
|
+
" #{@end_line}, path: #{@path}, start_col: #{@start_col}, start_line: #{@start_line}, url:"\
|
|
132
|
+
" #{@url}, additional_properties: #{@additional_properties}>"
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
136
|
+
def inspect
|
|
137
|
+
class_name = self.class.name.split('::').last
|
|
138
|
+
"<#{class_name} committed_at: #{@committed_at.inspect}, end_col: #{@end_col.inspect},"\
|
|
139
|
+
" end_line: #{@end_line.inspect}, path: #{@path.inspect}, start_col: #{@start_col.inspect},"\
|
|
140
|
+
" start_line: #{@start_line.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
141
|
+
" #{@additional_properties}>"
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
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
|
+
# A specific dependency.
|
|
8
|
+
class ProtosScaV1Dependency < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# String identifier of dependency
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :name
|
|
15
|
+
|
|
16
|
+
# Version specifier of dependency.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :version_specifier
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['name'] = 'name'
|
|
24
|
+
@_hash['version_specifier'] = 'versionSpecifier'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
name
|
|
32
|
+
version_specifier
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(name: SKIP, version_specifier: SKIP,
|
|
42
|
+
additional_properties: nil)
|
|
43
|
+
# Add additional model properties to the instance
|
|
44
|
+
additional_properties = {} if additional_properties.nil?
|
|
45
|
+
|
|
46
|
+
@name = name unless name == SKIP
|
|
47
|
+
@version_specifier = version_specifier unless version_specifier == SKIP
|
|
48
|
+
@additional_properties = additional_properties
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates an instance of the object from a hash.
|
|
52
|
+
def self.from_hash(hash)
|
|
53
|
+
return nil unless hash
|
|
54
|
+
|
|
55
|
+
# Extract variables from the hash.
|
|
56
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
|
57
|
+
version_specifier =
|
|
58
|
+
hash.key?('versionSpecifier') ? hash['versionSpecifier'] : SKIP
|
|
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
|
+
ProtosScaV1Dependency.new(name: name,
|
|
69
|
+
version_specifier: version_specifier,
|
|
70
|
+
additional_properties: additional_properties)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a human-readable string representation of the object.
|
|
74
|
+
def to_s
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} name: #{@name}, version_specifier: #{@version_specifier},"\
|
|
77
|
+
" 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} name: #{@name.inspect}, version_specifier: #{@version_specifier.inspect},"\
|
|
84
|
+
" additional_properties: #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|