Class: Jamf::ComputerPrestage

Inherits:
OAPISchemas::GetComputerPrestageV3 show all
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

Instance Method Summary collapse

Instance Attribute Details

#cnxJamf::Connection (readonly) Originally defined in module JPAPIResource

#delete_pathString (readonly) Originally defined in module CollectionResource

#get_pathString (readonly) Originally defined in module JPAPIResource

#post_pathString (readonly) Originally defined in module CollectionResource

#update_pathString (readonly) Originally defined in module JPAPIResource

Instance Method Details

#assign(*sns_to_assign) ⇒ Object Also known as: add Originally defined in module Prestage

Assign

#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.

#assigned_snsArray<String> Originally defined in module Prestage

#deleteObject Originally defined in module CollectionResource

#exist?Boolean Originally defined in module CollectionResource

#initialize(**data) ⇒ Object Originally defined in module CollectionResource

Constructor

#pretty_print_instance_variablesArray Originally defined in module JPAPIResource

Remove large cached items from the instance_variables used to create pretty-print (pp) output.

#saveObject Originally defined in module JPAPIResource

TODO: error handling

#scope(refresh = false) ⇒ PrestageScope Originally defined in module Prestage

The scope data for this prestage -

#scope_pathObject Originally defined in module Prestage

The scope endpoint for this instance

#to_sString Originally defined in module CollectionResource

A meaningful string representation of this object

#unassign(*sns_to_unassign) ⇒ Object Also known as: remove Originally defined in module Prestage