ruby-jss 1.6.4 → 2.0.0a10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (705) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/CHANGES.md +40 -4
  4. data/README-2.0.0.md +316 -0
  5. data/README.md +48 -34
  6. data/bin/cgrouper +3 -3
  7. data/bin/jamfHelperBackgrounder +2 -2
  8. data/bin/netseg-update +3 -3
  9. data/data/ruby-jss.conf.example +1 -1
  10. data/lib/{jss/api_object → jamf/api/classic/api_objects}/account.rb +29 -22
  11. data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_computer_search.rb +6 -6
  12. data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_mobile_device_search.rb +6 -6
  13. data/lib/{jss/api_object/advanced_search → jamf/api/classic/api_objects}/advanced_user_search.rb +6 -6
  14. data/lib/{jss/api_object → jamf/api/classic/api_objects}/building.rb +6 -6
  15. data/lib/{jss/api_object → jamf/api/classic/api_objects}/categorizable.rb +10 -10
  16. data/lib/{jss/api_object → jamf/api/classic/api_objects}/category.rb +17 -15
  17. data/lib/{jss/api_object → jamf/api/classic/api_objects}/computer.rb +210 -111
  18. data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/computer_extension_attribute.rb +19 -19
  19. data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/computer_group.rb +8 -8
  20. data/lib/{jss/api_object → jamf/api/classic/api_objects}/computer_invitation.rb +8 -8
  21. data/lib/{jss/api_object → jamf/api/classic/api_objects}/creatable.rb +22 -24
  22. data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable/criteria.rb +24 -24
  23. data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable/criterion.rb +15 -15
  24. data/lib/{jss/api_object → jamf/api/classic/api_objects}/criteriable.rb +25 -28
  25. data/lib/{jss/api_object → jamf/api/classic/api_objects}/department.rb +7 -7
  26. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding.rb +40 -40
  27. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/active_directory.rb +47 -47
  28. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/admitmac.rb +56 -56
  29. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/centrify.rb +15 -15
  30. data/lib/{jss/api_object → jamf/api/classic/api_objects/directory_binding_type}/directory_binding_type.rb +2 -25
  31. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/open_directory.rb +19 -19
  32. data/lib/{jss/api_object → jamf/api/classic/api_objects}/directory_binding_type/powerbroker_identity_services.rb +1 -1
  33. data/lib/jamf/api/classic/api_objects/directory_binding_type.rb +47 -0
  34. data/lib/{jss/api_object/disk_encryption_configurations.rb → jamf/api/classic/api_objects/disk_encryption_configuration.rb} +14 -14
  35. data/lib/{jss/api_object → jamf/api/classic/api_objects}/distribution_point.rb +41 -35
  36. data/lib/{jss/api_object → jamf/api/classic/api_objects}/dock_item.rb +12 -12
  37. data/lib/{jss/api_object → jamf/api/classic/api_objects}/ebook.rb +3 -3
  38. data/lib/{jss/api_object → jamf/api/classic/api_objects}/extendable.rb +23 -23
  39. data/lib/{jss/api_object → jamf/api/classic/api_objects}/ibeacon.rb +15 -15
  40. data/lib/{jss/api_object/self_servable → jamf/api/classic/api_objects}/icon.rb +8 -8
  41. data/lib/{jss/api_object → jamf/api/classic/api_objects}/ldap_server.rb +45 -34
  42. data/lib/{jss/api_object → jamf/api/classic/api_objects}/locatable.rb +6 -6
  43. data/lib/{jss/api_object → jamf/api/classic/api_objects}/mac_application.rb +18 -18
  44. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/audit_event.rb +4 -4
  45. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/casper_imaging_log.rb +4 -5
  46. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/casper_remote_log.rb +4 -4
  47. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/computer_usage_log.rb +4 -4
  48. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/ebook.rb +7 -7
  49. data/lib/{jss/api_object/management_history/hashlike.rb → jamf/api/classic/api_objects/management_history/hash_like.rb} +3 -3
  50. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mac_app_store_app.rb +4 -4
  51. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mdm_command.rb +9 -9
  52. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/mobile_device_app.rb +4 -4
  53. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/policy_log.rb +5 -5
  54. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/screen_sharing_log.rb +4 -4
  55. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history/user_location_change.rb +4 -4
  56. data/lib/{jss/api_object → jamf/api/classic/api_objects}/management_history.rb +226 -189
  57. data/lib/{jss/api_object → jamf/api/classic/api_objects}/matchable.rb +9 -6
  58. data/lib/{jss/api_object → jamf/api/classic/api_objects}/mdm.rb +256 -151
  59. data/lib/{jss/api_object → jamf/api/classic/api_objects}/mobile_device.rb +55 -39
  60. data/lib/{jss/api_object → jamf/api/classic/api_objects}/mobile_device_application.rb +77 -35
  61. data/lib/{jss/api_object/configuration_profile → jamf/api/classic/api_objects}/mobile_device_configuration_profile.rb +7 -10
  62. data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/mobile_device_extension_attribute.rb +19 -19
  63. data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/mobile_device_group.rb +8 -8
  64. data/lib/{jss/api_object → jamf/api/classic/api_objects}/netboot_server.rb +6 -6
  65. data/lib/{jss/api_object → jamf/api/classic/api_objects}/network_segment.rb +75 -61
  66. data/lib/{jss/api_object/configuration_profile → jamf/api/classic/api_objects}/osx_configuration_profile.rb +7 -7
  67. data/lib/{jss/api_object → jamf/api/classic/api_objects}/package.rb +83 -74
  68. data/lib/{jss/api_object/patch_source → jamf/api/classic/api_objects}/patch_external_source.rb +9 -9
  69. data/lib/{jss/api_object/patch_source → jamf/api/classic/api_objects}/patch_internal_source.rb +5 -5
  70. data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_policy.rb +70 -68
  71. data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_title/version.rb +15 -15
  72. data/lib/{jss/api_object → jamf/api/classic/api_objects}/patch_title.rb +76 -64
  73. data/lib/{jss/api_object → jamf/api/classic/api_objects}/peripheral.rb +24 -24
  74. data/lib/{jss/api_object → jamf/api/classic/api_objects}/peripheral_type.rb +20 -20
  75. data/lib/{jss/api_object → jamf/api/classic/api_objects}/policy.rb +113 -112
  76. data/lib/{jss/api_object → jamf/api/classic/api_objects}/printer.rb +52 -52
  77. data/lib/{jss/api_object → jamf/api/classic/api_objects}/purchasable.rb +6 -6
  78. data/lib/{jss/api_object → jamf/api/classic/api_objects}/removable_macaddr.rb +7 -7
  79. data/lib/{jss/api_object → jamf/api/classic/api_objects}/restricted_software.rb +21 -21
  80. data/lib/{jss/api_object → jamf/api/classic/api_objects}/scopable/scope.rb +69 -64
  81. data/lib/{jss/api_object → jamf/api/classic/api_objects}/scopable.rb +11 -13
  82. data/lib/{jss/api_object → jamf/api/classic/api_objects}/script.rb +22 -22
  83. data/lib/{jss/api_object → jamf/api/classic/api_objects}/self_servable.rb +49 -47
  84. data/lib/{jss/api_object → jamf/api/classic/api_objects}/sitable.rb +8 -8
  85. data/lib/{jss/api_object → jamf/api/classic/api_objects}/site.rb +6 -6
  86. data/lib/{jss/api_object → jamf/api/classic/api_objects}/software_update_server.rb +5 -5
  87. data/lib/{jss/api_object → jamf/api/classic/api_objects}/updatable.rb +13 -13
  88. data/lib/{jss/api_object → jamf/api/classic/api_objects}/uploadable.rb +71 -29
  89. data/lib/{jss/api_object → jamf/api/classic/api_objects}/user.rb +18 -18
  90. data/lib/{jss/api_object/extension_attribute → jamf/api/classic/api_objects}/user_extension_attribute.rb +12 -12
  91. data/lib/{jss/api_object/group → jamf/api/classic/api_objects}/user_group.rb +7 -7
  92. data/lib/{jss/api_object → jamf/api/classic/api_objects}/vpp_account.rb +15 -15
  93. data/lib/{jss/api_object → jamf/api/classic/api_objects}/vppable.rb +5 -5
  94. data/lib/{jss/api_object/webhook.rb → jamf/api/classic/api_objects/web_hook.rb} +15 -15
  95. data/lib/{jss/api_object → jamf/api/classic/base_classes}/advanced_search.rb +36 -40
  96. data/lib/{jss → jamf/api/classic/base_classes}/api_object.rb +314 -274
  97. data/lib/{jss/api_object → jamf/api/classic/base_classes}/configuration_profile.rb +13 -16
  98. data/lib/{jss/api_object → jamf/api/classic/base_classes}/extension_attribute.rb +55 -59
  99. data/lib/{jss/api_object → jamf/api/classic/base_classes}/group.rb +45 -43
  100. data/lib/{jss/api_object → jamf/api/classic/base_classes}/patch_source.rb +107 -87
  101. data/lib/{jss → jamf/api/classic}/xml_workaround.rb +12 -12
  102. data/lib/jamf/api/connection/attributes.rb +177 -0
  103. data/lib/jamf/api/connection/cache.rb +148 -0
  104. data/lib/jamf/api/connection/classic_api.rb +287 -0
  105. data/lib/jamf/api/connection/connect.rb +491 -0
  106. data/lib/jamf/api/connection/constants.rb +106 -0
  107. data/lib/jamf/api/connection/default_connection.rb +103 -0
  108. data/lib/jamf/api/connection/jamf_pro_api.rb +170 -0
  109. data/lib/jamf/api/connection/jamf_pro_api_error.rb +109 -0
  110. data/lib/jamf/api/connection/token.rb +289 -99
  111. data/lib/jamf/api/connection.rb +186 -819
  112. data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +82 -0
  113. data/lib/jamf/api/jamf_pro/api_objects/device_enrollment.rb +358 -0
  114. data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +163 -0
  115. data/lib/jamf/api/jamf_pro/api_objects/jp_building.rb +116 -0
  116. data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +87 -0
  117. data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +602 -0
  118. data/lib/jamf/api/{mixins → jamf_pro/mixins}/bulk_deletable.rb +2 -1
  119. data/lib/jamf/api/jamf_pro/mixins/change_log.rb +246 -0
  120. data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +762 -0
  121. data/lib/jamf/api/{mixins → jamf_pro/mixins}/filterable.rb +21 -14
  122. data/lib/jamf/api/{mixins → jamf_pro/mixins}/immutable.rb +6 -8
  123. data/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb +167 -0
  124. data/lib/jamf/api/{mixins → jamf_pro/mixins}/lockable.rb +29 -3
  125. data/lib/jamf/api/jamf_pro/mixins/prestage.rb +346 -0
  126. data/lib/jamf/api/{mixins → jamf_pro/mixins}/sortable.rb +7 -17
  127. data/lib/jamf/api/{mixins → jamf_pro/mixins}/uncreatable.rb +2 -2
  128. data/lib/jamf/api/{mixins → jamf_pro/mixins}/undeletable.rb +2 -2
  129. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_preview_search_results.rb +90 -0
  130. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_search_results.rb +90 -0
  131. data/lib/jamf/api/jamf_pro/oapi_schemas/access_groups_v2_search_results.rb +90 -0
  132. data/lib/jamf/api/jamf_pro/oapi_schemas/account.rb +160 -0
  133. data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +124 -0
  134. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences.rb +108 -0
  135. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +106 -0
  136. data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v4.rb +118 -0
  137. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history.rb +161 -0
  138. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_history_search_results.rb +90 -0
  139. data/lib/jamf/api/jamf_pro/oapi_schemas/active_patch_summary.rb +132 -0
  140. data/lib/jamf/api/jamf_pro/oapi_schemas/admin_account.rb +83 -0
  141. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search.rb +117 -0
  142. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_criteria_choices.rb +84 -0
  143. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_search_search_results.rb +90 -0
  144. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search.rb +117 -0
  145. data/lib/jamf/api/jamf_pro/oapi_schemas/advanced_user_content_search_search_results.rb +90 -0
  146. data/lib/jamf/api/jamf_pro/oapi_schemas/android_details.rb +163 -0
  147. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +90 -0
  148. data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +107 -0
  149. data/lib/jamf/api/jamf_pro/oapi_schemas/app_analytics_setting.rb +88 -0
  150. data/lib/jamf/api/jamf_pro/oapi_schemas/app_dynamics_config.rb +134 -0
  151. data/lib/jamf/api/jamf_pro/oapi_schemas/app_path.rb +91 -0
  152. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field.rb +115 -0
  153. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_form_input_field_search_results.rb +90 -0
  154. data/lib/jamf/api/jamf_pro/oapi_schemas/app_request_settings.rb +105 -0
  155. data/lib/jamf/api/jamf_pro/oapi_schemas/apple_tv_details.rb +133 -0
  156. data/lib/jamf/api/jamf_pro/oapi_schemas/application_attributes.rb +88 -0
  157. data/lib/jamf/api/jamf_pro/oapi_schemas/application_configuration.rb +88 -0
  158. data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +113 -0
  159. data/lib/jamf/api/jamf_pro/oapi_schemas/attributes.rb +101 -0
  160. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account.rb +159 -0
  161. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +159 -0
  162. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token.rb +91 -0
  163. data/lib/jamf/api/jamf_pro/oapi_schemas/auth_token_v1.rb +91 -0
  164. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization.rb +117 -0
  165. data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +117 -0
  166. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_process_status.rb +116 -0
  167. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_ad_migration_report_request.rb +103 -0
  168. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration.rb +95 -0
  169. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_request.rb +93 -0
  170. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_configuration_update.rb +93 -0
  171. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_mappings.rb +158 -0
  172. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration.rb +147 -0
  173. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_request.rb +146 -0
  174. data/lib/jamf/api/jamf_pro/oapi_schemas/azure_server_configuration_update.rb +132 -0
  175. data/lib/jamf/api/jamf_pro/oapi_schemas/branding_image_url.rb +87 -0
  176. data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +138 -0
  177. data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +90 -0
  178. data/lib/jamf/api/jamf_pro/oapi_schemas/cache_settings.rb +150 -0
  179. data/lib/jamf/api/jamf_pro/oapi_schemas/categories_search_results.rb +90 -0
  180. data/lib/jamf/api/jamf_pro/oapi_schemas/category.rb +104 -0
  181. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_details.rb +91 -0
  182. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v1.rb +102 -0
  183. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_identity_v2.rb +108 -0
  184. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_key.rb +90 -0
  185. data/lib/jamf/api/jamf_pro/oapi_schemas/certificate_record.rb +147 -0
  186. data/lib/jamf/api/jamf_pro/oapi_schemas/classic_ldap_mappings.rb +169 -0
  187. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v2.rb +165 -0
  188. data/lib/jamf/api/jamf_pro/oapi_schemas/client_check_in_v3.rb +135 -0
  189. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common.rb +109 -0
  190. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_request.rb +98 -0
  191. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_id_p_common_response.rb +109 -0
  192. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_pool_statistics.rb +175 -0
  193. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_connection_status.rb +84 -0
  194. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore.rb +104 -0
  195. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_keystore_file.rb +106 -0
  196. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_request.rb +106 -0
  197. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_mappings_response.rb +109 -0
  198. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_request.rb +152 -0
  199. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_response.rb +149 -0
  200. data/lib/jamf/api/jamf_pro/oapi_schemas/cloud_ldap_server_update.rb +149 -0
  201. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +125 -0
  202. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +103 -0
  203. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +128 -0
  204. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +119 -0
  205. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +373 -0
  206. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +121 -0
  207. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +98 -0
  208. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +99 -0
  209. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +90 -0
  210. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +132 -0
  211. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +106 -0
  212. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +125 -0
  213. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +119 -0
  214. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +98 -0
  215. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +144 -0
  216. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +121 -0
  217. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +176 -0
  218. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +94 -0
  219. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +231 -0
  220. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general_update.rb +113 -0
  221. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +265 -0
  222. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware_update.rb +107 -0
  223. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +82 -0
  224. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_preferences.rb +166 -0
  225. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_collection_settings.rb +109 -0
  226. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_recovery_lock_password_response.rb +84 -0
  227. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_response.rb +276 -0
  228. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_search_results.rb +90 -0
  229. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_update_request.rb +125 -0
  230. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +89 -0
  231. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +190 -0
  232. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_location.rb +94 -0
  233. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +89 -0
  234. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +133 -0
  235. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system_update.rb +83 -0
  236. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_overview.rb +180 -0
  237. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +98 -0
  238. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +146 -0
  239. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +94 -0
  240. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +98 -0
  241. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +94 -0
  242. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage.rb +107 -0
  243. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results.rb +90 -0
  244. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v2.rb +90 -0
  245. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v2.rb +130 -0
  246. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +100 -0
  247. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +159 -0
  248. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +95 -0
  249. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +110 -0
  250. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +180 -0
  251. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +82 -0
  252. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +94 -0
  253. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +91 -0
  254. data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +132 -0
  255. data/lib/jamf/api/jamf_pro/oapi_schemas/computers_search_results.rb +90 -0
  256. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_profile.rb +103 -0
  257. data/lib/jamf/api/jamf_pro/oapi_schemas/configuration_search_results.rb +91 -0
  258. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_candidate_request.rb +124 -0
  259. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_response.rb +123 -0
  260. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_status_response.rb +86 -0
  261. data/lib/jamf/api/jamf_pro/oapi_schemas/connection_configuration_update_request.rb +110 -0
  262. data/lib/jamf/api/jamf_pro/oapi_schemas/country.rb +88 -0
  263. data/lib/jamf/api/jamf_pro/oapi_schemas/country_codes.rb +84 -0
  264. data/lib/jamf/api/jamf_pro/oapi_schemas/create_path.rb +98 -0
  265. data/lib/jamf/api/jamf_pro/oapi_schemas/csa_token.rb +94 -0
  266. data/lib/jamf/api/jamf_pro/oapi_schemas/current_account.rb +160 -0
  267. data/lib/jamf/api/jamf_pro/oapi_schemas/current_authorization.rb +109 -0
  268. data/lib/jamf/api/jamf_pro/oapi_schemas/data_roaming_setting.rb +88 -0
  269. data/lib/jamf/api/jamf_pro/oapi_schemas/database_password.rb +89 -0
  270. data/lib/jamf/api/jamf_pro/oapi_schemas/day_of_week.rb +93 -0
  271. data/lib/jamf/api/jamf_pro/oapi_schemas/delete_user_command.rb +94 -0
  272. data/lib/jamf/api/jamf_pro/oapi_schemas/department.rb +98 -0
  273. data/lib/jamf/api/jamf_pro/oapi_schemas/departments_search_results.rb +90 -0
  274. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task.rb +130 -0
  275. data/lib/jamf/api/jamf_pro/oapi_schemas/deployment_task_search_results.rb +92 -0
  276. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_request.rb +92 -0
  277. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_response.rb +105 -0
  278. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_search_results.rb +91 -0
  279. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_configuration_update.rb +92 -0
  280. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_request.rb +166 -0
  281. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_response.rb +163 -0
  282. data/lib/jamf/api/jamf_pro/oapi_schemas/deprecated_server_update.rb +171 -0
  283. data/lib/jamf/api/jamf_pro/oapi_schemas/device_communication_settings.rb +129 -0
  284. data/lib/jamf/api/jamf_pro/oapi_schemas/device_compliance_information.rb +118 -0
  285. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +163 -0
  286. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +90 -0
  287. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_body.rb +84 -0
  288. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +83 -0
  289. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +164 -0
  290. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +90 -0
  291. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +99 -0
  292. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage.rb +216 -0
  293. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +235 -0
  294. data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +95 -0
  295. data/lib/jamf/api/jamf_pro/oapi_schemas/diagnostic_submission_setting.rb +88 -0
  296. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook.rb +153 -0
  297. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_exclusions.rb +138 -0
  298. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_limitations.rb +98 -0
  299. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_scope.rb +171 -0
  300. data/lib/jamf/api/jamf_pro/oapi_schemas/ebook_search_results.rb +90 -0
  301. data/lib/jamf/api/jamf_pro/oapi_schemas/enable_lost_mode_command.rb +94 -0
  302. data/lib/jamf/api/jamf_pro/oapi_schemas/engage.rb +85 -0
  303. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group.rb +123 -0
  304. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_preview.rb +135 -0
  305. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_access_group_v2.rb +133 -0
  306. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization.rb +107 -0
  307. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_branding_settings.rb +112 -0
  308. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependencies.rb +84 -0
  309. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_dependency.rb +94 -0
  310. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_ldap_group_access.rb +88 -0
  311. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel.rb +90 -0
  312. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_ldap_auth.rb +122 -0
  313. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_list.rb +84 -0
  314. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_sso_auth.rb +114 -0
  315. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_panel_text.rb +113 -0
  316. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results.rb +90 -0
  317. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_search_results_v2.rb +90 -0
  318. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_customization_v2.rb +116 -0
  319. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +98 -0
  320. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_process_text_object.rb +347 -0
  321. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings.rb +264 -0
  322. data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_settings_v2.rb +274 -0
  323. data/lib/jamf/api/jamf_pro/oapi_schemas/export_field.rb +92 -0
  324. data/lib/jamf/api/jamf_pro/oapi_schemas/export_parameters.rb +118 -0
  325. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute.rb +116 -0
  326. data/lib/jamf/api/jamf_pro/oapi_schemas/extension_attribute_v2.rb +117 -0
  327. data/lib/jamf/api/jamf_pro/oapi_schemas/external_recipient.rb +92 -0
  328. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment.rb +90 -0
  329. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_delete.rb +84 -0
  330. data/lib/jamf/api/jamf_pro/oapi_schemas/file_attachment_v2.rb +90 -0
  331. data/lib/jamf/api/jamf_pro/oapi_schemas/filter.rb +105 -0
  332. data/lib/jamf/api/jamf_pro/oapi_schemas/font_path.rb +91 -0
  333. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage.rb +106 -0
  334. data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v2.rb +105 -0
  335. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization.rb +88 -0
  336. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel.rb +90 -0
  337. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_ldap_auth.rb +94 -0
  338. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_sso_auth.rb +94 -0
  339. data/lib/jamf/api/jamf_pro/oapi_schemas/get_enrollment_customization_panel_text.rb +94 -0
  340. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage.rb +106 -0
  341. data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +104 -0
  342. data/lib/jamf/api/jamf_pro/oapi_schemas/group_mappings.rb +139 -0
  343. data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +95 -0
  344. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search.rb +107 -0
  345. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_request.rb +86 -0
  346. data/lib/jamf/api/jamf_pro/oapi_schemas/group_test_search_response.rb +92 -0
  347. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results.rb +142 -0
  348. data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +92 -0
  349. data/lib/jamf/api/jamf_pro/oapi_schemas/href_response.rb +169 -0
  350. data/lib/jamf/api/jamf_pro/oapi_schemas/icon_response.rb +92 -0
  351. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name.rb +93 -0
  352. data/lib/jamf/api/jamf_pro/oapi_schemas/id_and_name_v2.rb +89 -0
  353. data/lib/jamf/api/jamf_pro/oapi_schemas/ids.rb +96 -0
  354. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize.rb +134 -0
  355. data/lib/jamf/api/jamf_pro/oapi_schemas/initialize_v1.rb +134 -0
  356. data/lib/jamf/api/jamf_pro/oapi_schemas/install_package.rb +104 -0
  357. data/lib/jamf/api/jamf_pro/oapi_schemas/integer_wrapper.rb +85 -0
  358. data/lib/jamf/api/jamf_pro/oapi_schemas/internal_recipient.rb +95 -0
  359. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_information.rb +114 -0
  360. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_error.rb +124 -0
  361. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error.rb +90 -0
  362. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_error_cause.rb +106 -0
  363. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_csv_validation_success.rb +87 -0
  364. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +90 -0
  365. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column.rb +88 -0
  366. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute_column_result.rb +90 -0
  367. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_invalid_csv_response.rb +89 -0
  368. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record.rb +249 -0
  369. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results.rb +92 -0
  370. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +90 -0
  371. data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +264 -0
  372. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_configuration.rb +130 -0
  373. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_branding_search_results.rb +90 -0
  374. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details.rb +256 -0
  375. data/lib/jamf/api/jamf_pro/oapi_schemas/ios_details_v2.rb +256 -0
  376. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_application_response.rb +96 -0
  377. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_nation_credentials.rb +91 -0
  378. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_package_response.rb +108 -0
  379. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_information.rb +125 -0
  380. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_server_url.rb +93 -0
  381. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_pro_version.rb +83 -0
  382. data/lib/jamf/api/jamf_pro/oapi_schemas/jamf_protect_plan.rb +126 -0
  383. data/lib/jamf/api/jamf_pro/oapi_schemas/language_code.rb +95 -0
  384. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_request.rb +100 -0
  385. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_response.rb +102 -0
  386. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_configuration_update.rb +100 -0
  387. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group.rb +108 -0
  388. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_group_search_results.rb +92 -0
  389. data/lib/jamf/api/jamf_pro/oapi_schemas/ldap_server.rb +95 -0
  390. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile.rb +127 -0
  391. data/lib/jamf/api/jamf_pro/oapi_schemas/linked_connect_profile_search_results.rb +90 -0
  392. data/lib/jamf/api/jamf_pro/oapi_schemas/locale.rb +89 -0
  393. data/lib/jamf/api/jamf_pro/oapi_schemas/location.rb +126 -0
  394. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +147 -0
  395. data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +147 -0
  396. data/lib/jamf/api/jamf_pro/oapi_schemas/location_v2.rb +125 -0
  397. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_configuration.rb +119 -0
  398. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_branding_search_results.rb +90 -0
  399. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +113 -0
  400. data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +92 -0
  401. data/lib/jamf/api/jamf_pro/oapi_schemas/markdown.rb +85 -0
  402. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_client_type.rb +91 -0
  403. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command.rb +110 -0
  404. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_client.rb +89 -0
  405. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_request.rb +90 -0
  406. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_state.rb +90 -0
  407. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_command_type.rb +173 -0
  408. data/lib/jamf/api/jamf_pro/oapi_schemas/mdm_signing_certificate.rb +102 -0
  409. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_mappings.rb +85 -0
  410. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_request.rb +93 -0
  411. data/lib/jamf/api/jamf_pro/oapi_schemas/membership_test_search_response.rb +91 -0
  412. data/lib/jamf/api/jamf_pro/oapi_schemas/memcached_endpoints.rb +114 -0
  413. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device.rb +154 -0
  414. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_application.rb +101 -0
  415. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment.rb +90 -0
  416. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_attachment_v2.rb +90 -0
  417. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v1.rb +88 -0
  418. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_certificate_v2.rb +88 -0
  419. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details.rb +236 -0
  420. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_get_v2.rb +84 -0
  421. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_details_v2.rb +254 -0
  422. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_ebook.rb +95 -0
  423. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_extension_attribute_results.rb +84 -0
  424. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_group.rb +97 -0
  425. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage.rb +137 -0
  426. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name.rb +95 -0
  427. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +95 -0
  428. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names.rb +119 -0
  429. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +119 -0
  430. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results.rb +90 -0
  431. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +90 -0
  432. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +176 -0
  433. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_params.rb +145 -0
  434. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results.rb +90 -0
  435. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_search_results_v2.rb +90 -0
  436. data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_v2.rb +159 -0
  437. data/lib/jamf/api/jamf_pro/oapi_schemas/network.rb +172 -0
  438. data/lib/jamf/api/jamf_pro/oapi_schemas/network_v2.rb +180 -0
  439. data/lib/jamf/api/jamf_pro/oapi_schemas/notification.rb +97 -0
  440. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_type.rb +141 -0
  441. data/lib/jamf/api/jamf_pro/oapi_schemas/notification_v1.rb +97 -0
  442. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history.rb +138 -0
  443. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +138 -0
  444. data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +107 -0
  445. data/lib/jamf/api/jamf_pro/oapi_schemas/order_by.rb +96 -0
  446. data/lib/jamf/api/jamf_pro/oapi_schemas/package_manifest.rb +149 -0
  447. data/lib/jamf/api/jamf_pro/oapi_schemas/parent_app.rb +131 -0
  448. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_ids_on_dashboard.rb +84 -0
  449. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt.rb +103 -0
  450. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_attempt_action.rb +95 -0
  451. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log.rb +125 -0
  452. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_log_search_results.rb +90 -0
  453. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_on_dashboard.rb +83 -0
  454. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_policy_summary.rb +147 -0
  455. data/lib/jamf/api/jamf_pro/oapi_schemas/patch_version.rb +97 -0
  456. data/lib/jamf/api/jamf_pro/oapi_schemas/personal_hotspot_setting.rb +88 -0
  457. data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +90 -0
  458. data/lib/jamf/api/jamf_pro/oapi_schemas/plugin_path.rb +91 -0
  459. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties.rb +92 -0
  460. data/lib/jamf/api/jamf_pro/oapi_schemas/policy_properties_v1.rb +92 -0
  461. data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v2.rb +86 -0
  462. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependencies.rb +86 -0
  463. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_dependency.rb +94 -0
  464. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment.rb +96 -0
  465. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_file_attachment_v2.rb +96 -0
  466. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +175 -0
  467. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +175 -0
  468. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope.rb +85 -0
  469. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment.rb +94 -0
  470. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +95 -0
  471. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response.rb +110 -0
  472. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +110 -0
  473. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_update.rb +114 -0
  474. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +85 -0
  475. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status.rb +99 -0
  476. data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_sync_status_v2.rb +99 -0
  477. data/lib/jamf/api/jamf_pro/oapi_schemas/process_texts_search_results.rb +92 -0
  478. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_registration_request.rb +99 -0
  479. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_settings_response.rb +142 -0
  480. data/lib/jamf/api/jamf_pro/oapi_schemas/protect_updatable_settings_request.rb +84 -0
  481. data/lib/jamf/api/jamf_pro/oapi_schemas/provisioning_profile.rb +96 -0
  482. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing.rb +154 -0
  483. data/lib/jamf/api/jamf_pro/oapi_schemas/purchasing_v2.rb +154 -0
  484. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage.rb +83 -0
  485. data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v2.rb +92 -0
  486. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage.rb +83 -0
  487. data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +83 -0
  488. data/lib/jamf/api/jamf_pro/oapi_schemas/recalculation_results.rb +93 -0
  489. data/lib/jamf/api/jamf_pro/oapi_schemas/recipient.rb +95 -0
  490. data/lib/jamf/api/jamf_pro/oapi_schemas/recipients.rb +83 -0
  491. data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +89 -0
  492. data/lib/jamf/api/jamf_pro/oapi_schemas/reenrollment.rb +118 -0
  493. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_response.rb +108 -0
  494. data/lib/jamf/api/jamf_pro/oapi_schemas/remote_administration_search_results.rb +91 -0
  495. data/lib/jamf/api/jamf_pro/oapi_schemas/renew_mdm_profile_response.rb +83 -0
  496. data/lib/jamf/api/jamf_pro/oapi_schemas/restart_device_command.rb +96 -0
  497. data/lib/jamf/api/jamf_pro/oapi_schemas/retry_patch_policy_params.rb +98 -0
  498. data/lib/jamf/api/jamf_pro/oapi_schemas/safelisted_apps.rb +85 -0
  499. data/lib/jamf/api/jamf_pro/oapi_schemas/script.rb +193 -0
  500. data/lib/jamf/api/jamf_pro/oapi_schemas/scripts_search_results.rb +90 -0
  501. data/lib/jamf/api/jamf_pro/oapi_schemas/search_active_patch_history_params.rb +122 -0
  502. data/lib/jamf/api/jamf_pro/oapi_schemas/search_patch_policy_log_params.rb +122 -0
  503. data/lib/jamf/api/jamf_pro/oapi_schemas/security.rb +131 -0
  504. data/lib/jamf/api/jamf_pro/oapi_schemas/security_v2.rb +130 -0
  505. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_install_settings.rb +93 -0
  506. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_interaction_settings.rb +123 -0
  507. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_login_settings.rb +114 -0
  508. data/lib/jamf/api/jamf_pro/oapi_schemas/self_service_settings.rb +101 -0
  509. data/lib/jamf/api/jamf_pro/oapi_schemas/session.rb +83 -0
  510. data/lib/jamf/api/jamf_pro/oapi_schemas/session_candidate_request.rb +109 -0
  511. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details.rb +176 -0
  512. data/lib/jamf/api/jamf_pro/oapi_schemas/session_details_search_results.rb +91 -0
  513. data/lib/jamf/api/jamf_pro/oapi_schemas/session_status.rb +99 -0
  514. data/lib/jamf/api/jamf_pro/oapi_schemas/set_recovery_lock_command.rb +83 -0
  515. data/lib/jamf/api/jamf_pro/oapi_schemas/settings_command.rb +168 -0
  516. data/lib/jamf/api/jamf_pro/oapi_schemas/shared_device_configuration.rb +88 -0
  517. data/lib/jamf/api/jamf_pro/oapi_schemas/signature.rb +94 -0
  518. data/lib/jamf/api/jamf_pro/oapi_schemas/site.rb +92 -0
  519. data/lib/jamf/api/jamf_pro/oapi_schemas/smart_search_criterion.rb +119 -0
  520. data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_configuration.rb +90 -0
  521. data/lib/jamf/api/jamf_pro/oapi_schemas/software_title_patch_policy_summaries.rb +90 -0
  522. data/lib/jamf/api/jamf_pro/oapi_schemas/software_update_settings.rb +89 -0
  523. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore.rb +129 -0
  524. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_cert_parse_response.rb +131 -0
  525. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_details.rb +108 -0
  526. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_parse.rb +104 -0
  527. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response.rb +121 -0
  528. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_response_with_details.rb +94 -0
  529. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_keystore_with_details.rb +94 -0
  530. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_metadata_url.rb +84 -0
  531. data/lib/jamf/api/jamf_pro/oapi_schemas/sso_settings.rb +241 -0
  532. data/lib/jamf/api/jamf_pro/oapi_schemas/startup_status.rb +186 -0
  533. data/lib/jamf/api/jamf_pro/oapi_schemas/static_user_group.rb +92 -0
  534. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity.rb +108 -0
  535. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_certificate_upload.rb +100 -0
  536. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_create.rb +91 -0
  537. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_search_results.rb +90 -0
  538. data/lib/jamf/api/jamf_pro/oapi_schemas/supervision_identity_update.rb +84 -0
  539. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_features.rb +106 -0
  540. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_request.rb +108 -0
  541. data/lib/jamf/api/jamf_pro/oapi_schemas/teacher_settings_response.rb +122 -0
  542. data/lib/jamf/api/jamf_pro/oapi_schemas/time_frame.rb +88 -0
  543. data/lib/jamf/api/jamf_pro/oapi_schemas/time_zone.rb +108 -0
  544. data/lib/jamf/api/jamf_pro/oapi_schemas/tv_os_details.rb +133 -0
  545. data/lib/jamf/api/jamf_pro/oapi_schemas/udids.rb +84 -0
  546. data/lib/jamf/api/jamf_pro/oapi_schemas/update_apple_tv.rb +88 -0
  547. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios.rb +82 -0
  548. data/lib/jamf/api/jamf_pro/oapi_schemas/update_ios_v2.rb +82 -0
  549. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device.rb +123 -0
  550. data/lib/jamf/api/jamf_pro/oapi_schemas/update_mobile_device_v2.rb +138 -0
  551. data/lib/jamf/api/jamf_pro/oapi_schemas/update_tv_os.rb +88 -0
  552. data/lib/jamf/api/jamf_pro/oapi_schemas/user_attributes.rb +118 -0
  553. data/lib/jamf/api/jamf_pro/oapi_schemas/user_mappings.rb +194 -0
  554. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search.rb +113 -0
  555. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_request.rb +86 -0
  556. data/lib/jamf/api/jamf_pro/oapi_schemas/user_test_search_response.rb +92 -0
  557. data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +91 -0
  558. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_ca_record.rb +148 -0
  559. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record.rb +88 -0
  560. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_pki_payload_record_search_results.rb +90 -0
  561. data/lib/jamf/api/jamf_pro/oapi_schemas/venafi_service_status.rb +84 -0
  562. data/lib/jamf/api/jamf_pro/oapi_schemas/verbose_package_deployment_response.rb +91 -0
  563. data/lib/jamf/api/jamf_pro/oapi_schemas/voice_roaming_setting.rb +88 -0
  564. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_content.rb +154 -0
  565. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location.rb +87 -0
  566. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_list_view.rb +172 -0
  567. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_patch.rb +112 -0
  568. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_location_post.rb +115 -0
  569. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_locations.rb +90 -0
  570. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription.rb +87 -0
  571. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscription_base.rb +128 -0
  572. data/lib/jamf/api/jamf_pro/oapi_schemas/volume_purchasing_subscriptions.rb +90 -0
  573. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_admin_account.rb +120 -0
  574. data/lib/jamf/api/jamf_pro/oapi_schemas/vpp_token_subscription.rb +124 -0
  575. data/lib/jamf/api/jamf_pro/oapi_schemas/web_link.rb +88 -0
  576. data/lib/jamf/api/jamf_pro/oapi_schemas.rb +35 -0
  577. data/lib/{jss/ruby_extensions/string.rb → jamf/api/jamf_pro/other_classes/change_log_entry.rb} +12 -10
  578. data/lib/jamf/api/{attribute_classes → jamf_pro/other_classes}/ip_address.rb +2 -8
  579. data/lib/jamf/api/jamf_pro/other_classes/pager.rb +257 -0
  580. data/lib/jamf/api/{attribute_classes → jamf_pro/other_classes}/timestamp.rb +18 -14
  581. data/lib/jamf/{api/mixins/base_class.rb → base_class.rb} +8 -8
  582. data/lib/jamf/client/jamf_binary.rb +104 -98
  583. data/lib/jamf/client/jamf_helper.rb +263 -255
  584. data/lib/jamf/client/management_action.rb +71 -72
  585. data/lib/jamf/client.rb +15 -86
  586. data/lib/jamf/composer.rb +5 -5
  587. data/lib/jamf/configuration.rb +219 -196
  588. data/lib/jamf/{api/json_objects/prestage_sync_status.rb → constants.rb} +15 -32
  589. data/lib/{jss → jamf}/db_connection.rb +23 -31
  590. data/lib/{jpapi.rb → jamf/deprecations/deprecated_api_constant.rb} +3 -4
  591. data/lib/jamf/deprecations/deprecated_config_constant.rb +25 -0
  592. data/lib/jamf/exceptions.rb +14 -15
  593. data/lib/jamf/oapi_validate.rb +502 -0
  594. data/lib/jamf/ruby_extensions/array/predicates.rb +3 -1
  595. data/lib/jamf/ruby_extensions/array/utils.rb +2 -11
  596. data/lib/jamf/ruby_extensions/array.rb +1 -1
  597. data/lib/jamf/ruby_extensions/filetest/predicates.rb +2 -1
  598. data/lib/jamf/ruby_extensions/filetest.rb +1 -1
  599. data/lib/jamf/ruby_extensions/hash/{backports.rb → utils.rb} +53 -34
  600. data/lib/jamf/ruby_extensions/hash.rb +3 -3
  601. data/lib/jamf/ruby_extensions/ipaddr/utils.rb +7 -4
  602. data/lib/jamf/ruby_extensions/ipaddr.rb +2 -2
  603. data/lib/jamf/ruby_extensions/object/predicates.rb +3 -1
  604. data/lib/jamf/ruby_extensions/object.rb +1 -1
  605. data/lib/jamf/ruby_extensions/pathname/predicates.rb +3 -1
  606. data/lib/jamf/ruby_extensions/pathname/utils.rb +11 -5
  607. data/lib/jamf/ruby_extensions/pathname.rb +1 -1
  608. data/lib/jamf/ruby_extensions/string/conversions.rb +16 -1
  609. data/lib/jamf/ruby_extensions/string/predicates.rb +3 -1
  610. data/lib/jamf/ruby_extensions/string.rb +1 -3
  611. data/lib/{jss/ruby_extensions/time.rb → jamf/ruby_extensions/time/utils.rb} +40 -25
  612. data/lib/{jss/version.rb → jamf/ruby_extensions/time.rb} +7 -6
  613. data/lib/jamf/ruby_extensions.rb +9 -9
  614. data/lib/jamf/utility.rb +626 -410
  615. data/lib/jamf/validate.rb +86 -125
  616. data/lib/jamf/version.rb +3 -3
  617. data/lib/jamf.rb +76 -131
  618. data/lib/jss-api.rb +2 -2
  619. data/lib/jss.rb +3 -215
  620. data/lib/ruby-jss.rb +2 -2
  621. data/lib/zeitwerk_config.rb +162 -0
  622. data/test/README.md +27 -112
  623. data/test/bin/runtests +57 -130
  624. data/test/lib/jamf_test/APITest.rb +80 -0
  625. data/test/lib/jamf_test/auth.rb +267 -0
  626. data/test/lib/jamf_test/collection_tests.rb +393 -0
  627. data/test/lib/{testhelper.rb → jamf_test.rb} +8 -11
  628. data/{lib/jss/ruby_extensions/filetest.rb → test/tests/category.rb} +17 -20
  629. data/test/tests/device_enrollment.rb +101 -0
  630. data/test/tests/inventory_preload_record.rb +131 -0
  631. data/{lib/jss/ruby_extensions.rb → test/tests/jp_building.rb} +16 -12
  632. data/test/tests/policy.rb +163 -0
  633. metadata +646 -204
  634. data/lib/jamf/api/base_classes/collection_resource.rb +0 -612
  635. data/lib/jamf/api/base_classes/json_object.rb +0 -1103
  636. data/lib/jamf/api/base_classes/prestage.rb +0 -503
  637. data/lib/jamf/api/base_classes/resource.rb +0 -259
  638. data/lib/jamf/api/base_classes/singleton_resource.rb +0 -88
  639. data/lib/jamf/api/connection/api_error.rb +0 -111
  640. data/lib/jamf/api/connection/api_error_styleguide.rb +0 -96
  641. data/lib/jamf/api/json_objects/change_log_entry.rb +0 -77
  642. data/lib/jamf/api/json_objects/country.rb +0 -51
  643. data/lib/jamf/api/json_objects/device_enrollment_device.rb +0 -165
  644. data/lib/jamf/api/json_objects/device_enrollment_device_sync_state.rb +0 -81
  645. data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +0 -71
  646. data/lib/jamf/api/json_objects/inventory_preload_extension_attribute.rb +0 -57
  647. data/lib/jamf/api/json_objects/locale.rb +0 -59
  648. data/lib/jamf/api/json_objects/md_prestage_name.rb +0 -57
  649. data/lib/jamf/api/json_objects/md_prestage_names.rb +0 -82
  650. data/lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb +0 -214
  651. data/lib/jamf/api/json_objects/prestage_assignment.rb +0 -76
  652. data/lib/jamf/api/json_objects/prestage_location.rb +0 -104
  653. data/lib/jamf/api/json_objects/prestage_purchasing_data.rb +0 -132
  654. data/lib/jamf/api/json_objects/prestage_scope.rb +0 -57
  655. data/lib/jamf/api/json_objects/time_zone.rb +0 -105
  656. data/lib/jamf/api/mixins/change_log.rb +0 -288
  657. data/lib/jamf/api/mixins/extendable.rb +0 -75
  658. data/lib/jamf/api/mixins/pageable.rb +0 -208
  659. data/lib/jamf/api/mixins/searchable.rb +0 -202
  660. data/lib/jamf/api/resources/collection_resources/building.rb +0 -121
  661. data/lib/jamf/api/resources/collection_resources/category.rb +0 -83
  662. data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +0 -89
  663. data/lib/jamf/api/resources/collection_resources/department.rb +0 -78
  664. data/lib/jamf/api/resources/collection_resources/device_enrollment.rb +0 -384
  665. data/lib/jamf/api/resources/collection_resources/inventory_preload_record.rb +0 -289
  666. data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +0 -143
  667. data/lib/jamf/api/resources/collection_resources/script.rb +0 -226
  668. data/lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb +0 -141
  669. data/lib/jamf/api/resources/singleton_resources/locales.rb +0 -155
  670. data/lib/jamf/api/resources/singleton_resources/time_zones.rb +0 -213
  671. data/lib/jamf/compatibility.rb +0 -88
  672. data/lib/jamf/ruby_extensions/dig.rb +0 -52
  673. data/lib/jamf/ruby_extensions/string/backports.rb +0 -66
  674. data/lib/jss/api_connection.rb +0 -1029
  675. data/lib/jss/api_object/app_store_country_codes.rb +0 -298
  676. data/lib/jss/api_object/computer/application_installs.rb +0 -118
  677. data/lib/jss/client/jamf_binary.rb +0 -132
  678. data/lib/jss/client/jamf_helper.rb +0 -298
  679. data/lib/jss/client/management_action.rb +0 -113
  680. data/lib/jss/client.rb +0 -301
  681. data/lib/jss/compatibility.rb +0 -88
  682. data/lib/jss/composer.rb +0 -190
  683. data/lib/jss/configuration.rb +0 -319
  684. data/lib/jss/exceptions.rb +0 -115
  685. data/lib/jss/ruby_extensions/array.rb +0 -52
  686. data/lib/jss/ruby_extensions/hash.rb +0 -140
  687. data/lib/jss/ruby_extensions/ipaddr.rb +0 -92
  688. data/lib/jss/ruby_extensions/object.rb +0 -19
  689. data/lib/jss/ruby_extensions/pathname.rb +0 -78
  690. data/lib/jss/ruby_extensions/string/backports.rb +0 -68
  691. data/lib/jss/ruby_extensions/string/conversions.rb +0 -69
  692. data/lib/jss/ruby_extensions/string/predicates.rb +0 -57
  693. data/lib/jss/server.rb +0 -146
  694. data/lib/jss/utility.rb +0 -672
  695. data/lib/jss/validate.rb +0 -248
  696. data/test/lib/testhelper/auth.rb +0 -275
  697. data/test/lib/testhelper/patch_mgmt.rb +0 -123
  698. data/test/specs/api_connection_spec.rb +0 -57
  699. data/test/specs/patch01_source_spec.rb +0 -54
  700. data/test/specs/patch02_internal_source_spec.rb +0 -88
  701. data/test/specs/patch03_external_source_spec.rb +0 -120
  702. data/test/specs/patch04_titles_spec.rb +0 -207
  703. data/test/specs/patch05_policies_spec.rb +0 -119
  704. data/test/specs/patch06_cleanup_spec.rb +0 -52
  705. data/test/specs/policy_spec.rb +0 -112
