ruby-jss 4.2.2 → 4.2.4b1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +18 -1
  3. data/LICENSE.txt +5 -3
  4. data/README.md +3 -1
  5. data/bin/cgrouper +4 -22
  6. data/bin/jamfHelperBackgrounder +4 -22
  7. data/bin/netseg-update +4 -22
  8. data/data/ruby-jss.conf.example +4 -22
  9. data/lib/jamf/api/classic/api_objects/account.rb +4 -22
  10. data/lib/jamf/api/classic/api_objects/advanced_computer_search.rb +4 -22
  11. data/lib/jamf/api/classic/api_objects/advanced_mobile_device_search.rb +4 -22
  12. data/lib/jamf/api/classic/api_objects/advanced_user_search.rb +4 -22
  13. data/lib/jamf/api/classic/api_objects/building.rb +4 -22
  14. data/lib/jamf/api/classic/api_objects/categorizable.rb +4 -22
  15. data/lib/jamf/api/classic/api_objects/category.rb +7 -24
  16. data/lib/jamf/api/classic/api_objects/computer.rb +6 -23
  17. data/lib/jamf/api/classic/api_objects/computer_extension_attribute.rb +2 -20
  18. data/lib/jamf/api/classic/api_objects/computer_group.rb +2 -20
  19. data/lib/jamf/api/classic/api_objects/computer_invitation.rb +6 -23
  20. data/lib/jamf/api/classic/api_objects/creatable.rb +4 -22
  21. data/lib/jamf/api/classic/api_objects/criteriable/criteria.rb +4 -22
  22. data/lib/jamf/api/classic/api_objects/criteriable/criterion.rb +2 -20
  23. data/lib/jamf/api/classic/api_objects/criteriable.rb +2 -20
  24. data/lib/jamf/api/classic/api_objects/department.rb +4 -22
  25. data/lib/jamf/api/classic/api_objects/directory_binding.rb +221 -247
  26. data/lib/jamf/api/classic/api_objects/directory_binding_type/active_directory.rb +492 -526
  27. data/lib/jamf/api/classic/api_objects/directory_binding_type/admitmac.rb +27 -55
  28. data/lib/jamf/api/classic/api_objects/directory_binding_type/centrify.rb +191 -220
  29. data/lib/jamf/api/classic/api_objects/directory_binding_type/directory_binding_type.rb +4 -22
  30. data/lib/jamf/api/classic/api_objects/directory_binding_type/open_directory.rb +142 -169
  31. data/lib/jamf/api/classic/api_objects/directory_binding_type/powerbroker_identity_services.rb +37 -57
  32. data/lib/jamf/api/classic/api_objects/directory_binding_type.rb +4 -22
  33. data/lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb +90 -84
  34. data/lib/jamf/api/classic/api_objects/distribution_point.rb +6 -24
  35. data/lib/jamf/api/classic/api_objects/dock_item.rb +11 -34
  36. data/lib/jamf/api/classic/api_objects/ebook.rb +4 -22
  37. data/lib/jamf/api/classic/api_objects/extendable.rb +2 -20
  38. data/lib/jamf/api/classic/api_objects/ibeacon.rb +6 -23
  39. data/lib/jamf/api/classic/api_objects/icon.rb +5 -23
  40. data/lib/jamf/api/classic/api_objects/ldap_server.rb +2 -20
  41. data/lib/jamf/api/classic/api_objects/locatable.rb +4 -22
  42. data/lib/jamf/api/classic/api_objects/mac_application.rb +6 -23
  43. data/lib/jamf/api/classic/api_objects/management_history/audit_event.rb +4 -25
  44. data/lib/jamf/api/classic/api_objects/management_history/casper_imaging_log.rb +5 -24
  45. data/lib/jamf/api/classic/api_objects/management_history/casper_remote_log.rb +4 -25
  46. data/lib/jamf/api/classic/api_objects/management_history/computer_usage_log.rb +4 -25
  47. data/lib/jamf/api/classic/api_objects/management_history/ebook.rb +4 -26
  48. data/lib/jamf/api/classic/api_objects/management_history/hash_like.rb +4 -22
  49. data/lib/jamf/api/classic/api_objects/management_history/mac_app_store_app.rb +4 -26
  50. data/lib/jamf/api/classic/api_objects/management_history/mdm_command.rb +4 -25
  51. data/lib/jamf/api/classic/api_objects/management_history/mobile_device_app.rb +4 -25
  52. data/lib/jamf/api/classic/api_objects/management_history/policy_log.rb +4 -25
  53. data/lib/jamf/api/classic/api_objects/management_history/screen_sharing_log.rb +4 -25
  54. data/lib/jamf/api/classic/api_objects/management_history/user_location_change.rb +4 -25
  55. data/lib/jamf/api/classic/api_objects/management_history.rb +4 -22
  56. data/lib/jamf/api/classic/api_objects/matchable.rb +4 -22
  57. data/lib/jamf/api/classic/api_objects/mdm.rb +6 -23
  58. data/lib/jamf/api/classic/api_objects/mobile_device.rb +7 -23
  59. data/lib/jamf/api/classic/api_objects/mobile_device_application.rb +7 -23
  60. data/lib/jamf/api/classic/api_objects/mobile_device_configuration_profile.rb +4 -22
  61. data/lib/jamf/api/classic/api_objects/mobile_device_extension_attribute.rb +3 -20
  62. data/lib/jamf/api/classic/api_objects/mobile_device_group.rb +4 -22
  63. data/lib/jamf/api/classic/api_objects/netboot_server.rb +4 -22
  64. data/lib/jamf/api/classic/api_objects/network_segment.rb +7 -23
  65. data/lib/jamf/api/classic/api_objects/osx_configuration_profile.rb +2 -20
  66. data/lib/jamf/api/classic/api_objects/package.rb +6 -23
  67. data/lib/jamf/api/classic/api_objects/patch_external_source.rb +7 -24
  68. data/lib/jamf/api/classic/api_objects/patch_internal_source.rb +4 -22
  69. data/lib/jamf/api/classic/api_objects/patch_policy.rb +6 -23
  70. data/lib/jamf/api/classic/api_objects/patch_title/version.rb +4 -22
  71. data/lib/jamf/api/classic/api_objects/patch_title.rb +8 -24
  72. data/lib/jamf/api/classic/api_objects/peripheral.rb +7 -24
  73. data/lib/jamf/api/classic/api_objects/peripheral_type.rb +7 -26
  74. data/lib/jamf/api/classic/api_objects/policy.rb +8 -24
  75. data/lib/jamf/api/classic/api_objects/printer.rb +384 -388
  76. data/lib/jamf/api/classic/api_objects/purchasable.rb +4 -22
  77. data/lib/jamf/api/classic/api_objects/removable_macaddr.rb +4 -22
  78. data/lib/jamf/api/classic/api_objects/restricted_software.rb +7 -24
  79. data/lib/jamf/api/classic/api_objects/scopable/scope.rb +2 -19
  80. data/lib/jamf/api/classic/api_objects/scopable.rb +6 -23
  81. data/lib/jamf/api/classic/api_objects/script.rb +5 -23
  82. data/lib/jamf/api/classic/api_objects/self_servable.rb +4 -22
  83. data/lib/jamf/api/classic/api_objects/sitable.rb +4 -22
  84. data/lib/jamf/api/classic/api_objects/site.rb +2 -20
  85. data/lib/jamf/api/classic/api_objects/software_update_server.rb +4 -22
  86. data/lib/jamf/api/classic/api_objects/updatable.rb +4 -22
  87. data/lib/jamf/api/classic/api_objects/uploadable.rb +4 -22
  88. data/lib/jamf/api/classic/api_objects/user.rb +6 -24
  89. data/lib/jamf/api/classic/api_objects/user_extension_attribute.rb +2 -19
  90. data/lib/jamf/api/classic/api_objects/user_group.rb +4 -22
  91. data/lib/jamf/api/classic/api_objects/vpp_account.rb +6 -23
  92. data/lib/jamf/api/classic/api_objects/vppable.rb +4 -22
  93. data/lib/jamf/api/classic/api_objects/web_hook.rb +4 -20
  94. data/lib/jamf/api/classic/base_classes/advanced_search.rb +9 -25
  95. data/lib/jamf/api/classic/base_classes/api_object.rb +7 -24
  96. data/lib/jamf/api/classic/base_classes/configuration_profile.rb +5 -22
  97. data/lib/jamf/api/classic/base_classes/extension_attribute.rb +8 -25
  98. data/lib/jamf/api/classic/base_classes/group.rb +6 -22
  99. data/lib/jamf/api/classic/base_classes/patch_source.rb +4 -22
  100. data/lib/jamf/api/classic/xml_workaround.rb +4 -22
  101. data/lib/jamf/api/connection/attributes.rb +4 -21
  102. data/lib/jamf/api/connection/cache.rb +4 -21
  103. data/lib/jamf/api/connection/classic_api.rb +4 -21
  104. data/lib/jamf/api/connection/connect.rb +4 -21
  105. data/lib/jamf/api/connection/constants.rb +7 -23
  106. data/lib/jamf/api/connection/default_connection.rb +4 -21
  107. data/lib/jamf/api/connection/jamf_pro_api.rb +4 -21
  108. data/lib/jamf/api/connection/jamf_pro_api_error.rb +2 -20
  109. data/lib/jamf/api/connection/token.rb +2 -20
  110. data/lib/jamf/api/connection.rb +4 -21
  111. data/lib/jamf/api/jamf_pro/api_objects/api_client.rb +2 -20
  112. data/lib/jamf/api/jamf_pro/api_objects/api_integration.rb +2 -20
  113. data/lib/jamf/api/jamf_pro/api_objects/api_role.rb +2 -20
  114. data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +2 -23
  115. data/lib/jamf/api/jamf_pro/api_objects/device_enrollment.rb +2 -20
  116. data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +2 -20
  117. data/lib/jamf/api/jamf_pro/api_objects/j_building.rb +2 -20
  118. data/lib/jamf/api/jamf_pro/api_objects/j_package.rb +2 -20
  119. data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates/plan.rb +2 -19
  120. data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates.rb +2 -19
  121. data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +2 -20
  122. data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +2 -19
  123. data/lib/jamf/api/jamf_pro/mixins/bulk_deletable.rb +2 -19
  124. data/lib/jamf/api/jamf_pro/mixins/change_log.rb +2 -20
  125. data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +2 -20
  126. data/lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb +2 -19
  127. data/lib/jamf/api/jamf_pro/mixins/filevault.rb +2 -19
  128. data/lib/jamf/api/jamf_pro/mixins/filterable.rb +2 -19
  129. data/lib/jamf/api/jamf_pro/mixins/immutable.rb +2 -19
  130. data/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb +2 -20
  131. data/lib/jamf/api/jamf_pro/mixins/lockable.rb +2 -19
  132. data/lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb +2 -19
  133. data/lib/jamf/api/jamf_pro/mixins/macos_redeploy_mgmt_framework.rb +2 -19
  134. data/lib/jamf/api/jamf_pro/mixins/prestage.rb +2 -20
  135. data/lib/jamf/api/jamf_pro/mixins/sortable.rb +2 -19
  136. data/lib/jamf/api/jamf_pro/mixins/uncreatable.rb +2 -19
  137. data/lib/jamf/api/jamf_pro/mixins/undeletable.rb +2 -19
  138. data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +12 -31
  139. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +3 -24
  140. data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_request.rb +2 -19
  141. data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_response.rb +2 -19
  142. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +3 -24
  143. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +2 -19
  144. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_request.rb +2 -19
  145. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_response.rb +2 -19
  146. data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_search_result.rb +2 -19
  147. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role.rb +2 -19
  148. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_request.rb +2 -19
  149. data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_result.rb +2 -19
  150. data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +3 -24
  151. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +11 -30
  152. data/lib/jamf/api/jamf_pro/oapi_schemas/authentication_type.rb +13 -32
  153. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +2 -19
  154. data/lib/jamf/api/jamf_pro/oapi_schemas/available_updates.rb +4 -25
  155. data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +2 -19
  156. data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +2 -19
  157. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +3 -24
  158. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +3 -24
  159. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +12 -31
  160. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +3 -24
  161. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +10 -29
  162. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +3 -24
  163. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +3 -24
  164. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +2 -23
  165. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +3 -24
  166. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +2 -23
  167. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +3 -24
  168. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +3 -24
  169. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +2 -23
  170. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +3 -24
  171. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +2 -23
  172. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +7 -26
  173. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +12 -31
  174. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +3 -24
  175. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +2 -23
  176. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +2 -23
  177. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +3 -24
  178. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory.rb +2 -23
  179. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_file_vault.rb +7 -26
  180. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +3 -24
  181. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +12 -31
  182. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +3 -24
  183. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +8 -27
  184. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +3 -24
  185. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +6 -25
  186. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +2 -23
  187. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +14 -33
  188. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +3 -24
  189. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v3.rb +2 -19
  190. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v3.rb +6 -26
  191. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +3 -24
  192. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +2 -23
  193. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +3 -24
  194. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +28 -47
  195. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +28 -47
  196. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +3 -24
  197. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +3 -24
  198. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +2 -23
  199. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +2 -23
  200. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +2 -19
  201. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +2 -19
  202. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +2 -19
  203. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +2 -19
  204. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +2 -19
  205. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +2 -19
  206. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +2 -19
  207. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +2 -19
  208. data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declaration.rb +8 -27
  209. data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declarations.rb +3 -24
  210. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +3 -24
  211. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v3.rb +2 -19
  212. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +2 -19
  213. data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +3 -24
  214. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +2 -19
  215. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +3 -24
  216. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +2 -19
  217. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +2 -19
  218. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +3 -24
  219. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +3 -24
  220. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +2 -19
  221. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +2 -19
  222. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan.rb +2 -19
  223. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_event_store.rb +4 -25
  224. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_group_post.rb +3 -24
  225. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post.rb +3 -24
  226. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post_response.rb +3 -24
  227. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle.rb +4 -25
  228. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status.rb +14 -33
  229. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status_wrapper.rb +3 -24
  230. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plans.rb +3 -24
  231. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_status.rb +2 -19
  232. data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_statuses.rb +3 -24
  233. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +3 -24
  234. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +3 -24
  235. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +2 -19
  236. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +2 -19
  237. data/lib/jamf/api/jamf_pro/oapi_schemas/o_auth_client_credentials.rb +2 -19
  238. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +2 -19
  239. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +2 -19
  240. data/lib/jamf/api/jamf_pro/oapi_schemas/package.rb +3 -24
  241. data/lib/jamf/api/jamf_pro/oapi_schemas/packages_search_results.rb +3 -24
  242. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_configuration_post.rb +17 -36
  243. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device.rb +7 -26
  244. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_post.rb +7 -26
  245. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_response.rb +2 -23
  246. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_group_post.rb +6 -25
  247. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +3 -24
  248. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_status.rb +36 -55
  249. data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v3.rb +2 -19
  250. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +3 -24
  251. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +3 -24
  252. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +3 -24
  253. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +2 -19
  254. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +2 -19
  255. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v3.rb +2 -19
  256. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +2 -19
  257. data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +2 -19
  258. data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +3 -24
  259. data/lib/jamf/api/jamf_pro/oapi_schemas.rb +2 -19
  260. data/lib/jamf/api/jamf_pro/other_classes/change_log_entry.rb +2 -20
  261. data/lib/jamf/api/jamf_pro/other_classes/ip_address.rb +2 -20
  262. data/lib/jamf/api/jamf_pro/other_classes/pager.rb +2 -19
  263. data/lib/jamf/api/jamf_pro/other_classes/timestamp.rb +2 -20
  264. data/lib/jamf/base_class.rb +2 -19
  265. data/lib/jamf/client/jamf_binary.rb +4 -22
  266. data/lib/jamf/client/jamf_helper.rb +4 -22
  267. data/lib/jamf/client/management_action.rb +4 -22
  268. data/lib/jamf/client.rb +4 -22
  269. data/lib/jamf/composer.rb +2 -20
  270. data/lib/jamf/configuration.rb +2 -20
  271. data/lib/jamf/constants.rb +2 -20
  272. data/lib/jamf/db_connection.rb +5 -23
  273. data/lib/jamf/deprecations/deprecated_api_connection_class.rb +2 -20
  274. data/lib/jamf/deprecations/deprecated_api_constant.rb +2 -20
  275. data/lib/jamf/deprecations/deprecated_config_constant.rb +2 -20
  276. data/lib/jamf/deprecations.rb +4 -22
  277. data/lib/jamf/exceptions.rb +2 -20
  278. data/lib/jamf/oapi_validate.rb +2 -19
  279. data/lib/jamf/ruby_extensions/array/predicates.rb +2 -20
  280. data/lib/jamf/ruby_extensions/array/utils.rb +2 -20
  281. data/lib/jamf/ruby_extensions/array.rb +2 -20
  282. data/lib/jamf/ruby_extensions/filetest/predicates.rb +2 -20
  283. data/lib/jamf/ruby_extensions/filetest.rb +2 -20
  284. data/lib/jamf/ruby_extensions/hash/utils.rb +2 -44
  285. data/lib/jamf/ruby_extensions/hash.rb +2 -20
  286. data/lib/jamf/ruby_extensions/ipaddr/utils.rb +2 -20
  287. data/lib/jamf/ruby_extensions/ipaddr.rb +4 -22
  288. data/lib/jamf/ruby_extensions/object/predicates.rb +2 -20
  289. data/lib/jamf/ruby_extensions/object.rb +2 -20
  290. data/lib/jamf/ruby_extensions/pathname/predicates.rb +2 -20
  291. data/lib/jamf/ruby_extensions/pathname/utils.rb +2 -20
  292. data/lib/jamf/ruby_extensions/pathname.rb +2 -20
  293. data/lib/jamf/ruby_extensions/string/conversions.rb +2 -20
  294. data/lib/jamf/ruby_extensions/string/predicates.rb +2 -20
  295. data/lib/jamf/ruby_extensions/string.rb +2 -20
  296. data/lib/jamf/ruby_extensions/time/utils.rb +4 -22
  297. data/lib/jamf/ruby_extensions/time.rb +4 -22
  298. data/lib/jamf/ruby_extensions.rb +4 -22
  299. data/lib/jamf/utility.rb +2 -20
  300. data/lib/jamf/validate.rb +2 -19
  301. data/lib/jamf/version.rb +5 -23
  302. data/lib/jamf/zeitwerk_config.rb +2 -20
  303. data/lib/jamf.rb +2 -20
  304. data/lib/jss-api.rb +4 -22
  305. data/lib/jss.rb +4 -22
  306. data/lib/ruby-jss.rb +4 -22
  307. data/test/bin/runtests +4 -22
  308. data/test/lib/jamf_test/APITest.rb +4 -22
  309. data/test/lib/jamf_test/advanced_search.rb +4 -22
  310. data/test/lib/jamf_test/auth.rb +4 -22
  311. data/test/lib/jamf_test/collection_tests.rb +4 -22
  312. data/test/lib/jamf_test/prestage_tests.rb +4 -22
  313. data/test/lib/jamf_test.rb +4 -22
  314. data/test/tests/advanced_computer_search.rb +4 -22
  315. data/test/tests/advanced_mobile_device_search.rb +4 -22
  316. data/test/tests/advanced_user_search.rb +4 -22
  317. data/test/tests/building.rb +4 -22
  318. data/test/tests/category.rb +4 -22
  319. data/test/tests/computer.rb +4 -22
  320. data/test/tests/computer_group.rb +4 -22
  321. data/test/tests/computer_prestage.rb +4 -22
  322. data/test/tests/department.rb +4 -22
  323. data/test/tests/device_enrollment.rb +4 -22
  324. data/test/tests/inventory_preload_record.rb +4 -22
  325. data/test/tests/j_building.rb +4 -22
  326. data/test/tests/j_package.rb +4 -22
  327. data/test/tests/mobile_device.rb +4 -22
  328. data/test/tests/mobile_device_prestage.rb +4 -22
  329. data/test/tests/policy.rb +4 -22
  330. metadata +4 -4
