class EmassClient::ControlsRequestPutBody

Attributes

acronym[RW]
Required

Required to match the NIST SP 800-53 Revision 4.

common_control_provider[RW]
Conditional

Indicate the type of Common Control Provider for an “Inherited” Security Control.

control_designation[RW]
Required

Control designations

estimated_completion_date[RW]
Required

Field is required for Implementation Plan.

impact[RW]
Optional

Values include the following options (Very Low, Low, Moderate,High,Very High)

impact_description[RW]
Optional

Include description of Security Control’s impact.

implementation_narrative[RW]
Required

Includes security control comments. Character Limit = 2,000.

implementation_status[RW]
Optional

Implementation Status of the Security Control for the information system.

likelihood[RW]
Optional

Values include the following options (Very Low, Low, Moderate,High,Very High)

na_justification[RW]
Conditional

Provide justification for Security Controls deemed Not Applicable to the system.

recommendations[RW]
Optional

Include recommendations. Character Limit = 2,000.

relevance_of_threat[RW]
Optional

Values include the following options (Very Low, Low, Moderate,High,Very High)

residual_risk_level[RW]
Optional

Values include the following options (Very Low, Low, Moderate,High,Very High)

responsible_entities[RW]
Required

Include written description of Responsible Entities that are responsible for the Security Control. Character Limit = 2,000.

severity[RW]
Optional

Values include the following options (Very Low, Low, Moderate,High,Very High)

slcm_comments[RW]
Conditional

Additional comments for Security Control regarding SLCM. Character Limit = 4,000.

slcm_criticality[RW]
Conditional

Criticality of Security Control regarding SLCM. Character Limit = 2,000.

slcm_frequency[RW]
Conditional

SLCM frequency

slcm_method[RW]
Conditional

SLCM method utilized

slcm_reporting[RW]
Conditional

Method for reporting Security Control for SLCM. Character Limit = 2,000.

slcm_tracking[RW]
Conditional

How Non-Compliant Security Controls will be tracked for SLCM. Character Limit = 2,000.

test_method[RW]
Optional

Identifies the assessment method / combination that will determine if the security requirements are implemented correctly.

vulnerabilty_summary[RW]
Optional

