Class: Windoo::Component

Inherits:
BaseClasses::JSONObject show all
Includes:
Mixins::APICollection
Defined in:
lib/windoo/objects/component.rb

Overview

A component holds a bunch of criteria defining which computers have a specific patch version installed.

Constant Summary collapse

RSRC_PATH =

Constants

'components'
CONTAINER_CLASS =
Windoo::Patch
JSON_ATTRIBUTES =

Attributes

{

  # @!attribute componentId
  # @return [Integer] The id number of this component
  componentId: {
    class: :Integer,
    identifier: :primary,
    do_not_send: true,
    readonly: true
  },

  # @!attribute patchId
  # @return [Integer] The id number of the patch which uses this component
  patchId: {
    class: :Integer,
    do_not_send: true,
    readonly: true
  },

  # @!attribute name
  # @return [String] The name of the Software Title for this patch
  name: {
    class: :String
  },

  # @!attribute version
  # @return [String] The version installed by this patch
  version: {
    class: :String
  },

  # @!attribute criteria
  # @return [Array<Windoo::ComponentCriterion>] The criteria used by
  # this component.
  criteria: {
    class: Windoo::ComponentCriteriaManager,
    do_not_send: true
  }

}.freeze

Constants inherited from BaseClasses::JSONObject

BaseClasses::JSONObject::PP_OMITTED_INST_VARS

Instance Attribute Summary collapse

Attributes inherited from BaseClasses::JSONObject

#init_data

Instance Method Summary collapse

Methods included from Mixins::APICollection

#==, #cnx, #container, #create_on_server, #delete, #deleted_id, included, #pretty_print_instance_variables, #primary_id, #softwareTitle, #update_on_server

Methods inherited from BaseClasses::JSONObject

attribute_already_parsed?, ident_keys, json_attributes, json_attributes_parsed, mutable?, parse_json_attributes, #pretty_print_instance_variables, primary_id_key, required_attributes, #to_api, #to_json, validate_attr

Constructor Details

#initialize(**init_data) ⇒ Component

Constructor



73
74
75
76
77
# File 'lib/windoo/objects/component.rb', line 73

def initialize(**init_data)
  super
  @criteria ||= []
  @criteria = Windoo::ComponentCriteriaManager.new @criteria, container: self
end

Instance Attribute Details

#componentIdInteger

Returns The id number of this component.

Returns:

  • (Integer)

    The id number of this component



# File 'lib/windoo/objects/component.rb', line 31


#criteriaArray<Windoo::ComponentCriterion>

this component.

Returns:



# File 'lib/windoo/objects/component.rb', line 60


#nameString

Returns The name of the Software Title for this patch.

Returns:

  • (String)

    The name of the Software Title for this patch



# File 'lib/windoo/objects/component.rb', line 48


#patchIdInteger

Returns The id number of the patch which uses this component.

Returns:

  • (Integer)

    The id number of the patch which uses this component



# File 'lib/windoo/objects/component.rb', line 40


#versionString

Returns The version installed by this patch.

Returns:

  • (String)

    The version installed by this patch



# File 'lib/windoo/objects/component.rb', line 54