ruby-jss 4.2.3 → 4.2.4b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGES.md +11 -1
 - data/LICENSE.txt +5 -3
 - data/README.md +3 -1
 - data/bin/cgrouper +4 -22
 - data/bin/jamfHelperBackgrounder +4 -22
 - data/bin/netseg-update +4 -22
 - data/data/ruby-jss.conf.example +4 -22
 - data/lib/jamf/api/classic/api_objects/account.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/advanced_computer_search.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/advanced_mobile_device_search.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/advanced_user_search.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/building.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/categorizable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/category.rb +7 -24
 - data/lib/jamf/api/classic/api_objects/computer.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/computer_extension_attribute.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/computer_group.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/computer_invitation.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/creatable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/criteriable/criteria.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/criteriable/criterion.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/criteriable.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/department.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/directory_binding.rb +221 -247
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/active_directory.rb +492 -526
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/admitmac.rb +27 -55
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/centrify.rb +191 -220
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/directory_binding_type.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/open_directory.rb +142 -169
 - data/lib/jamf/api/classic/api_objects/directory_binding_type/powerbroker_identity_services.rb +37 -57
 - data/lib/jamf/api/classic/api_objects/directory_binding_type.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb +90 -84
 - data/lib/jamf/api/classic/api_objects/distribution_point.rb +6 -24
 - data/lib/jamf/api/classic/api_objects/dock_item.rb +11 -34
 - data/lib/jamf/api/classic/api_objects/ebook.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/extendable.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/ibeacon.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/icon.rb +5 -23
 - data/lib/jamf/api/classic/api_objects/ldap_server.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/locatable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/mac_application.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/management_history/audit_event.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/casper_imaging_log.rb +5 -24
 - data/lib/jamf/api/classic/api_objects/management_history/casper_remote_log.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/computer_usage_log.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/ebook.rb +4 -26
 - data/lib/jamf/api/classic/api_objects/management_history/hash_like.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/management_history/mac_app_store_app.rb +4 -26
 - data/lib/jamf/api/classic/api_objects/management_history/mdm_command.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/mobile_device_app.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/policy_log.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/screen_sharing_log.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history/user_location_change.rb +4 -25
 - data/lib/jamf/api/classic/api_objects/management_history.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/matchable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/mdm.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/mobile_device.rb +7 -23
 - data/lib/jamf/api/classic/api_objects/mobile_device_application.rb +7 -23
 - data/lib/jamf/api/classic/api_objects/mobile_device_configuration_profile.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/mobile_device_extension_attribute.rb +3 -20
 - data/lib/jamf/api/classic/api_objects/mobile_device_group.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/netboot_server.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/network_segment.rb +7 -23
 - data/lib/jamf/api/classic/api_objects/osx_configuration_profile.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/package.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/patch_external_source.rb +7 -24
 - data/lib/jamf/api/classic/api_objects/patch_internal_source.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/patch_policy.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/patch_title/version.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/patch_title.rb +8 -24
 - data/lib/jamf/api/classic/api_objects/peripheral.rb +7 -24
 - data/lib/jamf/api/classic/api_objects/peripheral_type.rb +7 -26
 - data/lib/jamf/api/classic/api_objects/policy.rb +6 -22
 - data/lib/jamf/api/classic/api_objects/printer.rb +384 -388
 - data/lib/jamf/api/classic/api_objects/purchasable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/removable_macaddr.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/restricted_software.rb +7 -24
 - data/lib/jamf/api/classic/api_objects/scopable/scope.rb +2 -19
 - data/lib/jamf/api/classic/api_objects/scopable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/script.rb +5 -23
 - data/lib/jamf/api/classic/api_objects/self_servable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/sitable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/site.rb +2 -20
 - data/lib/jamf/api/classic/api_objects/software_update_server.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/updatable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/uploadable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/user.rb +6 -24
 - data/lib/jamf/api/classic/api_objects/user_extension_attribute.rb +2 -19
 - data/lib/jamf/api/classic/api_objects/user_group.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/vpp_account.rb +6 -23
 - data/lib/jamf/api/classic/api_objects/vppable.rb +4 -22
 - data/lib/jamf/api/classic/api_objects/web_hook.rb +4 -20
 - data/lib/jamf/api/classic/base_classes/advanced_search.rb +9 -25
 - data/lib/jamf/api/classic/base_classes/api_object.rb +7 -24
 - data/lib/jamf/api/classic/base_classes/configuration_profile.rb +5 -22
 - data/lib/jamf/api/classic/base_classes/extension_attribute.rb +6 -23
 - data/lib/jamf/api/classic/base_classes/group.rb +6 -22
 - data/lib/jamf/api/classic/base_classes/patch_source.rb +4 -22
 - data/lib/jamf/api/classic/xml_workaround.rb +4 -22
 - data/lib/jamf/api/connection/attributes.rb +4 -21
 - data/lib/jamf/api/connection/cache.rb +4 -21
 - data/lib/jamf/api/connection/classic_api.rb +4 -21
 - data/lib/jamf/api/connection/connect.rb +4 -21
 - data/lib/jamf/api/connection/constants.rb +7 -23
 - data/lib/jamf/api/connection/default_connection.rb +4 -21
 - data/lib/jamf/api/connection/jamf_pro_api.rb +4 -21
 - data/lib/jamf/api/connection/jamf_pro_api_error.rb +2 -20
 - data/lib/jamf/api/connection/token.rb +2 -20
 - data/lib/jamf/api/connection.rb +4 -21
 - data/lib/jamf/api/jamf_pro/api_objects/api_client.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/api_integration.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/api_role.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +2 -23
 - data/lib/jamf/api/jamf_pro/api_objects/device_enrollment.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/j_building.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/j_package.rb +2 -20
 - data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates/plan.rb +2 -19
 - data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates.rb +2 -19
 - data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +2 -20
 - data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/bulk_deletable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/change_log.rb +2 -20
 - data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +2 -20
 - data/lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/filevault.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/filterable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/immutable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb +2 -20
 - data/lib/jamf/api/jamf_pro/mixins/lockable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/macos_redeploy_mgmt_framework.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/prestage.rb +2 -20
 - data/lib/jamf/api/jamf_pro/mixins/sortable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/uncreatable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/mixins/undeletable.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +12 -31
 - data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_request.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_response.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_request.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_response.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_search_result.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_role.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_request.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_result.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +11 -30
 - data/lib/jamf/api/jamf_pro/oapi_schemas/authentication_type.rb +13 -32
 - data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/available_updates.rb +4 -25
 - data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +12 -31
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +10 -29
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +7 -26
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +12 -31
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_file_vault.rb +7 -26
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +12 -31
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +8 -27
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +6 -25
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +14 -33
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v3.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v3.rb +6 -26
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +28 -47
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +28 -47
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declaration.rb +8 -27
 - data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declarations.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v3.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_event_store.rb +4 -25
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_group_post.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post_response.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle.rb +4 -25
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status.rb +14 -33
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status_wrapper.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plans.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_status.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_statuses.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/o_auth_client_credentials.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/package.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/packages_search_results.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_configuration_post.rb +17 -36
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device.rb +7 -26
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_post.rb +7 -26
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_response.rb +2 -23
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_group_post.rb +6 -25
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/plan_status.rb +36 -55
 - data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v3.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v3.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +2 -19
 - data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +3 -24
 - data/lib/jamf/api/jamf_pro/oapi_schemas.rb +2 -19
 - data/lib/jamf/api/jamf_pro/other_classes/change_log_entry.rb +2 -20
 - data/lib/jamf/api/jamf_pro/other_classes/ip_address.rb +2 -20
 - data/lib/jamf/api/jamf_pro/other_classes/pager.rb +2 -19
 - data/lib/jamf/api/jamf_pro/other_classes/timestamp.rb +2 -20
 - data/lib/jamf/base_class.rb +2 -19
 - data/lib/jamf/client/jamf_binary.rb +4 -22
 - data/lib/jamf/client/jamf_helper.rb +4 -22
 - data/lib/jamf/client/management_action.rb +4 -22
 - data/lib/jamf/client.rb +4 -22
 - data/lib/jamf/composer.rb +2 -20
 - data/lib/jamf/configuration.rb +2 -20
 - data/lib/jamf/constants.rb +2 -20
 - data/lib/jamf/db_connection.rb +5 -23
 - data/lib/jamf/deprecations/deprecated_api_connection_class.rb +2 -20
 - data/lib/jamf/deprecations/deprecated_api_constant.rb +2 -20
 - data/lib/jamf/deprecations/deprecated_config_constant.rb +2 -20
 - data/lib/jamf/deprecations.rb +4 -22
 - data/lib/jamf/exceptions.rb +2 -20
 - data/lib/jamf/oapi_validate.rb +2 -19
 - data/lib/jamf/ruby_extensions/array/predicates.rb +2 -20
 - data/lib/jamf/ruby_extensions/array/utils.rb +2 -20
 - data/lib/jamf/ruby_extensions/array.rb +2 -20
 - data/lib/jamf/ruby_extensions/filetest/predicates.rb +2 -20
 - data/lib/jamf/ruby_extensions/filetest.rb +2 -20
 - data/lib/jamf/ruby_extensions/hash/utils.rb +2 -44
 - data/lib/jamf/ruby_extensions/hash.rb +2 -20
 - data/lib/jamf/ruby_extensions/ipaddr/utils.rb +2 -20
 - data/lib/jamf/ruby_extensions/ipaddr.rb +4 -22
 - data/lib/jamf/ruby_extensions/object/predicates.rb +2 -20
 - data/lib/jamf/ruby_extensions/object.rb +2 -20
 - data/lib/jamf/ruby_extensions/pathname/predicates.rb +2 -20
 - data/lib/jamf/ruby_extensions/pathname/utils.rb +2 -20
 - data/lib/jamf/ruby_extensions/pathname.rb +2 -20
 - data/lib/jamf/ruby_extensions/string/conversions.rb +2 -20
 - data/lib/jamf/ruby_extensions/string/predicates.rb +2 -20
 - data/lib/jamf/ruby_extensions/string.rb +2 -20
 - data/lib/jamf/ruby_extensions/time/utils.rb +4 -22
 - data/lib/jamf/ruby_extensions/time.rb +4 -22
 - data/lib/jamf/ruby_extensions.rb +4 -22
 - data/lib/jamf/utility.rb +2 -20
 - data/lib/jamf/validate.rb +2 -19
 - data/lib/jamf/version.rb +5 -23
 - data/lib/jamf/zeitwerk_config.rb +2 -20
 - data/lib/jamf.rb +2 -20
 - data/lib/jss-api.rb +4 -22
 - data/lib/jss.rb +4 -22
 - data/lib/ruby-jss.rb +4 -22
 - data/test/bin/runtests +4 -22
 - data/test/lib/jamf_test/APITest.rb +4 -22
 - data/test/lib/jamf_test/advanced_search.rb +4 -22
 - data/test/lib/jamf_test/auth.rb +4 -22
 - data/test/lib/jamf_test/collection_tests.rb +4 -22
 - data/test/lib/jamf_test/prestage_tests.rb +4 -22
 - data/test/lib/jamf_test.rb +4 -22
 - data/test/tests/advanced_computer_search.rb +4 -22
 - data/test/tests/advanced_mobile_device_search.rb +4 -22
 - data/test/tests/advanced_user_search.rb +4 -22
 - data/test/tests/building.rb +4 -22
 - data/test/tests/category.rb +4 -22
 - data/test/tests/computer.rb +4 -22
 - data/test/tests/computer_group.rb +4 -22
 - data/test/tests/computer_prestage.rb +4 -22
 - data/test/tests/department.rb +4 -22
 - data/test/tests/device_enrollment.rb +4 -22
 - data/test/tests/inventory_preload_record.rb +4 -22
 - data/test/tests/j_building.rb +4 -22
 - data/test/tests/j_package.rb +4 -22
 - data/test/tests/mobile_device.rb +4 -22
 - data/test/tests/mobile_device_prestage.rb +4 -22
 - data/test/tests/policy.rb +4 -22
 - metadata +4 -4
 
