Class: Jamf::MobileDevicePrestage
- Inherits:
-
Prestage
- Object
- JSONObject
- Resource
- CollectionResource
- Prestage
- Jamf::MobileDevicePrestage
- 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
'v2'.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: :hash }, # @!attribute allowPairing # @return [Boolean] allowPairing: { class: :boolean }, # @!attribute multiUser # @return [Boolean] multiUser: { class: :boolean }, # @!attribute supervised # @return [Boolean] supervised: { class: :boolean }, # @!attribute maximumSharedAccounts # @return [Integer] maximumSharedAccounts: { class: :integer }, # @!attribute isAutoAdvanceSetup # @return [Boolean] autoAdvanceSetup: { class: :boolean }, # @!attribute configureDeviceBeforeSetupAssistant # @return [Boolean] configureDeviceBeforeSetupAssistant: { class: :boolean }, # @!attribute names # @return [Jamf::MobileDevicePrestageNames] names: { class: Jamf::MobileDevicePrestageNames }, # @!attribute sendTimezone # @return [Boolean] sendTimezone: { class: :boolean }, # @!attribute timezone # @return [String] timezone: { class: :string } ).freeze
Instance Attribute Summary collapse
-
#versionLock ⇒ Object
included
from Lockable
readonly
Returns the value of attribute versionLock.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_change_log_note(note, cnx: Jamf.cnx) ⇒ void
included
from ChangeLog
Add a note to this resource's change log.
-
#change_log(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeLogEntry>
included
from ChangeLog
The change and note history for this resource.
-
#change_log_count(cnx: Jamf.cnx) ⇒ Integer
included
from ChangeLog
how many change log entries are there? needed when using paged #change_log calls.
-
#next_page_of_change_log ⇒ Array<Jamf::ChangeHistoryEntry>
included
from ChangeLog
Fetch the next page of a paged #change_log request Returns an empty array if there's been no paged request or if the last one has no more pages.
-
#sync_status(latest = false) ⇒ Object
Instance Methods.
Instance Attribute Details
Class Method Details
.sync_status(prestage = nil, latest = false, cnx: Jamf.cnx) ⇒ Object
Class Methods
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb', line 118 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, the cache is flushed after adding the note.
#change_log(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeLogEntry> Originally defined in module ChangeLog
The change and note history for this resource. This is a collection of objects as a sub-resource of some primary resource. As such, retriving the change log returns an array of objects, and can be paged, sorted and filtered.
This method is very similar to CollectionResource.all, see the docs for that method for more details
successive page.
#change_log_count(cnx: Jamf.cnx) ⇒ Integer Originally defined in module ChangeLog
how many change log entries are there? needed when using paged #change_log calls
#next_page_of_change_log ⇒ Array<Jamf::ChangeHistoryEntry> Originally defined in module ChangeLog
Fetch the next page of a paged #change_log request Returns an empty array if there's been no paged request or if the last one has no more pages.
#sync_status(latest = false) ⇒ Object
Instance Methods
137 138 139 |
# File 'lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb', line 137 def sync_status(latest = false) self.class.sync_status @id, latest, cnx: @cnx end |