ruby-jss 2.0.0a10 → 2.0.0b3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (502) hide show
  1. checksums.yaml +4 -4
  2. data/README-2.0.0.md +53 -32
  3. data/lib/jamf/api/classic/api_objects/computer.rb +18 -15
  4. data/lib/jamf/api/classic/api_objects/computer_group.rb +1 -0
  5. data/lib/jamf/api/classic/api_objects/criteriable.rb +1 -1
  6. data/lib/jamf/api/classic/api_objects/mdm.rb +40 -24
  7. data/lib/jamf/api/classic/api_objects/mobile_device.rb +8 -12
  8. data/lib/jamf/api/classic/api_objects/mobile_device_application.rb +35 -6
  9. data/lib/jamf/api/classic/api_objects/policy.rb +8 -17
  10. data/lib/jamf/api/classic/api_objects/script.rb +1 -1
  11. data/lib/jamf/api/classic/base_classes/advanced_search.rb +5 -5
  12. data/lib/jamf/api/classic/base_classes/api_object.rb +26 -26
  13. data/lib/jamf/api/classic/base_classes/extension_attribute.rb +2 -2
  14. data/lib/jamf/api/classic/base_classes/group.rb +57 -40
  15. data/lib/jamf/api/connection/attributes.rb +51 -4
  16. data/lib/jamf/api/connection/classic_api.rb +2 -1
  17. data/lib/jamf/api/connection/connect.rb +49 -2
  18. data/lib/jamf/api/connection/constants.rb +6 -0
  19. data/lib/jamf/api/connection/jamf_pro_api.rb +6 -2
  20. data/lib/jamf/api/connection/token.rb +10 -3
  21. data/lib/jamf/api/connection.rb +1 -1
  22. data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +9 -1
  23. data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +21 -9
  24. data/lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb +178 -0
  25. data/lib/jamf/api/jamf_pro/mixins/prestage.rb +17 -7
  26. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_preview_search_results.rb +2 -3
  27. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_v2_search_results.rb +1 -2
  28. data/lib/jamf/api/jamf_pro/oapi_schemas/account.rb +1 -2
  29. data/lib/jamf/api/jamf_pro/oapi_schemas/{access_groups_search_results.rb → account_driven_user_enrollment_session_token_settings.rb} +14 -14
  30. data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +1 -2
  31. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences.rb +1 -2
  32. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +1 -2
  33. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v4.rb +1 -2
  34. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history.rb +1 -2
  35. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history_search_results.rb +1 -2
  36. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_summary.rb +1 -2
  37. data/lib/jamf/api/jamf_pro/oapi_schemas/admin_account.rb +1 -2
  38. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search.rb +1 -2
  39. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_criteria_choices.rb +1 -2
  40. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_search_results.rb +1 -2
  41. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search.rb +1 -2
  42. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search_search_results.rb +1 -2
  43. data/lib/jamf/api/jamf_pro/oapi_schemas/android_details.rb +1 -2
  44. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +1 -2
  45. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +1 -2
  46. data/lib/jamf/api/jamf_pro/oapi_schemas/app_analytics_setting.rb +1 -2
  47. data/lib/jamf/api/jamf_pro/oapi_schemas/app_dynamics_config.rb +1 -2
  48. data/lib/jamf/api/jamf_pro/oapi_schemas/app_path.rb +1 -2
  49. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field.rb +1 -2
  50. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field_search_results.rb +1 -2
  51. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_settings.rb +1 -2
  52. data/lib/jamf/api/jamf_pro/oapi_schemas/apple_tv_details.rb +1 -2
  53. data/lib/jamf/api/jamf_pro/oapi_schemas/application_attributes.rb +1 -2
  54. data/lib/jamf/api/jamf_pro/oapi_schemas/application_configuration.rb +1 -2
  55. data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +1 -2
  56. data/lib/jamf/api/jamf_pro/oapi_schemas/attributes.rb +1 -2
  57. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account.rb +1 -2
  58. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +1 -2
  59. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token.rb +1 -2
  60. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token_v1.rb +1 -2
  61. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization.rb +1 -2
  62. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +1 -2
  63. data/lib/jamf/api/jamf_pro/oapi_schemas/{deprecated_configuration_search_results.rb → available_updates.rb} +12 -20
  64. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_process_status.rb +1 -2
  65. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_request.rb +1 -2
  66. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration.rb +1 -2
  67. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_request.rb +1 -2
  68. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_update.rb +1 -2
  69. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_mappings.rb +1 -2
  70. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration.rb +1 -2
  71. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_request.rb +1 -2
  72. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_update.rb +1 -2
  73. data/lib/jamf/api/jamf_pro/oapi_schemas/branding_image_url.rb +1 -2
  74. data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +1 -2
  75. data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +1 -2
  76. data/lib/jamf/api/jamf_pro/oapi_schemas/cache_settings.rb +1 -2
  77. data/lib/jamf/api/jamf_pro/oapi_schemas/categories_search_results.rb +1 -2
  78. data/lib/jamf/api/jamf_pro/oapi_schemas/category.rb +1 -2
  79. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_details.rb +1 -4
  80. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v2.rb +1 -2
  81. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_key.rb +1 -2
  82. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_record.rb +1 -2
  83. data/lib/jamf/api/jamf_pro/oapi_schemas/classic_ldap_mappings.rb +1 -2
  84. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v2.rb +1 -2
  85. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v3.rb +1 -2
  86. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common.rb +1 -2
  87. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_request.rb +1 -2
  88. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_response.rb +1 -2
  89. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_pool_statistics.rb +1 -6
  90. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_status.rb +1 -2
  91. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore.rb +1 -3
  92. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore_file.rb +1 -4
  93. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_request.rb +1 -6
  94. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_response.rb +1 -9
  95. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_request.rb +1 -2
  96. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_response.rb +1 -2
  97. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_update.rb +1 -2
  98. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +2 -3
  99. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +2 -3
  100. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +26 -3
  101. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +2 -3
  102. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +2 -3
  103. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +1 -2
  104. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +1 -2
  105. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +1 -2
  106. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +1 -2
  107. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +1 -2
  108. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +1 -2
  109. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +1 -2
  110. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +1 -2
  111. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +1 -2
  112. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +1 -2
  113. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +2 -3
  114. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +2 -3
  115. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +2 -3
  116. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +2 -3
  117. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general_update.rb +1 -2
  118. data/lib/jamf/api/jamf_pro/oapi_schemas/{mdm_signing_certificate.rb → computer_group.rb} +18 -24
  119. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +2 -3
  120. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware_update.rb +1 -2
  121. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +2 -3
  122. data/lib/jamf/api/jamf_pro/oapi_schemas/{computer_inventory_response.rb → computer_inventory.rb} +4 -5
  123. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_preferences.rb +1 -2
  124. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_settings.rb +1 -2
  125. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_recovery_lock_password_response.rb +1 -2
  126. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_search_results.rb +4 -5
  127. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_update_request.rb +1 -2
  128. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +2 -3
  129. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +2 -3
  130. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_location.rb +1 -2
  131. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +1 -2
  132. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +2 -3
  133. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system_update.rb +1 -2
  134. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_overview.rb +1 -2
  135. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +2 -3
  136. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +1 -2
  137. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +1 -2
  138. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +1 -2
  139. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +2 -3
  140. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage.rb +1 -2
  141. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results.rb +1 -2
  142. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v2.rb +1 -2
  143. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v2.rb +1 -2
  144. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +2 -3
  145. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +2 -3
  146. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +1 -2
  147. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +1 -2
  148. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +2 -3
  149. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +2 -3
  150. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +2 -3
  151. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +2 -3
  152. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +2 -3
  153. data/lib/jamf/api/jamf_pro/oapi_schemas/computers_search_results.rb +1 -2
  154. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_profile.rb +1 -2
  155. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_search_results.rb +1 -2
  156. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_candidate_request.rb +1 -2
  157. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_response.rb +1 -2
  158. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_status_response.rb +1 -2
  159. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_update_request.rb +1 -2
  160. data/lib/jamf/api/jamf_pro/oapi_schemas/country.rb +1 -2
  161. data/lib/jamf/api/jamf_pro/oapi_schemas/country_codes.rb +1 -2
  162. data/lib/jamf/api/jamf_pro/oapi_schemas/create_path.rb +1 -2
  163. data/lib/jamf/api/jamf_pro/oapi_schemas/csa_token.rb +1 -2
  164. data/lib/jamf/api/jamf_pro/oapi_schemas/current_account.rb +1 -2
  165. data/lib/jamf/api/jamf_pro/oapi_schemas/current_authorization.rb +1 -2
  166. data/lib/jamf/api/jamf_pro/oapi_schemas/data_roaming_setting.rb +1 -2
  167. data/lib/jamf/api/jamf_pro/oapi_schemas/database_password.rb +1 -2
  168. data/lib/jamf/api/jamf_pro/oapi_schemas/day_of_week.rb +1 -2
  169. data/lib/jamf/api/jamf_pro/oapi_schemas/delete_user_command.rb +1 -2
  170. data/lib/jamf/api/jamf_pro/oapi_schemas/department.rb +1 -2
  171. data/lib/jamf/api/jamf_pro/oapi_schemas/departments_search_results.rb +1 -2
  172. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task.rb +1 -2
  173. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task_search_results.rb +1 -2
  174. data/lib/jamf/api/jamf_pro/oapi_schemas/device_communication_settings.rb +1 -2
  175. data/lib/jamf/api/jamf_pro/oapi_schemas/device_compliance_information.rb +1 -2
  176. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +1 -2
  177. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +1 -2
  178. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_body.rb +1 -2
  179. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +1 -2
  180. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +1 -2
  181. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +1 -2
  182. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +1 -2
  183. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage.rb +1 -2
  184. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +1 -2
  185. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +1 -2
  186. data/lib/jamf/api/jamf_pro/oapi_schemas/diagnostic_submission_setting.rb +1 -2
  187. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook.rb +1 -2
  188. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_exclusions.rb +1 -2
  189. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_limitations.rb +1 -2
  190. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_scope.rb +1 -2
  191. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_search_results.rb +1 -2
  192. data/lib/jamf/api/jamf_pro/oapi_schemas/enable_lost_mode_command.rb +1 -2
  193. data/lib/jamf/api/jamf_pro/oapi_schemas/engage.rb +1 -2
  194. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_preview.rb +12 -6
  195. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_v2.rb +1 -2
  196. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization.rb +1 -2
  197. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_branding_settings.rb +1 -2
  198. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependencies.rb +1 -2
  199. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependency.rb +1 -2
  200. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_ldap_group_access.rb +1 -2
  201. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel.rb +1 -2
  202. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_ldap_auth.rb +1 -2
  203. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_list.rb +1 -2
  204. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_sso_auth.rb +1 -2
  205. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_text.rb +1 -2
  206. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results.rb +1 -2
  207. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results_v2.rb +1 -2
  208. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_v2.rb +3 -3
  209. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +1 -2
  210. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_process_text_object.rb +5 -6
  211. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v2.rb +1 -2
  212. data/lib/jamf/api/jamf_pro/oapi_schemas/export_field.rb +1 -2
  213. data/lib/jamf/api/jamf_pro/oapi_schemas/export_parameters.rb +5 -2
  214. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute.rb +1 -2
  215. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute_v2.rb +1 -2
  216. data/lib/jamf/api/jamf_pro/oapi_schemas/external_recipient.rb +1 -2
  217. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment.rb +1 -2
  218. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_delete.rb +1 -2
  219. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_v2.rb +1 -2
  220. data/lib/jamf/api/jamf_pro/oapi_schemas/filter.rb +1 -2
  221. data/lib/jamf/api/jamf_pro/oapi_schemas/font_path.rb +1 -2
  222. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage.rb +1 -2
  223. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v2.rb +1 -2
  224. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization.rb +1 -2
  225. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel.rb +1 -2
  226. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_ldap_auth.rb +1 -2
  227. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_sso_auth.rb +1 -2
  228. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_text.rb +1 -2
  229. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage.rb +1 -2
  230. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +1 -2
  231. data/lib/jamf/api/jamf_pro/oapi_schemas/group_mappings.rb +1 -2
  232. data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +2 -3
  233. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search.rb +1 -2
  234. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_request.rb +1 -4
  235. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_response.rb +1 -4
  236. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results.rb +1 -6
  237. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +1 -2
  238. data/lib/jamf/api/jamf_pro/oapi_schemas/href_response.rb +3 -4
  239. data/lib/jamf/api/jamf_pro/oapi_schemas/icon_response.rb +1 -2
  240. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name.rb +1 -2
  241. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name_v2.rb +1 -2
  242. data/lib/jamf/api/jamf_pro/oapi_schemas/ids.rb +5 -2
  243. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize.rb +1 -2
  244. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize_v1.rb +1 -2
  245. data/lib/jamf/api/jamf_pro/oapi_schemas/install_package.rb +1 -2
  246. data/lib/jamf/api/jamf_pro/oapi_schemas/integer_wrapper.rb +1 -2
  247. data/lib/jamf/api/jamf_pro/oapi_schemas/internal_recipient.rb +1 -2
  248. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_information.rb +1 -2
  249. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_error.rb +1 -2
  250. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error.rb +1 -2
  251. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error_cause.rb +1 -2
  252. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_success.rb +1 -2
  253. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +1 -2
  254. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column.rb +1 -2
  255. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column_result.rb +1 -2
  256. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_invalid_csv_response.rb +1 -2
  257. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record.rb +1 -2
  258. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results.rb +1 -2
  259. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +1 -2
  260. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +1 -2
  261. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_configuration.rb +1 -2
  262. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_search_results.rb +1 -2
  263. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details.rb +1 -2
  264. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details_v2.rb +1 -2
  265. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_application_response.rb +1 -2
  266. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_nation_credentials.rb +1 -2
  267. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_package_response.rb +1 -2
  268. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information.rb +1 -2
  269. data/lib/jamf/api/jamf_pro/oapi_schemas/{enrollment_access_group.rb → jamf_pro_information_v2.rb} +35 -34
  270. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_server_url.rb +1 -2
  271. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_version.rb +1 -2
  272. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_protect_plan.rb +1 -2
  273. data/lib/jamf/api/jamf_pro/oapi_schemas/language_code.rb +5 -6
  274. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_request.rb +1 -2
  275. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_response.rb +1 -2
  276. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_update.rb +1 -2
  277. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group.rb +1 -2
  278. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group_search_results.rb +1 -2
  279. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_server.rb +1 -2
  280. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile.rb +1 -2
  281. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile_search_results.rb +1 -2
  282. data/lib/jamf/api/jamf_pro/oapi_schemas/locale.rb +1 -2
  283. data/lib/jamf/api/jamf_pro/oapi_schemas/location.rb +1 -2
  284. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +1 -2
  285. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +1 -2
  286. data/lib/jamf/api/jamf_pro/oapi_schemas/location_v2.rb +1 -2
  287. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_configuration.rb +1 -2
  288. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_search_results.rb +1 -2
  289. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +28 -3
  290. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +1 -4
  291. data/lib/jamf/api/jamf_pro/oapi_schemas/markdown.rb +1 -2
  292. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_client_type.rb +1 -2
  293. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command.rb +1 -2
  294. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client.rb +1 -2
  295. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_request.rb +1 -2
  296. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_state.rb +1 -2
  297. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_type.rb +1 -2
  298. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_mappings.rb +1 -2
  299. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_request.rb +1 -4
  300. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_response.rb +1 -4
  301. data/lib/jamf/api/jamf_pro/oapi_schemas/memcached_endpoints.rb +1 -2
  302. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device.rb +1 -2
  303. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application.rb +1 -2
  304. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment.rb +1 -2
  305. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment_v2.rb +1 -2
  306. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v1.rb +1 -2
  307. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v2.rb +61 -3
  308. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details.rb +1 -2
  309. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_get_v2.rb +1 -2
  310. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_v2.rb +7 -2
  311. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook.rb +1 -2
  312. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_extension_attribute_results.rb +1 -2
  313. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_group.rb +1 -2
  314. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage.rb +1 -2
  315. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name.rb +1 -2
  316. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +1 -2
  317. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names.rb +1 -2
  318. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +1 -2
  319. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results.rb +1 -2
  320. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +1 -2
  321. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +1 -2
  322. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_params.rb +1 -2
  323. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results.rb +1 -2
  324. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results_v2.rb +1 -2
  325. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_v2.rb +1 -2
  326. data/lib/jamf/api/jamf_pro/oapi_schemas/network.rb +1 -2
  327. data/lib/jamf/api/jamf_pro/oapi_schemas/network_v2.rb +1 -2
  328. data/lib/jamf/api/jamf_pro/oapi_schemas/notification.rb +1 -2
  329. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_type.rb +3 -3
  330. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_v1.rb +1 -2
  331. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history.rb +1 -6
  332. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +1 -6
  333. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +1 -2
  334. data/lib/jamf/api/jamf_pro/oapi_schemas/order_by.rb +1 -2
  335. data/lib/jamf/api/jamf_pro/oapi_schemas/package_manifest.rb +1 -2
  336. data/lib/jamf/api/jamf_pro/oapi_schemas/parent_app.rb +5 -5
  337. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_ids_on_dashboard.rb +1 -2
  338. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt.rb +1 -2
  339. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt_action.rb +1 -2
  340. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log.rb +1 -2
  341. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_search_results.rb +1 -2
  342. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_on_dashboard.rb +1 -2
  343. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_summary.rb +1 -2
  344. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_version.rb +1 -2
  345. data/lib/jamf/api/jamf_pro/oapi_schemas/personal_hotspot_setting.rb +1 -2
  346. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +1 -2
  347. data/lib/jamf/api/jamf_pro/oapi_schemas/plugin_path.rb +1 -2
  348. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties.rb +1 -2
  349. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties_v1.rb +1 -2
  350. data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v2.rb +1 -2
  351. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependencies.rb +1 -2
  352. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependency.rb +1 -2
  353. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment.rb +1 -2
  354. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment_v2.rb +1 -2
  355. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +1 -2
  356. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +1 -2
  357. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope.rb +1 -2
  358. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment.rb +1 -2
  359. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +1 -2
  360. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response.rb +1 -2
  361. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +1 -2
  362. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_update.rb +1 -2
  363. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +1 -2
  364. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status.rb +1 -2
  365. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status_v2.rb +1 -2
  366. data/lib/jamf/api/jamf_pro/oapi_schemas/process_texts_search_results.rb +3 -4
  367. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_registration_request.rb +1 -2
  368. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_settings_response.rb +1 -2
  369. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_updatable_settings_request.rb +1 -2
  370. data/lib/jamf/api/jamf_pro/oapi_schemas/provisioning_profile.rb +1 -2
  371. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing.rb +1 -2
  372. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing_v2.rb +1 -2
  373. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage.rb +1 -2
  374. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v2.rb +1 -2
  375. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage.rb +1 -2
  376. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +1 -2
  377. data/lib/jamf/api/jamf_pro/oapi_schemas/recalculation_results.rb +1 -2
  378. data/lib/jamf/api/jamf_pro/oapi_schemas/recipient.rb +1 -2
  379. data/lib/jamf/api/jamf_pro/oapi_schemas/recipients.rb +1 -2
  380. data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +1 -2
  381. data/lib/jamf/api/jamf_pro/oapi_schemas/reenrollment.rb +1 -2
  382. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_response.rb +1 -2
  383. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_search_results.rb +1 -2
  384. data/lib/jamf/api/jamf_pro/oapi_schemas/renew_mdm_profile_response.rb +1 -2
  385. data/lib/jamf/api/jamf_pro/oapi_schemas/restart_device_command.rb +1 -2
  386. data/lib/jamf/api/jamf_pro/oapi_schemas/retry_patch_policy_params.rb +1 -2
  387. data/lib/jamf/api/jamf_pro/oapi_schemas/{safelisted_apps.rb → safelisted_app.rb} +15 -11
  388. data/lib/jamf/api/jamf_pro/oapi_schemas/script.rb +1 -2
  389. data/lib/jamf/api/jamf_pro/oapi_schemas/scripts_search_results.rb +1 -2
  390. data/lib/jamf/api/jamf_pro/oapi_schemas/search_active_patch_history_params.rb +1 -2
  391. data/lib/jamf/api/jamf_pro/oapi_schemas/search_patch_policy_log_params.rb +1 -2
  392. data/lib/jamf/api/jamf_pro/oapi_schemas/security.rb +1 -2
  393. data/lib/jamf/api/jamf_pro/oapi_schemas/security_v2.rb +1 -2
  394. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_install_settings.rb +1 -2
  395. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_interaction_settings.rb +1 -2
  396. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_login_settings.rb +1 -2
  397. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_settings.rb +1 -2
  398. data/lib/jamf/api/jamf_pro/oapi_schemas/session.rb +1 -2
  399. data/lib/jamf/api/jamf_pro/oapi_schemas/session_candidate_request.rb +1 -2
  400. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details.rb +1 -2
  401. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details_search_results.rb +1 -2
  402. data/lib/jamf/api/jamf_pro/oapi_schemas/session_status.rb +1 -2
  403. data/lib/jamf/api/jamf_pro/oapi_schemas/set_recovery_lock_command.rb +1 -2
  404. data/lib/jamf/api/jamf_pro/oapi_schemas/settings_command.rb +1 -2
  405. data/lib/jamf/api/jamf_pro/oapi_schemas/shared_device_configuration.rb +1 -2
  406. data/lib/jamf/api/jamf_pro/oapi_schemas/signature.rb +1 -2
  407. data/lib/jamf/api/jamf_pro/oapi_schemas/site.rb +1 -2
  408. data/lib/jamf/api/jamf_pro/oapi_schemas/smart_search_criterion.rb +1 -2
  409. data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_configuration.rb +1 -2
  410. data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_patch_policy_summaries.rb +1 -2
  411. data/lib/jamf/api/jamf_pro/oapi_schemas/software_update_settings.rb +1 -2
  412. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore.rb +1 -2
  413. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_cert_parse_response.rb +1 -2
  414. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_details.rb +1 -2
  415. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_parse.rb +1 -2
  416. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response.rb +1 -2
  417. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response_with_details.rb +1 -2
  418. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_with_details.rb +1 -2
  419. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_metadata_url.rb +1 -2
  420. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_settings.rb +1 -2
  421. data/lib/jamf/api/jamf_pro/oapi_schemas/startup_status.rb +1 -2
  422. data/lib/jamf/api/jamf_pro/oapi_schemas/static_user_group.rb +1 -2
  423. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity.rb +1 -2
  424. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_certificate_upload.rb +1 -2
  425. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_create.rb +1 -2
  426. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_search_results.rb +1 -2
  427. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_update.rb +1 -2
  428. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_features.rb +1 -2
  429. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_request.rb +5 -5
  430. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_response.rb +5 -5
  431. data/lib/jamf/api/jamf_pro/oapi_schemas/time_frame.rb +1 -2
  432. data/lib/jamf/api/jamf_pro/oapi_schemas/time_zone.rb +1 -2
  433. data/lib/jamf/api/jamf_pro/oapi_schemas/tv_os_details.rb +9 -2
  434. data/lib/jamf/api/jamf_pro/oapi_schemas/udids.rb +1 -2
  435. data/lib/jamf/api/jamf_pro/oapi_schemas/update_apple_tv.rb +1 -2
  436. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios.rb +1 -2
  437. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios_v2.rb +1 -2
  438. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device.rb +1 -2
  439. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device_v2.rb +1 -2
  440. data/lib/jamf/api/jamf_pro/oapi_schemas/update_tv_os.rb +1 -2
  441. data/lib/jamf/api/jamf_pro/oapi_schemas/user_attributes.rb +1 -2
  442. data/lib/jamf/api/jamf_pro/oapi_schemas/user_mappings.rb +1 -2
  443. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search.rb +1 -2
  444. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_request.rb +1 -4
  445. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_response.rb +1 -4
  446. data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +3 -3
  447. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_ca_record.rb +1 -2
  448. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record.rb +1 -2
  449. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record_search_results.rb +1 -2
  450. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_service_status.rb +1 -2
  451. data/lib/jamf/api/jamf_pro/oapi_schemas/verbose_package_deployment_response.rb +1 -2
  452. data/lib/jamf/api/jamf_pro/oapi_schemas/voice_roaming_setting.rb +1 -2
  453. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content.rb +1 -2
  454. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location.rb +1 -2
  455. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_list_view.rb +1 -2
  456. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_patch.rb +1 -2
  457. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_post.rb +1 -2
  458. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_locations.rb +1 -2
  459. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription.rb +1 -2
  460. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription_base.rb +1 -2
  461. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscriptions.rb +1 -2
  462. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_admin_account.rb +1 -2
  463. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_token_subscription.rb +1 -2
  464. data/lib/jamf/api/jamf_pro/oapi_schemas/web_link.rb +1 -2
  465. data/lib/jamf/client/jamf_binary.rb +76 -77
  466. data/lib/jamf/client/jamf_helper.rb +245 -235
  467. data/lib/jamf/client/management_action.rb +63 -53
  468. data/lib/jamf/client.rb +3 -3
  469. data/lib/jamf/constants.rb +1 -1
  470. data/lib/jamf/deprecations/deprecated_api_connection_class.rb +29 -0
  471. data/lib/jamf/deprecations/deprecated_api_constant.rb +3 -1
  472. data/lib/jamf/deprecations/deprecated_config_constant.rb +3 -1
  473. data/lib/jamf/version.rb +1 -1
  474. data/lib/zeitwerk_config.rb +23 -17
  475. data/test/{README.md → README-TEST.md} +3 -0
  476. data/test/bin/runtests +42 -2
  477. data/test/lib/jamf_test/APITest.rb +33 -7
  478. data/test/lib/jamf_test/advanced_search.rb +40 -0
  479. data/test/lib/jamf_test/collection_tests.rb +8 -13
  480. data/test/lib/jamf_test/prestage_tests.rb +135 -0
  481. data/test/lib/jamf_test.rb +7 -1
  482. data/test/tests/advanced_computer_search.rb +36 -0
  483. data/test/tests/advanced_mobile_device_search.rb +36 -0
  484. data/test/tests/advanced_user_search.rb +36 -0
  485. data/test/tests/building.rb +41 -0
  486. data/test/tests/computer.rb +41 -0
  487. data/test/tests/computer_group.rb +132 -0
  488. data/test/tests/computer_prestage.rb +36 -0
  489. data/test/tests/department.rb +41 -0
  490. data/test/tests/inventory_preload_record.rb +2 -2
  491. data/test/tests/mobile_device.rb +41 -0
  492. data/test/tests/mobile_device_prestage.rb +37 -0
  493. data/test/tests/policy.rb +39 -50
  494. metadata +41 -53
  495. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v1.rb +0 -102
  496. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_request.rb +0 -92
  497. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_response.rb +0 -105
  498. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_update.rb +0 -92
  499. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_request.rb +0 -166
  500. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_response.rb +0 -163
  501. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_update.rb +0 -171
  502. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings.rb +0 -264