| 
         @@ -1,446 +1,442 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Jamf
         
     | 
| 
       2 
     | 
    
         
            -
                ### Module Constants
         
     | 
| 
       3 
     | 
    
         
            -
                #####################################
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
                ### Module Variables
         
     | 
| 
       6 
     | 
    
         
            -
                #####################################
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
                ### Module Methods
         
     | 
| 
       9 
     | 
    
         
            -
                #####################################
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                ### Classes
         
     | 
| 
       12 
     | 
    
         
            -
                #####################################
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
                ### Printer object inside JSS
         
     | 
| 
       15 
     | 
    
         
            -
                ###
         
     | 
| 
       16 
     | 
    
         
            -
                ### @see Jamf::APIObject
         
     | 
| 
       17 
     | 
    
         
            -
                class Printer < Jamf::APIObject
         
     | 
| 
       18 
     | 
    
         
            -
                    ## Mix-Ins
         
     | 
| 
       19 
     | 
    
         
            -
                    #####################################
         
     | 
| 
       20 
     | 
    
         
            -
                    include Jamf::Creatable
         
     | 
| 
       21 
     | 
    
         
            -
                    include Jamf::Updatable
         
     | 
| 
       22 
     | 
    
         
            -
                    include Jamf::Categorizable
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                    ## Class Constants
         
     | 
| 
       25 
     | 
    
         
            -
                    #####################################
         
     | 
| 
       26 
2 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                    ### the hash key used for the JSON list output of all objects in the JSS
         
     | 
| 
       31 
     | 
    
         
            -
                    RSRC_LIST_KEY = :printers
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                    ### The hash key used for the JSON object output
         
     | 
| 
       34 
     | 
    
         
            -
                    ### It's also used in various error messages
         
     | 
| 
       35 
     | 
    
         
            -
                    RSRC_OBJECT_KEY = :printer
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                    # Where is the Category in the API JSON?
         
     | 
| 
       38 
     | 
    
         
            -
                    CATEGORY_SUBSET = :top
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                    # How is the category stored in the API data?
         
     | 
| 
       41 
     | 
    
         
            -
                    CATEGORY_DATA_TYPE = String
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                    ## Attributes
         
     | 
| 
       44 
     | 
    
         
            -
                    #####################################
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                    ### @return [String] The URI path for the specific printer.
         
     | 
| 
       47 
     | 
    
         
            -
                    attr_reader :uri
         
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                    ### @return [String] The CUPs name to be used
         
     | 
| 
       50 
     | 
    
         
            -
                    attr_reader :CUPS_name
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                    ### @return [String] The physical location of the printer.
         
     | 
| 
       53 
     | 
    
         
            -
                    attr_reader :location
         
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
                    ### @return [String] The specific model of printer.
         
     | 
| 
       56 
     | 
    
         
            -
                    attr_reader :model
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                    ### @return [Boolean] Is this printer to be shared?
         
     | 
| 
       59 
     | 
    
         
            -
                    attr_reader :shared
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                    ### @return [String] Information for this specific printer.
         
     | 
| 
       62 
     | 
    
         
            -
                    attr_reader :info
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
                    ### @return [String] Notes for this specific printer.
         
     | 
| 
       65 
     | 
    
         
            -
                    attr_reader :notes
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                    ### @return [Boolean] Make this printer as the default printer upon installation.
         
     | 
| 
       68 
     | 
    
         
            -
                    attr_reader :make_default
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                    ### @return [Boolean] Use a generic PPD.
         
     | 
| 
       71 
     | 
    
         
            -
                    attr_reader :use_generic
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
                    ### @return [String] The PPD file name.
         
     | 
| 
       74 
     | 
    
         
            -
                    attr_reader :ppd
         
     | 
| 
       75 
     | 
    
         
            -
             
     | 
| 
       76 
     | 
    
         
            -
                    ### @return [String] The contents of the PPD file.
         
     | 
| 
       77 
     | 
    
         
            -
                    attr_reader :ppd_contents
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
                    ### @return [String] The path the PPD file will be installed.
         
     | 
| 
       80 
     | 
    
         
            -
                    attr_reader :ppd_path
         
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
                    ### @return [String] The OS version requirements seperated by commas
         
     | 
| 
       83 
     | 
    
         
            -
                    attr_reader :os_requirements
         
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                    ## Constructor
         
     | 
| 
       86 
     | 
    
         
            -
                    #####################################
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
                    ###
         
     | 
| 
       89 
     | 
    
         
            -
                    def initialize(**args)
         
     | 
| 
       90 
     | 
    
         
            -
                        super
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
                        if self.in_jss?
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                            @uri = @init_data[:uri]
         
     | 
| 
       95 
     | 
    
         
            -
                            @CUPS_name = @init_data[:CUPS_name]
         
     | 
| 
       96 
     | 
    
         
            -
                            @location = @init_data[:location]
         
     | 
| 
       97 
     | 
    
         
            -
                            @model = @init_data[:model]
         
     | 
| 
       98 
     | 
    
         
            -
                            @shared = @init_data[:shared]
         
     | 
| 
       99 
     | 
    
         
            -
                            @info = @init_data[:info]
         
     | 
| 
       100 
     | 
    
         
            -
                            @notes = @init_data[:notes]
         
     | 
| 
       101 
     | 
    
         
            -
                            @make_default = @init_data[:make_default]
         
     | 
