Class: Jamf::PrestageAssignment

Inherits:
JSONObject show all
Extended by:
Immutable
Defined in:
lib/jamf/api/json_objects/prestage_assignment.rb

Overview

An assignment of a device to a prestage, placing that device into the prestage's scope

Constant Summary collapse

OBJECT_MODEL =
{

  # @!attribute serialNumber
  #   @return [String]
  serialNumber: {
    class: :string
  },

  # @!attribute assignmentEpoch
  #   @return [Integer]
  assignmentDate: {
    class: Jamf::Timestamp
  },

  # @!attribute userAssigned
  #   @return [String]
  userAssigned: {
    class: :string,
    aliases: %i[assignedBy]
  }
}.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ PrestageAssignment

Returns a new instance of PrestageAssignment.



69
70
71
72
# File 'lib/jamf/api/json_objects/prestage_assignment.rb', line 69

def initialize(*args)
  super
  @assignmentTimestamp = Jamf::Timestamp.new @assignmentEpoch
end

Instance Attribute Details

#assignmentEpochInteger

Returns:

  • (Integer)


# File 'lib/jamf/api/json_objects/prestage_assignment.rb', line 43

#assignmentTimestampJamf::Timestamp (readonly)

The assignment epoch as a Jamf::Timestamp object.

NOTE: I expct this will go away once Jamf conforms to its own standard of exchanging ALL timestamp data as ISO6801 strings. At that time the assignment epoch won't be a thing anymore.

Returns:



67
68
69
# File 'lib/jamf/api/json_objects/prestage_assignment.rb', line 67

def assignmentTimestamp
  @assignmentTimestamp
end

#serialNumberString

Returns:



# File 'lib/jamf/api/json_objects/prestage_assignment.rb', line 37

#userAssignedString

Returns:



# File 'lib/jamf/api/json_objects/prestage_assignment.rb', line 49

Class Method Details

.mutable?Boolean Originally defined in module Immutable

Returns:

  • (Boolean)