Class: Jamf::OAPIObject

Inherits:
Object show all
Includes:
Comparable
Defined in:
lib/jamf/api/jamf_pro/base_classes/oapi_object.rb

Overview

The parent class for all objects auto-generated in the Jamf::OAPISchemas module more docs to come

Direct Known Subclasses

Jamf::OAPISchemas::AccessGroupsPreviewSearchResults, Jamf::OAPISchemas::AccessGroupsV2SearchResults, Jamf::OAPISchemas::Account, Jamf::OAPISchemas::AccountDrivenUserEnrollmentSessionTokenSettings, Jamf::OAPISchemas::AccountGroup, Jamf::OAPISchemas::AccountPreferences, Jamf::OAPISchemas::AccountPreferencesV1, Jamf::OAPISchemas::AccountPreferencesV4, Jamf::OAPISchemas::ActivePatchSummary, Jamf::OAPISchemas::AdminAccount, Jamf::OAPISchemas::AdvancedSearch, Jamf::OAPISchemas::AdvancedSearchCriteriaChoices, Jamf::OAPISchemas::AdvancedSearchSearchResults, Jamf::OAPISchemas::AdvancedUserContentSearch, Jamf::OAPISchemas::AdvancedUserContentSearchSearchResults, Jamf::OAPISchemas::AndroidDetails, Jamf::OAPISchemas::ApiError, Jamf::OAPISchemas::ApiErrorCause, Jamf::OAPISchemas::AppAnalyticsSetting, Jamf::OAPISchemas::AppPath, Jamf::OAPISchemas::AppRequestFormInputField, Jamf::OAPISchemas::AppRequestFormInputFieldSearchResults, Jamf::OAPISchemas::AppRequestSettings, Jamf::OAPISchemas::AppleTvDetails, Jamf::OAPISchemas::ApplicationAttributes, Jamf::OAPISchemas::ApplicationConfiguration, Jamf::OAPISchemas::AssignRemoveProfileResponseSyncState, Jamf::OAPISchemas::Assignment, Jamf::OAPISchemas::Attributes, Jamf::OAPISchemas::AuthAccount, Jamf::OAPISchemas::AuthAccountV1, Jamf::OAPISchemas::AuthToken, Jamf::OAPISchemas::AuthTokenV1, Jamf::OAPISchemas::AuthenticationType, Jamf::OAPISchemas::Authorization, Jamf::OAPISchemas::AuthorizationV1, Jamf::OAPISchemas::AvailableOsUpdates, Jamf::OAPISchemas::AvailableUpdates, Jamf::OAPISchemas::AzureAdMigrationReportProcessStatus, Jamf::OAPISchemas::AzureAdMigrationReportRequest, Jamf::OAPISchemas::AzureConfiguration, Jamf::OAPISchemas::AzureConfigurationRequest, Jamf::OAPISchemas::AzureConfigurationUpdate, Jamf::OAPISchemas::AzureMappings, Jamf::OAPISchemas::AzureServerConfiguration, Jamf::OAPISchemas::AzureServerConfigurationRequest, Jamf::OAPISchemas::AzureServerConfigurationUpdate, Jamf::OAPISchemas::BrandingImageUrl, Jamf::OAPISchemas::Building, Jamf::OAPISchemas::BuildingSearchResults, Jamf::OAPISchemas::CacheSettings, Jamf::OAPISchemas::CategoriesSearchResults, Jamf::OAPISchemas::Category, Jamf::OAPISchemas::CertificateDetails, Jamf::OAPISchemas::CertificateIdentityV2, Jamf::OAPISchemas::CertificateKey, Jamf::OAPISchemas::CertificateRecord, Jamf::OAPISchemas::ClassicLdapMappings, Jamf::OAPISchemas::ClientCheckInV2, Jamf::OAPISchemas::ClientCheckInV3, Jamf::OAPISchemas::CloudIdPCommon, Jamf::OAPISchemas::CloudIdPCommonRequest, Jamf::OAPISchemas::CloudIdPCommonResponse, Jamf::OAPISchemas::CloudLdapConnectionPoolStatistics, Jamf::OAPISchemas::CloudLdapConnectionStatus, Jamf::OAPISchemas::CloudLdapKeystore, Jamf::OAPISchemas::CloudLdapKeystoreFile, Jamf::OAPISchemas::CloudLdapMappingsRequest, Jamf::OAPISchemas::CloudLdapMappingsResponse, Jamf::OAPISchemas::CloudLdapServerRequest, Jamf::OAPISchemas::CloudLdapServerResponse, Jamf::OAPISchemas::CloudLdapServerUpdate, Jamf::OAPISchemas::CloudResponse, Jamf::OAPISchemas::ComplianceVendorDeviceInformation, Jamf::OAPISchemas::ComputerApplication, Jamf::OAPISchemas::ComputerAttachment, Jamf::OAPISchemas::ComputerCertificate, Jamf::OAPISchemas::ComputerConfigurationProfile, Jamf::OAPISchemas::ComputerContentCaching, Jamf::OAPISchemas::ComputerContentCachingAlert, Jamf::OAPISchemas::ComputerContentCachingCacheDetail, Jamf::OAPISchemas::ComputerContentCachingDataMigrationError, Jamf::OAPISchemas::ComputerContentCachingDataMigrationErrorUserInfo, Jamf::OAPISchemas::ComputerContentCachingParent, Jamf::OAPISchemas::ComputerContentCachingParentAlert, Jamf::OAPISchemas::ComputerContentCachingParentCapabilities, Jamf::OAPISchemas::ComputerContentCachingParentDetails, Jamf::OAPISchemas::ComputerContentCachingParentLocalNetwork, Jamf::OAPISchemas::ComputerDisk, Jamf::OAPISchemas::ComputerDiskEncryption, Jamf::OAPISchemas::ComputerExtensionAttribute, Jamf::OAPISchemas::ComputerFont, Jamf::OAPISchemas::ComputerGeneral, Jamf::OAPISchemas::ComputerGeneralUpdate, Jamf::OAPISchemas::ComputerGroup, Jamf::OAPISchemas::ComputerHardware, Jamf::OAPISchemas::ComputerHardwareUpdate, Jamf::OAPISchemas::ComputerIbeacon, Jamf::OAPISchemas::ComputerInventory, Jamf::OAPISchemas::ComputerInventoryCollectionPreferences, Jamf::OAPISchemas::ComputerInventoryCollectionSettings, Jamf::OAPISchemas::ComputerInventoryFileVault, Jamf::OAPISchemas::ComputerInventoryFileVaultSearchResults, Jamf::OAPISchemas::ComputerInventoryRecoveryLockPasswordResponse, Jamf::OAPISchemas::ComputerInventorySearchResults, Jamf::OAPISchemas::ComputerInventoryUpdateRequest, Jamf::OAPISchemas::ComputerLicensedSoftware, Jamf::OAPISchemas::ComputerLocalUserAccount, Jamf::OAPISchemas::ComputerLocation, Jamf::OAPISchemas::ComputerMdmCapability, Jamf::OAPISchemas::ComputerOperatingSystem, Jamf::OAPISchemas::ComputerOperatingSystemUpdate, Jamf::OAPISchemas::ComputerOverview, Jamf::OAPISchemas::ComputerPackageReceipts, Jamf::OAPISchemas::ComputerPartition, Jamf::OAPISchemas::ComputerPartitionEncryption, Jamf::OAPISchemas::ComputerPartitionFileVault2State, Jamf::OAPISchemas::ComputerPlugin, Jamf::OAPISchemas::ComputerPrestage, Jamf::OAPISchemas::ComputerPrestageSearchResults, Jamf::OAPISchemas::ComputerPrestageSearchResultsV2, Jamf::OAPISchemas::ComputerPrestageV2, Jamf::OAPISchemas::ComputerPrinter, Jamf::OAPISchemas::ComputerPurchase, Jamf::OAPISchemas::ComputerRemoteManagement, Jamf::OAPISchemas::ComputerSection, Jamf::OAPISchemas::ComputerSecurity, Jamf::OAPISchemas::ComputerService, Jamf::OAPISchemas::ComputerSoftwareUpdate, Jamf::OAPISchemas::ComputerStorage, Jamf::OAPISchemas::ComputerUserAndLocation, Jamf::OAPISchemas::ComputersSearchResults, Jamf::OAPISchemas::ConfigurationProfile, Jamf::OAPISchemas::ConfigurationSearchResults, Jamf::OAPISchemas::ConnectionConfigurationCandidateRequest, Jamf::OAPISchemas::ConnectionConfigurationResponse, Jamf::OAPISchemas::ConnectionConfigurationStatusResponse, Jamf::OAPISchemas::ConnectionConfigurationUpdateRequest, Jamf::OAPISchemas::Country, Jamf::OAPISchemas::CountryCodes, Jamf::OAPISchemas::CreatePath, Jamf::OAPISchemas::CsaToken, Jamf::OAPISchemas::CurrentAccount, Jamf::OAPISchemas::CurrentAuthorization, Jamf::OAPISchemas::DataRoamingSetting, Jamf::OAPISchemas::DatabasePassword, Jamf::OAPISchemas::DayOfWeek, Jamf::OAPISchemas::DeclarativeManagementCommand, Jamf::OAPISchemas::DeleteUserCommand, Jamf::OAPISchemas::Department, Jamf::OAPISchemas::DepartmentsSearchResults, Jamf::OAPISchemas::DeploymentTask, Jamf::OAPISchemas::DeploymentTaskSearchResults, Jamf::OAPISchemas::DeviceCommunicationSettings, Jamf::OAPISchemas::DeviceComplianceInformation, Jamf::OAPISchemas::DeviceEnrollmentDevice, Jamf::OAPISchemas::DeviceEnrollmentDeviceSearchResults, Jamf::OAPISchemas::DeviceEnrollmentDisownBody, Jamf::OAPISchemas::DeviceEnrollmentDisownResponse, Jamf::OAPISchemas::DeviceEnrollmentInstance, Jamf::OAPISchemas::DeviceEnrollmentInstanceSearchResults, Jamf::OAPISchemas::DeviceEnrollmentInstanceSyncStatus, Jamf::OAPISchemas::DeviceEnrollmentPrestage, Jamf::OAPISchemas::DeviceEnrollmentPrestageV2, Jamf::OAPISchemas::DeviceEnrollmentToken, Jamf::OAPISchemas::DiagnosticSubmissionSetting, Jamf::OAPISchemas::Ebook, Jamf::OAPISchemas::EbookExclusions, Jamf::OAPISchemas::EbookLimitations, Jamf::OAPISchemas::EbookScope, Jamf::OAPISchemas::EbookSearchResults, Jamf::OAPISchemas::EnableLostModeCommand, Jamf::OAPISchemas::Engage, Jamf::OAPISchemas::EnrollmentAccessGroupPreview, Jamf::OAPISchemas::EnrollmentAccessGroupV2, Jamf::OAPISchemas::EnrollmentCustomization, Jamf::OAPISchemas::EnrollmentCustomizationBrandingSettings, Jamf::OAPISchemas::EnrollmentCustomizationDependencies, Jamf::OAPISchemas::EnrollmentCustomizationDependency, Jamf::OAPISchemas::EnrollmentCustomizationLdapGroupAccess, Jamf::OAPISchemas::EnrollmentCustomizationPanel, Jamf::OAPISchemas::EnrollmentCustomizationPanelLdapAuth, Jamf::OAPISchemas::EnrollmentCustomizationPanelList, Jamf::OAPISchemas::EnrollmentCustomizationPanelSsoAuth, Jamf::OAPISchemas::EnrollmentCustomizationPanelText, Jamf::OAPISchemas::EnrollmentCustomizationSearchResults, Jamf::OAPISchemas::EnrollmentCustomizationSearchResultsV2, Jamf::OAPISchemas::EnrollmentCustomizationV2, Jamf::OAPISchemas::EnrollmentMethod, Jamf::OAPISchemas::EnrollmentProcessTextObject, Jamf::OAPISchemas::EnrollmentSettingsV2, Jamf::OAPISchemas::ExportField, Jamf::OAPISchemas::ExportParameters, Jamf::OAPISchemas::ExtensionAttribute, Jamf::OAPISchemas::ExtensionAttributeMigrationMappingChange, Jamf::OAPISchemas::ExtensionAttributeV2, Jamf::OAPISchemas::ExternalRecipient, Jamf::OAPISchemas::FileAttachment, Jamf::OAPISchemas::FileAttachmentDelete, Jamf::OAPISchemas::FileAttachmentV2, Jamf::OAPISchemas::FontPath, Jamf::OAPISchemas::GetComputerPrestage, Jamf::OAPISchemas::GetComputerPrestageV2, Jamf::OAPISchemas::GetEnrollmentCustomization, Jamf::OAPISchemas::GetEnrollmentCustomizationPanel, Jamf::OAPISchemas::GetEnrollmentCustomizationPanelLdapAuth, Jamf::OAPISchemas::GetEnrollmentCustomizationPanelSsoAuth, Jamf::OAPISchemas::GetEnrollmentCustomizationPanelText, Jamf::OAPISchemas::GetMobileDevicePrestage, Jamf::OAPISchemas::GetMobileDevicePrestageV2, Jamf::OAPISchemas::GroupMappings, Jamf::OAPISchemas::GroupMembership, Jamf::OAPISchemas::GroupTestSearch, Jamf::OAPISchemas::GroupTestSearchRequest, Jamf::OAPISchemas::GroupTestSearchResponse, Jamf::OAPISchemas::HistorySearchResults, Jamf::OAPISchemas::HistorySearchResultsV1, Jamf::OAPISchemas::HrefResponse, Jamf::OAPISchemas::IconResponse, Jamf::OAPISchemas::IdAndName, Jamf::OAPISchemas::IdAndNameV2, Jamf::OAPISchemas::Ids, Jamf::OAPISchemas::Initialize, Jamf::OAPISchemas::InitializeV1, Jamf::OAPISchemas::InstallPackage, Jamf::OAPISchemas::IntegerWrapper, Jamf::OAPISchemas::InternalRecipient, Jamf::OAPISchemas::InventoryInformation, Jamf::OAPISchemas::InventoryListMobileDevice, Jamf::OAPISchemas::InventoryListMobileDeviceSearchResults, Jamf::OAPISchemas::InventoryPreloadCsvError, Jamf::OAPISchemas::InventoryPreloadCsvValidationError, Jamf::OAPISchemas::InventoryPreloadCsvValidationErrorCause, Jamf::OAPISchemas::InventoryPreloadCsvValidationSuccess, Jamf::OAPISchemas::InventoryPreloadExtensionAttribute, Jamf::OAPISchemas::InventoryPreloadExtensionAttributeColumn, Jamf::OAPISchemas::InventoryPreloadExtensionAttributeColumnResult, Jamf::OAPISchemas::InventoryPreloadInvalidCsvResponse, Jamf::OAPISchemas::InventoryPreloadRecord, Jamf::OAPISchemas::InventoryPreloadRecordSearchResults, Jamf::OAPISchemas::InventoryPreloadRecordSearchResultsV2, Jamf::OAPISchemas::InventoryPreloadRecordV2, Jamf::OAPISchemas::IosBrandingConfiguration, Jamf::OAPISchemas::IosBrandingSearchResults, Jamf::OAPISchemas::IosDetails, Jamf::OAPISchemas::IosDetailsV2, Jamf::OAPISchemas::JamfApplicationResponse, Jamf::OAPISchemas::JamfNationCredentials, Jamf::OAPISchemas::JamfPackageResponse, Jamf::OAPISchemas::JamfProInformation, Jamf::OAPISchemas::JamfProInformationV2, Jamf::OAPISchemas::JamfProServerUrl, Jamf::OAPISchemas::JamfProVersion, Jamf::OAPISchemas::JamfProtectPlan, Jamf::OAPISchemas::LanguageCode, Jamf::OAPISchemas::LapsAudit, Jamf::OAPISchemas::LapsAuditV2, Jamf::OAPISchemas::LapsPasswordAndAudits, Jamf::OAPISchemas::LapsPasswordAndAuditsV2, Jamf::OAPISchemas::LapsPasswordAuditsResults, Jamf::OAPISchemas::LapsPasswordAuditsResultsV2, Jamf::OAPISchemas::LapsPasswordResponse, Jamf::OAPISchemas::LapsPasswordResponseV2, Jamf::OAPISchemas::LapsSettingsRequest, Jamf::OAPISchemas::LapsSettingsRequestV2, Jamf::OAPISchemas::LapsSettingsResponse, Jamf::OAPISchemas::LapsSettingsResponseV2, Jamf::OAPISchemas::LapsUser, Jamf::OAPISchemas::LapsUserPassword, Jamf::OAPISchemas::LapsUserPasswordRequest, Jamf::OAPISchemas::LapsUserPasswordRequestV2, Jamf::OAPISchemas::LapsUserPasswordResponse, Jamf::OAPISchemas::LapsUserPasswordResponseV2, Jamf::OAPISchemas::LapsUserPasswordV2, Jamf::OAPISchemas::LapsUserResults, Jamf::OAPISchemas::LapsUserResultsV2, Jamf::OAPISchemas::LapsUserV2, Jamf::OAPISchemas::LdapConfigurationRequest, Jamf::OAPISchemas::LdapConfigurationResponse, Jamf::OAPISchemas::LdapConfigurationUpdate, Jamf::OAPISchemas::LdapGroup, Jamf::OAPISchemas::LdapGroupSearchResults, Jamf::OAPISchemas::LdapServer, Jamf::OAPISchemas::LinkedConnectProfile, Jamf::OAPISchemas::LinkedConnectProfileSearchResults, Jamf::OAPISchemas::Locale, Jamf::OAPISchemas::Location, Jamf::OAPISchemas::LocationInformation, Jamf::OAPISchemas::LocationInformationV2, Jamf::OAPISchemas::LocationV2, Jamf::OAPISchemas::MacOsBrandingConfiguration, Jamf::OAPISchemas::MacOsBrandingSearchResults, Jamf::OAPISchemas::MacOsManagedSoftwareUpdate, Jamf::OAPISchemas::MacOsManagedSoftwareUpdateResponse, Jamf::OAPISchemas::ManagedSoftwareUpdateStatus, Jamf::OAPISchemas::ManagedSoftwareUpdateStatuses, Jamf::OAPISchemas::Markdown, Jamf::OAPISchemas::MdmClientType, Jamf::OAPISchemas::MdmCommand, Jamf::OAPISchemas::MdmCommandClient, Jamf::OAPISchemas::MdmCommandClientRequest, Jamf::OAPISchemas::MdmCommandRequest, Jamf::OAPISchemas::MdmCommandResults, Jamf::OAPISchemas::MdmCommandState, Jamf::OAPISchemas::MdmCommandType, Jamf::OAPISchemas::MembershipMappings, Jamf::OAPISchemas::MembershipTestSearchRequest, Jamf::OAPISchemas::MembershipTestSearchResponse, Jamf::OAPISchemas::MemcachedEndpoints, Jamf::OAPISchemas::MobileDevice, Jamf::OAPISchemas::MobileDeviceApplication, Jamf::OAPISchemas::MobileDeviceAttachment, Jamf::OAPISchemas::MobileDeviceAttachmentV2, Jamf::OAPISchemas::MobileDeviceCertificateV1, Jamf::OAPISchemas::MobileDeviceCertificateV2, Jamf::OAPISchemas::MobileDeviceDetails, Jamf::OAPISchemas::MobileDeviceDetailsGetV2, Jamf::OAPISchemas::MobileDeviceDetailsV2, Jamf::OAPISchemas::MobileDeviceEbook, Jamf::OAPISchemas::MobileDeviceExtensionAttributeResults, Jamf::OAPISchemas::MobileDeviceGroup, Jamf::OAPISchemas::MobileDevicePrestage, Jamf::OAPISchemas::MobileDevicePrestageName, Jamf::OAPISchemas::MobileDevicePrestageNameV2, Jamf::OAPISchemas::MobileDevicePrestageNames, Jamf::OAPISchemas::MobileDevicePrestageNamesV2, Jamf::OAPISchemas::MobileDevicePrestageSearchResults, Jamf::OAPISchemas::MobileDevicePrestageSearchResultsV2, Jamf::OAPISchemas::MobileDevicePrestageV2, Jamf::OAPISchemas::MobileDeviceSearchParams, Jamf::OAPISchemas::MobileDeviceSearchResults, Jamf::OAPISchemas::MobileDeviceSearchResultsV2, Jamf::OAPISchemas::MobileDeviceServiceSubscription, Jamf::OAPISchemas::MobileDeviceV2, Jamf::OAPISchemas::Network, Jamf::OAPISchemas::NetworkV2, Jamf::OAPISchemas::Notification, Jamf::OAPISchemas::NotificationType, Jamf::OAPISchemas::NotificationV1, Jamf::OAPISchemas::ObjectHistory, Jamf::OAPISchemas::ObjectHistoryNote, Jamf::OAPISchemas::ObjectHistoryV1, Jamf::OAPISchemas::OrderBy, Jamf::OAPISchemas::PackageManifest, Jamf::OAPISchemas::ParentApp, Jamf::OAPISchemas::PatchIdsOnDashboard, Jamf::OAPISchemas::PatchPolicies, Jamf::OAPISchemas::PatchPolicyAttempt, Jamf::OAPISchemas::PatchPolicyAttemptAction, Jamf::OAPISchemas::PatchPolicyListView, Jamf::OAPISchemas::PatchPolicyLogDetail, Jamf::OAPISchemas::PatchPolicyLogDetailAction, Jamf::OAPISchemas::PatchPolicyLogEligibleRetryCount, Jamf::OAPISchemas::PatchPolicyLogRetry, Jamf::OAPISchemas::PatchPolicyLogV2, Jamf::OAPISchemas::PatchPolicyLogs, Jamf::OAPISchemas::PatchPolicyOnDashboard, Jamf::OAPISchemas::PatchPolicyV2OnDashboard, Jamf::OAPISchemas::PatchSoftwareTitleConfiguration, Jamf::OAPISchemas::PatchSoftwareTitleConfigurationBase, Jamf::OAPISchemas::PatchSoftwareTitleConfigurationDefinitionKillApp, Jamf::OAPISchemas::PatchSoftwareTitleConfigurationExtensionAttributes, Jamf::OAPISchemas::PatchSoftwareTitleConfigurationPatch, Jamf::OAPISchemas::PatchSoftwareTitleDefinition, Jamf::OAPISchemas::PatchSoftwareTitleDefinitions, Jamf::OAPISchemas::PatchSoftwareTitleExtensionAttributes, Jamf::OAPISchemas::PatchSoftwareTitlePackages, Jamf::OAPISchemas::PatchSoftwareTitleReport, Jamf::OAPISchemas::PatchSoftwareTitleReportSearchResult, Jamf::OAPISchemas::PatchSummary, Jamf::OAPISchemas::PatchSummaryVersion, Jamf::OAPISchemas::PersonalHotspotSetting, Jamf::OAPISchemas::PlanSearchResults, Jamf::OAPISchemas::PluginPath, Jamf::OAPISchemas::PolicyProperties, Jamf::OAPISchemas::PolicyPropertiesV1, Jamf::OAPISchemas::PostComputerPrestageV2, Jamf::OAPISchemas::PrestageDependencies, Jamf::OAPISchemas::PrestageDependency, Jamf::OAPISchemas::PrestageFileAttachment, Jamf::OAPISchemas::PrestageFileAttachmentV2, Jamf::OAPISchemas::PrestagePurchasingInformation, Jamf::OAPISchemas::PrestagePurchasingInformationV2, Jamf::OAPISchemas::PrestageScope, Jamf::OAPISchemas::PrestageScopeAssignment, Jamf::OAPISchemas::PrestageScopeAssignmentV2, Jamf::OAPISchemas::PrestageScopeResponse, Jamf::OAPISchemas::PrestageScopeResponseV2, Jamf::OAPISchemas::PrestageScopeUpdate, Jamf::OAPISchemas::PrestageScopeV2, Jamf::OAPISchemas::PrestageSyncStatus, Jamf::OAPISchemas::PrestageSyncStatusV2, Jamf::OAPISchemas::ProcessTextsSearchResults, Jamf::OAPISchemas::ProtectRegistrationRequest, Jamf::OAPISchemas::ProtectSettingsResponse, Jamf::OAPISchemas::ProtectUpdatableSettingsRequest, Jamf::OAPISchemas::ProvisioningProfile, Jamf::OAPISchemas::Purchasing, Jamf::OAPISchemas::PurchasingV2, Jamf::OAPISchemas::PutComputerPrestage, Jamf::OAPISchemas::PutComputerPrestageV2, Jamf::OAPISchemas::PutMobileDevicePrestage, Jamf::OAPISchemas::PutMobileDevicePrestageV2, Jamf::OAPISchemas::RecalculationResults, Jamf::OAPISchemas::Recipient, Jamf::OAPISchemas::Recipients, Jamf::OAPISchemas::RedeployJamfManagementFrameworkResponse, Jamf::OAPISchemas::Reenrollment, Jamf::OAPISchemas::RemoteAdministrationResponse, Jamf::OAPISchemas::RemoteAdministrationSearchResults, Jamf::OAPISchemas::RenewMdmProfileResponse, Jamf::OAPISchemas::RestartDeviceCommand, Jamf::OAPISchemas::SafelistedApp, Jamf::OAPISchemas::Script, Jamf::OAPISchemas::ScriptsSearchResults, Jamf::OAPISchemas::Security, Jamf::OAPISchemas::SecurityV2, Jamf::OAPISchemas::SelfServiceInstallSettings, Jamf::OAPISchemas::SelfServiceInteractionSettings, Jamf::OAPISchemas::SelfServiceLoginSettings, Jamf::OAPISchemas::SelfServiceSettings, Jamf::OAPISchemas::Session, Jamf::OAPISchemas::SessionCandidateRequest, Jamf::OAPISchemas::SessionDetails, Jamf::OAPISchemas::SessionDetailsSearchResults, Jamf::OAPISchemas::SessionStatus, Jamf::OAPISchemas::SetAutoAdminPasswordCommand, Jamf::OAPISchemas::SetRecoveryLockCommand, Jamf::OAPISchemas::SettingsCommand, Jamf::OAPISchemas::SharedDeviceConfiguration, Jamf::OAPISchemas::Signature, Jamf::OAPISchemas::Site, Jamf::OAPISchemas::SmartSearchCriterion, Jamf::OAPISchemas::SoftwareTitleConfigurationOnDashboard, Jamf::OAPISchemas::SoftwareUpdateSettings, Jamf::OAPISchemas::SsoFailoverData, Jamf::OAPISchemas::SsoKeystore, Jamf::OAPISchemas::SsoKeystoreCertParseResponse, Jamf::OAPISchemas::SsoKeystoreDetails, Jamf::OAPISchemas::SsoKeystoreParse, Jamf::OAPISchemas::SsoKeystoreResponse, Jamf::OAPISchemas::SsoKeystoreResponseWithDetails, Jamf::OAPISchemas::SsoKeystoreWithDetails, Jamf::OAPISchemas::SsoMetadataUrl, Jamf::OAPISchemas::SsoSettings, Jamf::OAPISchemas::StartupStatus, Jamf::OAPISchemas::StaticGroup, Jamf::OAPISchemas::StaticGroupAssignment, Jamf::OAPISchemas::StaticGroupSearchResults, Jamf::OAPISchemas::StaticGroupSummary, Jamf::OAPISchemas::StaticUserGroup, Jamf::OAPISchemas::SupervisionIdentity, Jamf::OAPISchemas::SupervisionIdentityCertificateUpload, Jamf::OAPISchemas::SupervisionIdentityCreate, Jamf::OAPISchemas::SupervisionIdentitySearchResults, Jamf::OAPISchemas::SupervisionIdentityUpdate, Jamf::OAPISchemas::TeacherFeatures, Jamf::OAPISchemas::TeacherSettingsRequest, Jamf::OAPISchemas::TeacherSettingsResponse, Jamf::OAPISchemas::TimeFrame, Jamf::OAPISchemas::TimeZone, Jamf::OAPISchemas::TvOsDetails, Jamf::OAPISchemas::Udids, Jamf::OAPISchemas::UpdateAppleTv, Jamf::OAPISchemas::UpdateIos, Jamf::OAPISchemas::UpdateIosV2, Jamf::OAPISchemas::UpdateMobileDevice, Jamf::OAPISchemas::UpdateMobileDeviceV2, Jamf::OAPISchemas::UpdateTvOs, Jamf::OAPISchemas::UserMappings, Jamf::OAPISchemas::UserPreferencesSettings, Jamf::OAPISchemas::UserTestAttributes, Jamf::OAPISchemas::UserTestSearch, Jamf::OAPISchemas::UserTestSearchRequest, Jamf::OAPISchemas::UserTestSearchResponse, Jamf::OAPISchemas::V1Site, Jamf::OAPISchemas::VenafiCaRecord, Jamf::OAPISchemas::VenafiPkiPayloadRecord, Jamf::OAPISchemas::VenafiPkiPayloadRecordSearchResults, Jamf::OAPISchemas::VenafiServiceStatus, Jamf::OAPISchemas::VerbosePackageDeploymentResponse, Jamf::OAPISchemas::VoiceRoamingSetting, Jamf::OAPISchemas::VolumePurchasingContent, Jamf::OAPISchemas::VolumePurchasingContentList, Jamf::OAPISchemas::VolumePurchasingLocation, Jamf::OAPISchemas::VolumePurchasingLocationListView, Jamf::OAPISchemas::VolumePurchasingLocationPatch, Jamf::OAPISchemas::VolumePurchasingLocationPost, Jamf::OAPISchemas::VolumePurchasingLocations, Jamf::OAPISchemas::VolumePurchasingSubscription, Jamf::OAPISchemas::VolumePurchasingSubscriptionBase, Jamf::OAPISchemas::VolumePurchasingSubscriptions, Jamf::OAPISchemas::VppAdminAccount, Jamf::OAPISchemas::VppTokenSubscription, Jamf::OAPISchemas::WebLink

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OAPIObject