| 
       102 
     | 
    
         
            -
                            @use_generic = @init_data[:use_generic]
         
     | 
| 
       103 
     | 
    
         
            -
                            @ppd = @init_data[:ppd]
         
     | 
| 
       104 
     | 
    
         
            -
                            @ppd_contents = @init_data[:ppd_contents]
         
     | 
| 
       105 
     | 
    
         
            -
                            @ppd_path = @init_data[:ppd_path]
         
     | 
| 
       106 
     | 
    
         
            -
                            @os_requirements = @init_data[:os_requirements]
         
     | 
| 
       107 
     | 
    
         
            -
                        else
         
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
                            raise Jamf::MissingDataError, "CUPS_name must be provided." unless !@init_data[:CUPS_name].nil?
         
     | 
| 
       110 
     | 
    
         
            -
                            raise Jamf::MissingDataError, "uri must be provided." unless !@init_data[:uri].nil?
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "uri must be a String." unless @init_data[:uri].is_a?(String) || @init_data[:uri].nil?
         
     | 
| 
       113 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "CUPS_name must be a String." unless @init_data[:CUPS_name].is_a?(String)
         
     | 
| 
       114 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "location must be a String." unless @init_data[:location].is_a?(String) || @init_data[:location].nil?
         
     | 
| 
       115 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "model must be a String." unless @init_data[:model].is_a?(String) || @init_data[:model].nil?
         
     | 
| 
       116 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "info must be a String." unless @init_data[:info].is_a?(String) || @init_data[:info].nil?
         
     | 
| 
       117 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "notes must be a String." unless @init_data[:notes].is_a?(String) || @init_data[:notes].nil?
         
     | 
| 
       118 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "ppd must be a String." unless @init_data[:ppd].is_a?(String) || @init_data[:ppd].nil?
         
     | 
| 
       119 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "ppd_contents must be a String." unless @init_data[:ppd_contents].is_a?(String) || @init_data[:ppd_contents].nil?
         
     | 
| 
       120 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "ppd_path must be a String." unless @init_data[:ppd_path].is_a?(String) || @init_data[:ppd_path].nil?
         
     | 
| 
       121 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "os_requirements must be a String." unless @init_data[:os_requirements].is_a?(String) || @init_data[:os_requirements].nil?
         
     | 
| 
       122 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "shared must be a String." unless (@init_data[:shared].is_a?(TrueClass) || @init_data[:shared].is_a?(FalseClass)) || @init_data[:shared].nil?
         
     | 
| 
       123 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "make_default must be a String." unless (@init_data[:make_default].is_a?(TrueClass) || @init_data[:make_default].is_a?(FalseClass)) || @init_data[:make_default].nil?
         
     | 
| 
       124 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "use_generic must be a String." unless (@init_data[:use_generic].is_a?(TrueClass) || @init_data[:use_generic].is_a?(FalseClass)) || @init_data[:use_generic].nil?
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
                            @uri = @init_data[:uri]
         
     | 
| 
       127 
     | 
    
         
            -
                            @CUPS_name = @init_data[:CUPS_name]
         
     | 
| 
       128 
     | 
    
         
            -
                            @location = @init_data[:location]
         
     | 
| 
       129 
     | 
    
         
            -
                            @model = @init_data[:model]
         
     | 
| 
       130 
     | 
    
         
            -
                            @shared = @init_data[:shared]
         
     | 
| 
       131 
     | 
    
         
            -
                            @info = @init_data[:info]
         
     | 
| 
       132 
     | 
    
         
            -
                            @notes = @init_data[:notes]
         
     | 
| 
       133 
     | 
    
         
            -
                            @make_default = @init_data[:make_default]
         
     | 
| 
       134 
     | 
    
         
            -
                            @use_generic = @init_data[:use_generic]
         
     | 
| 
       135 
     | 
    
         
            -
                            @ppd = @init_data[:ppd]
         
     | 
| 
       136 
     | 
    
         
            -
                            @ppd_contents = @init_data[:ppd_contents]
         
     | 
| 
       137 
     | 
    
         
            -
                            @ppd_path = @init_data[:ppd_path]
         
     | 
| 
       138 
     | 
    
         
            -
                            @os_requirements = @init_data[:os_requirements]
         
     | 
| 
       139 
     | 
    
         
            -
                        end
         
     | 
| 
       140 
     | 
    
         
            -
                    end
         
     | 
| 
      
 3 
     | 
    
         
            +
              ### Module Constants
         
     | 
| 
      
 4 
     | 
    
         
            +
              #####################################
         
     | 
| 
       141 
5 
     | 
    
         | 
| 
      
 6 
     | 
    
         
            +
              ### Module Variables
         
     | 
| 
      
 7 
     | 
    
         
            +
              #####################################
         
     | 
| 
       142 
8 
     | 
    
         | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
      
 9 
     | 
    
         
            +
              ### Module Methods
         
     | 
| 
      
 10 
     | 
    
         
            +
              #####################################
         
     | 
| 
       145 
11 
     | 
    
         | 
| 
      
 12 
     | 
    
         
            +
              ### Classes
         
     | 
| 
      
 13 
     | 
    
         
            +
              #####################################
         
     | 
| 
       146 
14 
     | 
    
         | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       152 
     | 
    
         
            -
                    #
         
     | 
| 
       153 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       154 
     | 
    
         
            -
                    #
         
     | 
| 
       155 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       156 
     | 
    
         
            -
                    def uri=(newvalue)
         
     | 
| 
      
 15 
     | 
    
         
            +
              ### Printer object inside JSS
         
     | 
| 
      
 16 
     | 
    
         
            +
              ###
         
     | 
| 
      
 17 
     | 
    
         
            +
              ### @see Jamf::APIObject
         
     | 
| 
      
 18 
     | 
    
         
            +
              class Printer < Jamf::APIObject
         
     | 
| 
       157 
19 
     | 
    
         | 
| 
       158 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
                ## Mix-Ins
         
     | 
| 
      
 21 
     | 
    
         
            +
                #####################################
         
     | 
| 
      
 22 
     | 
    
         
            +
                include Jamf::Creatable
         
     | 
| 
      
 23 
     | 
    
         
            +
                include Jamf::Updatable
         
     | 
| 
      
 24 
     | 
    
         
            +
                include Jamf::Categorizable
         
     | 
| 
       159 
25 
     | 
    
         | 
| 
       160 
     | 
    
         
            -
             
     | 
| 
      
 26 
     | 
    
         
            +
                ## Class Constants
         
     | 
| 
      
 27 
     | 
    
         
            +
                #####################################
         
     | 
| 
       161 
28 
     | 
    
         | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
             
     | 
| 
      
 29 
     | 
    
         
            +
                ### The base for REST resources of this class
         
     | 
| 
      
 30 
     | 
    
         
            +
                RSRC_BASE = 'printers'.freeze
         
     | 
| 
       164 
31 
     | 
    
         | 
| 
      
 32 
     | 
    
         
            +
                ### the hash key used for the JSON list output of all objects in the JSS
         
     | 
| 
      
 33 
     | 
    
         
            +
                RSRC_LIST_KEY = :printers
         
     | 
| 
       165 
34 
     | 
    
         | 
| 
       166 
     | 
    
         
            -
             
     | 
| 
       167 
     | 
    
         
            -
             
     | 
| 
       168 
     | 
    
         
            -
             
     | 
| 
       169 
     | 
    
         
            -
                    #
         
     | 
| 
       170 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       171 
     | 
    
         
            -
                    #
         
     | 
| 
       172 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       173 
     | 
    
         
            -
                    #
         
     | 
| 
       174 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       175 
     | 
    
         
            -
                    def CUPS_name=(newvalue)
         
     | 
| 
      
 35 
     | 
    
         
            +
                ### The hash key used for the JSON object output
         
     | 
| 
      
 36 
     | 
    
         
            +
                ### It's also used in various error messages
         
     | 
| 
      
 37 
     | 
    
         
            +
                RSRC_OBJECT_KEY = :printer
         
     | 
| 
       176 
38 
     | 
    
         | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Where is the Category in the API JSON?
         
     | 
| 
      
 40 
     | 
    
         
            +
                CATEGORY_SUBSET = :top
         
     | 
| 
       178 
41 
     | 
    
         | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
      
 42 
     | 
    
         
            +
                # How is the category stored in the API data?
         
     | 
| 
      
 43 
     | 
    
         
            +
                CATEGORY_DATA_TYPE = String
         
     | 
| 
       180 
44 
     | 
    
         | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
      
 45 
     | 
    
         
            +
                ## Attributes
         
     | 
| 
      
 46 
     | 
    
         
            +
                #####################################
         
     | 
| 
       183 
47 
     | 
    
         | 
| 
      
 48 
     | 
    
         
            +
                ### @return [String] The URI path for the specific printer.
         
     | 
| 
      
 49 
     | 
    
         
            +
                attr_reader :uri
         
     | 
| 
       184 
50 
     | 
    
         | 
| 
       185 
     | 
    
         
            -
             
     | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       188 
     | 
    
         
            -
                    #
         
     | 
| 
       189 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       190 
     | 
    
         
            -
                    #
         
     | 
| 
       191 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       192 
     | 
    
         
            -
                    #
         
     | 
| 
       193 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       194 
     | 
    
         
            -
                    def location=(newvalue)
         
     | 
| 
      
 51 
     | 
    
         
            +
                ### @return [String] The CUPs name to be used
         
     | 
| 
      
 52 
     | 
    
         
            +
                attr_reader :CUPS_name
         
     | 
| 
       195 
53 
     | 
    
         | 
| 
       196 
     | 
    
         
            -
             
     | 
| 
      
 54 
     | 
    
         
            +
                ### @return [String] The physical location of the printer.
         
     | 
| 
      
 55 
     | 
    
         
            +
                attr_reader :location
         
     | 
| 
       197 
56 
     | 
    
         | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
      
 57 
     | 
    
         
            +
                ### @return [String] The specific model of printer.
         
     | 
| 
      
 58 
     | 
    
         
            +
                attr_reader :model
         
     | 
| 
       199 
59 
     | 
    
         | 
| 
       200 
     | 
    
         
            -
             
     | 
| 
       201 
     | 
    
         
            -
             
     | 
| 
      
 60 
     | 
    
         
            +
                ### @return [Boolean] Is this printer to be shared?
         
     | 
| 
      
 61 
     | 
    
         
            +
                attr_reader :shared
         
     | 
| 
       202 
62 
     | 
    
         | 
| 
      
 63 
     | 
    
         
            +
                ### @return [String] Information for this specific printer.
         
     | 
| 
      
 64 
     | 
    
         
            +
                attr_reader :info
         
     | 
| 
       203 
65 
     | 
    
         | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
             
     | 
| 
       206 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       207 
     | 
    
         
            -
                    #
         
     | 
| 
       208 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       209 
     | 
    
         
            -
                    #
         
     | 
| 
       210 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       211 
     | 
    
         
            -
                    #
         
     | 
| 
       212 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       213 
     | 
    
         
            -
                    def model=(newvalue)
         
     | 
| 
      
 66 
     | 
    
         
            +
                ### @return [String] Notes for this specific printer.
         
     | 
| 
      
 67 
     | 
    
         
            +
                attr_reader :notes
         
     | 
| 
       214 
68 
     | 
    
         | 
| 
       215 
     | 
    
         
            -
             
     | 
| 
      
 69 
     | 
    
         
            +
                ### @return [Boolean] Make this printer as the default printer upon installation.
         
     | 
| 
      
 70 
     | 
    
         
            +
                attr_reader :make_default
         
     | 
| 
       216 
71 
     | 
    
         | 
| 
       217 
     | 
    
         
            -
             
     | 
| 
      
 72 
     | 
    
         
            +
                ### @return [Boolean] Use a generic PPD.
         
     | 
| 
      
 73 
     | 
    
         
            +
                attr_reader :use_generic
         
     | 
| 
       218 
74 
     | 
    
         | 
| 
       219 
     | 
    
         
            -
             
     | 
| 
       220 
     | 
    
         
            -
             
     | 
| 
      
 75 
     | 
    
         
            +
                ### @return [String] The PPD file name.
         
     | 
| 
      
 76 
     | 
    
         
            +
                attr_reader :ppd
         
     | 
| 
       221 
77 
     | 
    
         | 
| 
      
 78 
     | 
    
         
            +
                ### @return [String] The contents of the PPD file.
         
     | 
| 
      
 79 
     | 
    
         
            +
                attr_reader :ppd_contents
         
     | 
| 
       222 
80 
     | 
    
         | 
| 
       223 
     | 
    
         
            -
             
     | 
| 
       224 
     | 
    
         
            -
             
     | 
| 
       225 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       226 
     | 
    
         
            -
                    #
         
     | 
| 
       227 
     | 
    
         
            -
                    # @param newvalue [Boolean]
         
     | 
| 
       228 
     | 
    
         
            -
                    #
         
     | 
| 
       229 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
       230 
     | 
    
         
            -
                    #
         
     | 
| 
       231 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       232 
     | 
    
         
            -
                    def shared=(newvalue)
         
     | 
| 
      
 81 
     | 
    
         
            +
                ### @return [String] The path the PPD file will be installed.
         
     | 
| 
      
 82 
     | 
    
         
            +
                attr_reader :ppd_path
         
     | 
| 
       233 
83 
     | 
    
         | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
      
 84 
     | 
    
         
            +
                ### @return [String] The OS version requirements seperated by commas
         
     | 
| 
      
 85 
     | 
    
         
            +
                attr_reader :os_requirements
         
     | 
| 
       235 
86 
     | 
    
         | 
| 
       236 
     | 
    
         
            -
             
     | 
| 
      
 87 
     | 
    
         
            +
                ## Constructor
         
     | 
| 
      
 88 
     | 
    
         
            +
                #####################################
         
     | 
| 
       237 
89 
     | 
    
         | 
| 
       238 
     | 
    
         
            -
             
     | 
| 
      
 90 
     | 
    
         
            +
                ###
         
     | 
| 
      
 91 
     | 
    
         
            +
                def initialize(**args)
         
     | 
| 
      
 92 
     | 
    
         
            +
                  super
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
                  if in_jss?
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                    @uri = @init_data[:uri]
         
     | 
| 
      
 97 
     | 
    
         
            +
                    @CUPS_name = @init_data[:CUPS_name]
         
     | 
| 
      
 98 
     | 
    
         
            +
                    @location = @init_data[:location]
         
     | 
| 
      
 99 
     | 
    
         
            +
                    @model = @init_data[:model]
         
     | 
| 
      
 100 
     | 
    
         
            +
                    @shared = @init_data[:shared]
         
     | 
| 
      
 101 
     | 
    
         
            +
                    @info = @init_data[:info]
         
     | 
| 
      
 102 
     | 
    
         
            +
                    @notes = @init_data[:notes]
         
     | 
| 
      
 103 
     | 
    
         
            +
                    @make_default = @init_data[:make_default]
         
     | 
| 
      
 104 
     | 
    
         
            +
                    @use_generic = @init_data[:use_generic]
         
     | 
| 
      
 105 
     | 
    
         
            +
                    @ppd = @init_data[:ppd]
         
     | 
| 
      
 106 
     | 
    
         
            +
                    @ppd_contents = @init_data[:ppd_contents]
         
     | 
| 
      
 107 
     | 
    
         
            +
                    @ppd_path = @init_data[:ppd_path]
         
     | 
| 
      
 108 
     | 
    
         
            +
                    @os_requirements = @init_data[:os_requirements]
         
     | 
| 
      
 109 
     | 
    
         
            +
                  else
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                    raise Jamf::MissingDataError, 'CUPS_name must be provided.' if @init_data[:CUPS_name].nil?
         
     | 
| 
      
 112 
     | 
    
         
            +
                    raise Jamf::MissingDataError, 'uri must be provided.' if @init_data[:uri].nil?
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'uri must be a String.' unless @init_data[:uri].is_a?(String) || @init_data[:uri].nil?
         
     | 
| 
      
 115 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'CUPS_name must be a String.' unless @init_data[:CUPS_name].is_a?(String)
         
     | 
| 
      
 116 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'location must be a String.' unless @init_data[:location].is_a?(String) || @init_data[:location].nil?
         
     | 
| 
      
 117 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'model must be a String.' unless @init_data[:model].is_a?(String) || @init_data[:model].nil?
         
     | 
| 
      
 118 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'info must be a String.' unless @init_data[:info].is_a?(String) || @init_data[:info].nil?
         
     | 
| 
      
 119 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'notes must be a String.' unless @init_data[:notes].is_a?(String) || @init_data[:notes].nil?
         
     | 
| 
      
 120 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'ppd must be a String.' unless @init_data[:ppd].is_a?(String) || @init_data[:ppd].nil?
         
     | 
| 
      
 121 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'ppd_contents must be a String.' unless @init_data[:ppd_contents].is_a?(String) || @init_data[:ppd_contents].nil?
         
     | 
| 
      
 122 
     | 
    
         
            +
                    raise Jamf::InvalidDataError, 'ppd_path must be a String.' unless @init_data[:ppd_path].is_a?(String) || @init_data[:ppd_path].nil?
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
                    unless @init_data[:os_requirements].is_a?(String) || @init_data[:os_requirements].nil?
         
     | 
| 
      
 125 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 126 
     | 
    
         
            +
                            'os_requirements must be a String.'
         
     | 
| 
       239 
127 
     | 
    
         
             
                    end
         
     | 
| 
       240 
     | 
    
         
            -
             
     | 
| 
       241 
     | 
    
         
            -
             
     | 
| 
       242 
     | 
    
         
            -
             
     | 
| 
       243 
     | 
    
         
            -
                    #
         
     | 
| 
       244 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       245 
     | 
    
         
            -
                    #
         
     | 
| 
       246 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       247 
     | 
    
         
            -
                    #
         
     | 
| 
       248 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       249 
     | 
    
         
            -
                    #
         
     | 
| 
       250 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       251 
     | 
    
         
            -
                    def info=(newvalue)
         
     | 
| 
       252 
     | 
    
         
            -
             
     | 
| 
       253 
     | 
    
         
            -
                        raise Jamf::InvalidDataError, "info must be a string." unless newvalue.is_a? String
         
     | 
| 
       254 
     | 
    
         
            -
             
     | 
| 
       255 
     | 
    
         
            -
                        @info = newvalue
         
     | 
| 
       256 
     | 
    
         
            -
             
     | 
| 
       257 
     | 
    
         
            -
                        @need_to_update = true
         
     | 
| 
      
 128 
     | 
    
         
            +
                    unless (@init_data[:shared].is_a?(TrueClass) || @init_data[:shared].is_a?(FalseClass)) || @init_data[:shared].nil?
         
     | 
| 
      
 129 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 130 
     | 
    
         
            +
                            'shared must be a String.'
         
     | 
| 
       258 
131 
     | 
    
         
             
                    end
         
     | 
| 
       259 
     | 
    
         
            -
             
     | 
| 
       260 
     | 
    
         
            -
             
     | 
| 
       261 
     | 
    
         
            -
             
     | 
| 
       262 
     | 
    
         
            -
                    #
         
     | 
| 
       263 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       264 
     | 
    
         
            -
                    #
         
     | 
| 
       265 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       266 
     | 
    
         
            -
                    #
         
     | 
| 
       267 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       268 
     | 
    
         
            -
                    #
         
     | 
| 
       269 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       270 
     | 
    
         
            -
                    def notes=(newvalue)
         
     | 
| 
       271 
     | 
    
         
            -
             
     | 
| 
       272 
     | 
    
         
            -
                        raise Jamf::InvalidDataError, "notes must be a string." unless newvalue.is_a? String
         
     | 
| 
       273 
     | 
    
         
            -
             
     | 
| 
       274 
     | 
    
         
            -
                        @notes = newvalue
         
     | 
| 
       275 
     | 
    
         
            -
             
     | 
| 
       276 
     | 
    
         
            -
                        @need_to_update = true
         
     | 
| 
      
 132 
     | 
    
         
            +
                    unless (@init_data[:make_default].is_a?(TrueClass) || @init_data[:make_default].is_a?(FalseClass)) || @init_data[:make_default].nil?
         
     | 
| 
      
 133 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 134 
     | 
    
         
            +
                            'make_default must be a String.'
         
     | 
| 
       277 
135 
     | 
    
         
             
                    end
         
     | 
| 
       278 
     | 
    
         
            -
             
     | 
| 
       279 
     | 
    
         
            -
             
     | 
| 
       280 
     | 
    
         
            -
             
     | 
| 
       281 
     | 
    
         
            -
                    #
         
     | 
| 
       282 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       283 
     | 
    
         
            -
                    #
         
     | 
| 
       284 
     | 
    
         
            -
                    # @param newvalue [Boolean]
         
     | 
| 
       285 
     | 
    
         
            -
                    #
         
     | 
| 
       286 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
       287 
     | 
    
         
            -
                    #
         
     | 
| 
       288 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       289 
     | 
    
         
            -
                    def make_default=(newvalue)
         
     | 
| 
       290 
     | 
    
         
            -
             
     | 
| 
       291 
     | 
    
         
            -
                        raise Jamf::InvalidDataError, "make_default must be a string." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
         
     | 
| 
       292 
     | 
    
         
            -
             
     | 
| 
       293 
     | 
    
         
            -
                        @make_default = newvalue
         
     | 
| 
       294 
     | 
    
         
            -
             
     | 
| 
       295 
     | 
    
         
            -
                        @need_to_update = true
         
     | 
| 
      
 136 
     | 
    
         
            +
                    unless (@init_data[:use_generic].is_a?(TrueClass) || @init_data[:use_generic].is_a?(FalseClass)) || @init_data[:use_generic].nil?
         
     | 
| 
      
 137 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 138 
     | 
    
         
            +
                            'use_generic must be a String.'
         
     | 
| 
       296 
139 
     | 
    
         
             
                    end
         
     | 
| 
       297 
140 
     | 
    
         | 
| 
      
 141 
     | 
    
         
            +
                    @uri = @init_data[:uri]
         
     | 
| 
      
 142 
     | 
    
         
            +
                    @CUPS_name = @init_data[:CUPS_name]
         
     | 
| 
      
 143 
     | 
    
         
            +
                    @location = @init_data[:location]
         
     | 
| 
      
 144 
     | 
    
         
            +
                    @model = @init_data[:model]
         
     | 
| 
      
 145 
     | 
    
         
            +
                    @shared = @init_data[:shared]
         
     | 
| 
      
 146 
     | 
    
         
            +
                    @info = @init_data[:info]
         
     | 
| 
      
 147 
     | 
    
         
            +
                    @notes = @init_data[:notes]
         
     | 
| 
      
 148 
     | 
    
         
            +
                    @make_default = @init_data[:make_default]
         
     | 
| 
      
 149 
     | 
    
         
            +
                    @use_generic = @init_data[:use_generic]
         
     | 
| 
      
 150 
     | 
    
         
            +
                    @ppd = @init_data[:ppd]
         
     | 
| 
      
 151 
     | 
    
         
            +
                    @ppd_contents = @init_data[:ppd_contents]
         
     | 
| 
      
 152 
     | 
    
         
            +
                    @ppd_path = @init_data[:ppd_path]
         
     | 
| 
      
 153 
     | 
    
         
            +
                    @os_requirements = @init_data[:os_requirements]
         
     | 
| 
      
 154 
     | 
    
         
            +
                  end
         
     | 
| 
      
 155 
     | 
    
         
            +
                end
         
     | 
| 
       298 
156 
     | 
    
         | 
| 
       299 
     | 
    
         
            -
             
     | 
| 
       300 
     | 
    
         
            -
             
     | 
| 
       301 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       302 
     | 
    
         
            -
                    #
         
     | 
| 
       303 
     | 
    
         
            -
                    # @param newvalue [Boolean]
         
     | 
| 
       304 
     | 
    
         
            -
                    #
         
     | 
| 
       305 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
       306 
     | 
    
         
            -
                    #
         
     | 
| 
       307 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       308 
     | 
    
         
            -
                    def use_generic=(newvalue)
         
     | 
| 
      
 157 
     | 
    
         
            +
                ## Class Methods
         
     | 
| 
      
 158 
     | 
    
         
            +
                #####################################
         
     | 
| 
       309 
159 
     | 
    
         | 
| 
       310 
     | 
    
         
            -
             
     | 
| 
      
 160 
     | 
    
         
            +
                # The URI path for the specific printer.
         
     | 
| 
      
 161 
     | 
    
         
            +
                #
         
     | 
| 
      
 162 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 163 
     | 
    
         
            +
                #
         
     | 
| 
      
 164 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 165 
     | 
    
         
            +
                #
         
     | 
| 
      
 166 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 167 
     | 
    
         
            +
                #
         
     | 
| 
      
 168 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 169 
     | 
    
         
            +
                def uri=(newvalue)
         
     | 
| 
      
 170 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'URI must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
                  @uri = newvalue
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 175 
     | 
    
         
            +
                end
         
     | 
| 
       311 
176 
     | 
    
         | 
| 
       312 
     | 
    
         
            -
             
     | 
| 
      
 177 
     | 
    
         
            +
                # The CUPs name to be used
         
     | 
| 
      
 178 
     | 
    
         
            +
                #
         
     | 
| 
      
 179 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 180 
     | 
    
         
            +
                #
         
     | 
| 
      
 181 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 182 
     | 
    
         
            +
                #
         
     | 
| 
      
 183 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 184 
     | 
    
         
            +
                #
         
     | 
| 
      
 185 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 186 
     | 
    
         
            +
                def CUPS_name=(newvalue)
         
     | 
| 
      
 187 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'CUPS_name must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 188 
     | 
    
         
            +
             
     | 
| 
      
 189 
     | 
    
         
            +
                  @CUPS_name = newvalue
         
     | 
| 
      
 190 
     | 
    
         
            +
             
     | 
| 
      
 191 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 192 
     | 
    
         
            +
                end
         
     | 
| 
       313 
193 
     | 
    
         | 
| 
       314 
     | 
    
         
            -
             
     | 
| 
       315 
     | 
    
         
            -
             
     | 
| 
      
 194 
     | 
    
         
            +
                # The physical location of the printer.
         
     | 
| 
      
 195 
     | 
    
         
            +
                #
         
     | 
| 
      
 196 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 197 
     | 
    
         
            +
                #
         
     | 
| 
      
 198 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 199 
     | 
    
         
            +
                #
         
     | 
| 
      
 200 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 201 
     | 
    
         
            +
                #
         
     | 
| 
      
 202 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 203 
     | 
    
         
            +
                def location=(newvalue)
         
     | 
| 
      
 204 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'location must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 205 
     | 
    
         
            +
             
     | 
| 
      
 206 
     | 
    
         
            +
                  @location = newvalue
         
     | 
| 
      
 207 
     | 
    
         
            +
             
     | 
| 
      
 208 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 209 
     | 
    
         
            +
                end
         
     | 
| 
       316 
210 
     | 
    
         | 
| 
      
 211 
     | 
    
         
            +
                # The specific model of printer.
         
     | 
| 
      
 212 
     | 
    
         
            +
                #
         
     | 
| 
      
 213 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 214 
     | 
    
         
            +
                #
         
     | 
| 
      
 215 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 216 
     | 
    
         
            +
                #
         
     | 
| 
      
 217 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 218 
     | 
    
         
            +
                #
         
     | 
| 
      
 219 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 220 
     | 
    
         
            +
                def model=(newvalue)
         
     | 
| 
      
 221 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'model must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
      
 223 
     | 
    
         
            +
                  @model = newvalue
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 226 
     | 
    
         
            +
                end
         
     | 
| 
       317 
227 
     | 
    
         | 
| 
       318 
     | 
    
         
            -
             
     | 
| 
       319 
     | 
    
         
            -
             
     | 
| 
       320 
     | 
    
         
            -
             
     | 
| 
       321 
     | 
    
         
            -
             
     | 
| 
       322 
     | 
    
         
            -
             
     | 
| 
       323 
     | 
    
         
            -
             
     | 
| 
       324 
     | 
    
         
            -
             
     | 
| 
       325 
     | 
    
         
            -
             
     | 
| 
       326 
     | 
    
         
            -
             
     | 
| 
       327 
     | 
    
         
            -
             
     | 
| 
      
 228 
     | 
    
         
            +
                # Is this printer to be shared?
         
     | 
| 
      
 229 
     | 
    
         
            +
                #
         
     | 
| 
      
 230 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 231 
     | 
    
         
            +
                #
         
     | 
| 
      
 232 
     | 
    
         
            +
                # @param newvalue [Boolean]
         
     | 
| 
      
 233 
     | 
    
         
            +
                #
         
     | 
| 
      
 234 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
      
 235 
     | 
    
         
            +
                #
         
     | 
| 
      
 236 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 237 
     | 
    
         
            +
                def shared=(newvalue)
         
     | 
| 
      
 238 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'shared must be a string.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
                  @shared = newvalue
         
     | 
| 
      
 241 
     | 
    
         
            +
             
     | 
| 
      
 242 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 243 
     | 
    
         
            +
                end
         
     | 
| 
       328 
244 
     | 
    
         | 
| 
       329 
     | 
    
         
            -
             
     | 
| 
      
 245 
     | 
    
         
            +
                # Information for this specific printer.
         
     | 
| 
      
 246 
     | 
    
         
            +
                #
         
     | 
| 
      
 247 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 248 
     | 
    
         
            +
                #
         
     | 
| 
      
 249 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 250 
     | 
    
         
            +
                #
         
     | 
| 
      
 251 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 252 
     | 
    
         
            +
                #
         
     | 
| 
      
 253 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 254 
     | 
    
         
            +
                def info=(newvalue)
         
     | 
| 
      
 255 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'info must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 256 
     | 
    
         
            +
             
     | 
| 
      
 257 
     | 
    
         
            +
                  @info = newvalue
         
     | 
| 
      
 258 
     | 
    
         
            +
             
     | 
| 
      
 259 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 260 
     | 
    
         
            +
                end
         
     | 
| 
       330 
261 
     | 
    
         | 
| 
       331 
     | 
    
         
            -
             
     | 
| 
      
 262 
     | 
    
         
            +
                # Notes for this specific printer.
         
     | 
| 
      
 263 
     | 
    
         
            +
                #
         
     | 
| 
      
 264 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 265 
     | 
    
         
            +
                #
         
     | 
| 
      
 266 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 267 
     | 
    
         
            +
                #
         
     | 
| 
      
 268 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 269 
     | 
    
         
            +
                #
         
     | 
| 
      
 270 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 271 
     | 
    
         
            +
                def notes=(newvalue)
         
     | 
| 
      
 272 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'notes must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 273 
     | 
    
         
            +
             
     | 
| 
      
 274 
     | 
    
         
            +
                  @notes = newvalue
         
     | 
| 
      
 275 
     | 
    
         
            +
             
     | 
| 
      
 276 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 277 
     | 
    
         
            +
                end
         
     | 
| 
       332 
278 
     | 
    
         | 
| 
       333 
     | 
    
         
            -
             
     | 
| 
       334 
     | 
    
         
            -
             
     | 
| 
      
 279 
     | 
    
         
            +
                # Make this printer as the default printer upon installation.
         
     | 
| 
      
 280 
     | 
    
         
            +
                #
         
     | 
| 
      
 281 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 282 
     | 
    
         
            +
                #
         
     | 
| 
      
 283 
     | 
    
         
            +
                # @param newvalue [Boolean]
         
     | 
| 
      
 284 
     | 
    
         
            +
                #
         
     | 
| 
      
 285 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
      
 286 
     | 
    
         
            +
                #
         
     | 
| 
      
 287 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 288 
     | 
    
         
            +
                def make_default=(newvalue)
         
     | 
| 
      
 289 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'make_default must be a string.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
         
     | 
| 
      
 290 
     | 
    
         
            +
             
     | 
| 
      
 291 
     | 
    
         
            +
                  @make_default = newvalue
         
     | 
| 
      
 292 
     | 
    
         
            +
             
     | 
| 
      
 293 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 294 
     | 
    
         
            +
                end
         
     | 
| 
       335 
295 
     | 
    
         | 
| 
      
 296 
     | 
    
         
            +
                # Use a generic PPD.
         
     | 
| 
      
 297 
     | 
    
         
            +
                #
         
     | 
| 
      
 298 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 299 
     | 
    
         
            +
                #
         
     | 
| 
      
 300 
     | 
    
         
            +
                # @param newvalue [Boolean]
         
     | 
| 
      
 301 
     | 
    
         
            +
                #
         
     | 
| 
      
 302 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a Boolean
         
     | 
| 
      
 303 
     | 
    
         
            +
                #
         
     | 
| 
      
 304 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 305 
     | 
    
         
            +
                def use_generic=(newvalue)
         
     | 
| 
      
 306 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'use_generic must be a string.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
         
     | 
| 
      
 307 
     | 
    
         
            +
             
     | 
| 
      
 308 
     | 
    
         
            +
                  @use_generic = newvalue
         
     | 
| 
      
 309 
     | 
    
         
            +
             
     | 
| 
      
 310 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 311 
     | 
    
         
            +
                end
         
     | 
| 
       336 
312 
     | 
    
         | 
| 
       337 
     | 
    
         
            -
             
     | 
| 
       338 
     | 
    
         
            -
             
     | 
| 
       339 
     | 
    
         
            -
             
     | 
| 
       340 
     | 
    
         
            -
             
     | 
| 
       341 
     | 
    
         
            -
             
     | 
| 
       342 
     | 
    
         
            -
             
     | 
| 
       343 
     | 
    
         
            -
             
     | 
| 
       344 
     | 
    
         
            -
             
     | 
| 
       345 
     | 
    
         
            -
             
     | 
| 
       346 
     | 
    
         
            -
             
     | 
| 
      
 313 
     | 
    
         
            +
                # The PPD file name.
         
     | 
| 
      
 314 
     | 
    
         
            +
                #
         
     | 
| 
      
 315 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 316 
     | 
    
         
            +
                #
         
     | 
| 
      
 317 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 318 
     | 
    
         
            +
                #
         
     | 
| 
      
 319 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 320 
     | 
    
         
            +
                #
         
     | 
| 
      
 321 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 322 
     | 
    
         
            +
                def ppd=(newvalue)
         
     | 
| 
      
 323 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'ppd must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 324 
     | 
    
         
            +
             
     | 
| 
      
 325 
     | 
    
         
            +
                  @ppd = newvalue
         
     | 
| 
      
 326 
     | 
    
         
            +
             
     | 
| 
      
 327 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 328 
     | 
    
         
            +
                end
         
     | 
| 
       347 
329 
     | 
    
         | 
| 
       348 
     | 
    
         
            -
             
     | 
| 
      
 330 
     | 
    
         
            +
                # The contents of the PPD file.
         
     | 
| 
      
 331 
     | 
    
         
            +
                #
         
     | 
| 
      
 332 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 333 
     | 
    
         
            +
                #
         
     | 
| 
      
 334 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 335 
     | 
    
         
            +
                #
         
     | 
| 
      
 336 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 337 
     | 
    
         
            +
                #
         
     | 
| 
      
 338 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 339 
     | 
    
         
            +
                def ppd_contents=(newvalue)
         
     | 
| 
      
 340 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'ppd_contents must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 341 
     | 
    
         
            +
             
     | 
| 
      
 342 
     | 
    
         
            +
                  @ppd_contents = newvalue
         
     | 
| 
      
 343 
     | 
    
         
            +
             
     | 
| 
      
 344 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 345 
     | 
    
         
            +
                end
         
     | 
| 
       349 
346 
     | 
    
         | 
| 
       350 
     | 
    
         
            -
             
     | 
| 
      
 347 
     | 
    
         
            +
                # The path the PPD file will be installed.
         
     | 
| 
      
 348 
     | 
    
         
            +
                #
         
     | 
| 
      
 349 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 350 
     | 
    
         
            +
                #
         
     | 
| 
      
 351 
     | 
    
         
            +
                # @param newvalue [String]
         
     | 
| 
      
 352 
     | 
    
         
            +
                #
         
     | 
| 
      
 353 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
      
 354 
     | 
    
         
            +
                #
         
     | 
| 
      
 355 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 356 
     | 
    
         
            +
                def ppd_path=(newvalue)
         
     | 
| 
      
 357 
     | 
    
         
            +
                  raise Jamf::InvalidDataError, 'ppd_path must be a string.' unless newvalue.is_a? String
         
     | 
| 
      
 358 
     | 
    
         
            +
             
     | 
| 
      
 359 
     | 
    
         
            +
                  @ppd_path = newvalue
         
     | 
| 
      
 360 
     | 
    
         
            +
             
     | 
| 
      
 361 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 362 
     | 
    
         
            +
                end
         
     | 
| 
       351 
363 
     | 
    
         | 
| 
       352 
     | 
    
         
            -
             
     | 
| 
      
 364 
     | 
    
         
            +
                # The OS version requirements seperated by commas
         
     | 
| 
      
 365 
     | 
    
         
            +
                #
         
     | 
| 
      
 366 
     | 
    
         
            +
                # @author Tyler Morgan
         
     | 
| 
      
 367 
     | 
    
         
            +
                #
         
     | 
| 
      
 368 
     | 
    
         
            +
                # @param newvalue [String, Float, Array[String], Array[Float]]
         
     | 
| 
      
 369 
     | 
    
         
            +
                #
         
     | 
| 
      
 370 
     | 
    
         
            +
                # @raise [Jamf::InvalidDataError] If newvalue is not a String, Float, Array containing Strings, or Array containing Floats.
         
     | 
| 
      
 371 
     | 
    
         
            +
                #
         
     | 
| 
      
 372 
     | 
    
         
            +
                # @example Limit Printer object to only High Sierra devices and Mojave 10.14.5 OS versions
         
     | 
| 
      
 373 
     | 
    
         
            +
                #   printer.os_requirements = "10.13.x, 10.14.5"
         
     | 
| 
      
 374 
     | 
    
         
            +
                #
         
     | 
| 
      
 375 
     | 
    
         
            +
                # @return [void]
         
     | 
| 
      
 376 
     | 
    
         
            +
                def os_requirements=(newvalue)
         
     | 
| 
      
 377 
     | 
    
         
            +
                  if newvalue.is_a? Array
         
     | 
| 
      
 378 
     | 
    
         
            +
                    # Parse Array
         
     | 
| 
      
 379 
     | 
    
         
            +
                    unless newvalue[0].is_a?(String) || newvalue[0].is_a?(Float)
         
     | 
| 
      
 380 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 381 
     | 
    
         
            +
                            'If setting os_requirements with an array, it must contain strings or floats.'
         
     | 
| 
       353 
382 
     | 
    
         
             
                    end
         
     | 
| 
       354 
383 
     | 
    
         | 
| 
       355 
     | 
    
         
            -
             
     | 
| 
       356 
     | 
    
         
            -
             
     | 
| 
       357 
     | 
    
         
            -
                     
     | 
| 
       358 
     | 
    
         
            -
             
     | 
| 
       359 
     | 
    
         
            -
             
     | 
| 
       360 
     | 
    
         
            -
                    # @param newvalue [String]
         
     | 
| 
       361 
     | 
    
         
            -
                    #
         
     | 
| 
       362 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String
         
     | 
| 
       363 
     | 
    
         
            -
                    #
         
     | 
| 
       364 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       365 
     | 
    
         
            -
                    def ppd_path=(newvalue)
         
     | 
| 
       366 
     | 
    
         
            -
             
     | 
| 
       367 
     | 
    
         
            -
                        raise Jamf::InvalidDataError, "ppd_path must be a string." unless newvalue.is_a? String
         
     | 
| 
       368 
     | 
    
         
            -
             
     | 
| 
       369 
     | 
    
         
            -
                        @ppd_path = newvalue
         
     | 
| 
       370 
     | 
    
         
            -
             
     | 
| 
       371 
     | 
    
         
            -
                        @need_to_update = true
         
     | 
| 
      
 384 
     | 
    
         
            +
                    newvalue = newvalue.map { |x| x.to_s }.join(',')
         
     | 
| 
      
 385 
     | 
    
         
            +
                  else
         
     | 
| 
      
 386 
     | 
    
         
            +
                    unless (newvalue.is_a?(String) || newvalue.is_a?(Float)) && !newvalue.nil?
         
     | 
| 
      
 387 
     | 
    
         
            +
                      raise Jamf::InvalidDataError,
         
     | 
| 
      
 388 
     | 
    
         
            +
                            'os_requirements must either be a string, float, or an array containing strings or floats.'
         
     | 
| 
       372 
389 
     | 
    
         
             
                    end
         
     | 
| 
      
 390 
     | 
    
         
            +
                  end
         
     | 
| 
       373 
391 
     | 
    
         | 
| 
      
 392 
     | 
    
         
            +
                  @os_requirements = newvalue
         
     | 
| 
       374 
393 
     | 
    
         | 
| 
       375 
     | 
    
         
            -
             
     | 
| 
       376 
     | 
    
         
            -
             
     | 
| 
       377 
     | 
    
         
            -
                    # @author Tyler Morgan
         
     | 
| 
       378 
     | 
    
         
            -
                    #
         
     | 
| 
       379 
     | 
    
         
            -
                    # @param newvalue [String, Float, Array[String], Array[Float]]
         
     | 
| 
       380 
     | 
    
         
            -
                    #
         
     | 
| 
       381 
     | 
    
         
            -
                    # @raise [Jamf::InvalidDataError] If newvalue is not a String, Float, Array containing Strings, or Array containing Floats.
         
     | 
| 
       382 
     | 
    
         
            -
                    #
         
     | 
| 
       383 
     | 
    
         
            -
                    # @example Limit Printer object to only High Sierra devices and Mojave 10.14.5 OS versions
         
     | 
| 
       384 
     | 
    
         
            -
                    #   printer.os_requirements = "10.13.x, 10.14.5"
         
     | 
| 
       385 
     | 
    
         
            -
                    #
         
     | 
| 
       386 
     | 
    
         
            -
                    # @return [void]
         
     | 
| 
       387 
     | 
    
         
            -
                    def os_requirements=(newvalue)
         
     | 
| 
       388 
     | 
    
         
            -
             
     | 
| 
       389 
     | 
    
         
            -
                        if newvalue.is_a? Array
         
     | 
| 
       390 
     | 
    
         
            -
                            # Parse Array
         
     | 
| 
       391 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "If setting os_requirements with an array, it must contain strings or floats." unless newvalue[0].is_a?(String) || newvalue[0].is_a?(Float)
         
     | 
| 
       392 
     | 
    
         
            -
                            newvalue = newvalue.map { |x| x.to_s }.join(',')
         
     | 
| 
       393 
     | 
    
         
            -
                        else
         
     | 
| 
       394 
     | 
    
         
            -
                            raise Jamf::InvalidDataError, "os_requirements must either be a string, float, or an array containing strings or floats." unless (newvalue.is_a?(String) || newvalue.is_a?(Float)) && !newvalue.nil?
         
     | 
