Class: OCI::FleetAppsManagement::Models::Details
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::Details
- Defined in:
- lib/oci/fleet_apps_management/models/details.rb
Overview
The details of the task.
Constant Summary collapse
- OS_TYPE_ENUM =
[ OS_TYPE_WINDOWS = 'WINDOWS'.freeze, OS_TYPE_LINUX = 'LINUX'.freeze, OS_TYPE_GENERIC = 'GENERIC'.freeze, OS_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SCOPE_ENUM =
[ SCOPE_LOCAL = 'LOCAL'.freeze, SCOPE_SHARED = 'SHARED'.freeze, SCOPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#execution_details ⇒ OCI::FleetAppsManagement::Models::ExecutionDetails
This attribute is required.
-
#is_apply_subject_task ⇒ BOOLEAN
Is this an Apply Subject Task? Set this to true for a Patch Execution Task which applies patches(subjects) on a target.
-
#is_discovery_output_task ⇒ BOOLEAN
Is this a discovery output task?.
-
#operation ⇒ String
The lifecycle operation performed by the runbook.
-
#os_type ⇒ String
The OS for the task.
-
#platform ⇒ String
The platform of the runbook.
- #properties ⇒ OCI::FleetAppsManagement::Models::Properties
-
#scope ⇒ String
[Required] The scope of the task.
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 = {}) ⇒ Details
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 = {}) ⇒ Details
Initializes the object
104 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 147 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 104 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.execution_details = attributes[:'executionDetails'] if attributes[:'executionDetails'] raise 'You cannot provide both :executionDetails and :execution_details' if attributes.key?(:'executionDetails') && attributes.key?(:'execution_details') self.execution_details = attributes[:'execution_details'] if attributes[:'execution_details'] self.platform = attributes[:'platform'] if attributes[:'platform'] self.os_type = attributes[:'osType'] if attributes[:'osType'] self.os_type = "GENERIC" if os_type.nil? && !attributes.key?(:'osType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :osType and :os_type' if attributes.key?(:'osType') && attributes.key?(:'os_type') self.os_type = attributes[:'os_type'] if attributes[:'os_type'] self.os_type = "GENERIC" if os_type.nil? && !attributes.key?(:'osType') && !attributes.key?(:'os_type') # rubocop:disable Style/StringLiterals self.scope = attributes[:'scope'] if attributes[:'scope'] self.properties = attributes[:'properties'] if attributes[:'properties'] self.is_discovery_output_task = attributes[:'isDiscoveryOutputTask'] unless attributes[:'isDiscoveryOutputTask'].nil? self.is_discovery_output_task = false if is_discovery_output_task.nil? && !attributes.key?(:'isDiscoveryOutputTask') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isDiscoveryOutputTask and :is_discovery_output_task' if attributes.key?(:'isDiscoveryOutputTask') && attributes.key?(:'is_discovery_output_task') self.is_discovery_output_task = attributes[:'is_discovery_output_task'] unless attributes[:'is_discovery_output_task'].nil? self.is_discovery_output_task = false if is_discovery_output_task.nil? && !attributes.key?(:'isDiscoveryOutputTask') && !attributes.key?(:'is_discovery_output_task') # rubocop:disable Style/StringLiterals self.is_apply_subject_task = attributes[:'isApplySubjectTask'] unless attributes[:'isApplySubjectTask'].nil? self.is_apply_subject_task = false if is_apply_subject_task.nil? && !attributes.key?(:'isApplySubjectTask') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isApplySubjectTask and :is_apply_subject_task' if attributes.key?(:'isApplySubjectTask') && attributes.key?(:'is_apply_subject_task') self.is_apply_subject_task = attributes[:'is_apply_subject_task'] unless attributes[:'is_apply_subject_task'].nil? self.is_apply_subject_task = false if is_apply_subject_task.nil? && !attributes.key?(:'isApplySubjectTask') && !attributes.key?(:'is_apply_subject_task') # rubocop:disable Style/StringLiterals self.operation = attributes[:'operation'] if attributes[:'operation'] end |
Instance Attribute Details
#execution_details ⇒ OCI::FleetAppsManagement::Models::ExecutionDetails
This attribute is required.
27 28 29 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 27 def execution_details @execution_details end |
#is_apply_subject_task ⇒ BOOLEAN
Is this an Apply Subject Task? Set this to true for a Patch Execution Task which applies patches(subjects) on a target.
52 53 54 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 52 def is_apply_subject_task @is_apply_subject_task end |
#is_discovery_output_task ⇒ BOOLEAN
Is this a discovery output task?
46 47 48 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 46 def is_discovery_output_task @is_discovery_output_task end |
#operation ⇒ String
The lifecycle operation performed by the runbook.
56 57 58 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 56 def operation @operation end |
#os_type ⇒ String
The OS for the task
35 36 37 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 35 def os_type @os_type end |
#platform ⇒ String
The platform of the runbook.
31 32 33 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 31 def platform @platform end |
#properties ⇒ OCI::FleetAppsManagement::Models::Properties
42 43 44 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 42 def properties @properties end |
#scope ⇒ String
[Required] The scope of the task
39 40 41 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 39 def scope @scope end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 59 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'execution_details': :'executionDetails', 'platform': :'platform', 'os_type': :'osType', 'scope': :'scope', 'properties': :'properties', 'is_discovery_output_task': :'isDiscoveryOutputTask', 'is_apply_subject_task': :'isApplySubjectTask', 'operation': :'operation' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'execution_details': :'OCI::FleetAppsManagement::Models::ExecutionDetails', 'platform': :'String', 'os_type': :'String', 'scope': :'String', 'properties': :'OCI::FleetAppsManagement::Models::Properties', 'is_discovery_output_task': :'BOOLEAN', 'is_apply_subject_task': :'BOOLEAN', 'operation': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 182 def ==(other) return true if equal?(other) self.class == other.class && execution_details == other.execution_details && platform == other.platform && os_type == other.os_type && scope == other.scope && properties == other.properties && is_discovery_output_task == other.is_discovery_output_task && is_apply_subject_task == other.is_apply_subject_task && operation == other.operation end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 219 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
199 200 201 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 199 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
208 209 210 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 208 def hash [execution_details, platform, os_type, scope, properties, is_discovery_output_task, is_apply_subject_task, operation].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
252 253 254 255 256 257 258 259 260 261 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 252 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
246 247 248 |
# File 'lib/oci/fleet_apps_management/models/details.rb', line 246 def to_s to_hash.to_s end |