Class: Jamf::MobileDevicePrestage

Inherits:
Prestage show all
Includes:
ChangeLog
Defined in:
lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb

Overview

A building defined in the JSS

Constant Summary collapse

RSRC_VERSION =

Constants

'v1'.freeze
RSRC_PATH =
'mobile-device-prestages'.freeze
OBJECT_MODEL =

Object Model / Attributes See APIObject class documentation for details of how the OBJECT_MODEL hash works.

superclass::OBJECT_MODEL.merge(

  # @!attribute skipSetupItems
  #   @return [Jamf::ComputerPrestageSkipSetupItems]
  skipSetupItems: {
    class: Jamf::MobileDevicePrestageSkipSetupItems
  },

  # @!attribute isAllowPairing
  #   @return [Boolean]
  isAllowPairing: {
    class: :boolean
  },

  # @!attribute isMultiUser
  #   @return [Boolean]
  isMultiUser: {
    class: :boolean
  },

  # @!attribute isSupervised
  #   @return [Boolean]
  isSupervised: {
    class: :boolean
  },

  # @!attribute maximumSharedAccounts
  #   @return [Integer]
  maximumSharedAccounts: {
    class: :integer
  },

  # @!attribute isAutoAdvanceSetup
  #   @return [Boolean]
  isAutoAdvanceSetup: {
    class: :boolean
  },

  # @!attribute isConfigureDeviceBeforeSetupAssistant
  #   @return [Boolean]
  isConfigureDeviceBeforeSetupAssistant: {
    class: :boolean
  },

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

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

  # @!attribute names
  #   @return [Jamf::MobileDevicePrestageNames]
  names: {
    class: Jamf::MobileDevicePrestageNames
  }
).freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#versionLockObject (readonly) Originally defined in module Lockable

Returns the value of attribute versionLock.

Class Method Details

.sync_status(prestage = nil, latest = false, cnx: Jamf.cnx) ⇒ Object

Class Methods



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb', line 116

def self.sync_status(prestage = nil, latest = false, cnx: Jamf.cnx)
  @sync_rsrc ||= "#{self::RSRC_VERSION}/#{self::RSRC_PATH}/#{SYNC_RSRC}"

  if prestage
    id = valid_id prestage
    raise Jamf::NoSuchItemError, "No #{self.class} matching '#{prestage}'" unless id

    rsrc = "#{@sync_rsrc}/#{id}"
    rsrc << '/latest' if latest
    results = cnx.get rsrc
    latest ? Jamf::PrestageSyncStatus.new(results) : results.map { |ss| Jamf::PrestageSyncStatus.new ss }
  else
    cnx.get(@sync_rsrc).map { |ss| Jamf::PrestageSyncStatus.new ss }
  end
end

Instance Method Details

#add_change_log_note(note, cnx: Jamf.cnx) ⇒ void Originally defined in module ChangeLog

This method returns an undefined value.

Add a note to this resource’s change log.

If the change history has been cached already, it is recached after adding the note.

Parameters:

  • note (String)

    The note to add. It cannot be empty.

#change_log(refresh = false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeHistoryEntry> Originally defined in module ChangeLog

The change and note history for this resource.

The history is cached internally and only re-fetched when a truthy parameter is given.

Parameters:

  • refresh (Boolean) (defaults to: false)

    re-fetch and re-cache the history

Returns:

  • (Array<Jamf::ChangeHistoryEntry>)

    The change and note history for this resource

#sync_status(latest = false) ⇒ Object

Instance Methods



135
136
137
# File 'lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb', line 135

def sync_status(latest = false)
  self.class.sync_status @id, latest, cnx: @cnx
end