| 
       395 
     | 
    
         
            -
                        end
         
     | 
| 
       396 
     | 
    
         
            -
             
     | 
| 
       397 
     | 
    
         
            -
                        @os_requirements = newvalue
         
     | 
| 
       398 
     | 
    
         
            -
             
     | 
| 
       399 
     | 
    
         
            -
                        @need_to_update = true
         
     | 
| 
       400 
     | 
    
         
            -
                    end
         
     | 
| 
       401 
     | 
    
         
            -
             
     | 
| 
       402 
     | 
    
         
            -
                    # Remove the various large data
         
     | 
| 
       403 
     | 
    
         
            -
                    # from the instance_variables used to create
         
     | 
| 
       404 
     | 
    
         
            -
                    # pretty-print (pp) output.
         
     | 
| 
       405 
     | 
    
         
            -
                    #
         
     | 
| 
       406 
     | 
    
         
            -
                    # @return [Array] the desired instance_variables
         
     | 
| 
       407 
     | 
    
         
            -
                    #
         
     | 
| 
       408 
     | 
    
         
            -
                    def pretty_print_instance_variables
         
     | 
| 
       409 
     | 
    
         
            -
                      vars = super
         
     | 
| 
       410 
     | 
    
         
            -
                      vars.delete :@ppd_contents
         
     | 
| 
       411 
     | 
    
         
            -
                      vars
         
     | 
| 
       412 
     | 
    
         
            -
                    end
         
     | 
| 
      
 394 
     | 
    
         
            +
                  @need_to_update = true
         
     | 
| 
      
 395 
     | 
    
         
            +
                end
         
     | 
| 
       413 
396 
     | 
    
         | 
| 
      
 397 
     | 
    
         
            +
                # Remove the various large data
         
     | 
| 
      
 398 
     | 
    
         
            +
                # from the instance_variables used to create
         
     | 
| 
      
 399 
     | 
    
         
            +
                # pretty-print (pp) output.
         
     | 
| 
      
 400 
     | 
    
         
            +
                #
         
     | 
| 
      
 401 
     | 
    
         
            +
                # @return [Array] the desired instance_variables
         
     | 
| 
      
 402 
     | 
    
         
            +
                #
         
     | 
| 
      
 403 
     | 
    
         
            +
                def pretty_print_instance_variables
         
     | 
| 
      
 404 
     | 
    
         
            +
                  vars = super
         
     | 
| 
      
 405 
     | 
    
         
            +
                  vars.delete :@ppd_contents
         
     | 
| 
      
 406 
     | 
    
         
            +
                  vars
         
     | 
| 
      
 407 
     | 
    
         
            +
                end
         
     | 
| 
       414 
408 
     | 
    
         | 
| 
       415 
     | 
    
         
            -
             
     | 
| 
       416 
     | 
    
         
            -
             
     | 
| 
       417 
     | 
    
         
            -
             
     | 
| 
       418 
     | 
    
         
            -
             
     | 
| 
       419 
     | 
    
         
            -
                    ### Return the xml for creating or updating this script in the JSS
         
     | 
| 
       420 
     | 
    
         
            -
                    ###
         
     | 
| 
       421 
     | 
    
         
            -
                    def rest_xml
         
     | 
| 
       422 
     | 
    
         
            -
                        doc = REXML::Document.new
         
     | 
| 
       423 
     | 
    
         
            -
                        printer = doc.add_element 'printer'
         
     | 
| 
       424 
     | 
    
         
            -
             
     | 
| 
       425 
     | 
    
         
            -
                        printer.add_element('id').text = @id
         
     | 
| 
       426 
     | 
    
         
            -
                        printer.add_element('name').text = @name
         
     | 
| 
       427 
     | 
    
         
            -
                        printer.add_element('uri').text = @uri
         
     | 
| 
       428 
     | 
    
         
            -
                        printer.add_element('CUPS_name').text = @CUPS_name
         
     | 
| 
       429 
     | 
    
         
            -
                        printer.add_element('location').text = @location
         
     | 
| 
       430 
     | 
    
         
            -
                        printer.add_element('model').text = @model
         
     | 
| 
       431 
     | 
    
         
            -
                        printer.add_element('shared').text = @shared
         
     | 
| 
       432 
     | 
    
         
            -
                        printer.add_element('info').text = @info
         
     | 
| 
       433 
     | 
    
         
            -
                        printer.add_element('notes').text = @notes
         
     | 
| 
       434 
     | 
    
         
            -
                        printer.add_element('make_default').text = @make_default
         
     | 
| 
       435 
     | 
    
         
            -
                        printer.add_element('use_generic').text = @use_generic
         
     | 
| 
       436 
     | 
    
         
            -
                        printer.add_element('ppd').text = @ppd
         
     | 
| 
       437 
     | 
    
         
            -
                        printer.add_element('ppd_contents').text = @ppd_contents
         
     | 
| 
       438 
     | 
    
         
            -
                        printer.add_element('ppd_path').text = @ppd_path
         
     | 
| 
       439 
     | 
    
         
            -
                        printer.add_element('os_requirements').text = @os_requirements
         
     | 
| 
       440 
     | 
    
         
            -
                        add_category_to_xml(doc)
         
     | 
| 
       441 
     | 
    
         
            -
             
     | 
| 
       442 
     | 
    
         
            -
                        doc.to_s
         
     | 
| 
      
 409 
     | 
    
         
            +
                ## Private Instance Methods
         
     | 
| 
      
 410 
     | 
    
         
            +
                #####################################
         
     | 
| 
      
 411 
     | 
    
         
            +
                private
         
     | 
| 
       443 
412 
     | 
    
         | 
| 
       444 
     | 
    
         
            -
             
     | 
| 
      
 413 
     | 
    
         
            +
                ### Return the xml for creating or updating this script in the JSS
         
     | 
| 
      
 414 
     | 
    
         
            +
                ###
         
     | 
| 
      
 415 
     | 
    
         
            +
                def rest_xml
         
     | 
| 
      
 416 
     | 
    
         
            +
                  doc = REXML::Document.new Jamf::Connection::XML_HEADER
         
     | 
| 
      
 417 
     | 
    
         
            +
                  doc.root.name = 'printer'
         
     | 
| 
      
 418 
     | 
    
         
            +
                  printer = doc.root
         
     | 
| 
      
 419 
     | 
    
         
            +
             
     | 
| 
      
 420 
     | 
    
         
            +
                  printer.add_element('id').text = @id
         
     | 
| 
      
 421 
     | 
    
         
            +
                  printer.add_element('name').text = @name
         
     | 
| 
      
 422 
     | 
    
         
            +
                  printer.add_element('uri').text = @uri
         
     | 
| 
      
 423 
     | 
    
         
            +
                  printer.add_element('CUPS_name').text = @CUPS_name
         
     | 
| 
      
 424 
     | 
    
         
            +
                  printer.add_element('location').text = @location
         
     | 
| 
      
 425 
     | 
    
         
            +
                  printer.add_element('model').text = @model
         
     | 
| 
      
 426 
     | 
    
         
            +
                  printer.add_element('shared').text = @shared
         
     | 
| 
      
 427 
     | 
    
         
            +
                  printer.add_element('info').text = @info
         
     | 
| 
      
 428 
     | 
    
         
            +
                  printer.add_element('notes').text = @notes
         
     | 
| 
      
 429 
     | 
    
         
            +
                  printer.add_element('make_default').text = @make_default
         
     | 
| 
      
 430 
     | 
    
         
            +
                  printer.add_element('use_generic').text = @use_generic
         
     | 
| 
      
 431 
     | 
    
         
            +
                  printer.add_element('ppd').text = @ppd
         
     | 
| 
      
 432 
     | 
    
         
            +
                  printer.add_element('ppd_contents').text = @ppd_contents
         
     | 
| 
      
 433 
     | 
    
         
            +
                  printer.add_element('ppd_path').text = @ppd_path
         
     | 
| 
      
 434 
     | 
    
         
            +
                  printer.add_element('os_requirements').text = @os_requirements
         
     | 
| 
      
 435 
     | 
    
         
            +
                  add_category_to_xml(doc)
         
     | 
| 
      
 436 
     | 
    
         
            +
             
     | 
| 
      
 437 
     | 
    
         
            +
                  doc.to_s
         
     | 
| 
       445 
438 
     | 
    
         
             
                end
         
     | 
| 
      
 439 
     | 
    
         
            +
             
     | 
| 
      
 440 
     | 
    
         
            +
              end
         
     | 
| 
      
 441 
     | 
    
         
            +
             
     | 
| 
       446 
442 
     | 
    
         
             
            end
         
     |