Include vulnerability summary. Character Limit = 2,000.

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/emass_client/models/controls_request_put_body.rb, line 108
def self.attribute_map
  {
    :'acronym' => :'acronym',
    :'responsible_entities' => :'responsibleEntities',
    :'implementation_status' => :'implementationStatus',
    :'common_control_provider' => :'commonControlProvider',
    :'na_justification' => :'naJustification',
    :'control_designation' => :'controlDesignation',
    :'test_method' => :'testMethod',
    :'estimated_completion_date' => :'estimatedCompletionDate',
    :'implementation_narrative' => :'implementationNarrative',
    :'slcm_criticality' => :'slcmCriticality',
    :'slcm_frequency' => :'slcmFrequency',
    :'slcm_method' => :'slcmMethod',
    :'slcm_reporting' => :'slcmReporting',
    :'slcm_tracking' => :'slcmTracking',
    :'slcm_comments' => :'slcmComments',
    :'severity' => :'severity',
    :'vulnerabilty_summary' => :'vulnerabiltySummary',
    :'recommendations' => :'recommendations',
    :'relevance_of_threat' => :'relevanceOfThreat',
    :'likelihood' => :'likelihood',
    :'impact' => :'impact',
    :'impact_description' => :'impactDescription',
    :'residual_risk_level' => :'residualRiskLevel'
  }
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/emass_client/models/controls_request_put_body.rb, line 494
def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/emass_client/models/controls_request_put_body.rb, line 173
def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ControlsRequestPutBody` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ControlsRequestPutBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'acronym')
    self.acronym = attributes[:'acronym']
  end

  if attributes.key?(:'responsible_entities')
    self.responsible_entities = attributes[:'responsible_entities']
  end

  if attributes.key?(:'implementation_status')
    self.implementation_status = attributes[:'implementation_status']
  end

  if attributes.key?(:'common_control_provider')
    self.common_control_provider = attributes[:'common_control_provider']
  end

  if attributes.key?(:'na_justification')
    self.na_justification = attributes[:'na_justification']
  end

  if attributes.key?(:'control_designation')
    self.control_designation = attributes[:'control_designation']
  end

  if attributes.key?(:'test_method')
    self.test_method = attributes[:'test_method']
  end

  if attributes.key?(:'estimated_completion_date')
    self.estimated_completion_date = attributes[:'estimated_completion_date']
  end

  if attributes.key?(:'implementation_narrative')
    self.implementation_narrative = attributes[:'implementation_narrative']
  end

  if attributes.key?(:'slcm_criticality')
    self.slcm_criticality = attributes[:'slcm_criticality']
  end

  if attributes.key?(:'slcm_frequency')
    self.slcm_frequency = attributes[:'slcm_frequency']
  end

  if attributes.key?(:'slcm_method')
    self.slcm_method = attributes[:'slcm_method']
  end

  if attributes.key?(:'slcm_reporting')
    self.slcm_reporting = attributes[:'slcm_reporting']
  end

  if attributes.key?(:'slcm_tracking')
    self.slcm_tracking = attributes[:'slcm_tracking']
  end

  if attributes.key?(:'slcm_comments')
    self.slcm_comments = attributes[:'slcm_comments']
  end

  if attributes.key?(:'severity')
    self.severity = attributes[:'severity']
  end

  if attributes.key?(:'vulnerabilty_summary')
    self.vulnerabilty_summary = attributes[:'vulnerabilty_summary']
  end

  if attributes.key?(:'recommendations')
    self.recommendations = attributes[:'recommendations']
  end

  if attributes.key?(:'relevance_of_threat')
    self.relevance_of_threat = attributes[:'relevance_of_threat']
  end

  if attributes.key?(:'likelihood')
    self.likelihood = attributes[:'likelihood']
  end

  if attributes.key?(:'impact')
    self.impact = attributes[:'impact']
  end

  if attributes.key?(:'impact_description')
    self.impact_description = attributes[:'impact_description']
  end

  if attributes.key?(:'residual_risk_level')
    self.residual_risk_level = attributes[:'residual_risk_level']
  end
end
openapi_nullable() click to toggle source

List of attributes with nullable: true

# File lib/emass_client/models/controls_request_put_body.rb, line 166
def self.openapi_nullable
  Set.new([
  ])
end
openapi_types() click to toggle source

Attribute type mapping.

# File lib/emass_client/models/controls_request_put_body.rb, line 137
def self.openapi_types
  {
    :'acronym' => :'Object',
    :'responsible_entities' => :'Object',
    :'implementation_status' => :'Object',
    :'common_control_provider' => :'Object',
    :'na_justification' => :'Object',
    :'control_designation' => :'Object',
    :'test_method' => :'Object',
    :'estimated_completion_date' => :'Object',
    :'implementation_narrative' => :'Object',
    :'slcm_criticality' => :'Object',
    :'slcm_frequency' => :'Object',
    :'slcm_method' => :'Object',
    :'slcm_reporting' => :'Object',
    :'slcm_tracking' => :'Object',
    :'slcm_comments' => :'Object',
    :'severity' => :'Object',
    :'vulnerabilty_summary' => :'Object',
    :'recommendations' => :'Object',
    :'relevance_of_threat' => :'Object',
    :'likelihood' => :'Object',
    :'impact' => :'Object',
    :'impact_description' => :'Object',
    :'residual_risk_level' => :'Object'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/emass_client/models/controls_request_put_body.rb, line 451
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      acronym == o.acronym &&
      responsible_entities == o.responsible_entities &&
      implementation_status == o.implementation_status &&
      common_control_provider == o.common_control_provider &&
      na_justification == o.na_justification &&
      control_designation == o.control_designation &&
      test_method == o.test_method &&
      estimated_completion_date == o.estimated_completion_date &&
      implementation_narrative == o.implementation_narrative &&
      slcm_criticality == o.slcm_criticality &&
      slcm_frequency == o.slcm_frequency &&
      slcm_method == o.slcm_method &&
      slcm_reporting == o.slcm_reporting &&
      slcm_tracking == o.slcm_tracking &&
      slcm_comments == o.slcm_comments &&
      severity == o.severity &&
      vulnerabilty_summary == o.vulnerabilty_summary &&
      recommendations == o.recommendations &&
      relevance_of_threat == o.relevance_of_threat &&
      likelihood == o.likelihood &&
      impact == o.impact &&
      impact_description == o.impact_description &&
      residual_risk_level == o.residual_risk_level
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/emass_client/models/controls_request_put_body.rb, line 524
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    EmassClient.const_get(type).build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/emass_client/models/controls_request_put_body.rb, line 593
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/emass_client/models/controls_request_put_body.rb, line 501
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    end
  end

  self
end
common_control_provider=(common_control_provider) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] common_control_provider Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 351
def common_control_provider=(common_control_provider)
  validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave'])
  unless validator.valid?(common_control_provider)
    fail ArgumentError, "invalid value for \"common_control_provider\", must be one of #{validator.allowable_values}."
  end
  @common_control_provider = common_control_provider
end
control_designation=(control_designation) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] control_designation Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 361
def control_designation=(control_designation)
  validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid'])
  unless validator.valid?(control_designation)
    fail ArgumentError, "invalid value for \"control_designation\", must be one of #{validator.allowable_values}."
  end
  @control_designation = control_designation
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/emass_client/models/controls_request_put_body.rb, line 481
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Integer] Hash code

# File lib/emass_client/models/controls_request_put_body.rb, line 487
def hash
  [acronym, responsible_entities, implementation_status, common_control_provider, na_justification, control_designation, test_method, estimated_completion_date, implementation_narrative, slcm_criticality, slcm_frequency, slcm_method, slcm_reporting, slcm_tracking, slcm_comments, severity, vulnerabilty_summary, recommendations, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level].hash
end
impact=(impact) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] impact Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 431
def impact=(impact)
  validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  unless validator.valid?(impact)
    fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}."
  end
  @impact = impact
end
implementation_status=(implementation_status) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] implementation_status Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 341
def implementation_status=(implementation_status)
  validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited'])
  unless validator.valid?(implementation_status)
    fail ArgumentError, "invalid value for \"implementation_status\", must be one of #{validator.allowable_values}."
  end
  @implementation_status = implementation_status
end
likelihood=(likelihood) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] likelihood Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 421
def likelihood=(likelihood)
  validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  unless validator.valid?(likelihood)
    fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}."
  end
  @likelihood = likelihood
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/emass_client/models/controls_request_put_body.rb, line 281
def list_invalid_properties
  invalid_properties = Array.new
  if @acronym.nil?
    invalid_properties.push('invalid value for "acronym", acronym cannot be nil.')
  end

  if @responsible_entities.nil?
    invalid_properties.push('invalid value for "responsible_entities", responsible_entities cannot be nil.')
  end

  if @control_designation.nil?
    invalid_properties.push('invalid value for "control_designation", control_designation cannot be nil.')
  end

  if @estimated_completion_date.nil?
    invalid_properties.push('invalid value for "estimated_completion_date", estimated_completion_date cannot be nil.')
  end

  if @implementation_narrative.nil?
    invalid_properties.push('invalid value for "implementation_narrative", implementation_narrative cannot be nil.')
  end

  invalid_properties
end
relevance_of_threat=(relevance_of_threat) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] relevance_of_threat Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 411
def relevance_of_threat=(relevance_of_threat)
  validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  unless validator.valid?(relevance_of_threat)
    fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}."
  end
  @relevance_of_threat = relevance_of_threat
end
residual_risk_level=(residual_risk_level) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] residual_risk_level Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 441
def residual_risk_level=(residual_risk_level)
  validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  unless validator.valid?(residual_risk_level)
    fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}."
  end
  @residual_risk_level = residual_risk_level
end
severity=(severity) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] severity Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 401
def severity=(severity)
  validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  unless validator.valid?(severity)
    fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}."
  end
  @severity = severity
end
slcm_frequency=(slcm_frequency) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] slcm_frequency Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 381
def slcm_frequency=(slcm_frequency)
  validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined'])
  unless validator.valid?(slcm_frequency)
    fail ArgumentError, "invalid value for \"slcm_frequency\", must be one of #{validator.allowable_values}."
  end
  @slcm_frequency = slcm_frequency
end
slcm_method=(slcm_method) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] slcm_method Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 391
def slcm_method=(slcm_method)
  validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined'])
  unless validator.valid?(slcm_method)
    fail ArgumentError, "invalid value for \"slcm_method\", must be one of #{validator.allowable_values}."
  end
  @slcm_method = slcm_method
end
test_method=(test_method) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] test_method Object to be assigned

# File lib/emass_client/models/controls_request_put_body.rb, line 371
def test_method=(test_method)
  validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine'])
  unless validator.valid?(test_method)
    fail ArgumentError, "invalid value for \"test_method\", must be one of #{validator.allowable_values}."
  end
  @test_method = test_method
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/emass_client/models/controls_request_put_body.rb, line 569
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/emass_client/models/controls_request_put_body.rb, line 575
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/emass_client/models/controls_request_put_body.rb, line 563
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/emass_client/models/controls_request_put_body.rb, line 308
def valid?
  return false if @acronym.nil?
  return false if @responsible_entities.nil?
  implementation_status_validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited'])
  return false unless implementation_status_validator.valid?(@implementation_status)
  common_control_provider_validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave'])
  return false unless common_control_provider_validator.valid?(@common_control_provider)
  return false if @control_designation.nil?
  control_designation_validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid'])
  return false unless control_designation_validator.valid?(@control_designation)
  test_method_validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine'])
  return false unless test_method_validator.valid?(@test_method)
  return false if @estimated_completion_date.nil?
  return false if @implementation_narrative.nil?
  slcm_frequency_validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined'])
  return false unless slcm_frequency_validator.valid?(@slcm_frequency)
  slcm_method_validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined'])
  return false unless slcm_method_validator.valid?(@slcm_method)
  severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  return false unless severity_validator.valid?(@severity)
  relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  return false unless relevance_of_threat_validator.valid?(@relevance_of_threat)
  likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  return false unless likelihood_validator.valid?(@likelihood)
  impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  return false unless impact_validator.valid?(@impact)
  residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
  return false unless residual_risk_level_validator.valid?(@residual_risk_level)
  true
end