Class: Jamf::Criterion
- Inherits:
-
JSONObject
- Object
- JSONObject
- Jamf::Criterion
- Defined in:
- lib/jamf/api/json_objects/criterion.rb
Overview
A ‘location’ for a computer prestage in Jamf Pro
Constant Summary collapse
- AND =
the acceptable strings for and/or
'and'.freeze
- OR =
'or'.freeze
- AND_OR =
[ AND, OR ].freeze
- IS =
These are the available search-types for building criteria
'is'.freeze
- IS_NOT =
'is not'.freeze
- LIKE =
'like'.freeze
- NOT_LIKE =
'not like'.freeze
- HAS =
'has'.freeze
- HAS_NOT =
'does not have'.freeze
- MORE_THAN =
'more than'.freeze
- GREATER_THAN =
'greater than'.freeze
- LESS_THAN =
'less than'.freeze
- GREATER_OR_EQUAL =
'greater than or equal'.freeze
- LESS_OR_EQUAL =
'less than or equal'.freeze
- BEFORE_DATE =
'before (yyyy-mm-dd)'.freeze
- AFTER_DATE =
'after (yyyy-mm-dd)'.freeze
- MORE_THAN_DAYS_AGO =
'more than x days ago'.freeze
- LESS_THAN_DAYS_AGO =
'less than x days ago'.freeze
- IN_MORE_THAN_DAYS =
'in more than x days'.freeze
- IN_LESS_THAN_DAYS =
'in less than x days'.freeze
- MEMBER =
'member of'.freeze
- NOT_MEMBER =
'not member of'.freeze
- CURRENT =
'current'.freeze
- NOT_CURRENT =
'not current'.freeze
- REGEX =
'matches regex'.freeze
- NOT_REGEX =
'does not match regex'.freeze
- SEARCH_TYPES =
[ IS, IS_NOT, LIKE, NOT_LIKE, HAS, HAS_NOT, MORE_THAN, GREATER_THAN, LESS_THAN, GREATER_OR_EQUAL, LESS_OR_EQUAL, BEFORE_DATE, AFTER_DATE, MORE_THAN_DAYS_AGO, LESS_THAN_DAYS_AGO, IN_MORE_THAN_DAYS, IN_LESS_THAN_DAYS, MEMBER, NOT_MEMBER, CURRENT, NOT_CURRENT, REGEX, NOT_REGEX ].freeze
- OBJECT_MODEL =
{ # @!attribute name - the attribute name for this criterion # @return [String] name: { class: :string, required: true }, # @!attribute priority - Not used? Seems to always be zero. # Order is determined by array index, so not really sure, # possibly a holdover from classic API/XML # @return [Integer] priority: { class: :integer }, # @!attribute andOr - How this criterion is joined to the previous: # 'and' or 'or', defaults to 'and'. # meaningless for the first criterion in an array # @return [String] andOr: { class: :string, enum: Jamf::Criterion::AND_OR }, # @!attribute searchType - How to compare the attribute value to # the search value # @return [String] searchType: { class: :string, enum: Jamf::Criterion::SEARCH_TYPES, required: true }, # @!attribute value - the value to compare to the attribute # @return [String] value: { class: :string, required: true }, # @!attribute isOpeningParen - does this criterion start with an openParen? # @return [Boolean] isOpeningParen: { class: :boolean }, # @!attribute isClosingParen - does this criterion end with a closeParen? # @return [Boolean] isClosingParen: { class: :boolean } }.freeze
Instance Attribute Summary collapse
-
#andOr - How this criterion is joined to the previous:(-Howthiscriterionisjoinedtotheprevious: ) ⇒ String
‘and’ or ‘or’, defaults to ‘and’.
- #isClosingParen - does this criterion end with a closeParen?(-doesthiscriterionend) ⇒ Boolean
- #isOpeningParen - does this criterion start with an openParen?(-doesthiscriterionstartwithanopenParen?) ⇒ Boolean
- #name - the attribute name for this criterion(-theattributename) ⇒ String
-
#priority - Not used? Seems to always be zero.(-Notused?Seemstoalwaysbezero.) ⇒ Integer
Order is determined by array index, so not really sure, possibly a holdover from classic API/XML.
-
#searchType - How to compare the attribute value to(-Howtocomparetheattributevalueto) ⇒ String
the search value.
- #value - the value to compare to the attribute(-thevaluetocomparetotheattribute) ⇒ String
Constructor Details
This class inherits a constructor from Jamf::JSONObject
Instance Attribute Details
#andOr - How this criterion is joined to the previous:(-Howthiscriterionisjoinedtotheprevious: ) ⇒ String
‘and’ or ‘or’, defaults to ‘and’. meaningless for the first criterion in an array
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 109
|
#isClosingParen - does this criterion end with a closeParen?(-doesthiscriterionend) ⇒ Boolean
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 140
|
#isOpeningParen - does this criterion start with an openParen?(-doesthiscriterionstartwithanopenParen?) ⇒ Boolean
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 134
|
#name - the attribute name for this criterion(-theattributename) ⇒ String
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 94
|
#priority - Not used? Seems to always be zero.(-Notused?Seemstoalwaysbezero.) ⇒ Integer
Order is determined by array index, so not really sure, possibly a holdover from classic API/XML
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 101
|
#searchType - How to compare the attribute value to(-Howtocomparetheattributevalueto) ⇒ String
the search value
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 118
|
#value - the value to compare to the attribute(-thevaluetocomparetotheattribute) ⇒ String
|
|
# File 'lib/jamf/api/json_objects/criterion.rb', line 127
|