Class: OCI::OsManagementHub::Models::ScheduledJobOperation
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::ScheduledJobOperation
- Defined in:
- lib/oci/os_management_hub/models/scheduled_job_operation.rb
Overview
Defines an operation that is performed by a scheduled job.
Constant Summary collapse
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_INSTALL_PACKAGES = 'INSTALL_PACKAGES'.freeze, OPERATION_TYPE_UPDATE_PACKAGES = 'UPDATE_PACKAGES'.freeze, OPERATION_TYPE_REMOVE_PACKAGES = 'REMOVE_PACKAGES'.freeze, OPERATION_TYPE_UPDATE_ALL = 'UPDATE_ALL'.freeze, OPERATION_TYPE_UPDATE_SECURITY = 'UPDATE_SECURITY'.freeze, OPERATION_TYPE_UPDATE_BUGFIX = 'UPDATE_BUGFIX'.freeze, OPERATION_TYPE_UPDATE_ENHANCEMENT = 'UPDATE_ENHANCEMENT'.freeze, OPERATION_TYPE_UPDATE_OTHER = 'UPDATE_OTHER'.freeze, OPERATION_TYPE_UPDATE_KSPLICE_USERSPACE = 'UPDATE_KSPLICE_USERSPACE'.freeze, OPERATION_TYPE_UPDATE_KSPLICE_KERNEL = 'UPDATE_KSPLICE_KERNEL'.freeze, OPERATION_TYPE_MANAGE_MODULE_STREAMS = 'MANAGE_MODULE_STREAMS'.freeze, OPERATION_TYPE_SWITCH_MODULE_STREAM = 'SWITCH_MODULE_STREAM'.freeze, OPERATION_TYPE_ATTACH_SOFTWARE_SOURCES = 'ATTACH_SOFTWARE_SOURCES'.freeze, OPERATION_TYPE_DETACH_SOFTWARE_SOURCES = 'DETACH_SOFTWARE_SOURCES'.freeze, OPERATION_TYPE_SYNC_MANAGEMENT_STATION_MIRROR = 'SYNC_MANAGEMENT_STATION_MIRROR'.freeze, OPERATION_TYPE_PROMOTE_LIFECYCLE = 'PROMOTE_LIFECYCLE'.freeze, OPERATION_TYPE_INSTALL_WINDOWS_UPDATES = 'INSTALL_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_INSTALL_ALL_WINDOWS_UPDATES = 'INSTALL_ALL_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_INSTALL_SECURITY_WINDOWS_UPDATES = 'INSTALL_SECURITY_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_INSTALL_BUGFIX_WINDOWS_UPDATES = 'INSTALL_BUGFIX_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_INSTALL_ENHANCEMENT_WINDOWS_UPDATES = 'INSTALL_ENHANCEMENT_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_INSTALL_OTHER_WINDOWS_UPDATES = 'INSTALL_OTHER_WINDOWS_UPDATES'.freeze, OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #manage_module_streams_details ⇒ OCI::OsManagementHub::Models::ManageModuleStreamsInScheduledJobDetails
-
#operation_type ⇒ String
[Required] The type of operation this scheduled job performs.
-
#package_names ⇒ Array<String>
The names of the target packages.
-
#software_source_ids ⇒ Array<String>
The software source OCIDs.
- #switch_module_streams_details ⇒ OCI::OsManagementHub::Models::ModuleStreamDetails
-
#windows_update_names ⇒ Array<String>
Unique identifier for the Windows update.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ScheduledJobOperation
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ScheduledJobOperation
Initializes the object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 105 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.operation_type = attributes[:'operationType'] if attributes[:'operationType'] raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type') self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type'] self.package_names = attributes[:'packageNames'] if attributes[:'packageNames'] raise 'You cannot provide both :packageNames and :package_names' if attributes.key?(:'packageNames') && attributes.key?(:'package_names') self.package_names = attributes[:'package_names'] if attributes[:'package_names'] self.windows_update_names = attributes[:'windowsUpdateNames'] if attributes[:'windowsUpdateNames'] raise 'You cannot provide both :windowsUpdateNames and :windows_update_names' if attributes.key?(:'windowsUpdateNames') && attributes.key?(:'windows_update_names') self.windows_update_names = attributes[:'windows_update_names'] if attributes[:'windows_update_names'] self.manage_module_streams_details = attributes[:'manageModuleStreamsDetails'] if attributes[:'manageModuleStreamsDetails'] raise 'You cannot provide both :manageModuleStreamsDetails and :manage_module_streams_details' if attributes.key?(:'manageModuleStreamsDetails') && attributes.key?(:'manage_module_streams_details') self.manage_module_streams_details = attributes[:'manage_module_streams_details'] if attributes[:'manage_module_streams_details'] self.switch_module_streams_details = attributes[:'switchModuleStreamsDetails'] if attributes[:'switchModuleStreamsDetails'] raise 'You cannot provide both :switchModuleStreamsDetails and :switch_module_streams_details' if attributes.key?(:'switchModuleStreamsDetails') && attributes.key?(:'switch_module_streams_details') self.switch_module_streams_details = attributes[:'switch_module_streams_details'] if attributes[:'switch_module_streams_details'] self.software_source_ids = attributes[:'softwareSourceIds'] if attributes[:'softwareSourceIds'] raise 'You cannot provide both :softwareSourceIds and :software_source_ids' if attributes.key?(:'softwareSourceIds') && attributes.key?(:'software_source_ids') self.software_source_ids = attributes[:'software_source_ids'] if attributes[:'software_source_ids'] end |
Instance Attribute Details
#manage_module_streams_details ⇒ OCI::OsManagementHub::Models::ManageModuleStreamsInScheduledJobDetails
54 55 56 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 54 def manage_module_streams_details @manage_module_streams_details end |
#operation_type ⇒ String
[Required] The type of operation this scheduled job performs.
40 41 42 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 40 def operation_type @operation_type end |
#package_names ⇒ Array<String>
The names of the target packages. This parameter only applies when the scheduled job is for installing, updating, or removing packages.
44 45 46 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 44 def package_names @package_names end |
#software_source_ids ⇒ Array<String>
The software source OCIDs. This parameter only applies when the scheduled job is for attaching or detaching software sources.
63 64 65 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 63 def software_source_ids @software_source_ids end |
#switch_module_streams_details ⇒ OCI::OsManagementHub::Models::ModuleStreamDetails
57 58 59 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 57 def switch_module_streams_details @switch_module_streams_details end |
#windows_update_names ⇒ Array<String>
Unique identifier for the Windows update. This parameter only applies if the scheduled job is for installing Windows updates. Note that this is not an OCID, but is a unique identifier assigned by Microsoft. For example: '6981d463-cd91-4a26-b7c4-ea4ded9183ed'.
51 52 53 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 51 def windows_update_names @windows_update_names end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 66 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'operation_type': :'operationType', 'package_names': :'packageNames', 'windows_update_names': :'windowsUpdateNames', 'manage_module_streams_details': :'manageModuleStreamsDetails', 'switch_module_streams_details': :'switchModuleStreamsDetails', 'software_source_ids': :'softwareSourceIds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'operation_type': :'String', 'package_names': :'Array<String>', 'windows_update_names': :'Array<String>', 'manage_module_streams_details': :'OCI::OsManagementHub::Models::ManageModuleStreamsInScheduledJobDetails', 'switch_module_streams_details': :'OCI::OsManagementHub::Models::ModuleStreamDetails', 'software_source_ids': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 168 def ==(other) return true if equal?(other) self.class == other.class && operation_type == other.operation_type && package_names == other.package_names && windows_update_names == other.windows_update_names && manage_module_streams_details == other.manage_module_streams_details && switch_module_streams_details == other.switch_module_streams_details && software_source_ids == other.software_source_ids end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 203 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
183 184 185 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 183 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
192 193 194 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 192 def hash [operation_type, package_names, windows_update_names, manage_module_streams_details, switch_module_streams_details, software_source_ids].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 236 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
230 231 232 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 230 def to_s to_hash.to_s end |