Class: OCI::Cims::Models::ActivityItem
- Defined in:
- lib/oci/cims/models/activity_item.rb
Overview
Details about the ActivityItem object.
Constant Summary collapse
- ACTIVITY_TYPE_ENUM =
[ ACTIVITY_TYPE_NOTES = 'NOTES'.freeze, ACTIVITY_TYPE_PROBLEM_DESCRIPTION = 'PROBLEM_DESCRIPTION'.freeze, ACTIVITY_TYPE_UPDATE = 'UPDATE'.freeze, ACTIVITY_TYPE_CLOSE = 'CLOSE'.freeze, ACTIVITY_TYPE_REOPEN = 'REOPEN'.freeze, ACTIVITY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ACTIVITY_AUTHOR_ENUM =
[ ACTIVITY_AUTHOR_CUSTOMER = 'CUSTOMER'.freeze, ACTIVITY_AUTHOR_ORACLE = 'ORACLE'.freeze, ACTIVITY_AUTHOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ITEM_TYPE_ENUM =
[ ITEM_TYPE_ATTACHMENTS = 'ATTACHMENTS'.freeze, ITEM_TYPE_COMMENTS = 'COMMENTS'.freeze, ITEM_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ITEM_STATUS_ENUM =
[ ITEM_STATUS_PROCESSING = 'PROCESSING'.freeze, ITEM_STATUS_ATTACHED = 'ATTACHED'.freeze, ITEM_STATUS_REMOVED = 'REMOVED'.freeze, ITEM_STATUS_FAILED = 'FAILED'.freeze, ITEM_STATUS_REJECTED = 'REJECTED'.freeze, ITEM_STATUS_RECEIVED = 'RECEIVED'.freeze, ITEM_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#activity_author ⇒ String
This attribute is required.
-
#activity_type ⇒ String
[Required] The type of activity occuring on the support request.
-
#attachment_id ⇒ String
attachmentID for the ItemType Attachments only for Alloy realm.
-
#comments ⇒ String
[Required] Comments or file attachments added with the activity on the support request.
-
#id ⇒ String
Identifier of the activity on the support request.
-
#item_status ⇒ String
Who updates the activity on the support request.
- #item_type ⇒ String
-
#time_created ⇒ Integer
[Required] The time when the activity was created, in seconds since epoch time.
-
#time_updated ⇒ Integer
[Required] The time when the activity was updated, in seconds since epoch time.
Attributes inherited from Item
#category, #issue_type, #item_key, #name, #sub_category, #type
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 = {}) ⇒ ActivityItem
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.
Methods inherited from Item
Constructor Details
#initialize(attributes = {}) ⇒ ActivityItem
Initializes the object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/cims/models/activity_item.rb', line 145 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'activity' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.comments = attributes[:'comments'] if attributes[:'comments'] 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_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.activity_type = attributes[:'activityType'] if attributes[:'activityType'] raise 'You cannot provide both :activityType and :activity_type' if attributes.key?(:'activityType') && attributes.key?(:'activity_type') self.activity_type = attributes[:'activity_type'] if attributes[:'activity_type'] self. = attributes[:'activityAuthor'] if attributes[:'activityAuthor'] raise 'You cannot provide both :activityAuthor and :activity_author' if attributes.key?(:'activityAuthor') && attributes.key?(:'activity_author') self. = attributes[:'activity_author'] if attributes[:'activity_author'] self.item_type = attributes[:'itemType'] if attributes[:'itemType'] raise 'You cannot provide both :itemType and :item_type' if attributes.key?(:'itemType') && attributes.key?(:'item_type') self.item_type = attributes[:'item_type'] if attributes[:'item_type'] self.item_status = attributes[:'itemStatus'] if attributes[:'itemStatus'] raise 'You cannot provide both :itemStatus and :item_status' if attributes.key?(:'itemStatus') && attributes.key?(:'item_status') self.item_status = attributes[:'item_status'] if attributes[:'item_status'] self. = attributes[:'attachmentID'] if attributes[:'attachmentID'] raise 'You cannot provide both :attachmentID and :attachment_id' if attributes.key?(:'attachmentID') && attributes.key?(:'attachment_id') self. = attributes[:'attachment_id'] if attributes[:'attachment_id'] end |
Instance Attribute Details
#activity_author ⇒ String
This attribute is required.
66 67 68 |
# File 'lib/oci/cims/models/activity_item.rb', line 66 def @activity_author end |
#activity_type ⇒ String
[Required] The type of activity occuring on the support request.
62 63 64 |
# File 'lib/oci/cims/models/activity_item.rb', line 62 def activity_type @activity_type end |
#attachment_id ⇒ String
attachmentID for the ItemType Attachments only for Alloy realm.
77 78 79 |
# File 'lib/oci/cims/models/activity_item.rb', line 77 def @attachment_id end |
#comments ⇒ String
[Required] Comments or file attachments added with the activity on the support request.
50 51 52 |
# File 'lib/oci/cims/models/activity_item.rb', line 50 def comments @comments end |
#id ⇒ String
Identifier of the activity on the support request.
46 47 48 |
# File 'lib/oci/cims/models/activity_item.rb', line 46 def id @id end |
#item_status ⇒ String
Who updates the activity on the support request.
73 74 75 |
# File 'lib/oci/cims/models/activity_item.rb', line 73 def item_status @item_status end |
#item_type ⇒ String
69 70 71 |
# File 'lib/oci/cims/models/activity_item.rb', line 69 def item_type @item_type end |
#time_created ⇒ Integer
[Required] The time when the activity was created, in seconds since epoch time.
54 55 56 |
# File 'lib/oci/cims/models/activity_item.rb', line 54 def time_created @time_created end |
#time_updated ⇒ Integer
[Required] The time when the activity was updated, in seconds since epoch time.
58 59 60 |
# File 'lib/oci/cims/models/activity_item.rb', line 58 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/cims/models/activity_item.rb', line 80 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'item_key': :'itemKey', 'name': :'name', 'type': :'type', 'category': :'category', 'sub_category': :'subCategory', 'issue_type': :'issueType', 'id': :'id', 'comments': :'comments', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'activity_type': :'activityType', 'activity_author': :'activityAuthor', 'item_type': :'itemType', 'item_status': :'itemStatus', 'attachment_id': :'attachmentID' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/cims/models/activity_item.rb', line 103 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'item_key': :'String', 'name': :'String', 'type': :'String', 'category': :'OCI::Cims::Models::Category', 'sub_category': :'OCI::Cims::Models::SubCategory', 'issue_type': :'OCI::Cims::Models::IssueType', 'id': :'String', 'comments': :'String', 'time_created': :'Integer', 'time_updated': :'Integer', 'activity_type': :'String', 'activity_author': :'String', 'item_type': :'String', 'item_status': :'String', 'attachment_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/cims/models/activity_item.rb', line 261 def ==(other) return true if equal?(other) self.class == other.class && item_key == other.item_key && name == other.name && type == other.type && category == other.category && sub_category == other.sub_category && issue_type == other.issue_type && id == other.id && comments == other.comments && time_created == other.time_created && time_updated == other.time_updated && activity_type == other.activity_type && == other. && item_type == other.item_type && item_status == other.item_status && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/oci/cims/models/activity_item.rb', line 305 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
285 286 287 |
# File 'lib/oci/cims/models/activity_item.rb', line 285 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
294 295 296 |
# File 'lib/oci/cims/models/activity_item.rb', line 294 def hash [item_key, name, type, category, sub_category, issue_type, id, comments, time_created, time_updated, activity_type, , item_type, item_status, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
338 339 340 341 342 343 344 345 346 347 |
# File 'lib/oci/cims/models/activity_item.rb', line 338 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
332 333 334 |
# File 'lib/oci/cims/models/activity_item.rb', line 332 def to_s to_hash.to_s end |