Class: OCI::OsManagementHub::Models::WorkRequestSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management_hub/models/work_request_summary.rb

Overview

The summary of a work request.

Constant Summary collapse

OPERATION_TYPE_ENUM =
[
  OPERATION_TYPE_INSTALL_PACKAGES = 'INSTALL_PACKAGES'.freeze,
  OPERATION_TYPE_REMOVE_PACKAGES = 'REMOVE_PACKAGES'.freeze,
  OPERATION_TYPE_UPDATE_PACKAGES = 'UPDATE_PACKAGES'.freeze,
  OPERATION_TYPE_UPDATE_ALL_PACKAGES = 'UPDATE_ALL_PACKAGES'.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_KERNEL = 'UPDATE_KSPLICE_KERNEL'.freeze,
  OPERATION_TYPE_UPDATE_KSPLICE_USERSPACE = 'UPDATE_KSPLICE_USERSPACE'.freeze,
  OPERATION_TYPE_ENABLE_MODULE_STREAMS = 'ENABLE_MODULE_STREAMS'.freeze,
  OPERATION_TYPE_DISABLE_MODULE_STREAMS = 'DISABLE_MODULE_STREAMS'.freeze,
  OPERATION_TYPE_SWITCH_MODULE_STREAM = 'SWITCH_MODULE_STREAM'.freeze,
  OPERATION_TYPE_INSTALL_MODULE_PROFILES = 'INSTALL_MODULE_PROFILES'.freeze,
  OPERATION_TYPE_REMOVE_MODULE_PROFILES = 'REMOVE_MODULE_PROFILES'.freeze,
  OPERATION_TYPE_SET_SOFTWARE_SOURCES = 'SET_SOFTWARE_SOURCES'.freeze,
  OPERATION_TYPE_LIST_PACKAGES = 'LIST_PACKAGES'.freeze,
  OPERATION_TYPE_SET_MANAGEMENT_STATION_CONFIG = 'SET_MANAGEMENT_STATION_CONFIG'.freeze,
  OPERATION_TYPE_SYNC_MANAGEMENT_STATION_MIRROR = 'SYNC_MANAGEMENT_STATION_MIRROR'.freeze,
  OPERATION_TYPE_UPDATE_MANAGEMENT_STATION_SOFTWARE = 'UPDATE_MANAGEMENT_STATION_SOFTWARE'.freeze,
  OPERATION_TYPE_UPDATE = 'UPDATE'.freeze,
  OPERATION_TYPE_MODULE_ACTIONS = 'MODULE_ACTIONS'.freeze,
  OPERATION_TYPE_LIFECYCLE_PROMOTION = 'LIFECYCLE_PROMOTION'.freeze,
  OPERATION_TYPE_CREATE_SOFTWARE_SOURCE = 'CREATE_SOFTWARE_SOURCE'.freeze,
  OPERATION_TYPE_UPDATE_SOFTWARE_SOURCE = 'UPDATE_SOFTWARE_SOURCE'.freeze,
  OPERATION_TYPE_IMPORT_CONTENT = 'IMPORT_CONTENT'.freeze,
  OPERATION_TYPE_SYNC_AGENT_CONFIG = 'SYNC_AGENT_CONFIG'.freeze,
  OPERATION_TYPE_INSTALL_WINDOWS_UPDATES = 'INSTALL_WINDOWS_UPDATES'.freeze,
  OPERATION_TYPE_LIST_WINDOWS_UPDATE = 'LIST_WINDOWS_UPDATE'.freeze,
  OPERATION_TYPE_GET_WINDOWS_UPDATE_DETAILS = 'GET_WINDOWS_UPDATE_DETAILS'.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_REMOVE_CONTENT = 'REMOVE_CONTENT'.freeze,
  OPERATION_TYPE_UNREGISTER_MANAGED_INSTANCE = 'UNREGISTER_MANAGED_INSTANCE'.freeze,
  OPERATION_TYPE_REBOOT = 'REBOOT'.freeze,
  OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
STATUS_ENUM =
[
  STATUS_WAITING = 'WAITING'.freeze,
  STATUS_ACCEPTED = 'ACCEPTED'.freeze,
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  STATUS_CANCELING = 'CANCELING'.freeze,
  STATUS_CANCELED = 'CANCELED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WorkRequestSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :operation_type (String)

    The value to assign to the #operation_type property

  • :status (String)

    The value to assign to the #status property

  • :id (String)

    The value to assign to the #id property

  • :description (String)

    The value to assign to the #description property

  • :display_name (String)

    The value to assign to the #display_name property

  • :message (String)

    The value to assign to the #message property

  • :parent_id (String)

    The value to assign to the #parent_id property

  • :children_id (Array<String>)

    The value to assign to the #children_id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :percent_complete (Float)

    The value to assign to the #percent_complete property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_scheduled (DateTime)

    The value to assign to the #time_scheduled property

  • :is_managed_by_autonomous_linux (BOOLEAN)

    The value to assign to the #is_managed_by_autonomous_linux property

  • :reboot_timeout_in_mins (Integer)

    The value to assign to the #reboot_timeout_in_mins property



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 190

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.status = attributes[:'status'] if attributes[:'status']

  self.id = attributes[:'id'] if attributes[:'id']

  self.description = attributes[:'description'] if attributes[:'description']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.message = attributes[:'message'] if attributes[:'message']

  self.parent_id = attributes[:'parentId'] if attributes[:'parentId']

  raise 'You cannot provide both :parentId and :parent_id' if attributes.key?(:'parentId') && attributes.key?(:'parent_id')

  self.parent_id = attributes[:'parent_id'] if attributes[:'parent_id']

  self.children_id = attributes[:'childrenId'] if attributes[:'childrenId']

  raise 'You cannot provide both :childrenId and :children_id' if attributes.key?(:'childrenId') && attributes.key?(:'children_id')

  self.children_id = attributes[:'children_id'] if attributes[:'children_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.percent_complete = attributes[:'percentComplete'] if attributes[:'percentComplete']

  raise 'You cannot provide both :percentComplete and :percent_complete' if attributes.key?(:'percentComplete') && attributes.key?(:'percent_complete')

  self.percent_complete = attributes[:'percent_complete'] if attributes[:'percent_complete']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.time_scheduled = attributes[:'timeScheduled'] if attributes[:'timeScheduled']

  raise 'You cannot provide both :timeScheduled and :time_scheduled' if attributes.key?(:'timeScheduled') && attributes.key?(:'time_scheduled')

  self.time_scheduled = attributes[:'time_scheduled'] if attributes[:'time_scheduled']

  self.is_managed_by_autonomous_linux = attributes[:'isManagedByAutonomousLinux'] unless attributes[:'isManagedByAutonomousLinux'].nil?

  raise 'You cannot provide both :isManagedByAutonomousLinux and :is_managed_by_autonomous_linux' if attributes.key?(:'isManagedByAutonomousLinux') && attributes.key?(:'is_managed_by_autonomous_linux')

  self.is_managed_by_autonomous_linux = attributes[:'is_managed_by_autonomous_linux'] unless attributes[:'is_managed_by_autonomous_linux'].nil?

  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

#children_idArray<String>

The list of OCIDs for child work requests.

Returns:

  • (Array<String>)


95
96
97
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 95

def children_id
  @children_id
end

#compartment_idString

[Required] The OCID of the compartment that contains the work request. Work requests should be scoped to the same compartment as the resource it affects. If the work request affects multiple resources the different compartments, the services selects the compartment of the primary resource.

Returns:

  • (String)


102
103
104
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 102

def compartment_id
  @compartment_id
end

#descriptionString

A short description about the work request.

Returns:

  • (String)


79
80
81
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 79

def description
  @description
end

#display_nameString

A short display name for the work request.

Returns:

  • (String)


83
84
85
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 83

def display_name
  @display_name
end

#idString

[Required] The OCID of the work request.

Returns:

  • (String)


75
76
77
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 75

def id
  @id
end

#is_managed_by_autonomous_linuxBOOLEAN

Indicates whether this work request is managed by Autonomous Linux

Returns:

  • (BOOLEAN)


120
121
122
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 120

def is_managed_by_autonomous_linux
  @is_managed_by_autonomous_linux
end

#messageString

A progress or error message, if there is any.

Returns:

  • (String)


87
88
89
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 87

def message
  @message
end

#operation_typeString

[Required] Type of the work request.

Returns:

  • (String)


67
68
69
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 67

def operation_type
  @operation_type
end

#parent_idString

The OCID of the parent work request, if there is any.

Returns:

  • (String)


91
92
93
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 91

def parent_id
  @parent_id
end

#percent_completeFloat

The percentage complete of the operation tracked by this work request.

Returns:

  • (Float)


106
107
108
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 106

def percent_complete
  @percent_complete
end

#reboot_timeout_in_minsInteger

The number of minutes the service waits for the reboot to complete. If the managed instance doesn't reboot within the timeout, the service marks the reboot job as failed.

Returns:

  • (Integer)


124
125
126
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 124

def reboot_timeout_in_mins
  @reboot_timeout_in_mins
end

#statusString

[Required] Status of the work request.

Returns:

  • (String)


71
72
73
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 71

def status
  @status
end

#time_createdDateTime

[Required] The date and time the request was created - as described in RFC 3339, section 14.29.

Returns:

  • (DateTime)


112
113
114
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 112

def time_created
  @time_created
end

#time_scheduledDateTime

The scheduled date and time to retry the work request (in RFC 3339 format).

Returns:

  • (DateTime)


116
117
118
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 116

def time_scheduled
  @time_scheduled
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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/work_request_summary.rb', line 127

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'operation_type': :'operationType',
    'status': :'status',
    'id': :'id',
    'description': :'description',
    'display_name': :'displayName',
    'message': :'message',
    'parent_id': :'parentId',
    'children_id': :'childrenId',
    'compartment_id': :'compartmentId',
    'percent_complete': :'percentComplete',
    'time_created': :'timeCreated',
    'time_scheduled': :'timeScheduled',
    'is_managed_by_autonomous_linux': :'isManagedByAutonomousLinux',
    'reboot_timeout_in_mins': :'rebootTimeoutInMins'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 149

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'operation_type': :'String',
    'status': :'String',
    'id': :'String',
    'description': :'String',
    'display_name': :'String',
    'message': :'String',
    'parent_id': :'String',
    'children_id': :'Array<String>',
    'compartment_id': :'String',
    'percent_complete': :'Float',
    'time_created': :'DateTime',
    'time_scheduled': :'DateTime',
    'is_managed_by_autonomous_linux': :'BOOLEAN',
    'reboot_timeout_in_mins': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 298

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    operation_type == other.operation_type &&
    status == other.status &&
    id == other.id &&
    description == other.description &&
    display_name == other.display_name &&
    message == other.message &&
    parent_id == other.parent_id &&
    children_id == other.children_id &&
    compartment_id == other.compartment_id &&
    percent_complete == other.percent_complete &&
    time_created == other.time_created &&
    time_scheduled == other.time_scheduled &&
    is_managed_by_autonomous_linux == other.is_managed_by_autonomous_linux &&
    reboot_timeout_in_mins == other.reboot_timeout_in_mins
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 341

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


321
322
323
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 321

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



330
331
332
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 330

def hash
  [operation_type, status, id, description, display_name, message, parent_id, children_id, compartment_id, percent_complete, time_created, time_scheduled, is_managed_by_autonomous_linux, reboot_timeout_in_mins].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



374
375
376
377
378
379
380
381
382
383
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 374

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



368
369
370
# File 'lib/oci/os_management_hub/models/work_request_summary.rb', line 368

def to_s
  to_hash.to_s
end