ruby-jss 1.5.1 → 1.5.2
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.
Potentially problematic release.
This version of ruby-jss might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +26 -0
- data/lib/jamf.rb +8 -13
- data/lib/jamf/api/{abstract_classes → base_classes}/collection_resource.rb +6 -5
- data/lib/jamf/api/{abstract_classes → base_classes}/json_object.rb +4 -20
- data/lib/jamf/api/{abstract_classes → base_classes}/prestage.rb +1 -1
- data/lib/jamf/api/{abstract_classes → base_classes}/resource.rb +6 -2
- data/lib/jamf/api/{abstract_classes → base_classes}/singleton_resource.rb +3 -2
- data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
- 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/prestage_assignment.rb +2 -2
- data/lib/jamf/api/mixins/{abstract.rb → base_class.rb} +34 -16
- data/lib/jamf/api/resources/collection_resources/building.rb +0 -4
- data/lib/jamf/api/resources/collection_resources/category.rb +0 -1
- data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +1 -1
- data/lib/jamf/api/resources/collection_resources/department.rb +0 -2
- data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +1 -1
- data/lib/jamf/version.rb +1 -1
- data/lib/jss/api_connection.rb +1 -36
- data/lib/jss/api_object/computer.rb +13 -0
- data/lib/jss/api_object/configuration_profile.rb +28 -3
- data/lib/jss/api_object/policy.rb +105 -25
- data/lib/jss/api_object/scopable/scope.rb +31 -30
- data/lib/jss/utility.rb +142 -37
- data/lib/jss/version.rb +1 -1
- metadata +8 -41
- data/lib/jamf/api/abstract_classes/advanced_search.rb +0 -86
- data/lib/jamf/api/abstract_classes/generic_reference.rb +0 -153
- data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +0 -147
- 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/attachment.rb +0 -68
- data/lib/jamf/api/json_objects/cellular_network.rb +0 -151
- data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +0 -80
- 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_application.rb +0 -59
- 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/location.rb +0 -95
- 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/computer.rb +0 -49
- 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
data/lib/jss/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-jss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lasell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: plist
|
@@ -155,88 +155,55 @@ files:
|
|
155
155
|
- bin/netseg-update
|
156
156
|
- data/ruby-jss.conf.example
|
157
157
|
- lib/jamf.rb
|
158
|
-
- lib/jamf/api/abstract_classes/advanced_search.rb
|
159
|
-
- lib/jamf/api/abstract_classes/collection_resource.rb
|
160
|
-
- lib/jamf/api/abstract_classes/generic_reference.rb
|
161
|
-
- lib/jamf/api/abstract_classes/json_object.rb
|
162
|
-
- lib/jamf/api/abstract_classes/prestage.rb
|
163
|
-
- lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb
|
164
|
-
- lib/jamf/api/abstract_classes/resource.rb
|
165
|
-
- lib/jamf/api/abstract_classes/singleton_resource.rb
|
166
158
|
- lib/jamf/api/attribute_classes/ip_address.rb
|
167
159
|
- lib/jamf/api/attribute_classes/timestamp.rb
|
160
|
+
- lib/jamf/api/base_classes/collection_resource.rb
|
161
|
+
- lib/jamf/api/base_classes/json_object.rb
|
162
|
+
- lib/jamf/api/base_classes/prestage.rb
|
163
|
+
- lib/jamf/api/base_classes/resource.rb
|
164
|
+
- lib/jamf/api/base_classes/singleton_resource.rb
|
168
165
|
- lib/jamf/api/connection.rb
|
169
166
|
- lib/jamf/api/connection/api_error.rb
|
170
167
|
- lib/jamf/api/connection/api_error_styleguide.rb
|
171
168
|
- lib/jamf/api/connection/token.rb
|
172
|
-
- lib/jamf/api/json_objects/account_prefs.rb
|
173
|
-
- lib/jamf/api/json_objects/android_details.rb
|
174
|
-
- lib/jamf/api/json_objects/appletv_details.rb
|
175
|
-
- lib/jamf/api/json_objects/attachment.rb
|
176
|
-
- lib/jamf/api/json_objects/cellular_network.rb
|
177
169
|
- lib/jamf/api/json_objects/change_log_entry.rb
|
178
|
-
- lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb
|
179
170
|
- lib/jamf/api/json_objects/country.rb
|
180
|
-
- lib/jamf/api/json_objects/criterion.rb
|
181
171
|
- lib/jamf/api/json_objects/device_enrollment_device.rb
|
182
172
|
- lib/jamf/api/json_objects/device_enrollment_device_sync_state.rb
|
183
173
|
- lib/jamf/api/json_objects/device_enrollment_sync_status.rb
|
184
|
-
- lib/jamf/api/json_objects/extension_attribute_value.rb
|
185
|
-
- lib/jamf/api/json_objects/installed_application.rb
|
186
|
-
- lib/jamf/api/json_objects/installed_certificate.rb
|
187
|
-
- lib/jamf/api/json_objects/installed_configuration_profile.rb
|
188
|
-
- lib/jamf/api/json_objects/installed_ebook.rb
|
189
|
-
- lib/jamf/api/json_objects/installed_provisioning_profile.rb
|
190
174
|
- lib/jamf/api/json_objects/inventory_preload_extension_attribute.rb
|
191
|
-
- lib/jamf/api/json_objects/ios_details.rb
|
192
175
|
- lib/jamf/api/json_objects/locale.rb
|
193
|
-
- lib/jamf/api/json_objects/location.rb
|
194
176
|
- lib/jamf/api/json_objects/md_prestage_name.rb
|
195
177
|
- lib/jamf/api/json_objects/md_prestage_names.rb
|
196
178
|
- lib/jamf/api/json_objects/md_prestage_skip_setup_items.rb
|
197
|
-
- lib/jamf/api/json_objects/mobile_device_details.rb
|
198
|
-
- lib/jamf/api/json_objects/mobile_device_security.rb
|
199
179
|
- lib/jamf/api/json_objects/prestage_assignment.rb
|
200
180
|
- lib/jamf/api/json_objects/prestage_location.rb
|
201
181
|
- lib/jamf/api/json_objects/prestage_purchasing_data.rb
|
202
182
|
- lib/jamf/api/json_objects/prestage_scope.rb
|
203
183
|
- lib/jamf/api/json_objects/prestage_sync_status.rb
|
204
|
-
- lib/jamf/api/json_objects/purchasing_data.rb
|
205
184
|
- lib/jamf/api/json_objects/time_zone.rb
|
206
|
-
- lib/jamf/api/mixins/
|
185
|
+
- lib/jamf/api/mixins/base_class.rb
|
207
186
|
- lib/jamf/api/mixins/bulk_deletable.rb
|
208
187
|
- lib/jamf/api/mixins/change_log.rb
|
209
188
|
- lib/jamf/api/mixins/extendable.rb
|
210
189
|
- lib/jamf/api/mixins/filterable.rb
|
211
190
|
- lib/jamf/api/mixins/immutable.rb
|
212
|
-
- lib/jamf/api/mixins/locatable.rb
|
213
191
|
- lib/jamf/api/mixins/lockable.rb
|
214
192
|
- lib/jamf/api/mixins/pageable.rb
|
215
|
-
- lib/jamf/api/mixins/referable.rb
|
216
193
|
- lib/jamf/api/mixins/searchable.rb
|
217
194
|
- lib/jamf/api/mixins/sortable.rb
|
218
195
|
- lib/jamf/api/mixins/uncreatable.rb
|
219
196
|
- lib/jamf/api/mixins/undeletable.rb
|
220
|
-
- lib/jamf/api/resources/collection_resources/account.rb
|
221
|
-
- lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb
|
222
|
-
- lib/jamf/api/resources/collection_resources/advanced_user_search.rb
|
223
197
|
- lib/jamf/api/resources/collection_resources/building.rb
|
224
198
|
- lib/jamf/api/resources/collection_resources/category.rb
|
225
|
-
- lib/jamf/api/resources/collection_resources/computer.rb
|
226
199
|
- lib/jamf/api/resources/collection_resources/computer_prestage.rb
|
227
200
|
- lib/jamf/api/resources/collection_resources/department.rb
|
228
201
|
- lib/jamf/api/resources/collection_resources/device_enrollment.rb
|
229
|
-
- lib/jamf/api/resources/collection_resources/extension_attribute.rb
|
230
202
|
- lib/jamf/api/resources/collection_resources/inventory_preload_record.rb
|
231
|
-
- lib/jamf/api/resources/collection_resources/mobile_device.rb
|
232
203
|
- lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb
|
233
204
|
- lib/jamf/api/resources/collection_resources/script.rb
|
234
|
-
- lib/jamf/api/resources/collection_resources/site.rb
|
235
205
|
- lib/jamf/api/resources/singleton_resources/app_store_country_codes.rb
|
236
|
-
- lib/jamf/api/resources/singleton_resources/authorization.rb
|
237
|
-
- lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb
|
238
206
|
- lib/jamf/api/resources/singleton_resources/locales.rb
|
239
|
-
- lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb
|
240
207
|
- lib/jamf/api/resources/singleton_resources/time_zones.rb
|
241
208
|
- lib/jamf/client.rb
|
242
209
|
- lib/jamf/client/jamf_binary.rb
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# Copyright 2020 Pixar
|
2
|
-
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
5
|
-
# with the following modification; you may not use this file except in
|
6
|
-
# compliance with the Apache License and the following modification to it:
|
7
|
-
# Section 6. Trademarks. is deleted and replaced with:
|
8
|
-
#
|
9
|
-
# 6. Trademarks. This License does not grant permission to use the trade
|
10
|
-
# names, trademarks, service marks, or product names of the Licensor
|
11
|
-
# and its affiliates, except as required to comply with Section 4(c) of
|
12
|
-
# the License and to reproduce the content of the NOTICE file.
|
13
|
-
#
|
14
|
-
# You may obtain a copy of the Apache License at
|
15
|
-
#
|
16
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
17
|
-
#
|
18
|
-
# Unless required by applicable law or agreed to in writing, software
|
19
|
-
# distributed under the Apache License with the above modification is
|
20
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
-
# KIND, either express or implied. See the Apache License for the specific
|
22
|
-
# language governing permissions and limitations under the Apache License.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
|
26
|
-
# The Module
|
27
|
-
module Jamf
|
28
|
-
|
29
|
-
# Classes
|
30
|
-
#####################################
|
31
|
-
|
32
|
-
# A building defined in the JSS
|
33
|
-
class AdvancedSearch < Jamf::CollectionResource
|
34
|
-
|
35
|
-
extend Jamf::Abstract
|
36
|
-
|
37
|
-
# Constants
|
38
|
-
#####################################
|
39
|
-
|
40
|
-
# Object Model / Attributes
|
41
|
-
# See APIObject class documentation for details
|
42
|
-
# of how the OBJECT_MODEL hash works.
|
43
|
-
#####################################
|
44
|
-
OBJECT_MODEL = {
|
45
|
-
|
46
|
-
# @!attribute [r] id
|
47
|
-
# @return [Integer]
|
48
|
-
id: {
|
49
|
-
class: :integer,
|
50
|
-
identifier: :primary,
|
51
|
-
readonly: true
|
52
|
-
},
|
53
|
-
|
54
|
-
# @!attribute name
|
55
|
-
# @return [String]
|
56
|
-
name: {
|
57
|
-
class: :string,
|
58
|
-
identifier: true
|
59
|
-
},
|
60
|
-
|
61
|
-
# @!attribute criteria
|
62
|
-
# @return [Array<Jamf::Criterion>]
|
63
|
-
criteria: {
|
64
|
-
class: Jamf::Criterion,
|
65
|
-
multi: true,
|
66
|
-
required: true
|
67
|
-
},
|
68
|
-
|
69
|
-
# @!attribute displayFields
|
70
|
-
# @return [Array<String>]
|
71
|
-
displayFields: {
|
72
|
-
class: :string,
|
73
|
-
multi: true
|
74
|
-
},
|
75
|
-
|
76
|
-
# @!attribute site
|
77
|
-
# @return [Jamf::Site::Reference]
|
78
|
-
site: {
|
79
|
-
class: Jamf::Site::Reference
|
80
|
-
}
|
81
|
-
|
82
|
-
}.freeze
|
83
|
-
|
84
|
-
end # class
|
85
|
-
|
86
|
-
end # module
|
@@ -1,153 +0,0 @@
|
|
1
|
-
# Copyright 2020 Pixar
|
2
|
-
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
5
|
-
# with the following modification; you may not use this file except in
|
6
|
-
# compliance with the Apache License and the following modification to it:
|
7
|
-
# Section 6. Trademarks. is deleted and replaced with:
|
8
|
-
#
|
9
|
-
# 6. Trademarks. This License does not grant permission to use the trade
|
10
|
-
# names, trademarks, service marks, or product names of the Licensor
|
11
|
-
# and its affiliates, except as required to comply with Section 4(c) of
|
12
|
-
# the License and to reproduce the content of the NOTICE file.
|
13
|
-
#
|
14
|
-
# You may obtain a copy of the Apache License at
|
15
|
-
#
|
16
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
17
|
-
#
|
18
|
-
# Unless required by applicable law or agreed to in writing, software
|
19
|
-
# distributed under the Apache License with the above modification is
|
20
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
-
# KIND, either express or implied. See the Apache License for the specific
|
22
|
-
# language governing permissions and limitations under the Apache License.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
|
26
|
-
module Jamf
|
27
|
-
|
28
|
-
# TODO: This class and the referable mixin should be removed -
|
29
|
-
# According to the Jamf Pro API Styleguide/Specs:
|
30
|
-
#
|
31
|
-
# - Objects which reference other objects MUST only reference by its Jamf Pro-assigned numerical ID.
|
32
|
-
#
|
33
|
-
# and in newer endpoints that is what we're seeing, e.g. fields like
|
34
|
-
# 'siteId' and 'categoryId'
|
35
|
-
|
36
|
-
# This class is a reference to an individual API object from some other
|
37
|
-
# API object.
|
38
|
-
#
|
39
|
-
# This class is subclassed automatically when the {Jamf::Referable} module
|
40
|
-
# is included into a class.
|
41
|
-
#
|
42
|
-
# See {Jamf::Referable} for how to use the subclasses of GenericReference.
|
43
|
-
#
|
44
|
-
# Subclasses must define:
|
45
|
-
#
|
46
|
-
# REFERENT_CLASS - the full class to which this is a reference
|
47
|
-
# e.g. for BuildingReference it would be Jamf::Building
|
48
|
-
#
|
49
|
-
# Defining REFERENT_CLASS is handled automatically by including the
|
50
|
-
# Referable module
|
51
|
-
#
|
52
|
-
# @abstract
|
53
|
-
#
|
54
|
-
class GenericReference < Jamf::JSONObject
|
55
|
-
|
56
|
-
extend Jamf::Abstract
|
57
|
-
|
58
|
-
# Constants
|
59
|
-
#####################################
|
60
|
-
|
61
|
-
OBJECT_MODEL = {
|
62
|
-
|
63
|
-
id: {
|
64
|
-
class: :j_id,
|
65
|
-
identifier: :primary,
|
66
|
-
readonly: true
|
67
|
-
},
|
68
|
-
|
69
|
-
name: {
|
70
|
-
class: :string,
|
71
|
-
readonly: true
|
72
|
-
}
|
73
|
-
|
74
|
-
}.freeze
|
75
|
-
parse_object_model
|
76
|
-
|
77
|
-
# Constructor
|
78
|
-
#####################################
|
79
|
-
|
80
|
-
# Make a new reference to an API CollectionResource Object
|
81
|
-
#
|
82
|
-
# The data parameter can be one of:
|
83
|
-
#
|
84
|
-
# 1) A Hash with an :id and :name
|
85
|
-
# This is mostly used automatically when parsing fetched API data.
|
86
|
-
# When some attribute of an OBJECT_MODEL has `class: Someclass::Reference`
|
87
|
-
# the JSON hash from the API will be passed as the data param.
|
88
|
-
#
|
89
|
-
# e.g.
|
90
|
-
# - Policy::OBJECT_MODEL[:category][:class] is Jamf::Category::Reference
|
91
|
-
# - the policy JSON from the api might contain `category: { id: 234, name: 'foobar' }`
|
92
|
-
# - that hash will be passed into Jamf::Category::Reference.new, and the
|
93
|
-
# resulting instance used as the value of the policy's :category attribute.
|
94
|
-
#
|
95
|
-
# 2) An instance of the REFERENT_CLASS.
|
96
|
-
# This can be used to make a reference to some specific instance of
|
97
|
-
# the referent class.
|
98
|
-
#
|
99
|
-
# e.g. if you have an instance of Category in the variable `my_cat`
|
100
|
-
# then `ref_to_my_cat = Category::Reference.new my_cat` will work as
|
101
|
-
# expected.
|
102
|
-
#
|
103
|
-
# 3) A valid identifier for an existing REFERENT_CLASS in the JSS.
|
104
|
-
# The given value will be used with the REFERENT_CLASS's .valid_id method
|
105
|
-
# to see if there's a matching instance, which the reference refers to.
|
106
|
-
#
|
107
|
-
# e.g. `ref_to_my_cat = Category::Reference.new 12` creates a reference
|
108
|
-
# to Category id 12, and `ref_to_my_cat = Category::Reference.new 'foo'`
|
109
|
-
# creates a reference to the category named 'foo' - assuming they exist.
|
110
|
-
#
|
111
|
-
# The last two of these are commonly used with setters for attributes that
|
112
|
-
# have class: <some reference class>
|
113
|
-
#
|
114
|
-
# e.g. setting the category of a policy when
|
115
|
-
# Policy::OBJECT_MODEL[:category] is Category::Reference
|
116
|
-
#
|
117
|
-
# `mypolicy.category = a_cat` # a_cat is a Category instance
|
118
|
-
# `mypolicy.category = 12` # use categoty id 12
|
119
|
-
# `mypolicy.category = 'foo'` # use categoty named 'foo'
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
# @param data[Hash,CollectionResource,String,Integer]
|
124
|
-
#
|
125
|
-
def initialize(data, cnx: Jamf.cnx)
|
126
|
-
ref_class = self.class::REFERENT_CLASS
|
127
|
-
case data
|
128
|
-
when Hash
|
129
|
-
super
|
130
|
-
when ref_class
|
131
|
-
raise Jamf::InvalidDataError, "Provided #{ref_class} hasn't been created" unless data.exist?
|
132
|
-
@id = data.id
|
133
|
-
@name = data.name if data.respond_to? :name
|
134
|
-
@cnx = data.cnx
|
135
|
-
when nil
|
136
|
-
@id = nil
|
137
|
-
@name = nil
|
138
|
-
@cnx = cnx
|
139
|
-
else
|
140
|
-
@id = ref_class.valid_id data, cnx: cnx
|
141
|
-
raise "No matching #{ref_class}" unless @id
|
142
|
-
@name = ref_class.map_all(:id, to: :name, cnx: cnx)[@id]
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
def to_jamf
|
147
|
-
return nil if @id.nil?
|
148
|
-
{ id: @id }
|
149
|
-
end
|
150
|
-
|
151
|
-
end # class
|
152
|
-
|
153
|
-
end # module
|
@@ -1,147 +0,0 @@
|
|
1
|
-
# Copyright 2020 Pixar
|
2
|
-
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
5
|
-
# with the following modification; you may not use this file except in
|
6
|
-
# compliance with the Apache License and the following modification to it:
|
7
|
-
# Section 6. Trademarks. is deleted and replaced with:
|
8
|
-
#
|
9
|
-
# 6. Trademarks. This License does not grant permission to use the trade
|
10
|
-
# names, trademarks, service marks, or product names of the Licensor
|
11
|
-
# and its affiliates, except as required to comply with Section 4(c) of
|
12
|
-
# the License and to reproduce the content of the NOTICE file.
|
13
|
-
#
|
14
|
-
# You may obtain a copy of the Apache License at
|
15
|
-
#
|
16
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
17
|
-
#
|
18
|
-
# Unless required by applicable law or agreed to in writing, software
|
19
|
-
# distributed under the Apache License with the above modification is
|
20
|
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
21
|
-
# KIND, either express or implied. See the Apache License for the specific
|
22
|
-
# language governing permissions and limitations under the Apache License.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
|
26
|
-
# The module
|
27
|
-
module Jamf
|
28
|
-
|
29
|
-
# A class that represents the 'Skip' settings for
|
30
|
-
# various Setup options in a DEP prestage
|
31
|
-
# The object model here includes the attributes common
|
32
|
-
# to both Computer and MobileDevice prestages
|
33
|
-
#
|
34
|
-
# To see the current list of settings that are common
|
35
|
-
# to both Computers and MobileDevices, run this in irb:
|
36
|
-
#
|
37
|
-
# Jamf::ComputerPrestage.all.sample[:skipSetupItems].keys & Jamf::MobileDevicePrestage.all.sample[:skipSetupItems].keys
|
38
|
-
#
|
39
|
-
# => [
|
40
|
-
# :Appearance,
|
41
|
-
# :AppleID,
|
42
|
-
# :Biometric,
|
43
|
-
# :Diagnostics,
|
44
|
-
# :DisplayTone,
|
45
|
-
# :Location,
|
46
|
-
# :Payment,
|
47
|
-
# :Privacy,
|
48
|
-
# :Restore,
|
49
|
-
# :ScreenTime,
|
50
|
-
# :Siri,
|
51
|
-
# :TOS
|
52
|
-
# ]
|
53
|
-
#
|
54
|
-
class PrestageSkipSetupItems < Jamf::JSONObject
|
55
|
-
|
56
|
-
extend Jamf::Abstract
|
57
|
-
|
58
|
-
OBJECT_MODEL = {
|
59
|
-
|
60
|
-
# @!attribute Appearance
|
61
|
-
# @return [Boolean]
|
62
|
-
Appearance: {
|
63
|
-
class: :boolean,
|
64
|
-
aliases: %i[appearance]
|
65
|
-
},
|
66
|
-
|
67
|
-
# @!attribute AppleID
|
68
|
-
# @return [Boolean]
|
69
|
-
AppleID: {
|
70
|
-
class: :boolean,
|
71
|
-
aliases: %i[appleID appleid apple_id]
|
72
|
-
},
|
73
|
-
|
74
|
-
# @!attribute Biometric
|
75
|
-
# @return [Boolean]
|
76
|
-
Biometric: {
|
77
|
-
class: :boolean,
|
78
|
-
aliases: %i[biometric]
|
79
|
-
},
|
80
|
-
|
81
|
-
# @!attribute Diagnostics
|
82
|
-
# @return [Boolean]
|
83
|
-
Diagnostics: {
|
84
|
-
class: :boolean,
|
85
|
-
aliases: %i[diagnostics]
|
86
|
-
},
|
87
|
-
|
88
|
-
# @!attribute DisplayTone
|
89
|
-
# @return [Boolean]
|
90
|
-
DisplayTone: {
|
91
|
-
class: :boolean,
|
92
|
-
aliases: %i[displaytone display_tone]
|
93
|
-
},
|
94
|
-
|
95
|
-
# @!attribute Location
|
96
|
-
# @return [Boolean]
|
97
|
-
Location: {
|
98
|
-
class: :boolean,
|
99
|
-
aliases: %i[location]
|
100
|
-
},
|
101
|
-
|
102
|
-
# @!attribute Payment
|
103
|
-
# @return [Boolean]
|
104
|
-
Payment: {
|
105
|
-
class: :boolean,
|
106
|
-
aliases: %i[payment]
|
107
|
-
},
|
108
|
-
|
109
|
-
# @!attribute Privacy
|
110
|
-
# @return [Boolean]
|
111
|
-
Privacy: {
|
112
|
-
class: :boolean,
|
113
|
-
aliases: %i[privacy]
|
114
|
-
},
|
115
|
-
|
116
|
-
# @!attribute Restore
|
117
|
-
# @return [Boolean]
|
118
|
-
Restore: {
|
119
|
-
class: :boolean,
|
120
|
-
aliases: %i[restore]
|
121
|
-
},
|
122
|
-
|
123
|
-
# @!attribute ScreenTime
|
124
|
-
# @return [Boolean]
|
125
|
-
ScreenTime: {
|
126
|
-
class: :boolean,
|
127
|
-
aliases: %i[screenTime screentime]
|
128
|
-
},
|
129
|
-
|
130
|
-
# @!attribute Siri
|
131
|
-
# @return [Boolean]
|
132
|
-
Siri: {
|
133
|
-
class: :boolean,
|
134
|
-
aliases: %i[siri]
|
135
|
-
},
|
136
|
-
|
137
|
-
# @!attribute TOS
|
138
|
-
# @return [Boolean]
|
139
|
-
TOS: {
|
140
|
-
class: :boolean,
|
141
|
-
aliases: %i[tos terms_of_service]
|
142
|
-
}
|
143
|
-
}.freeze
|
144
|
-
|
145
|
-
end # class location
|
146
|
-
|
147
|
-
end # module
|