Sha256: c25de6d9fa8e331bd2f3629157f632312c91d19d7dc8a1f5d0bbab9e42aea295

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/agent/reporting/settings/application_settings'
require 'contrast/agent/reporting/settings/server_features'

module Contrast
  module Agent
    module Reporting
      # this class will hold the response from TS
      class Response
        # All of the settings from TeamServer that apply at the application level.
        # At least one, but not necessarily all, setting will differ from the agent's current set.
        # Agents are able to replace all application settings with those in this message.
        #
        # @return [Contrast::Agent::Reporting::Settings::ApplicationSettings, nil]
        attr_accessor :application_settings

        # All of the feature server_features
        #
        # @return [Contrast::Agent::Reporting::Settings::FeatureSettings, nil]
        attr_accessor :server_features

        class << self
          def application_response
            res = new
            res.application_settings = Contrast::Agent::Reporting::Settings::ApplicationSettings.new
            res
          end

          def server_response
            res = new
            res.server_features = Contrast::Agent::Reporting::Settings::ServerFeatures.new
            res
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
contrast-agent-6.1.2 lib/contrast/agent/reporting/reporting_utilities/response.rb
contrast-agent-6.1.1 lib/contrast/agent/reporting/reporting_utilities/response.rb