Make an instance. Data comes from the API

Parameters:

  • data (Hash)

    the data for constructing a new object.



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 350

def initialize(data)
  @init_data = data

  # creating a new one via ruby-jss, not fetching one from the API
  creating = data.delete :creating_from_create if data.is_a?(Hash)

  if creating
    self.class::OAPI_PROPERTIES.each_key do |attr_name|
      # we'll enforce required values when we save
      next unless data.key? attr_name

      # use our setters for each value so that they are validated, and
      # in the unsaved changes list
      send "#{attr_name}=", data[attr_name]
    end
    return
  end

  parse_init_data data
end

Instance Attribute Details

#init_dataHash (readonly)

the raw hash from which this object was constructed

Returns:



341
342
343
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 341

def init_data
  @init_data
end

Class Method Details

.mutable?Boolean

By default,OAPIObjects (as a whole) are mutable, although some attributes may not be (see OAPI_PROPERTIES in the JSONObject docs)

When an entire sublcass of OAPIObject is read-only/immutable, ‘extend Jamf::Immutable`, which will override this to return false. Doing so will prevent any setters from being created for the subclass and will cause Jamf::Resource.save to raise an error

Returns:

  • (Boolean)


50
51
52
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 50

def self.mutable?
  !singleton_class.ancestors.include? Jamf::Immutable
end

.oapi_properties_parsed?Boolean

have we already parsed our OAPI_PROPERTIES? If so, we shoudn’t do it again, an this can be used to check

Returns:

  • (Boolean)


64
65
66
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 64

def self.oapi_properties_parsed?
  @oapi_properties_parsed
end

.parse_oapi_propertiesObject

create getters and setters for subclasses of APIObject based on their OAPI_PROPERTIES Hash.

This method can’t be private, cuz we want to call it from a Zeitwerk callback when subclasses are loaded.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 74

def self.parse_oapi_properties
  # only do this once
  return if @oapi_properties_parsed

  # only if this constant is defined
  return unless defined? self::OAPI_PROPERTIES

  # TODO: is the concept of 'primary' needed anymore?
  got_primary = false

  self::OAPI_PROPERTIES.each do |attr_name, attr_def|
    Jamf.load_msg "Creating getters and setters for attribute '#{attr_name}' of #{self}"

    # see above comment
    # don't make one for :id, that one's hard-coded into CollectionResource
    # create_list_methods(attr_name, attr_def) if need_list_methods && attr_def[:identifier] && attr_name != :id

    # there can be only one (primary ident)
    if attr_def[:identifier] == :primary
      raise Jamf::UnsupportedError, 'Two identifiers marked as :primary' if got_primary

      got_primary = true
    end

    # create getter unless the attr is write only
    create_getters attr_name, attr_def unless attr_def[:writeonly]

    # Don't crete setters for readonly attrs, or immutable objects
    next if attr_def[:readonly] || !mutable?

    create_setters attr_name, attr_def
  end #  do |attr_name, attr_def|

  @oapi_properties_parsed = true
end

.required_attributesObject

An array of attribute names that are required when making new instances - they cannot be nil, but may be empty.

See the OAPI_PROPERTIES documentation in Jamf::OAPIObject



58
59
60
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 58

def self.required_attributes
  self::OAPI_PROPERTIES.select { |_attr, deets| deets[:required] }.keys
end

.validate_attr(attr_name, value) ⇒ Object

Used by auto-generated setters and .create to validate new values.

returns a valid value or raises an exception

This method only validates single values. When called from multi-value setters, it is used for each value individually.

Parameters:

  • attr_name (Symbol)

    , a top-level key from OAPI_PROPERTIES for this class

  • value (Object)

    the value to validate for that attribute.

Returns:

  • (Object)

    The validated, possibly converted, value.

Raises:

  • (ArgumentError)


324
325
326
327
328
329
330
331
332
333
334
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 324

def self.validate_attr(attr_name, value)
  attr_def = self::OAPI_PROPERTIES[attr_name]
  raise ArgumentError, "Unknown attribute: #{attr_name} for #{self} objects" unless attr_def

  # validate the value based on the OAPI definition.
  Jamf::Validate.oapi_attr value, attr_def: attr_def, attr_name: attr_name

  # if this is an identifier, it must be unique
  # TODO: move this to colloection resouce code
  # Jamf::Validate.doesnt_exist(value, self, attr_name, cnx: cnx) if attr_def[:identifier] && superclass == Jamf::CollectionResource
end

Instance Method Details

#<=>(other) ⇒ Object

Comparable by the sha1 hash of our properties. Subclasses or mixins may override this in ways that make sense for them



473
474
475
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 473

def <=>(other)
  sha1_hash <=> other.sha1_hash
end

#clear_unsaved_changesObject



418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 418

def clear_unsaved_changes
  return unless self.class.mutable?

  unsaved_changes.keys.each do |attr_name|
    attrib_val = instance_variable_get "@#{attr_name}"
    if self.class::OAPI_PROPERTIES[attr_name][:multi]
      attrib_val.each { |item| item.send :clear_unsaved_changes if item.respond_to? :clear_unsaved_changes }
    elsif attrib_val.respond_to? :clear_unsaved_changes
      attrib_val.send :clear_unsaved_changes
    end
  end
  ext_attrs_clear_unsaved_changes if self.class.include? Jamf::Extendable
  @unsaved_changes = {}
end

#mutable?Boolean

Are objects of this class mutable?

Returns:

  • (Boolean)

See Also:

  • class method in OAPIObject


376
377
378
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 376

def mutable?
  self.class.mutable?
end

#pretty_jamf_jsonObject

Print the JSON version of the to_jamf outout mostly for debugging/troubleshooting



454
455
456
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 454

def pretty_jamf_json
  puts JSON.pretty_generate(to_jamf)
end

#pretty_print_instance_variablesArray

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

Returns:

  • (Array)

    the desired instance_variables



464
465
466
467
468
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 464

def pretty_print_instance_variables
  vars = super.sort
  vars.delete :@init_data
  vars
end

#sha1_hashObject

The SHA1 hash of all the values of our properties as defined in the OAPI schema



479
480
481
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 479

def sha1_hash
  Digest::SHA1.hexdigest(to_jamf.to_s)
end

#to_jamfHash

Returns The data to be sent to the API, as a Hash to be converted to JSON before sending to the JPAPI.

Returns:

  • (Hash)

    The data to be sent to the API, as a Hash to be converted to JSON before sending to the JPAPI



436
437
438
439
440
441
442
443
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 436

def to_jamf
  jamf_data = {}
  self.class::OAPI_PROPERTIES.each do |attr_name, attr_def|
    raw_value = instance_variable_get "@#{attr_name}"
    jamf_data[attr_name] = attr_def[:multi] ? multi_to_jamf(raw_value, attr_def) : single_to_jamf(raw_value, attr_def)
  end
  jamf_data
end

#to_json(*_args) ⇒ String

Returns the JSON to be sent to the API for this object.

Returns:

  • (String)

    the JSON to be sent to the API for this object



448
449
450
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 448

def to_json(*_args)
  to_jamf.to_json
end

#unsaved_changesObject

a hash of all unsaved changes



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 382

def unsaved_changes
  return {} unless self.class.mutable?

  @unsaved_changes ||= {}

  changes = @unsaved_changes.dup

  self.class::OAPI_PROPERTIES.each do |attr_name, attr_def|
    # skip non-Class attrs
    next unless attr_def[:class].is_a? Class

    # the current value of the thing, e.g. a Location
    # which may have unsaved changes
    value = instance_variable_get "@#{attr_name}"

    # skip those that don't have any changes
    next unless value.respond_to? :unsaved_changes?

    attr_changes = value.unsaved_changes
    next if attr_changes.empty?

    # add the sub-changes to ours
    changes[attr_name] = attr_changes
  end
  changes[:ext_attrs] = ext_attrs_unsaved_changes if self.class.include? Jamf::Extendable
  changes
end

#unsaved_changes?Boolean

return true if we or any of our attributes have unsaved changes

Returns:

  • (Boolean)


412
413
414
415
416
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 412

def unsaved_changes?
  return false unless self.class.mutable?

  !unsaved_changes.empty?
end