@@ -1,5 +1,5 @@
1
1
 
2
- ### Copyright 2020 Pixar
2
+ ### Copyright 2022 Pixar
3
3
 
4
4
  ###
5
5
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,10 +24,8 @@
24
24
  ###
25
25
  ###
26
26
 
27
- require 'jss/api_object/self_servable/icon'
28
-
29
27
  ###
30
- module JSS
28
+ module Jamf
31
29
 
32
30
  # Module Variables
33
31
  #####################################
@@ -51,12 +49,12 @@ module JSS
51
49
  # - :security
52
50
  #
53
51
  # Additionally, items that apper in macOS Slf Svc have these keys:
54
- # - :self_service_display_name (but not JSS::MacApplication)
52
+ # - :self_service_display_name (but not Jamf::MacApplication)
55
53
  # - :install_button_text
56
- # - :reinstall_button_text (but not JSS::MacApplication)
54
+ # - :reinstall_button_text (but not Jamf::MacApplication)
57
55
  # - :force_users_to_view_description
58
56
  # - :notification
59
- # - :notification_location # PENDING API FIX, and also, not JSS::MacApplication
57
+ # - :notification_location # PENDING API FIX, and also, not Jamf::MacApplication
60
58
  # - :notification_subject
61
59
  # - :notification_message
62
60
  #
@@ -70,7 +68,7 @@ module JSS
70
68
  # Classes including this module *MUST*:
71
69
  # - call {#add_self_service_xml(xmldoc)} in their #rest_xml method
72
70
  #
73
- # IMPORTANT: Since SelfServable also includes #{JSS::Uploadable}, for uploading icons,
71
+ # IMPORTANT: Since SelfServable also includes #{Jamf::Uploadable}, for uploading icons,
74
72
  # see that module for its requirements.
75
73
  #
76
74
  #
@@ -113,6 +111,10 @@ module JSS
113
111
  # Self Service data is dealt with in the API data of the different
114
112
  # self-servable classes.
115
113
  #
114
+ # NOTE: The keys are the string versions of the Classes themselves, so that
115
+ # we don't cause circular dependencies when loading these classes with
116
+ # zeitwerk
117
+ #
116
118
  # - in_self_service_data_path: Array, In the API data hash (the @init_data)
117
119
  # where to find the value indicicating that a thing is in self service.
118
120
  # e.g. [:self_service, :use_for_self_service] means
@@ -154,7 +156,7 @@ module JSS
154
156
  # self service ruby code in this one module.
155
157
  #
156
158
  SELF_SERVICE_CLASSES = {
157
- JSS::Policy => {
159
+ 'Jamf::Policy' => {
158
160
  in_self_service_data_path: %i[self_service use_for_self_service],
159
161
  in_self_service: true,
160
162
  not_in_self_service: false,
@@ -165,7 +167,7 @@ module JSS
165
167
  notifications_supported: :ssvc_only,
166
168
  url_entity: 'policy'
167
169
  },
168
- JSS::PatchPolicy => {
170
+ 'Jamf::PatchPolicy' => {
169
171
  in_self_service_data_path: %i[general distribution_method],
170
172
  in_self_service: PATCHPOL_SELF_SERVICE,
171
173
  not_in_self_service: PATCHPOL_AUTO,
@@ -177,7 +179,7 @@ module JSS
177
179
  notifications_supported: :ssvc_and_nctr,
178
180
  notification_reminders: true
179
181
  },
180
- JSS::MacApplication => {
182
+ 'Jamf::MacApplication' => {
181
183
  in_self_service_data_path: %i[general deployment_type],
182
184
  in_self_service: MAKE_AVAILABLE,
183
185
  not_in_self_service: AUTO_INSTALL_OR_PROMPT,
@@ -189,7 +191,7 @@ module JSS
189
191
  url_entity: 'app'
190
192
  # OTHER BUG: no notification options seem to be changable via the API
191
193
  },
192
- JSS::OSXConfigurationProfile => {
194
+ 'Jamf::OSXConfigurationProfile' => {
193
195
  in_self_service_data_path: %i[general distribution_method],
194
196
  in_self_service: MAKE_AVAILABLE,
195
197
  not_in_self_service: AUTO_INSTALL,
@@ -200,7 +202,7 @@ module JSS
200
202
  notifications_supported: :ssvc_only,
201
203
  url_entity: 'configprofile'
202
204
  },
203
- JSS::EBook => {
205
+ 'Jamf::Ebook' => {
204
206
  in_self_service_data_path: %i[general deployment_type],
205
207
  in_self_service: MAKE_AVAILABLE,
206
208
  not_in_self_service: AUTO_INSTALL_OR_PROMPT,
@@ -211,7 +213,7 @@ module JSS
211
213
  notifications_supported: :ssvc_only,
212
214
  url_entity: 'ebook'
213
215
  },
214
- JSS::MobileDeviceApplication => {
216
+ 'Jamf::MobileDeviceApplication' => {
215
217
  in_self_service_data_path: %i[general deployment_type],
216
218
  in_self_service: MAKE_AVAILABLE,
217
219
  not_in_self_service: AUTO_INSTALL_OR_PROMPT,
@@ -220,7 +222,7 @@ module JSS
220
222
  can_display_in_categories: true,
221
223
  can_feature_in_categories: false
222
224
  },
223
- JSS::MobileDeviceConfigurationProfile => {
225
+ 'Jamf::MobileDeviceConfigurationProfile' => {
224
226
  in_self_service_data_path: %i[general deployment_method],
225
227
  in_self_service: MAKE_AVAILABLE,
226
228
  not_in_self_service: AUTO_INSTALL,
@@ -241,7 +243,7 @@ module JSS
241
243
  attr_reader :in_self_service
242
244
  alias in_self_service? in_self_service
243
245
 
244
- # @return [JSS::Icon, nil] The icon used in self-service
246
+ # @return [Jamf::Icon, nil] The icon used in self-service
245
247
  attr_reader :icon
246
248
  alias self_service_icon icon
247
249
 
@@ -362,7 +364,7 @@ module JSS
362
364
  def self_service_display_name=(new_val)
363
365
  new_val = new_val.strip
364
366
  return nil if @self_service_display_name == new_val
365
- raise JSS::InvalidDataError, 'Only macOS Self Service items have display names' unless self_service_targets.include? :macos
367
+ raise Jamf::InvalidDataError, 'Only macOS Self Service items have display names' unless self_service_targets.include? :macos
366
368
  @self_service_display_name = new_val
367
369
  @need_to_update = true
368
370
  end
@@ -376,7 +378,7 @@ module JSS
376
378
  def self_service_install_button_text=(new_val)
377
379
  new_val = new_val.strip
378
380
  return nil if @self_service_install_button_text == new_val
379
- raise JSS::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos
381
+ raise Jamf::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos
380
382
  @self_service_install_button_text = new_val
381
383
  @need_to_update = true
382
384
  end
@@ -388,7 +390,7 @@ module JSS
388
390
  def self_service_reinstall_button_text=(new_val)
389
391
  new_val = new_val.strip
390
392
  return nil if @self_service_reinstall_button_text == new_val
391
- raise JSS::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos
393
+ raise Jamf::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos
392
394
  @self_service_reinstall_button_text = new_val
393
395
  @need_to_update = true
394
396
  end
@@ -400,7 +402,7 @@ module JSS
400
402
  def self_service_feature_on_main_page=(new_val)
401
403
  return nil if @self_service_feature_on_main_page == new_val
402
404
  return nil unless @self_service_data_config[:can_feature_in_categories]
403
- raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
405
+ raise Jamf::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
404
406
  @self_service_feature_on_main_page = new_val
405
407
  @need_to_update = true
406
408
  end
@@ -412,8 +414,8 @@ module JSS
412
414
  #
413
415
  def self_service_force_users_to_view_description=(new_val)
414
416
  return nil if @self_service_force_users_to_view_description == new_val
415
- raise JSS::InvalidDataError, 'Only macOS Self Service Items can force users to view description' unless self_service_targets.include? :macos
416
- raise JSS::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
417
+ raise Jamf::InvalidDataError, 'Only macOS Self Service Items can force users to view description' unless self_service_targets.include? :macos
418
+ raise Jamf::InvalidDataError, 'New value must be true or false' unless new_val.jss_boolean?
417
419
  @self_service_force_users_to_view_description = new_val
418
420
  @need_to_update = true
419
421
  end
@@ -433,13 +435,13 @@ module JSS
433
435
  # @return [void]
434
436
  #
435
437
  def add_self_service_category(new_cat, display_in: true, feature_in: false)
436
- new_cat = JSS::Category.map_all_ids_to(:name, api: @api)[new_cat] if new_cat.is_a? Integer
438
+ new_cat = Jamf::Category.map_all_ids_to(:name, cnx: @cnx)[new_cat] if new_cat.is_a? Integer
437
439
  feature_in = false if display_in == false
438
- raise JSS::NoSuchItemError, "No category '#{new_cat}' in the JSS" unless JSS::Category.all_names(:refresh, api: @api).include? new_cat
440
+ raise Jamf::NoSuchItemError, "No category '#{new_cat}' in the JSS" unless Jamf::Category.all_names(:refresh, cnx: @cnx).include? new_cat
439
441
 
440
- raise JSS::InvalidDataError, 'display_in must be true or false' unless display_in.jss_boolean?
442
+ raise Jamf::InvalidDataError, 'display_in must be true or false' unless display_in.jss_boolean?
441
443
 
442
- raise JSS::InvalidDataError, 'feature_in must be true or false' unless feature_in.jss_boolean?
444
+ raise Jamf::InvalidDataError, 'feature_in must be true or false' unless feature_in.jss_boolean?
443
445
 
444
446
  new_data = { name: new_cat }
445
447
  new_data[:display_in] = display_in if @self_service_data_config[:can_display_in_categories]
@@ -502,7 +504,7 @@ module JSS
502
504
  def self_service_notifications_enabled=(new_val)
503
505
  return if new_val == self_service_notifications_enabled
504
506
  validate_notifications_supported
505
- JSS::Validate.boolean new_val
507
+ Jamf::Validate.boolean new_val
506
508
  @self_service_notifications_enabled = new_val
507
509
  @need_to_update = true
508
510
  end
@@ -523,7 +525,7 @@ module JSS
523
525
  raise "JAMF BUG: Until Jamf fixes API bugs in #{self.class}, you can only set Self Service notifications to :ssvc_only. Use the WebUI to activate Notification Center notifications"
524
526
  end
525
527
 
526
- raise JSS::InvalidDataError, "type must be one of: :#{NOTIFICATION_TYPES.keys.join ', :'}" unless NOTIFICATION_TYPES.key? type
528
+ raise Jamf::InvalidDataError, "type must be one of: :#{NOTIFICATION_TYPES.keys.join ', :'}" unless NOTIFICATION_TYPES.key? type
527
529
 
528
530
  @self_service_notification_type = type
529
531
  @need_to_update = true
@@ -562,7 +564,7 @@ module JSS
562
564
  def self_service_reminders_enabled=(new_val)
563
565
  return if new_val == self_service_reminders_enabled
564
566
  validate_notification_reminders_supported
565
- JSS::Validate.boolean new_val
567
+ Jamf::Validate.boolean new_val
566
568
  @self_service_reminders_enabled = new_val
567
569
  @need_to_update = true
568
570
  end
@@ -576,14 +578,14 @@ module JSS
576
578
  def self_service_reminder_frequency=(days)
577
579
  return if days == self_service_reminder_frequency
578
580
  validate_notification_reminders_supported
579
- JSS::Validate.integer days
581
+ Jamf::Validate.integer days
580
582
  @self_service_reminder_frequency = days
581
583
  @need_to_update = true
582
584
  end
583
585
 
584
586
  # Set a new Self Service icon for this object.
585
587
  #
586
- # Since JSS::Icon objects are read-only,
588
+ # Since Jamf::Icon objects are read-only,
587
589
  # the icon can only be changed by supplying the id number
588
590
  # of an icon already existing in the JSS, or a path to
589
591
  # a local file, which will be uploaded to the JSS and added
@@ -603,7 +605,7 @@ module JSS
603
605
  @need_to_update = true
604
606
  else
605
607
  unless uploadable? && defined?(self.class::UPLOAD_TYPES) && self.class::UPLOAD_TYPES.key?(:icon)
606
- raise JSS::UnsupportedError, "Class #{self.class} does not support icon uploads."
608
+ raise Jamf::UnsupportedError, "Class #{self.class} does not support icon uploads."
607
609
  end
608
610
  new_icon = Pathname.new new_icon
609
611
  upload(:icon, new_icon)
@@ -692,7 +694,7 @@ module JSS
692
694
  </self_service>
693
695
  </#{self.class::RSRC_OBJECT_KEY}>
694
696
  ENDXML
695
- @api.put_rsrc rest_rsrc, xml
697
+ @cnx.c_put rest_rsrc, xml
696
698
  @need_ss_notification_activation_hack = nil
697
699
  end
698
700
 
@@ -704,7 +706,7 @@ module JSS
704
706
  # @return [void]
705
707
  #
706
708
  def parse_self_service
707
- @self_service_data_config = SELF_SERVICE_CLASSES[self.class]
709
+ @self_service_data_config = SELF_SERVICE_CLASSES[self.class.to_s]
708
710
 
709
711
  subset_key = @self_service_data_config[:self_service_subset] ? @self_service_data_config[:self_service_subset] : :self_service
710
712
 
@@ -715,7 +717,7 @@ module JSS
715
717
 
716
718
  @self_service_description = ss_data[:self_service_description]
717
719
 
718
- @icon = JSS::Icon.new(ss_data[:self_service_icon]) if ss_data[:self_service_icon]
720
+ @icon = Jamf::Icon.new(ss_data[:self_service_icon]) if ss_data[:self_service_icon]
719
721
 
720
722
  @self_service_feature_on_main_page = ss_data[:feature_on_main_page]
721
723
 
@@ -767,7 +769,7 @@ module JSS
767
769
  # oldstyle/broken, we need the XML to know if notifications are turned on
768
770
  if @self_service_data_config[:notifications_supported] == :ssvc_only && @in_jss
769
771
  ssrsrc = "#{rest_rsrc}/subset/selfservice"
770
- raw_xml = api.get_rsrc(ssrsrc, :xml)
772
+ raw_xml = cnx.c_get(ssrsrc, :xml)
771
773
  @self_service_notifications_enabled = raw_xml.include? '<notification>true</notification>'
772
774
  @self_service_notification_type = NOTIFICATION_TYPES.invert[ss_data[:notification]]
773
775
  @self_service_notification_subject = ss_data[:notification_subject]
@@ -798,13 +800,13 @@ module JSS
798
800
  #
799
801
  def refresh_icon
800
802
  return nil unless @in_jss
801
- fresh_data = @api.get_rsrc(@rest_rsrc)[self.class::RSRC_OBJECT_KEY]
803
+ fresh_data = @cnx.c_get(@rest_rsrc)[self.class::RSRC_OBJECT_KEY]
802
804
  subset_key = @self_service_data_config[:self_service_subset] ? @self_service_data_config[:self_service_subset] : :self_service
803
805
 
804
806
  ss_data = fresh_data[subset_key]
805
807
 
806
808
  icon_data = ss_data[:self_service_icon]
807
- @icon = JSS::Icon.new icon_data
809
+ @icon = Jamf::Icon.new icon_data
808
810
  end # refresh icon
809
811
 
810
812
  # Add approriate XML for self service data to the XML document for this
@@ -890,7 +892,7 @@ module JSS
890
892
  ssvc.add_element('install_button_text').text = self_service_install_button_text if self_service_install_button_text
891
893
  ssvc.add_element('force_users_to_view_description').text = self_service_force_users_to_view_description.to_s
892
894
 
893
- return if self.class == JSS::MacApplication
895
+ return if self.class == Jamf::MacApplication
894
896
 
895
897
  ssvc.add_element('self_service_display_name').text = self_service_display_name if self_service_display_name
896
898
  ssvc.add_element('reinstall_button_text').text = self_service_reinstall_button_text if self_service_reinstall_button_text
@@ -926,29 +928,29 @@ module JSS
926
928
 
927
929
  # Raise an error if user_removable settings are wrong
928
930
  def validate_user_removable(new_val)
929
- raise JSS::UnsupportedError, 'User removal settings not applicable to this class' unless self_service_payload == :profile
931
+ raise Jamf::UnsupportedError, 'User removal settings not applicable to this class' unless self_service_payload == :profile
930
932
 
931
- raise JSS::UnsupportedError, 'Removal :with_auth not applicable to this class' if new_val == :with_auth && !self_service_targets.include?(:ios)
933
+ raise Jamf::UnsupportedError, 'Removal :with_auth not applicable to this class' if new_val == :with_auth && !self_service_targets.include?(:ios)
932
934
 
933
- raise JSS::InvalidDataError, "Value must be one of: :#{PROFILE_REMOVAL_BY_USER.keys.join(', :')}" unless PROFILE_REMOVAL_BY_USER.key?(new_val)
935
+ raise Jamf::InvalidDataError, "Value must be one of: :#{PROFILE_REMOVAL_BY_USER.keys.join(', :')}" unless PROFILE_REMOVAL_BY_USER.key?(new_val)
934
936
  end
935
937
 
936
938
  # Raise an error if an icon id is not valid
937
939
  def validate_icon(id)
938
- return nil unless JSS::DB_CNX.connected?
939
- raise JSS::NoSuchItemError, "No icon with id #{id}" unless JSS::Icon.all_ids.include? id
940
+ return nil unless Jamf::DB_CNX.connected?
941
+ raise Jamf::NoSuchItemError, "No icon with id #{id}" unless Jamf::Icon.all_ids.include? id
940
942
  end
941
943
 
942
944
  # Raise an error if notifications aren't supported
943
945
  def validate_notifications_supported
944
- raise JSS::UnsupportedError, "#{self.class} doesn't support Self Service notifications" unless @self_service_data_config[:notifications_supported]
946
+ raise Jamf::UnsupportedError, "#{self.class} doesn't support Self Service notifications" unless @self_service_data_config[:notifications_supported]
945
947
  end
946
948
 
947
949
  # Raise an error if notification reminders aren't supported
948
950
  def validate_notification_reminders_supported
949
- raise JSS::UnsupportedError, "#{self.class} doesn't support Self Service notifications" unless @self_service_data_config[:notification_reminders]
951
+ raise Jamf::UnsupportedError, "#{self.class} doesn't support Self Service notifications" unless @self_service_data_config[:notification_reminders]
950
952
  end
951
953
 
952
954
  end # module SelfServable
953
955
 
954
- end # module JSS
956
+ end # module Jamf
@@ -1,4 +1,4 @@
1
- ### Copyright 2020 Pixar
1
+ ### Copyright 2022 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,7 +24,7 @@
24
24
  ###
25
25
 
26
26
  ###
27
- module JSS
27
+ module Jamf
28
28
 
29
29
  # Module Variables
30
30
  #####################################
@@ -92,13 +92,13 @@ module JSS
92
92
  @site_id || NO_SITE_ID
93
93
  end # cat id
94
94
 
95
- # The JSS::Site instance for this object's site
95
+ # The Jamf::Site instance for this object's site
96
96
  #
97
- # @return [JSS::Site] The JSS::Site instance for this object's site
97
+ # @return [Jamf::Site] The Jamf::Site instance for this object's site
98
98
  #
99
99
  def site_object
100
100
  return nil unless site_assigned?
101
- JSS::Site.fetch id: @site_id
101
+ Jamf::Site.fetch id: @site_id
102
102
  end # cat obj
103
103
 
104
104
  # Does this object have a site assigned?
@@ -130,12 +130,12 @@ module JSS
130
130
  return
131
131
  end
132
132
 
133
- new_id = JSS::Site.valid_id new_site, api: @api
134
- new_name = JSS::Site.map_all_ids_to(:name, api: @api)[new_id]
133
+ new_id = Jamf::Site.valid_id new_site, cnx: @cnx
134
+ new_name = Jamf::Site.map_all_ids_to(:name, cnx: @cnx)[new_id]
135
135
  # no change, go home.
136
136
  return nil if new_name == @site_name
137
137
 
138
- raise JSS::NoSuchItemError, "Site '#{new_site}' is not known to the JSS" unless new_id
138
+ raise Jamf::NoSuchItemError, "Site '#{new_site}' is not known to the JSS" unless new_id
139
139
 
140
140
  @site_name = new_name
141
141
  @site_id = new_id
@@ -1,4 +1,4 @@
1
- # Copyright 2020 Pixar
1
+ # Copyright 2022 Pixar
2
2
 
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,7 +24,7 @@
24
24
  #
25
25
 
26
26
  #
27
- module JSS
27
+ module Jamf
28
28
 
29
29
  # Classes
30
30
  ###################################
@@ -33,14 +33,14 @@ module JSS
33
33
  #
34
34
  # These are simple, in that they only have an ID and a name.
35
35
  #
36
- # @see JSS::APIObject
36
+ # @see Jamf::APIObject
37
37
  #
38
- class Site < JSS::APIObject
38
+ class Site < Jamf::APIObject
39
39
 
40
40
  # Mix-Ins
41
41
  ###################################
42
- include JSS::Creatable
43
- include JSS::Updatable
42
+ include Jamf::Creatable
43
+ include Jamf::Updatable
44
44
 
45
45
  # Class Constants
46
46
  ###################################
@@ -1,4 +1,4 @@
1
- ### Copyright 2020 Pixar
1
+ ### Copyright 2022 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,7 +24,7 @@
24
24
  ###
25
25
 
26
26
  ###
27
- module JSS
27
+ module Jamf
28
28
 
29
29
  #####################################
30
30
  ### Module Variables
@@ -43,9 +43,9 @@ module JSS
43
43
  ###
44
44
  ### Only minimally implemented, for access to the APIObject list methods
45
45
  ###
46
- ### @see JSS::APIObject
46
+ ### @see Jamf::APIObject
47
47
  ###
48
- class SoftwareUpdateServer < JSS::APIObject
48
+ class SoftwareUpdateServer < Jamf::APIObject
49
49
 
50
50
  #####################################
51
51
  ### Mix-Ins
@@ -95,7 +95,7 @@ module JSS
95
95
  ###
96
96
  ### @see SS::APIObject#initialize
97
97
  ###
98
- def initialize (args = {})
98
+ def initialize(**args)
99
99
  super
100
100
  @ip_address = @init_data[:ip_address]
101
101
  @port = @init_data[:port]
@@ -1,4 +1,4 @@
1
- ### Copyright 2020 Pixar
1
+ ### Copyright 2022 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,7 +24,7 @@
24
24
  ###
25
25
 
26
26
  ### A mix-in module providing object-updating via the JSS API.
27
- module JSS
27
+ module Jamf
28
28
 
29
29
  # Module Variables
30
30
  #####################################
@@ -37,7 +37,7 @@ module JSS
37
37
 
38
38
  # A mix-in module that allows objects to be updated in the JSS via the API.
39
39
  #
40
- # When a JSS::APIObject subclass includes this module, instances of that
40
+ # When a Jamf::APIObject subclass includes this module, instances of that
41
41
  # subclass can be modified in the JSS using the {#update} or {APIObject#save} methods.
42
42
  #
43
43
  # Such classes should define setter methods for any values that they wish to
@@ -76,10 +76,10 @@ module JSS
76
76
  #
77
77
  def name=(newname)
78
78
  return nil if @name == newname
79
- raise JSS::UnsupportedError, "Editing #{self.class::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows." unless updatable?
80
- raise JSS::InvalidDataError, "Names can't be empty!" if newname.to_s.empty?
81
- raise JSS::AlreadyExistsError, "A #{self.class::RSRC_OBJECT_KEY} named '#{newname}' already exsists in the JSS" \
82
- if self.class.all_names(:refresh, api: @api).include? newname
79
+ raise Jamf::UnsupportedError, "Editing #{self.class::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows." unless updatable?
80
+ raise Jamf::InvalidDataError, "Names can't be empty!" if newname.to_s.empty?
81
+ raise Jamf::AlreadyExistsError, "A #{self.class::RSRC_OBJECT_KEY} named '#{newname}' already exsists in the JSS" \
82
+ if self.class.all_names(:refresh, cnx: @cnx).include? newname
83
83
  @name = newname
84
84
  @rest_rsrc = "#{self.class::RSRC_BASE}/name/#{CGI.escape @name.to_s}" if @rest_rsrc.include? '/name/'
85
85
  @need_to_update = true
@@ -87,23 +87,23 @@ module JSS
87
87
 
88
88
  # Save changes to the JSS
89
89
  #
90
- # @return [Boolean] success
90
+ # @return [Integer] The object id
91
91
  #
92
- def update
92
+ def update_in_jamf
93
93
  return nil unless @need_to_update
94
- raise JSS::UnsupportedError, "Editing #{self.class::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows." unless updatable?
95
- raise JSS::NoSuchItemError, "Not In JSS! Use #create to create this #{self.class::RSRC_OBJECT_KEY} in the JSS before updating it." unless @in_jss
94
+ raise Jamf::UnsupportedError, "Editing #{self.class::RSRC_LIST_KEY} isn't yet supported. Please use other Casper workflows." unless updatable?
96
95
 
97
- @api.put_rsrc @rest_rsrc, rest_xml
96
+ @cnx.c_put @rest_rsrc, rest_xml
98
97
  @need_to_update = false
99
98
  refresh_icon if self_servable?
100
99
 
101
100
  # clear any cached all-lists or id-maps for this class
102
101
  # so they'll re-cache as needed
103
- @api.flushcache self.class::RSRC_LIST_KEY
102
+ @cnx.flushcache self.class::RSRC_LIST_KEY
104
103
 
105
104
  @id
106
105
  end # update
106
+ private :update_in_jamf
107
107
 
108
108
  end # module Creatable
109
109
 
@@ -1,4 +1,4 @@
1
- ### Copyright 2020 Pixar
1
+ ### Copyright 2022 Pixar
2
2
 
3
3
  ###
4
4
  ### Licensed under the Apache License, Version 2.0 (the "Apache License")
@@ -24,7 +24,7 @@
24
24
  ###
25
25
 
26
26
  ###
27
- module JSS
27
+ module Jamf
28
28
 
29
29
  #####################################
30
30
  # Module Variables
@@ -46,8 +46,8 @@ module JSS
46
46
  #
47
47
  # UPLOAD_TYPES = {
48
48
  # :icon => :mobiledeviceapplicationsicon
49
- # :app => mobiledeviceapplicationsipa
50
- # :attachment => mobiledeviceapplications
49
+ # :app => :mobiledeviceapplicationsipa
50
+ # :attachment => :mobiledeviceapplications
51
51
  # }
52
52
  #
53
53
  # with one pair for each type of upload that the class can handle.
@@ -87,7 +87,6 @@ module JSS
87
87
  #
88
88
  module Uploadable
89
89
 
90
- #####################################
91
90
  # Constants
92
91
  #####################################
93
92
 
@@ -95,17 +94,68 @@ module JSS
95
94
 
96
95
  UPLOAD_RSRC_PREFIX = 'fileuploads'.freeze
97
96
 
98
- #####################################
99
- # Variables
100
- #####################################
97
+ FORCE_IPA_UPLOAD_PARAM = 'FORCE_IPA_UPLOAD'.freeze
101
98
 
99
+ # Class/Module Methods
102
100
  #####################################
103
- # Methods
101
+ module ClassMethods
102
+
103
+ # Upload a file to the JSS to be stored with an item of the
104
+ # class mixing in the Uploadable module.
105
+ #
106
+ # This class method does not require fetching a Ruby instance first,
107
+ # but the matching instance method will work for a specific instance if
108
+ # it's already been fetched.
109
+ #
110
+ # @param ident[Integer, String] A unique identifier for the object taking the upload
111
+ #
112
+ # @param type[Symbol] the type of upload happening.
113
+ # Must be one of the keys defined in the class's UPLOAD_TYPES Hash.
114
+ #
115
+ # @param local_file[String, Pathname] String or Pathname pointing to the
116
+ # locally-readable file to be uploaded.
117
+ #
118
+ # @param force_ipa_upload[Boolean] Should the server upload the .ipa file to
119
+ # JCDS or AWS if such are confgured for use?
120
+ #
121
+ # @param cnx [Jamf::Connection] the connection object for the operation.
122
+ # defaults to the default connection for the JSS module.
123
+ #
124
+ # @return [Boolean] was the upload successful?
125
+ #
126
+ def upload(ident, type, local_file, force_ipa_upload: false, api: nil, cnx: Jamf.cnx)
127
+ cnx = api if api
128
+
129
+ id = valid_id ident, :refresh, cnx: cnx
130
+ raise "No #{self::RSRC_OBJECT_KEY} matching '#{ident}'" unless id
131
+
132
+ # the type has to be defined in the class including this module.
133
+ raise Jamf::InvalidDataError, "#{self::RSRC_LIST_KEY} only take uploads of type: :#{self::UPLOAD_TYPES.keys.join(', :')}." \
134
+ unless self::UPLOAD_TYPES.key? type
135
+
136
+ # figure out the resource after the UPLOAD_RSRC_PREFIX
137
+ upload_rsrc = "#{UPLOAD_RSRC_PREFIX}/#{self::UPLOAD_TYPES[type]}/id/#{id}"
138
+
139
+ upload_rsrc << "?#{FORCE_IPA_UPLOAD_PARAM}=true" if self::UPLOAD_TYPES[type] == :mobiledeviceapplicationsipa && force_ipa_upload
140
+
141
+ cnx.upload upload_rsrc, local_file
142
+ end # def upload
143
+
144
+ end # module classmethods
145
+
146
+ # this loads the class methods (via 'extend') when the instanace methods
147
+ # are included
148
+ def self.included(klass)
149
+ klass.extend(ClassMethods)
150
+ end
151
+
152
+ # Instance Methods
104
153
  #####################################
105
154
 
106
-
107
- # Upload a file to the JSS via the REST Resource of the
108
- # object to which this module is mixed in.
155
+ # instance method wrapper for class method
156
+ #
157
+ # Upload a file to the JSS to be stored with this instance of the
158
+ # class mixing in the Uploadable module
109
159
  #
110
160
  # @param type[Symbol] the type of upload happening.
111
161
  # Must be one of the keys defined in the class's UPLOAD_TYPES Hash.
@@ -113,26 +163,18 @@ module JSS
113
163
  # @param local_file[String, Pathname] String or Pathname pointing to the
114
164
  # locally-readable file to be uploaded.
115
165
  #
116
- # @return [String] The xml response from the server.
166
+ # @param force_ipa_upload[Boolean] Should the server upload the .ipa file to
167
+ # JCDS or AWS if such are confgured for use?
117
168
  #
118
- def upload(type, local_file)
169
+ # @return [Boolean] was the upload successful?
170
+ #
171
+ def upload(type, local_file, force_ipa_upload: false)
119
172
  # the thing's gotta be in the JSS, and have an @id
120
- raise JSS::NoSuchItemError, 'Create this #{self.class::RSRC_OBJECT_KEY} in the JSS before uploading files to it.' unless @id && @in_jss
121
-
122
- # the type has to be defined in the class of self.
123
- raise JSS::InvalidDataError, "#{self.class::RSRC_LIST_KEY} only take uploads of type: :#{self.class::UPLOAD_TYPES.keys.join(', :')}." \
124
- unless self.class::UPLOAD_TYPES.keys.include? type
125
-
126
- # figure out the resource after the UPLOAD_RSRC_PREFIX
127
- upload_rsrc = "#{UPLOAD_RSRC_PREFIX}/#{self.class::UPLOAD_TYPES[type]}/id/#{@id}"
128
-
129
- # make a File object to hand to REST. 'rb' = read,binary
130
- file = File.new local_file.to_s, 'rb'
173
+ raise Jamf::NoSuchItemError, "Create this #{self.class::RSRC_OBJECT_KEY} in the JSS before uploading files to it." unless @id && @in_jss
131
174
 
132
- # upload it!
133
- @api.cnx[upload_rsrc].post name: file
134
- end # def upload file
175
+ self.class.upload @id, type, local_file, force_ipa_upload: force_ipa_upload, cnx: @cnx
176
+ end
135
177
 
136
178
  end # module FileUpload
137
179
 
138
- end # module JSS
180
+ end # module Jamf