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_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 ticket.
-
#attachment_id ⇒ String
attachmentID for the ItemType Attachments only for Alloy realm.
-
#comments ⇒ String
[Required] Comments added with the activity on the support ticket.
-
#item_status ⇒ String
Who updates the activity on the support ticket.
- #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
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 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 |
# File 'lib/oci/cims/models/activity_item.rb', line 136 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.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.
60 61 62 |
# File 'lib/oci/cims/models/activity_item.rb', line 60 def @activity_author end |
#activity_type ⇒ String
[Required] The type of activity occuring on the support ticket.
56 57 58 |
# File 'lib/oci/cims/models/activity_item.rb', line 56 def activity_type @activity_type end |
#attachment_id ⇒ String
attachmentID for the ItemType Attachments only for Alloy realm.
71 72 73 |
# File 'lib/oci/cims/models/activity_item.rb', line 71 def @attachment_id end |
#comments ⇒ String
[Required] Comments added with the activity on the support ticket.
44 45 46 |
# File 'lib/oci/cims/models/activity_item.rb', line 44 def comments @comments end |
#item_status ⇒ String
Who updates the activity on the support ticket.
67 68 69 |
# File 'lib/oci/cims/models/activity_item.rb', line 67 def item_status @item_status end |
#item_type ⇒ String
63 64 65 |
# File 'lib/oci/cims/models/activity_item.rb', line 63 def item_type @item_type end |
#time_created ⇒ Integer
[Required] The time when the activity was created, in seconds since epoch time.
48 49 50 |
# File 'lib/oci/cims/models/activity_item.rb', line 48 def time_created @time_created end |
#time_updated ⇒ Integer
[Required] The time when the activity was updated, in seconds since epoch time.
52 53 54 |
# File 'lib/oci/cims/models/activity_item.rb', line 52 def time_updated @time_updated 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 87 88 89 90 91 92 93 |
# File 'lib/oci/cims/models/activity_item.rb', line 74 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'item_key': :'itemKey', 'name': :'name', 'type': :'type', 'category': :'category', 'sub_category': :'subCategory', 'issue_type': :'issueType', '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.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/cims/models/activity_item.rb', line 96 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', '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.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/cims/models/activity_item.rb', line 250 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 && 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
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/oci/cims/models/activity_item.rb', line 293 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
273 274 275 |
# File 'lib/oci/cims/models/activity_item.rb', line 273 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
282 283 284 |
# File 'lib/oci/cims/models/activity_item.rb', line 282 def hash [item_key, name, type, category, sub_category, issue_type, comments, time_created, time_updated, activity_type, , item_type, item_status, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
326 327 328 329 330 331 332 333 334 335 |
# File 'lib/oci/cims/models/activity_item.rb', line 326 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
320 321 322 |
# File 'lib/oci/cims/models/activity_item.rb', line 320 def to_s to_hash.to_s end |