@@ -1,25 +1,7 @@
1
1
  # Copyright 2025 Pixar
2
-
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- # with the following modification; you may not use this file except in
6
- # compliance with the Apache License and the following modification to it:
7
- # Section 6. Trademarks. is deleted and replaced with:
8
- #
9
- # 6. Trademarks. This License does not grant permission to use the trade
10
- # names, trademarks, service marks, or product names of the Licensor
11
- # and its affiliates, except as required to comply with Section 4(c) of
12
- # the License and to reproduce the content of the NOTICE file.
13
- #
14
- # You may obtain a copy of the Apache License at
15
- #
16
- # http://www.apache.org/licenses/LICENSE-2.0
17
2
  #
18
- # Unless required by applicable law or agreed to in writing, software
19
- # distributed under the Apache License with the above modification is
20
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- # KIND, either express or implied. See the Apache License for the specific
22
- # language governing permissions and limitations under the Apache License.
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
23
5
  #
24
6
  #
25
7
 
@@ -1,25 +1,7 @@
1
1
  # Copyright 2025 Pixar
2
-
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- # with the following modification; you may not use this file except in
6
- # compliance with the Apache License and the following modification to it:
7
- # Section 6. Trademarks. is deleted and replaced with:
8
- #
9
- # 6. Trademarks. This License does not grant permission to use the trade
10
- # names, trademarks, service marks, or product names of the Licensor
11
- # and its affiliates, except as required to comply with Section 4(c) of
12
- # the License and to reproduce the content of the NOTICE file.
13
- #
14
- # You may obtain a copy of the Apache License at
15
- #
16
- # http://www.apache.org/licenses/LICENSE-2.0
17
2
  #
18
- # Unless required by applicable law or agreed to in writing, software
19
- # distributed under the Apache License with the above modification is
20
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- # KIND, either express or implied. See the Apache License for the specific
22
- # language governing permissions and limitations under the Apache License.
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
23
5
  #
24
6
  #
25
7
 
@@ -1,25 +1,7 @@
1
- ### Copyright 2025 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
23
5
  ###
24
6
  ###
25
7
 
@@ -1,273 +1,247 @@
1
- ### Copyright 2019 Rixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
23
5
  ###
24
6
  ###
25
7
 
26
8
  module Jamf
27
9
 
28
- # Module Variables
29
- #####################################
10
+ # Module Variables
11
+ #####################################
30
12
 
31
- # Module Methods
13
+ # Module Methods
14
+ #####################################
15
+
16
+ # Classes
17
+ #####################################
18
+
19
+ # A Directory Binding object in the JSS
20
+ # These are rather complex objects, and contain settings specific to the directory object's type.
21
+ #
22
+ # @see Jamf::APIObject
23
+ # @see Jamf::DirectoryBindingType
24
+ # @note "Jamf::DirectoryBinding.fetch name: 'BindingName'" seems to be returning a 500 error in my test evironment. Use "Jamf::DirectoryBinding.fetch 'BindingName' instead."
25
+ #
26
+ class DirectoryBinding < Jamf::APIObject
27
+
28
+ # Mix-Ins
32
29
  #####################################
30
+ include Jamf::Creatable
31
+ include Jamf::Updatable
32
+ include Jamf::DirectoryBindingType
33
33
 
34
- # Classes
34
+ # Class Methods
35
35
  #####################################
36
36
 
37
- # A Directory Binding object in the JSS
38
- # These are rather complex objects, and contain settings specific to the directory object's type.
39
- #
40
- # @see Jamf::APIObject
41
- # @see Jamf::DirectoryBindingType
42
- # @note "Jamf::DirectoryBinding.fetch name: 'BindingName'" seems to be returning a 500 error in my test evironment. Use "Jamf::DirectoryBinding.fetch 'BindingName' instead."
43
- #
44
- class DirectoryBinding < Jamf::APIObject
45
-
46
- # Mix-Ins
47
- #####################################
48
- include Jamf::Creatable
49
- include Jamf::Updatable
50
- include Jamf::DirectoryBindingType
51
-
52
- # Class Methods
53
- #####################################
54
-
55
- # Class Constants
56
- #####################################
57
-
58
- #! You CAN update this
59
- DIRECTORY_BINDING_TYPE = {
60
- open_directory: "Open Directory",
61
- active_directory: "Active Directory",
62
- powerbroker_identity_services: "PowerBroker Identity Services",
63
- admitmac: "ADmitMac",
64
- centrify: "Centrify"
65
- }.freeze
66
-
67
- DIRECTORY_BINDING_TYPE_CLASSES = {
68
- "Open Directory" => Jamf::DirectoryBindingType::OpenDirectory,
69
- "Active Directory" => Jamf::DirectoryBindingType::ActiveDirectory,
70
- "PowerBroker Identity Services" => Jamf::DirectoryBindingType::PowerBroker,
71
- "ADmitMac" => Jamf::DirectoryBindingType::ADmitMac,
72
- "Centrify" => Jamf::DirectoryBindingType::Centrify
73
- }
74
-
75
- # The base for REST resources of this class
76
- RSRC_BASE = 'directorybindings'.freeze
77
-
78
- # the hash key used for the JSON list output of all objects in the JSS
79
- RSRC_LIST_KEY = :directory_bindings
80
-
81
- # The hash key used for the JSON object output.
82
- # It's also used in various error messages
83
- RSRC_OBJECT_KEY = :directory_binding
84
-
85
- # the object type for this object in
86
- # the object history table.
87
- # See {APIObject#add_object_history_entry}
88
- # OBJECT_HISTORY_OBJECT_TYPE = 41
89
-
90
- # Attributes
91
- #####################################
92
- attr_reader :id
93
- attr_reader :name
94
- attr_reader :priority
95
- attr_reader :domain
96
- attr_reader :username
97
- attr_reader :password_sha256
98
- attr_reader :computer_ou
99
- attr_reader :type
100
- attr_reader :type_settings
101
- attr_reader :password
102
-
103
- # Constructor
104
- # @see Jamf::APIObject.initialize
105
- # @note When creating an object with specific properties use the
106
- # objects name and then the settings.
107
- # Ex: Creating an Active Directory object:
108
- # Jamf::DirectoryBinding.make name: "Example Binding", username: "BindingUser", password: "SuperMonkey123", computer_ou: "computers", active_directory: { multiple_domains: false }, domain: your.domain.server
109
- #####################################
110
- def initialize(**args)
111
- super
112
-
113
- if self.in_jss?
114
- @priority = @init_data[:priority]
115
- @domain = @init_data[:domain]
116
- @username = @init_data[:username]
117
- @password_sha256 = @init_data[:password_sha256]
118
- @computer_ou = @init_data[:computer_ou]
119
- @type = @init_data[:type]
120
-
121
- class_key = DIRECTORY_BINDING_TYPE.select { |k,v| v == @type }.map { |k,v| k }.first
122
- self.set_type_settings (DIRECTORY_BINDING_TYPE_CLASSES[@type.to_s].new @init_data[class_key])
123
- else
124
- # Build
125
- raise Jamf::MissingDataError, "domain must be provided." if @init_data[:domain].nil?
126
- raise Jamf::MissingDataError, "username must be provided." if @init_data[:username].nil?
127
- raise Jamf::MissingDataError, "computer_ou must be provided." if @init_data[:computer_ou].nil?
128
- raise Jamf::MissingDataError, "password must be provided when creating a DirectoryBinding object." if @init_data[:password].nil?
129
- raise Jamf::MissingDataError, "Type must be provided, one of \":#{DIRECTORY_BINDING_TYPE.keys.join(",:")}\"." if @init_data[:type].nil?
130
- raise Jamf::InvalidDataError, "Type must be one of \":#{DIRECTORY_BINDING_TYPE.keys.join(",:")}\"." unless DIRECTORY_BINDING_TYPE.keys.include? @init_data[:type]
131
- raise Jamf::InvalidDataError, "Priority must be between 1 and 10" if !@init_data[:priority].nil? && (@init_data[:priority] <= 1 || @init_data[:priority] >= 10)
132
-
133
- @domain = @init_data[:domain]
134
- @username = @init_data[:username]
135
- @computer_ou = @init_data[:computer_ou]
136
- @type = DIRECTORY_BINDING_TYPE[@init_data[:type]]
137
- @password = @init_data[:password]
138
- @priority = @init_data[:priority]
139
-
140
- @priority = 1 if @priority.nil?
141
-
142
-
143
- class_key = DIRECTORY_BINDING_TYPE.select { |k,v| v == @type }.map { |k,v| k }.first
144
- self.set_type_settings (DIRECTORY_BINDING_TYPE_CLASSES[@type.to_s].new @init_data[class_key])
145
-
146
- end
37
+ # Class Constants
38
+ #####################################
147
39
 
40
+ # ! You CAN update this
41
+ DIRECTORY_BINDING_TYPE = {
42
+ open_directory: 'Open Directory',
43
+ active_directory: 'Active Directory',
44
+ powerbroker_identity_services: 'PowerBroker Identity Services',
45
+ admitmac: 'ADmitMac',
46
+ centrify: 'Centrify'
47
+ }.freeze
48
+
49
+ DIRECTORY_BINDING_TYPE_CLASSES = {
50
+ 'Open Directory' => Jamf::DirectoryBindingType::OpenDirectory,
51
+ 'Active Directory' => Jamf::DirectoryBindingType::ActiveDirectory,
52
+ 'PowerBroker Identity Services' => Jamf::DirectoryBindingType::PowerBroker,
53
+ 'ADmitMac' => Jamf::DirectoryBindingType::ADmitMac,
54
+ 'Centrify' => Jamf::DirectoryBindingType::Centrify
55
+ }
56
+
57
+ # The base for REST resources of this class
58
+ RSRC_BASE = 'directorybindings'.freeze
59
+
60
+ # the hash key used for the JSON list output of all objects in the JSS
61
+ RSRC_LIST_KEY = :directory_bindings
62
+
63
+ # The hash key used for the JSON object output.
64
+ # It's also used in various error messages
65
+ RSRC_OBJECT_KEY = :directory_binding
66
+
67
+ # the object type for this object in
68
+ # the object history table.
69
+ # See {APIObject#add_object_history_entry}
70
+ # OBJECT_HISTORY_OBJECT_TYPE = 41
71
+
72
+ # Attributes
73
+ #####################################
74
+ attr_reader :id
75
+ attr_reader :name, :priority, :domain, :username, :password_sha256, :computer_ou, :type, :type_settings, :password
76
+
77
+ # Constructor
78
+ # @see Jamf::APIObject.initialize
79
+ # @note When creating an object with specific properties use the
80
+ # objects name and then the settings.
81
+ # Ex: Creating an Active Directory object:
82
+ # Jamf::DirectoryBinding.make name: "Example Binding", username: "BindingUser", password: "SuperMonkey123", computer_ou: "computers", active_directory: { multiple_domains: false }, domain: your.domain.server
83
+ #####################################
84
+ def initialize(**args)
85
+ super
86
+
87
+ if in_jss?
88
+ @priority = @init_data[:priority]
89
+ @domain = @init_data[:domain]
90
+ @username = @init_data[:username]
91
+ @password_sha256 = @init_data[:password_sha256]
92
+ @computer_ou = @init_data[:computer_ou]
93
+ @type = @init_data[:type]
94
+
95
+ class_key = DIRECTORY_BINDING_TYPE.select { |_k, v| v == @type }.map { |k, _v| k }.first
96
+ set_type_settings(DIRECTORY_BINDING_TYPE_CLASSES[@type.to_s].new(@init_data[class_key]))
97
+ else
98
+ # Build
99
+ raise Jamf::MissingDataError, 'domain must be provided.' if @init_data[:domain].nil?
100
+ raise Jamf::MissingDataError, 'username must be provided.' if @init_data[:username].nil?
101
+ raise Jamf::MissingDataError, 'computer_ou must be provided.' if @init_data[:computer_ou].nil?
102
+ raise Jamf::MissingDataError, 'password must be provided when creating a DirectoryBinding object.' if @init_data[:password].nil?
103
+ raise Jamf::MissingDataError, "Type must be provided, one of \":#{DIRECTORY_BINDING_TYPE.keys.join(',:')}\"." if @init_data[:type].nil?
104
+
105
+ unless DIRECTORY_BINDING_TYPE.keys.include? @init_data[:type]
106
+ raise Jamf::InvalidDataError,
107
+ "Type must be one of \":#{DIRECTORY_BINDING_TYPE.keys.join(',:')}\"."
148
108
  end
149
-
150
- # Public Instance Methods
151
- #####################################
152
-
153
- # The domain the device will be bound to.
154
- #
155
- # @author Tyler Morgan
156
- #
157
- # @param newvalue [String]
158
- #
159
- # @raise [Jamf::InvalidDataError] If newvalue is not a String
160
- #
161
- # @return [void]
162
- def domain=(newvalue)
163
- raise Jamf::InvalidDataError, "Domain must be a String" unless newvalue.is_a? String
164
-
165
- @domain = newvalue.to_s
166
- @need_to_update = true
109
+ if !@init_data[:priority].nil? && (@init_data[:priority] <= 1 || @init_data[:priority] >= 10)
110
+ raise Jamf::InvalidDataError,
111
+ 'Priority must be between 1 and 10'
167
112
  end
168
113
 
114
+ @domain = @init_data[:domain]
115
+ @username = @init_data[:username]
116
+ @computer_ou = @init_data[:computer_ou]
117
+ @type = DIRECTORY_BINDING_TYPE[@init_data[:type]]
118
+ @password = @init_data[:password]
119
+ @priority = @init_data[:priority]
169
120
 
170
- # The username used to attempt to bind the device to the domain.
171
- #
172
- # @author Tyler Morgan
173
- #
174
- # @param newvalue [String]
175
- #
176
- # @raise [Jamf::InvalidDataError] If newvalue is not a String
177
- #
178
- # @return [void]
179
- def username=(newvalue)
180
- raise Jamf::InvalidDataError, "Username must be a String" unless newvalue.is_a? String
181
-
182
- @username = newvalue
183
- @need_to_update = true
184
- end
121
+ @priority = 1 if @priority.nil?
185
122
 
123
+ class_key = DIRECTORY_BINDING_TYPE.select { |_k, v| v == @type }.map { |k, _v| k }.first
124
+ set_type_settings(DIRECTORY_BINDING_TYPE_CLASSES[@type.to_s].new(@init_data[class_key]))
186
125
 
187
- # The priority the domain has over another one.
188
- #
189
- # @author Tyler Morgan
190
- #
191
- # @param newvalue [Integer]
192
- #
193
- # @raise [Jamf::InvalidDataError] If newvalue is not an Integer
194
- # @raise [Jamf::InvalidDataError] If newvalue is not between 1 and 10
195
- #
196
- # @return [void]
197
- def priority=(newvalue)
198
- raise Jamf::InvalidDataError, "Priority must be a Integer" unless newvalue.is_a? Integer
199
- raise Jamf::InvalidDataError, "Priority cannot exceed 10" unless newvalue <= 10
200
- raise Jamf::InvalidDataError, "Priority must be greater than 0" unless newvalue > 0
201
-
202
- @priority = newvalue
203
- @need_to_update = true
204
- end
126
+ end
127
+ end
205
128
 
129
+ # Public Instance Methods
130
+ #####################################
206
131
 
207
- # The OU path the computer object is to be placed
208
- #
209
- # @author Tyler Morgan
210
- #
211
- # @param newvalue [String]
212
- #
213
- # @raise [Jamf::InvalidDataError] If newvalue is not a String
214
- #
215
- # @return [void]
216
- def computer_ou=(newvalue)
217
- raise Jamf::InvalidDataError, "Computer OU must be a String" unless newvalue.is_a? String
218
-
219
- @computer_ou = newvalue
220
- @need_to_update = true
221
- end
132
+ # The domain the device will be bound to.
133
+ #
134
+ # @author Tyler Morgan
135
+ #
136
+ # @param newvalue [String]
137
+ #
138
+ # @raise [Jamf::InvalidDataError] If newvalue is not a String
139
+ #
140
+ # @return [void]
141
+ def domain=(newvalue)
142
+ raise Jamf::InvalidDataError, 'Domain must be a String' unless newvalue.is_a? String
222
143
 
144
+ @domain = newvalue.to_s
145
+ @need_to_update = true
146
+ end
223
147
 
224
- # Sets the password used in conjunction with the username to attempt to bind
225
- # the computer to the domain.
226
- #
227
- # @author Tyler Morgan
228
- #
229
- # @param newvalue [String]
230
- #
231
- # @raise [Jamf::InvalidDataError] If newvalue is not a String
232
- #
233
- # @return [void]
234
- def password=(newvalue)
235
- raise Jamf::InvalidDataError, "Password must be a string" unless newvalue.is_a? String
236
-
237
- @password = newvalue
238
- @need_to_update = true
239
- end
148
+ # The username used to attempt to bind the device to the domain.
149
+ #
150
+ # @author Tyler Morgan
151
+ #
152
+ # @param newvalue [String]
153
+ #
154
+ # @raise [Jamf::InvalidDataError] If newvalue is not a String
155
+ #
156
+ # @return [void]
157
+ def username=(newvalue)
158
+ raise Jamf::InvalidDataError, 'Username must be a String' unless newvalue.is_a? String
240
159
 
241
- # private instance methods
242
- ######################
243
- private
244
-
245
- # the xml formated data for adding or updating this in the JSS
246
- #
247
- # This method constructs a properly formatted XML document to be handled by the Jamf Pro API
248
- #
249
- # @author Tyler Morgan
250
- #
251
- # @return [String]
252
- def rest_xml
253
- doc = REXML::Document.new Jamf::Connection::XML_HEADER
254
- ns = doc.add_element RSRC_OBJECT_KEY.to_s
255
- ns.add_element('id').text = @id.to_s
256
- ns.add_element('name').text = @name
257
- ns.add_element('priority').text = @priority.to_s
258
- ns.add_element('domain').text = @domain.to_s
259
- ns.add_element('username').text = @username.to_s
260
- ns.add_element('computer_ou').text = @computer_ou.to_s
261
- ns.add_element('type').text = @type.to_s
262
- if !@password.nil?
263
- ns.add_element('password').text = @password.to_s
264
- end
265
-
266
- ns << @type_settings.type_setting_xml
267
-
268
- return doc.to_s
269
- end # rest_xml
160
+ @username = newvalue
161
+ @need_to_update = true
162
+ end
163
+
164
+ # The priority the domain has over another one.
165
+ #
166
+ # @author Tyler Morgan
167
+ #
168
+ # @param newvalue [Integer]
169
+ #
170
+ # @raise [Jamf::InvalidDataError] If newvalue is not an Integer
171
+ # @raise [Jamf::InvalidDataError] If newvalue is not between 1 and 10
172
+ #
173
+ # @return [void]
174
+ def priority=(newvalue)
175
+ raise Jamf::InvalidDataError, 'Priority must be a Integer' unless newvalue.is_a? Integer
176
+ raise Jamf::InvalidDataError, 'Priority cannot exceed 10' unless newvalue <= 10
177
+ raise Jamf::InvalidDataError, 'Priority must be greater than 0' unless newvalue > 0
178
+
179
+ @priority = newvalue
180
+ @need_to_update = true
270
181
  end
271
182
 
183
+ # The OU path the computer object is to be placed
184
+ #
185
+ # @author Tyler Morgan
186
+ #
187
+ # @param newvalue [String]
188
+ #
189
+ # @raise [Jamf::InvalidDataError] If newvalue is not a String
190
+ #
191
+ # @return [void]
192
+ def computer_ou=(newvalue)
193
+ raise Jamf::InvalidDataError, 'Computer OU must be a String' unless newvalue.is_a? String
194
+
195
+ @computer_ou = newvalue
196
+ @need_to_update = true
197
+ end
198
+
199
+ # Sets the password used in conjunction with the username to attempt to bind
200
+ # the computer to the domain.
201
+ #
202
+ # @author Tyler Morgan
203
+ #
204
+ # @param newvalue [String]
205
+ #
206
+ # @raise [Jamf::InvalidDataError] If newvalue is not a String
207
+ #
208
+ # @return [void]
209
+ def password=(newvalue)
210
+ raise Jamf::InvalidDataError, 'Password must be a string' unless newvalue.is_a? String
211
+
212
+ @password = newvalue
213
+ @need_to_update = true
214
+ end
215
+
216
+ # private instance methods
217
+ ######################
218
+ private
219
+
220
+ # the xml formated data for adding or updating this in the JSS
221
+ #
222
+ # This method constructs a properly formatted XML document to be handled by the Jamf Pro API
223
+ #
224
+ # @author Tyler Morgan
225
+ #
226
+ # @return [String]
227
+ def rest_xml
228
+ doc = REXML::Document.new Jamf::Connection::XML_HEADER
229
+ doc.root.name = self.class::RSRC_OBJECT_KEY.to_s
230
+ ns = doc.root
231
+ ns.add_element('id').text = @id.to_s
232
+ ns.add_element('name').text = @name
233
+ ns.add_element('priority').text = @priority.to_s
234
+ ns.add_element('domain').text = @domain.to_s
235
+ ns.add_element('username').text = @username.to_s
236
+ ns.add_element('computer_ou').text = @computer_ou.to_s
237
+ ns.add_element('type').text = @type.to_s
238
+ ns.add_element('password').text = @password.to_s unless @password.nil?
239
+
240
+ ns << @type_settings.type_setting_xml
241
+
242
+ doc.to_s
243
+ end # rest_xml
244
+
245
+ end
272
246
 
273
247
  end