Class: Jamf::ComputerPrestage
- Inherits:
-
OAPISchemas::GetComputerPrestageV3
- Object
- OAPIObject
- OAPISchemas::GetComputerPrestageV3
- Jamf::ComputerPrestage
- Includes:
- CollectionResource, Prestage
- Defined in:
- lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb
Overview
A building in the Jamf Pro API
The parent class is the OAPI object representing a single member of the collection, i.e. the ‘GET_OBJECT’ similar to the POST_OBJECT defined in the class below.
Constant Summary collapse
- SEARCH_RESULT_OBJECT =
The OAPI object class we get back from a ‘list’ query to get the whole collection, or a subset of it. It contains a :results key which is an array of data for objects of the parent class.
Jamf::OAPISchemas::ComputerPrestageSearchResultsV3
- POST_OBJECT =
The OAPI object class we send with a POST request to make a new member of the collection in Jamf. This is usually the same as the parent class.
Jamf::OAPISchemas::PostComputerPrestageV3
- PUT_OBJECT =
The OAPI object class we send with a PUT request to change an object in Jamf by specifying all its values. Most updates happen this way, and this is usually the same as the parent class
Jamf::OAPISchemas::PutComputerPrestageV3
- LIST_PATH =
The path for GETting the list of all objects in the collection, possibly filtered, sorted, and/or paged
REQUIRED for all collection resources
GET_, PUT_, PATCH_, POST_, and DELETE_ paths for instances don’t need to be defined if they are the same as LIST_PATH (followed by an id if needed)
See the methods get_path, put_path, etc, in Jamf::CollectionResource::ClassMethods
'v3/computer-prestages'- SCOPE_PATH_PREFIX =
As of Jamf Pro 10.50, the scope-related endpoints for computer prestages are still in v2
'v2/computer-prestages'
Instance Attribute Summary collapse
-
#cnx ⇒ Jamf::Connection
included
from JPAPIResource
readonly
The API connection thru which we deal with this resource.
-
#delete_path ⇒ String
included
from CollectionResource
readonly
The path for deleting a this item from the collection in the JPAPI.
-
#get_path ⇒ String
included
from JPAPIResource
readonly
The path for fetching this thing from the JPAPI.
-
#post_path ⇒ String
included
from CollectionResource
readonly
The path for creating a new item in the collection in the JPAPI.
-
#update_path ⇒ String
included
from JPAPIResource
readonly
The path for updating this thing from the JPAPI.
Instance Method Summary collapse
-
#assign(*sns_to_assign) ⇒ Object
(also: #add)
included
from Prestage
Assign.
-
#assigned?(sn) ⇒ Boolean
(also: #include?, #scoped?)
included
from Prestage
Is this SN assigned to this prestage?.
-
#assigned_sns ⇒ Array<String>
included
from Prestage
The serialnumbers assigned to this prestage.
- #delete ⇒ Object included from CollectionResource
- #exist? ⇒ Boolean included from CollectionResource
-
#initialize(**data) ⇒ Object
included
from CollectionResource
Constructor.
-
#pretty_print_instance_variables ⇒ Array
included
from JPAPIResource
Remove large cached items from the instance_variables used to create pretty-print (pp) output.
-
#save ⇒ Object
included
from JPAPIResource
TODO: error handling.
-
#scope(refresh = false) ⇒ PrestageScope
included
from Prestage
The scope data for this prestage -.
-
#scope_path ⇒ Object
included
from Prestage
The scope endpoint for this instance.
-
#to_s ⇒ String
included
from CollectionResource
A meaningful string representation of this object.
- #unassign(*sns_to_unassign) ⇒ Object (also: #remove) included from Prestage
Instance Attribute Details
#cnx ⇒ Jamf::Connection (readonly) Originally defined in module JPAPIResource
#delete_path ⇒ String (readonly) Originally defined in module CollectionResource
#get_path ⇒ String (readonly) Originally defined in module JPAPIResource
#post_path ⇒ String (readonly) Originally defined in module CollectionResource
#update_path ⇒ String (readonly) Originally defined in module JPAPIResource
Instance Method Details
#assigned?(sn) ⇒ Boolean Also known as: include?, scoped? Originally defined in module Prestage
Is this SN assigned to this prestage?
This method uses the instance’s scope object, from a different API path than the class-level .assigned? method.
#delete ⇒ Object Originally defined in module CollectionResource
#exist? ⇒ Boolean Originally defined in module CollectionResource
#initialize(**data) ⇒ Object Originally defined in module CollectionResource
Constructor
#pretty_print_instance_variables ⇒ Array Originally defined in module JPAPIResource
Remove large cached items from the instance_variables used to create pretty-print (pp) output.
#save ⇒ Object Originally defined in module JPAPIResource
TODO: error handling
#scope(refresh = false) ⇒ PrestageScope Originally defined in module Prestage
The scope data for this prestage -
#to_s ⇒ String Originally defined in module CollectionResource
A meaningful string representation of this object