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.

Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +26 -0
  3. data/lib/jamf.rb +8 -13
  4. data/lib/jamf/api/{abstract_classes → base_classes}/collection_resource.rb +6 -5
  5. data/lib/jamf/api/{abstract_classes → base_classes}/json_object.rb +4 -20
  6. data/lib/jamf/api/{abstract_classes → base_classes}/prestage.rb +1 -1
  7. data/lib/jamf/api/{abstract_classes → base_classes}/resource.rb +6 -2
  8. data/lib/jamf/api/{abstract_classes → base_classes}/singleton_resource.rb +3 -2
  9. data/lib/jamf/api/json_objects/device_enrollment_sync_status.rb +1 -1
  10. data/lib/jamf/api/json_objects/md_prestage_name.rb +1 -1
  11. data/lib/jamf/api/json_objects/md_prestage_names.rb +2 -2
  12. data/lib/jamf/api/json_objects/prestage_assignment.rb +2 -2
  13. data/lib/jamf/api/mixins/{abstract.rb → base_class.rb} +34 -16
  14. data/lib/jamf/api/resources/collection_resources/building.rb +0 -4
  15. data/lib/jamf/api/resources/collection_resources/category.rb +0 -1
  16. data/lib/jamf/api/resources/collection_resources/computer_prestage.rb +1 -1
  17. data/lib/jamf/api/resources/collection_resources/department.rb +0 -2
  18. data/lib/jamf/api/resources/collection_resources/mobile_device_prestage.rb +1 -1
  19. data/lib/jamf/version.rb +1 -1
  20. data/lib/jss/api_connection.rb +1 -36
  21. data/lib/jss/api_object/computer.rb +13 -0
  22. data/lib/jss/api_object/configuration_profile.rb +28 -3
  23. data/lib/jss/api_object/policy.rb +105 -25
  24. data/lib/jss/api_object/scopable/scope.rb +31 -30
  25. data/lib/jss/utility.rb +142 -37
  26. data/lib/jss/version.rb +1 -1
  27. metadata +8 -41
  28. data/lib/jamf/api/abstract_classes/advanced_search.rb +0 -86
  29. data/lib/jamf/api/abstract_classes/generic_reference.rb +0 -153
  30. data/lib/jamf/api/abstract_classes/prestage_skip_setup_items.rb +0 -147
  31. data/lib/jamf/api/json_objects/account_prefs.rb +0 -79
  32. data/lib/jamf/api/json_objects/android_details.rb +0 -139
  33. data/lib/jamf/api/json_objects/appletv_details.rb +0 -110
  34. data/lib/jamf/api/json_objects/attachment.rb +0 -68
  35. data/lib/jamf/api/json_objects/cellular_network.rb +0 -151
  36. data/lib/jamf/api/json_objects/computer_prestage_skip_setup_items.rb +0 -80
  37. data/lib/jamf/api/json_objects/criterion.rb +0 -152
  38. data/lib/jamf/api/json_objects/extension_attribute_value.rb +0 -128
  39. data/lib/jamf/api/json_objects/installed_application.rb +0 -59
  40. data/lib/jamf/api/json_objects/installed_certificate.rb +0 -53
  41. data/lib/jamf/api/json_objects/installed_configuration_profile.rb +0 -67
  42. data/lib/jamf/api/json_objects/installed_ebook.rb +0 -58
  43. data/lib/jamf/api/json_objects/installed_provisioning_profile.rb +0 -59
  44. data/lib/jamf/api/json_objects/ios_details.rb +0 -244
  45. data/lib/jamf/api/json_objects/location.rb +0 -95
  46. data/lib/jamf/api/json_objects/mobile_device_details.rb +0 -219
  47. data/lib/jamf/api/json_objects/mobile_device_security.rb +0 -101
  48. data/lib/jamf/api/json_objects/purchasing_data.rb +0 -125
  49. data/lib/jamf/api/mixins/locatable.rb +0 -124
  50. data/lib/jamf/api/mixins/referable.rb +0 -92
  51. data/lib/jamf/api/resources/collection_resources/account.rb +0 -163
  52. data/lib/jamf/api/resources/collection_resources/advanced_mobile_device_search.rb +0 -52
  53. data/lib/jamf/api/resources/collection_resources/advanced_user_search.rb +0 -52
  54. data/lib/jamf/api/resources/collection_resources/computer.rb +0 -49
  55. data/lib/jamf/api/resources/collection_resources/extension_attribute.rb +0 -45
  56. data/lib/jamf/api/resources/collection_resources/mobile_device.rb +0 -315
  57. data/lib/jamf/api/resources/collection_resources/site.rb +0 -77
  58. data/lib/jamf/api/resources/singleton_resources/authorization.rb +0 -88
  59. data/lib/jamf/api/resources/singleton_resources/client_checkin_settings.rb +0 -139
  60. data/lib/jamf/api/resources/singleton_resources/reenrollment_settings.rb +0 -95
