Sha256: e3e8ea8a97ae399824a5933d1af3bba5bb0dfab14e2c0056e88a66bdbc588743
Contents?: true
Size: 1.7 KB
Versions: 18
Compression:
Stored size: 1.7 KB
Contents
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/utils/object_share' require 'contrast/agent/reporting/settings/virtual_patch_condition' module Contrast module Agent module Reporting module Settings # The settings for each virtual patch in the agent. class VirtualPatch # @return [String] attr_reader :name # @return [String] attr_reader :key # @return [String] attr_reader :uuid def initialize hash @name = hash[:name] @key = hash[:key] @uuid = hash[:uuid] hash[:headers]&.each do |header_json| headers << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end hash[:parameters]&.each do |header_json| parameters << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end hash[:urls]&.each do |header_json| urls << Contrast::Agent::Reporting::Settings::VirtualPatchCondition.new(header_json) end end # @return [Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>] def headers @_headers ||= [] end # @return [Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>] def parameters @_parameters ||= [] end # @return [Array<Contrast::Agent::Reporting::Settings::VirtualPatchCondition>] def urls @_urls ||= [] end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems