ruby-jss 1.4.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +95 -0
- data/THANKS.md +3 -2
- data/lib/jamf.rb +18 -17
- data/lib/jamf/api/base_classes/collection_resource.rb +613 -0
- data/lib/jamf/api/{abstract_classes → base_classes}/json_object.rb +109 -101
- data/lib/jamf/api/{abstract_classes → base_classes}/prestage.rb +55 -30
- data/lib/jamf/api/{abstract_classes → base_classes}/resource.rb +10 -6
- data/lib/jamf/api/{abstract_classes → base_classes}/singleton_resource.rb +4 -3
- data/lib/jamf/api/connection.rb +13 -9
- data/lib/jamf/api/connection/api_error.rb +8 -8
- data/lib/jamf/api/connection/token.rb +16 -15
- data/lib/jamf/api/json_objects/device_enrollment_device.rb +14 -7
- data/lib/jamf/api/json_objects/{location.rb → device_enrollment_device_sync_state.rb} +27 -41
- data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
- data/lib/jamf/api/json_objects/{attachment.rb → locale.rb} +14 -23
- data/lib/jamf/api/json_objects/md_prestage_name.rb +1 -1
- data/lib/jamf/api/json_objects/md_prestage_names.rb +2 -2
- data/lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb +50 -1
- data/lib/jamf/api/json_objects/prestage_assignment.rb +2 -2
- data/lib/jamf/api/json_objects/prestage_location.rb +3 -3
- data/lib/jamf/api/json_objects/prestage_purchasing_data.rb +7 -7
- data/lib/jamf/api/json_objects/prestage_scope.rb +1 -1
- data/lib/jamf/api/{resources/collection_resources → json_objects}/time_zone.rb +9 -23
- data/lib/jamf/api/mixins/{abstract.rb → base_class.rb} +34 -16
- data/lib/jamf/api/mixins/bulk_deletable.rb +27 -6
- data/lib/jamf/api/mixins/change_log.rb +201 -51
- data/lib/jamf/api/{resources/collection_resources/computer.rb → mixins/filterable.rb} +19 -17
- data/lib/jamf/api/mixins/pageable.rb +208 -0
- data/lib/jamf/api/{json_objects/installed_application.rb → mixins/sortable.rb} +33 -33
- data/lib/jamf/api/resources/collection_resources/building.rb +16 -9
- data/lib/jamf/api/resources/collection_resources/category.rb +5 -4
- data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +12 -5
- data/lib/jamf/api/resources/collection_resources/department.rb +0 -2
- data/lib/jamf/api/resources/collection_resources/device_enrollment.rb +10 -10
- data/lib/jamf/api/resources/collection_resources/inventory_preload_record.rb +11 -3
- data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +25 -23
- data/lib/jamf/api/resources/collection_resources/script.rb +61 -25
- data/lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb +15 -5
- data/lib/jamf/api/resources/singleton_resources/locales.rb +155 -0
- data/lib/jamf/api/resources/singleton_resources/time_zones.rb +213 -0
- data/lib/jamf/client.rb +3 -3
- data/lib/jamf/client/management_action.rb +2 -3
- data/lib/jamf/composer.rb +2 -2
- data/lib/jamf/utility.rb +35 -7
- data/lib/jamf/validate.rb +63 -24
- data/lib/jamf/version.rb +1 -1
- data/lib/jss.rb +2 -2
- data/lib/jss/api_connection.rb +114 -406
- data/lib/jss/api_object.rb +3 -19
- data/lib/jss/api_object/categorizable.rb +1 -1
- data/lib/jss/api_object/computer.rb +13 -0
- data/lib/jss/api_object/configuration_profile.rb +61 -5
- data/lib/jss/api_object/directory_binding_type.rb +66 -60
- data/lib/jss/api_object/directory_binding_type/active_directory.rb +71 -34
- data/lib/jss/api_object/directory_binding_type/admitmac.rb +536 -467
- data/lib/jss/api_object/directory_binding_type/centrify.rb +21 -7
- data/lib/jss/api_object/directory_binding_type/open_directory.rb +4 -4
- data/lib/jss/api_object/distribution_point.rb +2 -2
- data/lib/jss/api_object/dock_item.rb +102 -96
- data/lib/jss/api_object/extendable.rb +1 -1
- data/lib/jss/api_object/group.rb +33 -2
- data/lib/jss/api_object/network_segment.rb +45 -13
- data/lib/jss/api_object/patch_source.rb +10 -9
- data/lib/jss/api_object/policy.rb +155 -25
- data/lib/jss/api_object/printer.rb +10 -4
- data/lib/jss/api_object/scopable.rb +10 -15
- data/lib/jss/api_object/scopable/scope.rb +31 -30
- data/lib/jss/api_object/script.rb +242 -352
- data/lib/jss/api_object/user.rb +1 -1
- data/lib/jss/client/management_action.rb +1 -2
- data/lib/jss/composer.rb +2 -2
- data/lib/jss/exceptions.rb +3 -0
- data/lib/jss/server.rb +15 -0
- data/lib/jss/utility.rb +213 -45
- data/lib/jss/version.rb +1 -1
- metadata +46 -64
- data/lib/jamf/api/abstract_classes/advanced_search.rb +0 -86
- data/lib/jamf/api/abstract_classes/collection_resource.rb +0 -433
- data/lib/jamf/api/abstract_classes/generic_reference.rb +0 -145
- data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +0 -126
- data/lib/jamf/api/json_objects/account_prefs.rb +0 -79
- data/lib/jamf/api/json_objects/android_details.rb +0 -139
- data/lib/jamf/api/json_objects/appletv_details.rb +0 -110
- data/lib/jamf/api/json_objects/cellular_network.rb +0 -151
- data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +0 -67
- data/lib/jamf/api/json_objects/criterion.rb +0 -152
- data/lib/jamf/api/json_objects/extension_attribute_value.rb +0 -128
- data/lib/jamf/api/json_objects/installed_certificate.rb +0 -53
- data/lib/jamf/api/json_objects/installed_configuration_profile.rb +0 -67
- data/lib/jamf/api/json_objects/installed_ebook.rb +0 -58
- data/lib/jamf/api/json_objects/installed_provisioning_profile.rb +0 -59
- data/lib/jamf/api/json_objects/ios_details.rb +0 -244
- data/lib/jamf/api/json_objects/mobile_device_details.rb +0 -219
- data/lib/jamf/api/json_objects/mobile_device_security.rb +0 -101
- data/lib/jamf/api/json_objects/purchasing_data.rb +0 -125
- data/lib/jamf/api/mixins/locatable.rb +0 -124
- data/lib/jamf/api/mixins/referable.rb +0 -92
- data/lib/jamf/api/resources/collection_resources/account.rb +0 -163
- data/lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb +0 -52
- data/lib/jamf/api/resources/collection_resources/advanced_user_search.rb +0 -52
- data/lib/jamf/api/resources/collection_resources/extension_attribute.rb +0 -45
- data/lib/jamf/api/resources/collection_resources/mobile_device.rb +0 -315
- data/lib/jamf/api/resources/collection_resources/site.rb +0 -77
- data/lib/jamf/api/resources/singleton_resources/authorization.rb +0 -88
- data/lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb +0 -139
- data/lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb +0 -95
@@ -180,13 +180,13 @@ module Jamf
|
|
180
180
|
#
|
181
181
|
class Resource < Jamf::JSONObject
|
182
182
|
|
183
|
-
extend Jamf::
|
183
|
+
extend Jamf::BaseClass
|
184
184
|
|
185
185
|
# Constants
|
186
186
|
#####################################
|
187
187
|
|
188
188
|
# These methods are allowed to call .new
|
189
|
-
NEW_CALLERS = ['fetch', 'create', 'all', 'block in all'].freeze
|
189
|
+
NEW_CALLERS = ['fetch', 'create', 'all', 'cached_all', 'block in all', 'block in cached_all'].freeze
|
190
190
|
|
191
191
|
# The resource version for previewing new features
|
192
192
|
RSRC_PREVIEW_VERSION = 'preview'.freeze
|
@@ -197,7 +197,7 @@ module Jamf
|
|
197
197
|
# the resource path for this resource
|
198
198
|
# @return [String]
|
199
199
|
def self.rsrc_path
|
200
|
-
"#{self::RSRC_VERSION}/#{self::RSRC_PATH}"
|
200
|
+
@rsrc_path ||= "#{self::RSRC_VERSION}/#{self::RSRC_PATH}"
|
201
201
|
end
|
202
202
|
|
203
203
|
def self.preview_path
|
@@ -205,18 +205,22 @@ module Jamf
|
|
205
205
|
end
|
206
206
|
|
207
207
|
# Disallow direct use of ruby's .new class method for creating instances.
|
208
|
-
# Require use of .fetch or .create
|
208
|
+
# Require use of .fetch or .create, or 'all'
|
209
209
|
#
|
210
210
|
def self.new(data, cnx: Jamf.cnx)
|
211
|
+
stop_if_base_class
|
211
212
|
calling_method = caller_locations(1..1).first.label
|
212
|
-
raise Jamf::UnsupportedError, "Use .fetch or .
|
213
|
-
|
213
|
+
raise Jamf::UnsupportedError, "Use .fetch, .create, or .all(instantiate:true) to instantiate Jamf::Resources" unless NEW_CALLERS.include? calling_method
|
214
214
|
super
|
215
215
|
end
|
216
216
|
|
217
217
|
# Attributes
|
218
218
|
#####################################
|
219
219
|
|
220
|
+
# @return [Jamf::Connection] the API connection thru which we deal with
|
221
|
+
# this resource.
|
222
|
+
attr_reader :cnx
|
223
|
+
|
220
224
|
# @return [String] the resouce path for this object
|
221
225
|
attr_reader :rsrc_path
|
222
226
|
|
@@ -37,7 +37,7 @@ module Jamf
|
|
37
37
|
#
|
38
38
|
class SingletonResource < Jamf::Resource
|
39
39
|
|
40
|
-
extend Jamf::
|
40
|
+
extend Jamf::BaseClass
|
41
41
|
|
42
42
|
# Public Class Methods
|
43
43
|
#####################################
|
@@ -56,16 +56,17 @@ module Jamf
|
|
56
56
|
# @return [Jamf::SingletonResource] The ruby-instance of a Jamf resource
|
57
57
|
#
|
58
58
|
def self.fetch(reload = false, cnx: Jamf.cnx)
|
59
|
+
stop_if_base_class
|
59
60
|
cnx.singleton_cache[self] = nil if reload
|
60
61
|
cached = cnx.singleton_cache[self]
|
61
62
|
return cached if cached
|
62
63
|
|
63
|
-
data = cnx.get
|
64
|
+
data = cnx.get rsrc_path
|
64
65
|
cnx.singleton_cache[self] = new data, cnx: cnx
|
65
66
|
end # fetch
|
66
67
|
|
67
68
|
def self.flushcache(cnx: Jamf.cnx)
|
68
|
-
|
69
|
+
stop_if_base_class
|
69
70
|
cnx.singleton_cache[self] = nil
|
70
71
|
end
|
71
72
|
|
data/lib/jamf/api/connection.rb
CHANGED
@@ -24,9 +24,6 @@
|
|
24
24
|
require 'faraday' # >= 0.17.0
|
25
25
|
require 'faraday_middleware' # >= 0.13.0
|
26
26
|
|
27
|
-
require 'jamf/api/connection/token'
|
28
|
-
require 'jamf/api/connection/api_error'
|
29
|
-
|
30
27
|
# The module
|
31
28
|
module Jamf
|
32
29
|
|
@@ -45,10 +42,10 @@ module Jamf
|
|
45
42
|
#####################################
|
46
43
|
|
47
44
|
# The start of the path for API resources
|
48
|
-
RSRC_BASE = '
|
45
|
+
RSRC_BASE = 'api'.freeze
|
49
46
|
|
50
|
-
# The
|
51
|
-
MIN_JAMF_VERSION = Gem::Version.new('10.
|
47
|
+
# The JamfPro version must be this or higher
|
48
|
+
MIN_JAMF_VERSION = Gem::Version.new('10.25.0')
|
52
49
|
|
53
50
|
HTTPS_SCHEME = 'https'.freeze
|
54
51
|
|
@@ -85,6 +82,7 @@ module Jamf
|
|
85
82
|
TOKEN_REUSE_MIN_LIFE = 60
|
86
83
|
|
87
84
|
HTTP_ACCEPT_HEADER = 'Accept'.freeze
|
85
|
+
|
88
86
|
HTTP_CONTENT_TYPE_HEADER = 'Content-Type'.freeze
|
89
87
|
|
90
88
|
MIME_JSON = 'application/json'.freeze
|
@@ -161,7 +159,6 @@ module Jamf
|
|
161
159
|
#
|
162
160
|
# SingletonResource.fetch will return the instance from here, if it exists,
|
163
161
|
# unless the first parameter is truthy.
|
164
|
-
|
165
162
|
attr_reader :singleton_cache
|
166
163
|
|
167
164
|
# @return [Hash]
|
@@ -704,7 +701,11 @@ module Jamf
|
|
704
701
|
|
705
702
|
@timeout = params[:timeout]
|
706
703
|
@open_timeout = params[:open_timeout]
|
707
|
-
|
704
|
+
|
705
|
+
# TEMPORARY ? the tryitout host still uses `uapi` rather than the
|
706
|
+
# new `api` for regular servers
|
707
|
+
rsrc_base = @host == Token::JAMF_TRYITOUT_HOST ? 'uapi' : RSRC_BASE
|
708
|
+
@base_url = URI.parse "https://#{@host}:#{@port}/#{rsrc_base}"
|
708
709
|
|
709
710
|
# ssl opts for faraday
|
710
711
|
# TODO: implement all of faraday's options
|
@@ -766,7 +767,7 @@ module Jamf
|
|
766
767
|
cnx.response :json, parser_options: { symbolize_names: true } if parse_json
|
767
768
|
cnx.options[:timeout] = @timeout
|
768
769
|
cnx.options[:open_timeout] = @open_timeout
|
769
|
-
cnx.
|
770
|
+
cnx.adapter Faraday::Adapter::NetHttp
|
770
771
|
end
|
771
772
|
end
|
772
773
|
|
@@ -861,3 +862,6 @@ module Jamf
|
|
861
862
|
end
|
862
863
|
|
863
864
|
end # module Jamf
|
865
|
+
|
866
|
+
require 'jamf/api/connection/token'
|
867
|
+
require 'jamf/api/connection/api_error'
|
@@ -83,18 +83,18 @@ module Jamf
|
|
83
83
|
def initialize(http_response)
|
84
84
|
@http_response = http_response
|
85
85
|
@httpStatus = http_response.status
|
86
|
-
|
87
86
|
@errors =
|
88
|
-
if @http_response.body.
|
89
|
-
@http_response.body[:errors]
|
90
|
-
|
91
|
-
[]
|
87
|
+
if @http_response.body.is_a? String
|
88
|
+
JSON.parse(@http_response.body)[:errors]
|
89
|
+
elsif @http_response.body.is_a?(Hash)
|
90
|
+
@http_response.body[:errors]
|
92
91
|
end
|
92
|
+
@errors &&= @errors.map { |e| ErrorInfo.new e }
|
93
93
|
|
94
|
-
|
94
|
+
unless @errors
|
95
95
|
code = @httpStatus
|
96
|
-
desc =
|
97
|
-
@errors
|
96
|
+
desc = code == 404 ? RSRC_NOT_FOUND : @http_response.reason_phrase
|
97
|
+
@errors = [ErrorInfo.new(code: code, field: nil, description: desc, id: nil)]
|
98
98
|
end
|
99
99
|
|
100
100
|
super
|
@@ -32,13 +32,15 @@ module Jamf
|
|
32
32
|
|
33
33
|
JAMF_VERSION_RSRC = 'v1/jamf-pro-version'.freeze
|
34
34
|
|
35
|
+
AUTH_RSRC_VERSION = 'v1'.freeze
|
36
|
+
|
35
37
|
AUTH_RSRC = 'auth'.freeze
|
36
38
|
|
37
|
-
NEW_TOKEN_RSRC = "#{AUTH_RSRC}/
|
39
|
+
NEW_TOKEN_RSRC = "#{AUTH_RSRC_VERSION}/#{AUTH_RSRC}/token".freeze
|
38
40
|
|
39
|
-
KEEP_ALIVE_RSRC = "#{AUTH_RSRC}/
|
41
|
+
KEEP_ALIVE_RSRC = "#{AUTH_RSRC_VERSION}/#{AUTH_RSRC}/keep-alive".freeze
|
40
42
|
|
41
|
-
INVALIDATE_RSRC = "#{AUTH_RSRC}/
|
43
|
+
INVALIDATE_RSRC = "#{AUTH_RSRC_VERSION}/#{AUTH_RSRC}/invalidate-token".freeze
|
42
44
|
|
43
45
|
# this string is prepended to the token data when used for
|
44
46
|
# transaction authorization.
|
@@ -50,7 +52,7 @@ module Jamf
|
|
50
52
|
|
51
53
|
JAMF_TRYITOUT_TOKEN_BODY = {
|
52
54
|
token: 'This is a fake token, tryitout.jamfcloud.com uses internal tokens',
|
53
|
-
expires:
|
55
|
+
expires: 2_000_000_000_000
|
54
56
|
}.freeze
|
55
57
|
|
56
58
|
# @return [String] The user who generated this token
|
@@ -154,12 +156,14 @@ module Jamf
|
|
154
156
|
|
155
157
|
# @return [String]
|
156
158
|
def jamf_version
|
157
|
-
|
159
|
+
fetch_jamf_version unless @jamf_version
|
160
|
+
@jamf_version
|
158
161
|
end
|
159
162
|
|
160
163
|
# @return [String]
|
161
164
|
def jamf_build
|
162
|
-
|
165
|
+
fetch_jamf_version unless @jamf_build
|
166
|
+
@jamf_build
|
163
167
|
end
|
164
168
|
|
165
169
|
# @return [Boolean]
|
@@ -264,15 +268,12 @@ module Jamf
|
|
264
268
|
end
|
265
269
|
|
266
270
|
# @return [String]
|
267
|
-
def
|
268
|
-
# TODO: Remove this once we require Jamf Pro 10.19 and up
|
269
|
-
# the rsrc for getting the version used to be nothing (the
|
270
|
-
# base url itself returnedit) but now its JAMF_VERSION_RSRC
|
271
|
-
resp = token_connection(Jamf::BLANK, token: @auth_token).get # .body # [:version]
|
272
|
-
return resp.body[:version] if resp.success?
|
273
|
-
|
271
|
+
def fetch_jamf_version
|
274
272
|
resp = token_connection(JAMF_VERSION_RSRC, token: @auth_token).get
|
275
|
-
|
273
|
+
if resp.success?
|
274
|
+
@jamf_version, @jamf_build = resp.body[:version].split('-')
|
275
|
+
return
|
276
|
+
end
|
276
277
|
|
277
278
|
raise Jamf::InvalidConnectionError, 'Unable to read Jamf version from the API'
|
278
279
|
end
|
@@ -291,7 +292,7 @@ module Jamf
|
|
291
292
|
else
|
292
293
|
con.basic_auth @user, pw
|
293
294
|
end
|
294
|
-
con.
|
295
|
+
con.adapter Faraday::Adapter::NetHttp
|
295
296
|
end # Faraday.new
|
296
297
|
end # token_connection
|
297
298
|
|
@@ -68,25 +68,25 @@ module Jamf
|
|
68
68
|
OBJECT_MODEL = {
|
69
69
|
|
70
70
|
# @!attribute id
|
71
|
-
# @return [
|
71
|
+
# @return [String]
|
72
72
|
id: {
|
73
|
-
class: :
|
73
|
+
class: :j_id,
|
74
74
|
identifier: true
|
75
75
|
},
|
76
76
|
|
77
77
|
# @!attribute deviceEnrollmentProgramInstanceId
|
78
|
-
# @return [
|
78
|
+
# @return [String]
|
79
79
|
deviceEnrollmentProgramInstanceId: {
|
80
|
-
class: :
|
80
|
+
class: :j_id,
|
81
81
|
aliases: %i[instanceId]
|
82
82
|
},
|
83
83
|
|
84
84
|
# @!attribute prestageId
|
85
85
|
# The most recent prestage this device was assigned to, even if
|
86
86
|
# currently unassigned to any prestage.
|
87
|
-
# @return [
|
87
|
+
# @return [String]
|
88
88
|
prestageId: {
|
89
|
-
class: :
|
89
|
+
class: :j_id
|
90
90
|
},
|
91
91
|
|
92
92
|
# @!attribute serialNumber
|
@@ -122,7 +122,14 @@ module Jamf
|
|
122
122
|
# @!attribute profileStatus
|
123
123
|
# @return [String]
|
124
124
|
profileStatus: {
|
125
|
-
class: :string
|
125
|
+
class: :string,
|
126
|
+
enum: PROFILE_STATUSES
|
127
|
+
},
|
128
|
+
|
129
|
+
# @!attribute syncState
|
130
|
+
# @return [DeviceEnrollmentDeviceSyncState]
|
131
|
+
syncState: {
|
132
|
+
class: Jamf::DeviceEnrollmentDeviceSyncState
|
126
133
|
},
|
127
134
|
|
128
135
|
# @!attribute profileAssignTime
|
@@ -26,70 +26,56 @@
|
|
26
26
|
# The module
|
27
27
|
module Jamf
|
28
28
|
|
29
|
-
#
|
30
|
-
|
29
|
+
# The status of a device from Apple's POV, regarding its
|
30
|
+
# assignment or removal from ADE. Such assignment is done via
|
31
|
+
# a profile from apple, this data is the state of that profile.
|
32
|
+
class DeviceEnrollmentDeviceSyncState < Jamf::JSONObject
|
33
|
+
|
34
|
+
extend Jamf::Immutable
|
31
35
|
|
32
36
|
OBJECT_MODEL = {
|
33
37
|
|
34
|
-
# @!attribute
|
35
|
-
#
|
36
|
-
#
|
37
|
-
|
38
|
-
|
38
|
+
# @!attribute id
|
39
|
+
# NOTE: this is not a jamf object id, it comes from Apple, therefore
|
40
|
+
# it is an Integer, not a :j_id
|
41
|
+
# @return [Integer]
|
42
|
+
id: {
|
43
|
+
class: :integer
|
39
44
|
},
|
40
45
|
|
41
|
-
# @!attribute
|
42
|
-
# @param [String]
|
46
|
+
# @!attribute serialNumber
|
43
47
|
# @return [String]
|
44
|
-
|
48
|
+
serialNumber: {
|
45
49
|
class: :string
|
46
50
|
},
|
47
51
|
|
48
|
-
# @!attribute
|
49
|
-
# @param [String]
|
52
|
+
# @!attribute profileUUID
|
50
53
|
# @return [String]
|
51
|
-
|
54
|
+
profileUUID: {
|
52
55
|
class: :string
|
53
56
|
},
|
54
57
|
|
55
|
-
# @!attribute
|
56
|
-
# @param [String]
|
58
|
+
# @!attribute syncStatus
|
57
59
|
# @return [String]
|
58
|
-
|
60
|
+
syncStatus: {
|
59
61
|
class: :string
|
60
62
|
},
|
61
63
|
|
62
|
-
# @!attribute
|
63
|
-
# @
|
64
|
-
|
65
|
-
|
66
|
-
class: :string
|
64
|
+
# @!attribute failureCount
|
65
|
+
# @return [Integer]
|
66
|
+
failureCount: {
|
67
|
+
class: :integer
|
67
68
|
},
|
68
69
|
|
69
|
-
# @!attribute
|
70
|
-
# @
|
71
|
-
|
72
|
-
|
73
|
-
class: Jamf::Department::Reference
|
74
|
-
},
|
75
|
-
|
76
|
-
# @!attribute building
|
77
|
-
# @param [String]
|
78
|
-
# @return [String]
|
79
|
-
building: {
|
80
|
-
class: Jamf::Building::Reference
|
81
|
-
},
|
82
|
-
|
83
|
-
# @!attribute room
|
84
|
-
# @param [String]
|
85
|
-
# @return [String]
|
86
|
-
room: {
|
87
|
-
class: :string
|
70
|
+
# @!attribute timestamp
|
71
|
+
# @return [Jamf::Timestamp]
|
72
|
+
timestamp: {
|
73
|
+
class: Jamf::Timestamp
|
88
74
|
}
|
89
75
|
}.freeze
|
90
76
|
|
91
77
|
parse_object_model
|
92
78
|
|
93
|
-
end # class
|
79
|
+
end # class Country
|
94
80
|
|
95
81
|
end # module
|
@@ -23,22 +23,11 @@
|
|
23
23
|
#
|
24
24
|
#
|
25
25
|
|
26
|
-
# The
|
26
|
+
# The module
|
27
27
|
module Jamf
|
28
28
|
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
# An attachment to an object in the JSS
|
33
|
-
class Attachment < Jamf::JSONObject
|
34
|
-
|
35
|
-
# Mix-Ins
|
36
|
-
#####################################
|
37
|
-
|
38
|
-
include Jamf::Referable
|
39
|
-
|
40
|
-
# Constants
|
41
|
-
#####################################
|
29
|
+
# A Time Zone known to Jamf Pro
|
30
|
+
class Locale < Jamf::JSONObject
|
42
31
|
|
43
32
|
# Object Model / Attributes
|
44
33
|
# See APIObject class documentation for details
|
@@ -46,23 +35,25 @@ module Jamf
|
|
46
35
|
#####################################
|
47
36
|
OBJECT_MODEL = {
|
48
37
|
|
49
|
-
# @!attribute [r]
|
50
|
-
# @return [
|
51
|
-
|
52
|
-
class: :
|
38
|
+
# @!attribute [r] zoneId
|
39
|
+
# @return [String]
|
40
|
+
identifier: {
|
41
|
+
class: :string,
|
53
42
|
identifier: :primary,
|
54
|
-
|
43
|
+
read_only: true,
|
44
|
+
aliases: [:id]
|
55
45
|
},
|
56
46
|
|
57
|
-
# @!attribute
|
47
|
+
# @!attribute displayName
|
58
48
|
# @return [String]
|
59
|
-
|
49
|
+
description: {
|
60
50
|
class: :string,
|
61
|
-
|
51
|
+
read_only: true,
|
52
|
+
aliases: %i[name desc]
|
62
53
|
}
|
63
54
|
}.freeze
|
64
55
|
parse_object_model
|
65
56
|
|
66
|
-
end # class
|
57
|
+
end # class Locale
|
67
58
|
|
68
59
|
end # module
|