@@ -1,79 +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
- # Preferences for an administrator account in the JSS
33
- class AccountPreferences < Jamf::JSONObject
34
-
35
- # Object Model / Attributes
36
- # See APIObject class documentation for details
37
- # of how the OBJECT_MODEL hash works.
38
- #####################################
39
- OBJECT_MODEL = {
40
-
41
- # @!attribute [r] language
42
- # @return [String]
43
- language: {
44
- class: :string,
45
- readonly: true
46
- },
47
-
48
- # @!attribute [r] dateFormat
49
- # @return [String]
50
- dateFormat: {
51
- class: :string,
52
- readonly: true
53
- },
54
-
55
- # @!attribute [r] region
56
- # @return [String]
57
- region: {
58
- class: :string,
59
- readonly: true
60
- },
61
- # @!attribute [r] timezone
62
- # @return [String]
63
- timezone: {
64
- class: :string,
65
- readonly: true
66
- },
67
-
68
- # @!attribute [r] isDisableRelativeDates
69
- # @return [String]
70
- isDisableRelativeDates: {
71
- class: :boolean,
72
- readonly: true
73
- }
74
- }.freeze
75
- parse_object_model
76
-
77
- end # class
78
-
79
- end # module
@@ -1,139 +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
- class AndroidDetails < Jamf::JSONObject
30
-
31
- # Class Constants
32
- #####################################
33
-
34
- OBJECT_MODEL = {
35
-
36
- # @!attribute [r] osName
37
- # @return [String]
38
- osName: {
39
- class: :string,
40
- readonly: true
41
- },
42
-
43
- # @!attribute [r] manufacturer
44
- # @return [String]
45
- manufacturer: {
46
- class: :string,
47
- readonly: true
48
- },
49
-
50
- # @!attribute [r] model
51
- # @return [String]
52
- model: {
53
- class: :string,
54
- readonly: true
55
- },
56
-
57
- # @!attribute [r] internalCapacityMb
58
- # @return [Integer]
59
- internalCapacityMb: {
60
- class: :integer,
61
- readonly: true
62
- },
63
-
64
- # @!attribute [r] internalAvailableMb
65
- # @return [Integer]
66
- internalAvailableMb: {
67
- class: :integer,
68
- readonly: true
69
- },
70
-
71
- # @!attribute [r] internalPercentUsed
72
- # @return [Integer]
73
- internalPercentUsed: {
74
- class: :integer,
75
- readonly: true
76
- },
77
-
78
- # @!attribute [r] externalCapacityMb
79
- # @return [Integer]
80
- externalCapacityMb: {
81
- class: :integer,
82
- readonly: true
83
- },
84
-
85
- # @!attribute [r] externalAvailableMb
86
- # @return [Integer]
87
- externalAvailableMb: {
88
- class: :integer,
89
- readonly: true
90
- },
91
-
92
- # @!attribute [r] externalPercentUsed
93
- # @return [Integer]
94
- externalPercentUsed: {
95
- class: :integer,
96
- readonly: true
97
- },
98
-
99
- # @!attribute [r] batteryLevel
100
- # @return [Integer]
101
- batteryLevel: {
102
- class: :integer,
103
- readonly: true
104
- },
105
-
106
- # @!attribute [r] lastBackupTimestamp
107
- # @return [Jamf::Timestamp]
108
- lastBackupTimestamp: {
109
- class: Jamf::Timestamp,
110
- readonly: true,
111
- aliases: %i[lastBackup]
112
- },
113
-
114
- # @!attribute [r] apiVersion
115
- # @return [Integer]
116
- apiVersion: {
117
- class: :integer,
118
- readonly: true
119
- },
120
-
121
- # @!attribute [r] computer
122
- # @return [Jamf::Computer::Reference]
123
- computer: {
124
- class: Jamf::Computer::Reference,
125
- readonly: true
126
- },
127
-
128
- # @!attribute [r] security
129
- # @return [Jamf::MobileDevic:Security]
130
- security: {
131
- class: Jamf::MobileDeviceSecurity,
132
- readonly: true
133
- }
134
- }.freeze
135
- parse_object_model
136
-
137
- end # class Details
138
-
139
- end # module
@@ -1,110 +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
- class AppleTVDetails < Jamf::JSONObject
30
-
31
- # Class Constants
32
- #####################################
33
-
34
- # Since instances of this class are always embedded in the
35
- # matching MobileDevice instance, duplicated attributes are
36
- # omitted from OBJECT_MODEL
37
- OBJECT_MODEL = {
38
-
39
- # @!attribute [r] model
40
- # @param [String]
41
- # @return [String]
42
- model: {
43
- class: :string,
44
- readonly: true
45
- },
46
-
47
- # @!attribute [r] modelIdentifier
48
- # @param [String]
49
- # @return [String]
50
- modelIdentifier: {
51
- class: :string,
52
- readonly: true
53
- },
54
-
55
- # @!attribute [r] modelNumber
56
- # @param [String]
57
- # @return [String]
58
- modelNumber: {
59
- class: :string,
60
- readonly: true
61
- },
62
-
63
- # @!attribute [r] isSupervised
64
- # @return [Boolean]
65
- isSupervised: {
66
- class: :boolean,
67
- readonly: true
68
- },
69
-
70
- # @!attribute [r] deviceId
71
- # @return [String]
72
- deviceId: {
73
- class: :string,
74
- readonly: true,
75
- aliases: [:ethernet_mac_address]
76
- },
77
-
78
- # @!attribute [r] locales
79
- # @return [String]
80
- locales: {
81
- class: :string,
82
- readonly: true
83
- },
84
-
85
- # @!attribute [r] configurationProfiles
86
- # @return [Jamf::InstalledConfigurationProfile]
87
- configurationProfiles: {
88
- class: Jamf::InstalledConfigurationProfile,
89
- readonly: true,
90
- multi: true
91
- },
92
-
93
- # @!attribute [r] airplayPassword
94
- # @return [String]
95
- airplayPassword: {
96
- class: :string
97
- },
98
-
99
- # @!attribute [r] purchasing
100
- # @return [Jamf::PurchasingData]
101
- purchasing: {
102
- class: Jamf::PurchasingData,
103
- readonly: true
104
- }
105
- }.freeze
106
- parse_object_model
107
-
108
- end # class AppleTVDetails
109
-
110
- end # module
@@ -1,68 +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
- # 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
- #####################################
42
-
43
- # Object Model / Attributes
44
- # See APIObject class documentation for details
45
- # of how the OBJECT_MODEL hash works.
46
- #####################################
47
- OBJECT_MODEL = {
48
-
49
- # @!attribute [r] id
50
- # @return [Integer]
51
- id: {
52
- class: :integer,
53
- identifier: :primary,
54
- readonly: true
55
- },
56
-
57
- # @!attribute name
58
- # @return [String]
59
- name: {
60
- class: :string,
61
- readonly: true
62
- }
63
- }.freeze
64
- parse_object_model
65
-
66
- end # class
67
-
68
- end # module
@@ -1,151 +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
- # The collection of security settings for a device
30
- class CellularNetwork < Jamf::JSONObject
31
-
32
- OBJECT_MODEL = {
33
-
34
- # @!attribute [r] cellularTechnology
35
- # @return [String]
36
- cellularTechnology: {
37
- class: :string,
38
- readonly: true
39
- },
40
-
41
- # @!attribute [r] isVoiceRoamingEnabled
42
- # @return [Boolean]
43
- isVoiceRoamingEnabled: {
44
- class: :boolean,
45
- readonly: true
46
- },
47
-
48
- # @!attribute [r] isDataRoamingEnabled
49
- # @return [Boolean]
50
- isDataRoamingEnabled: {
51
- class: :boolean,
52
- readonly: true
53
- },
54
-
55
- # @!attribute [r] isRoaming
56
- # @return [Boolean]
57
- isRoaming: {
58
- class: :boolean,
59
- readonly: true
60
- },
61
-
62
- # @!attribute [r] imei
63
- # @return [String]
64
- imei: {
65
- class: :string,
66
- readonly: true
67
- },
68
-
69
- # @!attribute [r] iccid
70
- # @return [String]
71
- iccid: {
72
- class: :string,
73
- readonly: true
74
- },
75
-
76
- # @!attribute [r] meid
77
- # @return [String]
78
- meid: {
79
- class: :string,
80
- readonly: true
81
- },
82
-
83
- # @!attribute [r] carrierSettingsVersion
84
- # @return [String]
85
- carrierSettingsVersion: {
86
- class: :string,
87
- readonly: true
88
- },
89
-
90
- # @!attribute [r] currentCarrierNetwork
91
- # @return [String]
92
- currentCarrierNetwork: {
93
- class: :string,
94
- readonly: true
95
- },
96
-
97
- # @!attribute [r] currentMobileCountryCode
98
- # @return [String]
99
- currentMobileCountryCode: {
100
- class: :string,
101
- readonly: true
102
- },
103
-
104
- # @!attribute [r] currentMobileNetworkCode
105
- # @return [String]
106
- currentMobileNetworkCode: {
107
- class: :string,
108
- readonly: true
109
- },
110
-
111
- # @!attribute [r] homeCarrierNetwork
112
- # @return [String]
113
- homeCarrierNetwork: {
114
- class: :string,
115
- readonly: true
116
- },
117
-
118
- # @!attribute [r] homeMobileCountryCode
119
- # @return [String]
120
- homeMobileCountryCode: {
121
- class: :string,
122
- readonly: true
123
- },
124
-
125
- # @!attribute [r] homeMobileNetworkCode
126
- # @return [String]
127
- homeMobileNetworkCode: {
128
- class: :string,
129
- readonly: true
130
- },
131
-
132
- # @!attribute [r] phoneNumber
133
- # @return [String]
134
- phoneNumber: {
135
- class: :string,
136
- readonly: true
137
- }
138
-
139
- }.freeze
140
- parse_object_model
141
-
142
- # Setting as a whole always fails.
143
- #
144
- def self.validate(_value, _cnx = nil)
145
- raise Jamf::UnsupportedError, 'Mobile Device CellularNetwork state cannot be changed via API'
146
- end
147
-
148
-
149
- end # class Mobile Device security
150
-
151
- end # module