@@ -1425,29 +1425,21 @@ module Jamf
1425
1425
  #
1426
1426
  # @option [Symbol] priority: either :before or :after
1427
1427
  #
1428
- # @option [String] parameter4: the value of the 4th parameter passed to the script. this
1429
- # overrides the same parameter in the script object itself.
1428
+ # @option [String] parameter4: the value of the 4th parameter passed to the script.
1430
1429
  #
1431
- # @option [String] parameter5: the value of the 5th parameter passed to the script. this
1432
- # overrides the same parameter in the script object itself.
1430
+ # @option [String] parameter5: the value of the 5th parameter passed to the script.
1433
1431
  #
1434
- # @option [String] parameter6: the value of the 6th parameter passed to the script. this
1435
- # overrides the same parameter in the script object itself.
1432
+ # @option [String] parameter6: the value of the 6th parameter passed to the script.
1436
1433
  #
1437
- # @option [String] parameter7: the value of the 7th parameter passed to the script. this
1438
- # overrides the same parameter in the script object itself.
1434
+ # @option [String] parameter7: the value of the 7th parameter passed to the script.
1439
1435
  #
1440
- # @option [String] parameter8: the value of the 8th parameter passed to the script. this
1441
- # overrides the same parameter in the script object itself.
1436
+ # @option [String] parameter8: the value of the 8th parameter passed to the script.
1442
1437
  #
1443
- # @option [String] parameter9: the value of the 9th parameter passed to the script. this
1444
- # overrides the same parameter in the script object itself.
1438
+ # @option [String] parameter9: the value of the 9th parameter passed to the script.
1445
1439
  #
1446
- # @option [String] parameter10: the value of the 10th parameter passed to the script. this
1447
- # overrides the same parameter in the script object itself.
1440
+ # @option [String] parameter10: the value of the 10th parameter passed to the script.
1448
1441
  #
1449
- # @option [String] parameter11: the value of the 11th parameter passed to the script. this
1450
- # overrides the same parameter in the script object itself.
1442
+ # @option [String] parameter11: the value of the 11th parameter passed to the script.
1451
1443
  #
1452
1444
  # @return [Array, nil] the new @scripts array, nil if script was already in the policy
1453
1445
  #
@@ -1643,7 +1635,6 @@ module Jamf
1643
1635
  @printers
1644
1636
  end
1645
1637
 
1646
-
1647
1638
  # Remove a specific printer object from the policy.
1648
1639
  #
1649
1640
  # @author Tyler Morgan
@@ -389,7 +389,7 @@ module Jamf
389
389
  raise Jamf::MissingDataError, 'script_contents does not start with #!' unless @script_contents.to_s.start_with? '#!'
390
390
 
391
391
  opts[:target] ||= '/'
392
- opts[:computer_name] ||= Jamf::Client.run_jamf('getComputerName')[/>(.)</, 1]
392
+ opts[:computer_name] ||= Jamf::Client.run_jamf('getComputerName')[/>(.*?)</, 1]
393
393
  opts[:username] ||= Jamf::Client.console_user
394
394
 
395
395
  params = [opts[:target], opts[:computer_name], opts[:username]]
@@ -144,7 +144,7 @@ module Jamf
144
144
  # @see APIObject#initialize
145
145
  #
146
146
  def initialize(**args)
147
- super
147
+ super **args
148
148
 
149
149
  # @init_data now has the raw data
150
150
  # so fill in our attributes or set defaults
@@ -189,7 +189,7 @@ module Jamf
189
189
  raise Jamf::InvalidDataError, 'Jamf::Criteriable::Criteria instance required' unless @criteria.is_a? Jamf::Criteriable::Criteria
190
190
  raise Jamf::InvalidDataError, 'display_fields must be an Array.' unless @display_fields.is_a? Array
191
191
 
192
- orig_timeout = @cnx.cnx.options[:timeout]
192
+ orig_timeout = @cnx.timeout
193
193
  @cnx.timeout = 1800
194
194
  super()
195
195
  requery_search_results if get_results
@@ -207,7 +207,7 @@ module Jamf
207
207
  # @return [Integer] the id of the updated search
208
208
  #
209
209
  def update(get_results = false)
210
- orig_timeout = @cnx.cnx.options[:timeout]
210
+ orig_timeout = @cnx.timeout
211
211
  @cnx.timeout = 1800
212
212
  super()
213
213
  requery_search_results if get_results
@@ -235,8 +235,8 @@ module Jamf
235
235
  # @return [Array<Hash>] the new search results
236
236
  #
237
237
  def requery_search_results
238
- orig_open_timeout = @cnx.cnx.options[:open_timeout]
239
- orig_timeout = @cnx.cnx.options[:timeout]
238
+ orig_open_timeout = @cnx.open_timeout
239
+ orig_timeout = @cnx.timeout
240
240
  @cnx.timeout = 1800
241
241
  @cnx.open_timeout = 1800
242
242
  begin
@@ -295,14 +295,13 @@ module Jamf
295
295
  # This is called automatically when subclasses are loaded by zeitwerk
296
296
  #
297
297
  def self.define_identifier_list_methods
298
- Jamf.load_msg "defining list-methods for APIObject subclass #{self}"
298
+ Jamf.load_msg "Defining list-methods for APIObject subclass #{self}"
299
299
 
300
300
  lookup_keys.each do |als, key|
301
301
  meth_name = key.to_s.end_with?('s') ? "all_#{key}es" : "all_#{key}s"
302
-
303
302
  if als == key
304
303
  # the all_ method - skip if defined in the class
305
- next if singleton_methods.include? meth_name
304
+ next if singleton_methods.include? meth_name.to_sym
306
305
 
307
306
  define_singleton_method meth_name do |refresh = false, cached_list: nil, api: nil, cnx: Jamf.cnx|
308
307
  cnx = api if api
@@ -314,8 +313,9 @@ module Jamf
314
313
  else
315
314
  # an alias - skip if defined in the class
316
315
  als_name = als.to_s.end_with?('s') ? "all_#{als}es" : "all_#{als}s"
317
- next if singleton_methods.include? als_name
318
316
 
317
+ next if singleton_methods.include? als_name.to_sym
318
+
319
319
  define_singleton_method als_name do |refresh = false, api: nil, cnx: Jamf.cnx|
320
320
  cnx = api if api
321
321
  send meth_name, refresh, cnx: cnx
@@ -323,7 +323,8 @@ module Jamf
323
323
  Jamf.load_msg "Defined alias '#{als_name}' of #{self}##{meth_name}"
324
324
 
325
325
  end # if
326
- end # lookup_keys.eachs
326
+ end # lookup_keys.each
327
+
327
328
  true
328
329
  end # self.define_identifier_list_methods
329
330
 
@@ -534,7 +535,7 @@ module Jamf
534
535
  dups[obj[:name]] = 1
535
536
  end # if
536
537
  end # all(refresh, cnx: cnx).each
537
- dups.delete_if { |k,v| v == 1 }
538
+ dups.delete_if { |_k, v| v == 1 }
538
539
  dups
539
540
  end
540
541
 
@@ -559,7 +560,7 @@ module Jamf
559
560
  ident = lookup_keys[ident]
560
561
  raise Jamf::InvalidDataError, "No identifier :#{ident} for class #{self}" unless ident
561
562
 
562
- list = cached_list ? cached_list : all(refresh, cnx: cnx)
563
+ list = cached_list || all(refresh, cnx: cnx)
563
564
  mapped = list.map do |i|
564
565
  [
565
566
  i[ident],
@@ -660,7 +661,6 @@ module Jamf
660
661
  end
661
662
  end
662
663
 
663
-
664
664
  # Return the id of the object of this subclass with the given identifier.
665
665
  #
666
666
  # Return nil if no object has an identifier that matches.
@@ -1027,7 +1027,7 @@ module Jamf
1027
1027
 
1028
1028
  validate_not_metaclass(self)
1029
1029
  rsrc = "#{self::RSRC_BASE}/id/#{id}"
1030
- REXML::Document.new(cnx.c_put rsrc, xml.to_s)
1030
+ REXML::Document.new(cnx.c_put(rsrc, xml.to_s))
1031
1031
  end
1032
1032
 
1033
1033
  # POST some raw XML to the API for a given id in this subclass.
@@ -1055,7 +1055,7 @@ module Jamf
1055
1055
 
1056
1056
  validate_not_metaclass(self)
1057
1057
  rsrc = "#{self::RSRC_BASE}/id/-1"
1058
- REXML::Document.new(cnx.c_post rsrc, xml.to_s)
1058
+ REXML::Document.new(cnx.c_post(rsrc, xml.to_s))
1059
1059
  end
1060
1060
 
1061
1061
  # Make a ruby instance of a not-yet-existing APIObject.
@@ -1087,13 +1087,13 @@ module Jamf
1087
1087
 
1088
1088
  args[:api] ||= Jamf.cnx
1089
1089
  args[:id] = :new
1090
- new **args
1090
+ new(**args)
1091
1091
  end
1092
1092
 
1093
1093
  # backward compatability
1094
1094
  # @deprecated use .create instead
1095
1095
  def self.make(**args)
1096
- create **args
1096
+ create(**args)
1097
1097
  end
1098
1098
 
1099
1099
  # Disallow direct use of ruby's .new class method for creating instances.
@@ -1102,9 +1102,7 @@ module Jamf
1102
1102
  validate_not_metaclass(self)
1103
1103
 
1104
1104
  calling_method = caller_locations(1..1).first.label
1105
- unless OK_INSTANTIATORS.include? calling_method
1106
- raise Jamf::UnsupportedError, 'Use .fetch or .create to instantiate APIObject classes'
1107
- end
1105
+ raise Jamf::UnsupportedError, 'Use .fetch or .create to instantiate APIObject classes' unless OK_INSTANTIATORS.include? calling_method
1108
1106
 
1109
1107
  super
1110
1108
  end
@@ -1255,24 +1253,24 @@ module Jamf
1255
1253
  #
1256
1254
  def save
1257
1255
  if @in_jss
1258
- raise Jamf::UnsupportedError, 'Updating this object in the JSS is currently not supported by ruby-jss' unless updatable?
1259
-
1260
- update_in_jamf
1256
+ update
1261
1257
  else
1262
- raise Jamf::UnsupportedError, 'Creating this object in the JSS is currently not supported by ruby-jss' unless creatable?
1263
-
1264
- create_in_jamf
1258
+ create
1265
1259
  end
1266
1260
  end
1267
1261
 
1268
1262
  # @deprecated, use #save
1269
1263
  def create
1270
- save
1264
+ raise Jamf::UnsupportedError, 'Creating this object in the JSS is currently not supported by ruby-jss' unless creatable?
1265
+
1266
+ create_in_jamf
1271
1267
  end
1272
1268
 
1273
1269
  # @deprecated, use #save
1274
1270
  def update
1275
- save
1271
+ raise Jamf::UnsupportedError, 'Updating this object in the JSS is currently not supported by ruby-jss' unless updatable?
1272
+
1273
+ update_in_jamf
1276
1274
  end
1277
1275
 
1278
1276
  # Mix-in Modules.
@@ -1510,10 +1508,12 @@ module Jamf
1510
1508
 
1511
1509
  raise Jamf::InvalidConnectionError, 'Not connected to MySQL' unless Jamf::DB_CNX.connected?
1512
1510
 
1513
- raise Jamf::UnsupportedError, "Object History access is not supported for #{self.class} objects at this time" unless defined? self.class::OBJECT_HISTORY_OBJECT_TYPE
1511
+ unless defined? self.class::OBJECT_HISTORY_OBJECT_TYPE
1512
+ raise Jamf::UnsupportedError,
1513
+ "Object History access is not supported for #{self.class} objects at this time"
1514
+ end
1514
1515
  end
1515
1516
 
1516
-
1517
1517
  # If we're making a new object in the JSS, make sure we were given
1518
1518
  # valid data to do so, raise exceptions otherwise.
1519
1519
  #
@@ -1535,7 +1535,6 @@ module Jamf
1535
1535
  matches = self.class.all_names(:refresh, cnx: @cnx).select { |n| n.casecmp? args[:name] }
1536
1536
 
1537
1537
  raise Jamf::AlreadyExistsError, "A #{self.class::RSRC_OBJECT_KEY} already exists with the name '#{args[:name]}'" unless matches.empty?
1538
-
1539
1538
  end
1540
1539
 
1541
1540
  # Given initialization args, perform an API lookup for an object.
@@ -1612,6 +1611,7 @@ module Jamf
1612
1611
  def find_main_subset
1613
1612
  return @init_data if @init_data[:id] && @init_data[:name]
1614
1613
  return @init_data[:general] if @init_data[:general] && @init_data[:general][:id] && @init_data[:general][:name]
1614
+
1615
1615
  @init_data.each do |_key, value|
1616
1616
  next unless value.is_a? Hash
1617
1617
  return value if value.keys.include?(:id) && value.keys.include?(:name)
@@ -207,8 +207,8 @@ module Jamf
207
207
  # @see Jamf::APIObject#delete
208
208
  #
209
209
  def delete
210
- orig_open_timeout = @cnx.cnx.options[:open_timeout]
211
- orig_timeout = @cnx.cnx.options[:timeout]
210
+ orig_open_timeout = @cnx.open_timeout
211
+ orig_timeout = @cnx.timeout
212
212
  @cnx.timeout = orig_timeout + 1800
213
213
  @cnx.open_timeout = orig_open_timeout + 1800
214
214
  begin
@@ -112,7 +112,7 @@ module Jamf
112
112
  cnx = api if api
113
113
 
114
114
  raise Jamf::NoSuchItemError, "No #{self} matching '#{group}'" unless (group_id = valid_id group, cnx: cnx)
115
- raise Jamf::UnsupportedError, "Not a static group, can't change membership directly" if map_all_ids_to(:is_smart, cnx: cnx)[group_id]
115
+ raise Jamf::UnsupportedError, "Not a static group, can't change membership" if map_all(:id, to: :is_smart, cnx: cnx)[group_id]
116
116
 
117
117
  add_members = [add_members].flatten
118
118
  remove_members = [remove_members].flatten
@@ -123,6 +123,8 @@ module Jamf
123
123
  # that isn't in the group (which is kinda lame - it should just
124
124
  # ignore this, like it does when we add a member that's already
125
125
  # in the group.)
126
+ # Its even more lame because we have to instantiate the group
127
+ # and part of the point of this class method is to avoid that.
126
128
  current_member_ids = fetch(id: group_id, cnx: cnx).member_ids
127
129
 
128
130
  # nil if no changes to be made
@@ -189,7 +191,6 @@ module Jamf
189
191
  end
190
192
  private_class_method :member_removals_xml
191
193
 
192
-
193
194
  # Attributes
194
195
  #####################################
195
196
 
@@ -207,10 +208,12 @@ module Jamf
207
208
 
208
209
  # @return [Boolean] is this a smart group
209
210
  attr_reader :is_smart
211
+ alias smart? is_smart
210
212
 
211
213
  # @return [Boolean] does this group send notifications when it changes?
212
214
  attr_reader :notify_on_change
213
-
215
+ alias notify_on_change? notify_on_change
216
+ alias notify? notify_on_change
214
217
 
215
218
  # Constructor
216
219
  #####################################
@@ -221,20 +224,14 @@ module Jamf
221
224
  # @see Jamf::APIObject
222
225
  #
223
226
  def initialize(**args)
224
- if args[:id] == :new
225
- raise Jamf::InvalidDataError, 'New group creation must specify a :type of :smart or :static' unless GROUP_TYPES.include? args[:type]
226
- end
227
+ raise Jamf::InvalidDataError, 'New group creation must specify a :type of :smart or :static' if args[:id] == :new && !(GROUP_TYPES.include? args[:type])
227
228
 
228
229
  super
229
230
 
230
231
  @is_smart = @init_data[:is_smart] || (args[:type] == :smart)
231
232
 
232
233
  @members =
233
- if @init_data[self.class::MEMBER_CLASS::RSRC_LIST_KEY]
234
- @init_data[self.class::MEMBER_CLASS::RSRC_LIST_KEY]
235
- else
236
- []
237
- end
234
+ @init_data[self.class::MEMBER_CLASS::RSRC_LIST_KEY] || []
238
235
  end # init
239
236
 
240
237
  # Public Instance Methods
@@ -251,9 +248,8 @@ module Jamf
251
248
  # happens, try again this many times with a 1 second pause between attempts.
252
249
  #
253
250
  def create(calculate_members: true, retries: 10)
254
- if @is_smart
255
- raise Jamf::MissingDataError, 'No criteria specified for smart group' unless @criteria
256
- end
251
+ raise Jamf::MissingDataError, 'No criteria specified for smart group' if @is_smart && !@criteria
252
+
257
253
  super()
258
254
 
259
255
  if calculate_members
@@ -289,10 +285,10 @@ module Jamf
289
285
  if @in_jss
290
286
  raise Jamf::UnsupportedError, 'Updating this object in the JSS is currently not supported by ruby-jss' unless updatable?
291
287
 
292
-
293
288
  update refresh: params[:refresh]
294
289
  else
295
290
  raise Jamf::UnsupportedError, 'Creating this object in the JSS is currently not supported by ruby-jss' unless creatable?
291
+
296
292
  create calculate_members: params[:calculate_members], retries: params[:retries]
297
293
  end
298
294
  end
@@ -321,8 +317,10 @@ module Jamf
321
317
  #
322
318
  # @param args[Hash] the options and settings use for switching the computer group from static group to smart group
323
319
  #
324
- # @option args criteria[Array] The criterias to be user for the smart group
325
- def set_smart(*params)
320
+ # @option args criteria[Array] The criteria to be user for the smart group
321
+ #
322
+ # @return [void]
323
+ def make_smart(**params)
326
324
  return if @is_smart
327
325
 
328
326
  params[:criteria] = [] if params[:criteria].nil?
@@ -332,22 +330,28 @@ module Jamf
332
330
  @is_smart = true
333
331
  @need_to_update = true
334
332
  end
333
+ # backward compatility
334
+ alias set_smart make_smart
335
335
 
336
336
  # Change smart group to static group
337
337
  #
338
338
  # @param args[Hash] the options and settings use for switching the computer group from smart group to static group
339
339
  #
340
340
  # @option args preserve_members[Boolean] Should the smart group preserve it's current members?
341
- def set_static(*params)
341
+ #
342
+ # @return [void]
343
+ def make_static(**params)
342
344
  return unless @is_smart
343
345
 
344
346
  preserve_members = params.include? :preserve_members
345
347
 
346
348
  @is_smart = false
347
349
 
348
- clear() unless preserve_members
350
+ clear unless preserve_members
349
351
  end
350
-
352
+ # backward compatility
353
+ alias set_static make_static
354
+
351
355
  # How many members of the group?
352
356
  #
353
357
  # @return [Integer] the number of members of the group
@@ -355,6 +359,13 @@ module Jamf
355
359
  def size
356
360
  @members.count
357
361
  end
362
+ alias count size
363
+
364
+ # @return [Boolean] Is this a static group?
365
+ def static?
366
+ !smart?
367
+ end
368
+ alias is_static static?
358
369
 
359
370
  # @return [Array<String>] the names of the group members
360
371
  #
@@ -381,6 +392,7 @@ module Jamf
381
392
  def members=(new_members)
382
393
  raise UnsupportedError, "Smart group members can't be changed." if @is_smart
383
394
  raise InvalidDataError, 'Arg must be an array of names and/or ids' unless new_members.is_a? Array
395
+
384
396
  ok_members = []
385
397
  new_members.each do |m|
386
398
  ok_members << check_member(m)
@@ -390,6 +402,7 @@ module Jamf
390
402
 
391
403
  # make sure we've actually changed...
392
404
  return if members.map { |m| m[:id] }.sort == ok_members.map { |m| m[:id] }.sort
405
+
393
406
  @members = ok_members
394
407
  @need_to_update = true
395
408
  end
@@ -401,22 +414,32 @@ module Jamf
401
414
  # @return [void]
402
415
  #
403
416
  def add_member(mem)
404
- raise UnsupportedError, "Smart group members can't be changed." if @is_smart
417
+ raise UnsupportedError, "Smart group members can't be changed." if smart?
418
+
405
419
  @members << check_member(mem)
406
420
  @need_to_update = true
407
421
  end
408
422
 
409
423
  # Remove a member by id, or name
410
424
  #
411
- # @param m[Integer,String] the id or name of the member to remove
425
+ # @param m[Integer,String] an identifier for the item to remove
412
426
  #
413
427
  # @return [void]
414
428
  #
415
429
  def remove_member(mem)
416
- raise InvalidDataError, "Smart group members can't be changed." if @is_smart
417
- raise InvalidDataError, "Can't remove nil" if mem.nil?
418
- removed = @members.reject! { |mm| [mm[:id], mm[:name], mm[:username]].include? mem }
419
- @need_to_update = true if removed
430
+ raise UnsupportedError, "Smart group members can't be changed." if smart?
431
+
432
+ # See if we have the identifier in the @members hash
433
+ id_to_remove = @members.select { |mm| mm.values.include? mem }.first&.dig :id
434
+ # But the members hash might not have SN, macaddr, etc, and never has udid, so
435
+ # look at the MEMBER_CLASS if needed
436
+ id_to_remove ||= self.class::MEMBER_CLASS.valid_id mem
437
+
438
+ # nothing to do if that id isn't one of our members
439
+ return unless id_to_remove && member_ids.include?(id_to_remove)
440
+
441
+ @members.delete_if { |k, v| k == :id && v == id_to_remove }
442
+ @need_to_update = true
420
443
  end
421
444
 
422
445
  # Remove all members
@@ -426,6 +449,7 @@ module Jamf
426
449
  def clear
427
450
  raise InvalidDataError, "Smart group members can't be changed." if @is_smart
428
451
  return if @members.empty?
452
+
429
453
  @members.clear
430
454
  @need_to_update = true
431
455
  end
@@ -458,13 +482,7 @@ module Jamf
458
482
  def refresh_members
459
483
  @members = @cnx.c_get(@rest_rsrc)[self.class::RSRC_OBJECT_KEY][self.class::MEMBER_CLASS::RSRC_LIST_KEY]
460
484
  end
461
-
462
- # aliases
463
-
464
- alias smart? is_smart
465
- alias notify_on_change? notify_on_change
466
- alias notify? notify_on_change
467
- alias count size
485
+
468
486
 
469
487
  # Public Instance Methods
470
488
  #####################################
@@ -477,13 +495,12 @@ module Jamf
477
495
  # @return [Hash{:id=>Integer,:name=>String}] the valid id and name
478
496
  #
479
497
  def check_member(m)
480
- potential_members = self.class::MEMBER_CLASS.map_all_ids_to(:name, cnx: @cnx)
481
- if m.to_s =~ /^\d+$/
482
- return { id: m.to_i, name: potential_members[m] } if potential_members.key?(m.to_i)
483
- else
484
- return { name: m, id: potential_members.invert[m] } if potential_members.value?(m)
485
- end
486
- raise Jamf::NoSuchItemError, "No #{self.class::MEMBER_CLASS::RSRC_OBJECT_KEY} matching '#{m}' in the JSS."
498
+ desired_id = self.class::MEMBER_CLASS.valid_id m, cnx: @cnx
499
+ raise Jamf::NoSuchItemError, "No #{self.class::MEMBER_CLASS::RSRC_OBJECT_KEY} matching '#{m}' in the JSS." unless desired_id
500
+
501
+ desired_name = self.class::MEMBER_CLASS.map_all(:id, to: :name, cnx: @cnx)[desired_id]
502
+
503
+ { name: desired_name, id: desired_id }
487
504
  end
488
505
 
489
506
  # the xml formated data for adding or updating this in the JSS,
@@ -70,6 +70,53 @@ module Jamf
70
70
  attr_reader :connect_time
71
71
  alias login_time connect_time
72
72
 
73
+ # @return [Boolean] are we using a sticky session?
74
+ attr_reader :sticky_session
75
+ alias sticky_session? sticky_session
76
+ alias sticky? sticky_session
77
+
78
+ # @return [String, nil] The current sticky_session cookie. nil unless
79
+ # sticky_session is set to true, either as a param to 'connect' or via
80
+ # #sticky_session=
81
+ #
82
+ # When set via .connect, the cookie is gleaned from the token creation
83
+ # reponse. When set via #sticky_session=, a HEAD request is made, and the
84
+ # cookie will be in the response.
85
+ #
86
+ # Only valid when the connection is to a Jamf Cloud server.
87
+ attr_reader :sticky_session_cookie
88
+
89
+ ##########################################
90
+
91
+ # Turn sticky-sessions on or off. If turning on, host must be a Jamf Cloud
92
+ # server, with a hostname ending with Jamf::Connection::JAMFCLOUD_DOMAIN
93
+ #
94
+ # @param value [Boolean] should we use a sticky session?
95
+ #
96
+ # @return [void]
97
+ #
98
+ def sticky_session=(value)
99
+ @sticky_session ||= false
100
+
101
+ # convert boolean-y to boolean
102
+ value = value ? true : false
103
+
104
+ return if @sticky_session == value
105
+
106
+ if value
107
+ raise Jamf::UnsupportedError, 'Sticky Sessions may only be used with Jamf Cloud servers.' unless host.end_with? Jamf::Connection::JAMFCLOUD_DOMAIN
108
+
109
+ @sticky_session = true
110
+ enable_sticky_session Jamf.cnx.jp_cnx.head.headers
111
+
112
+ else
113
+ @sticky_session = false
114
+ @sticky_session_cookie = nil
115
+ @c_cnx&.headers&.delete Jamf::Connection::COOKIE_HEADER
116
+ @jp_cnx&.headers&.delete Jamf::Connection::COOKIE_HEADER
117
+ end
118
+ end
119
+
73
120
  # Reset the response timeout for the rest connection
74
121
  #
75
122
  # @param timeout[Integer] the new timeout in seconds
@@ -78,8 +125,8 @@ module Jamf
78
125
  #
79
126
  def timeout=(new_timeout)
80
127
  @timeout = new_timeout.to_i
81
- @c_cnx.options[:timeout] = @timeout if @c_cnx
82
- @jp_cnx.options[:timeout] = @timeout if @jp_cnx
128
+ @c_cnx&.options[:timeout] = @timeout
129
+ @jp_cnx&.options[:timeout] = @timeout
83
130
  end
84
131
 
85
132
  # Reset the open-connection timeout for the rest connection
@@ -90,8 +137,8 @@ module Jamf
90
137
  #
91
138
  def open_timeout=(new_timeout)
92
139
  @open_timeout = new_timeout.to_i
93
- @c_cnx.options[:open_timeout] = @open_timeout if @c_cnx
94
- @jp_cnx.options[:open_timeout] = @open_timeout if @jp_cnx
140
+ @c_cnx&.options[:open_timeout] = @open_timeout
141
+ @jp_cnx&.options[:open_timeout] = @open_timeout
95
142
  end
96
143
 
97
144
  # @return [URI::HTTPS] the base URL to the server
@@ -65,6 +65,7 @@ module Jamf
65
65
  resp =
66
66
  @c_cnx.get(rsrc) do |req|
67
67
  req.headers[Jamf::Connection::HTTP_ACCEPT_HEADER] = format == :json ? Jamf::Connection::MIME_JSON : Jamf::Connection::MIME_XML
68
+ # puts "Classic API Cookie is: #{req.headers['Cookie']}"
68
69
  end
69
70
  @last_http_response = resp
70
71
  unless resp.success?
@@ -222,7 +223,7 @@ module Jamf
222
223
 
223
224
  cnx.options[:timeout] = @timeout
224
225
  cnx.options[:open_timeout] = @open_timeout
225
-
226
+
226
227
  cnx.request :multipart
227
228
  cnx.request :url_encoded
228
229