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::AccessGroupsSearchResults, Jamf::OAPISchemas::AccessGroupsV2SearchResults, Jamf::OAPISchemas::Account, Jamf::OAPISchemas::AccountGroup, Jamf::OAPISchemas::AccountPreferences, Jamf::OAPISchemas::AccountPreferencesV1, Jamf::OAPISchemas::AccountPreferencesV4, Jamf::OAPISchemas::ActivePatchHistory, Jamf::OAPISchemas::ActivePatchHistorySearchResults, 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::AppDynamicsConfig, 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::Attributes, Jamf::OAPISchemas::AuthAccount, Jamf::OAPISchemas::AuthAccountV1, Jamf::OAPISchemas::AuthToken, Jamf::OAPISchemas::AuthTokenV1, Jamf::OAPISchemas::Authorization, Jamf::OAPISchemas::AuthorizationV1, 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::CertificateIdentityV1, 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::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::ComputerHardware, Jamf::OAPISchemas::ComputerHardwareUpdate, Jamf::OAPISchemas::ComputerIbeacon, Jamf::OAPISchemas::ComputerInventoryCollectionPreferences, Jamf::OAPISchemas::ComputerInventoryCollectionSettings, Jamf::OAPISchemas::ComputerInventoryRecoveryLockPasswordResponse, Jamf::OAPISchemas::ComputerInventoryResponse, 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::DeleteUserCommand, Jamf::OAPISchemas::Department, Jamf::OAPISchemas::DepartmentsSearchResults, Jamf::OAPISchemas::DeploymentTask, Jamf::OAPISchemas::DeploymentTaskSearchResults, Jamf::OAPISchemas::DeprecatedConfigurationRequest, Jamf::OAPISchemas::DeprecatedConfigurationResponse, Jamf::OAPISchemas::DeprecatedConfigurationSearchResults, Jamf::OAPISchemas::DeprecatedConfigurationUpdate, Jamf::OAPISchemas::DeprecatedServerRequest, Jamf::OAPISchemas::DeprecatedServerResponse, Jamf::OAPISchemas::DeprecatedServerUpdate, 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::EnrollmentAccessGroup, 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::EnrollmentSettings, Jamf::OAPISchemas::EnrollmentSettingsV2, Jamf::OAPISchemas::ExportField, Jamf::OAPISchemas::ExportParameters, Jamf::OAPISchemas::ExtensionAttribute, Jamf::OAPISchemas::ExtensionAttributeV2, Jamf::OAPISchemas::ExternalRecipient, Jamf::OAPISchemas::FileAttachment, Jamf::OAPISchemas::FileAttachmentDelete, Jamf::OAPISchemas::FileAttachmentV2, Jamf::OAPISchemas::Filter, 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::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::JamfProServerUrl, Jamf::OAPISchemas::JamfProVersion, Jamf::OAPISchemas::JamfProtectPlan, Jamf::OAPISchemas::LanguageCode, 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::Markdown, Jamf::OAPISchemas::MdmClientType, Jamf::OAPISchemas::MdmCommand, Jamf::OAPISchemas::MdmCommandClient, Jamf::OAPISchemas::MdmCommandRequest, Jamf::OAPISchemas::MdmCommandState, Jamf::OAPISchemas::MdmCommandType, Jamf::OAPISchemas::MdmSigningCertificate, 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::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::PatchPolicyAttempt, Jamf::OAPISchemas::PatchPolicyAttemptAction, Jamf::OAPISchemas::PatchPolicyLog, Jamf::OAPISchemas::PatchPolicyLogSearchResults, Jamf::OAPISchemas::PatchPolicyOnDashboard, Jamf::OAPISchemas::PatchPolicySummary, Jamf::OAPISchemas::PatchVersion, 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::RetryPatchPolicyParams, Jamf::OAPISchemas::SafelistedApps, Jamf::OAPISchemas::Script, Jamf::OAPISchemas::ScriptsSearchResults, Jamf::OAPISchemas::SearchActivePatchHistoryParams, Jamf::OAPISchemas::SearchPatchPolicyLogParams, 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::SetRecoveryLockCommand, Jamf::OAPISchemas::SettingsCommand, Jamf::OAPISchemas::SharedDeviceConfiguration, Jamf::OAPISchemas::Signature, Jamf::OAPISchemas::Site, Jamf::OAPISchemas::SmartSearchCriterion, Jamf::OAPISchemas::SoftwareTitleConfiguration, Jamf::OAPISchemas::SoftwareTitlePatchPolicySummaries, Jamf::OAPISchemas::SoftwareUpdateSettings, 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::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::UserAttributes, Jamf::OAPISchemas::UserMappings, 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::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.



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

def initialize(data)
  @init_data = data

  # creating a new one, not fetching from the API
  creating = data.delete :creating_from_create

  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:



337
338
339
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 337

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)


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

def self.mutable?
    !singleton_class.ancestors.include? Jamf::Immutable
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.



69
70
71
72
73
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
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 69

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



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

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)


320
321
322
323
324
325
326
327
328
329
330
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 320

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



462
463
464
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 462

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

#clear_unsaved_changesObject



414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 414

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


373
374
375
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 373

def mutable?
    self.class.mutable?
end

#pretty_jamf_jsonObject

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



443
444
445
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 443

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



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

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



468
469
470
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 468

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 by the Jamf::Connection.

Returns:

  • (Hash)

    The data to be sent to the API, as a Hash to be converted to JSON by the Jamf::Connection



432
433
434
435
436
437
438
439
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 432

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

#unsaved_changesObject

a hash of all unsaved changes



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

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)


408
409
410
411
412
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 408

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

  !unsaved_changes.empty?
end