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_REBOOT = 'REBOOT'.freeze, OPERATION_TYPE_RERUN_WORK_REQUEST = 'RERUN_WORK_REQUEST'.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.
-
#reboot_timeout_in_mins ⇒ Integer
The number of minutes the service waits for the reboot to complete.
-
#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
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 116 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'] self.reboot_timeout_in_mins = attributes[:'rebootTimeoutInMins'] if attributes[:'rebootTimeoutInMins'] raise 'You cannot provide both :rebootTimeoutInMins and :reboot_timeout_in_mins' if attributes.key?(:'rebootTimeoutInMins') && attributes.key?(:'reboot_timeout_in_mins') self.reboot_timeout_in_mins = attributes[:'reboot_timeout_in_mins'] if attributes[:'reboot_timeout_in_mins'] end |
Instance Attribute Details
#manage_module_streams_details ⇒ OCI::OsManagementHub::Models::ManageModuleStreamsInScheduledJobDetails
56 57 58 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 56 def manage_module_streams_details @manage_module_streams_details end |
#operation_type ⇒ String
[Required] The type of operation this scheduled job performs.
42 43 44 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 42 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.
46 47 48 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 46 def package_names @package_names end |
#reboot_timeout_in_mins ⇒ Integer
The number of minutes the service waits for the reboot to complete. If the instance doesn't reboot within the timeout, the service marks the reboot job as failed.
71 72 73 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 71 def reboot_timeout_in_mins @reboot_timeout_in_mins 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.
65 66 67 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 65 def software_source_ids @software_source_ids end |
#switch_module_streams_details ⇒ OCI::OsManagementHub::Models::ModuleStreamDetails
59 60 61 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 59 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'.
53 54 55 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 53 def windows_update_names @windows_update_names end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 74 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', 'reboot_timeout_in_mins': :'rebootTimeoutInMins' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 89 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>', 'reboot_timeout_in_mins': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 185 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 && reboot_timeout_in_mins == other.reboot_timeout_in_mins end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 221 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
201 202 203 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 201 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
210 211 212 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 210 def hash [operation_type, package_names, windows_update_names, manage_module_streams_details, switch_module_streams_details, software_source_ids, reboot_timeout_in_mins].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
254 255 256 257 258 259 260 261 262 263 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 254 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
248 249 250 |
# File 'lib/oci/os_management_hub/models/scheduled_job_operation.rb', line 248 def to_s to_hash.to_s end |