Class: MistApi::TicketCommentsAttachment
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::TicketCommentsAttachment
- Defined in:
- lib/mist_api/models/ticket_comments_attachment.rb
Overview
TicketCommentsAttachment Model.
Instance Attribute Summary collapse
-
#content_type ⇒ String
TODO: Write general description for this method.
-
#content_url ⇒ String
TODO: Write general description for this method.
-
#created_at ⇒ Integer
TODO: Write general description for this method.
-
#file_name ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#size_in_bytes ⇒ Integer
Unique ID of the object instance in the Mist Organization.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(content_type = SKIP, content_url = SKIP, created_at = SKIP, file_name = SKIP, id = SKIP, size_in_bytes = SKIP) ⇒ TicketCommentsAttachment
constructor
A new instance of TicketCommentsAttachment.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(content_type = SKIP, content_url = SKIP, created_at = SKIP, file_name = SKIP, id = SKIP, size_in_bytes = SKIP) ⇒ TicketCommentsAttachment
Returns a new instance of TicketCommentsAttachment.
65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 65 def initialize(content_type = SKIP, content_url = SKIP, created_at = SKIP, file_name = SKIP, id = SKIP, size_in_bytes = SKIP) @content_type = content_type unless content_type == SKIP @content_url = content_url unless content_url == SKIP @created_at = created_at unless created_at == SKIP @file_name = file_name unless file_name == SKIP @id = id unless id == SKIP @size_in_bytes = size_in_bytes unless size_in_bytes == SKIP end |
Instance Attribute Details
#content_type ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 14 def content_type @content_type end |
#content_url ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 18 def content_url @content_url end |
#created_at ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 22 def created_at @created_at end |
#file_name ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 26 def file_name @file_name end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
30 31 32 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 30 def id @id end |
#size_in_bytes ⇒ Integer
Unique ID of the object instance in the Mist Organization
34 35 36 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 34 def size_in_bytes @size_in_bytes end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 76 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. content_type = hash.key?('content_type') ? hash['content_type'] : SKIP content_url = hash.key?('content_url') ? hash['content_url'] : SKIP created_at = hash.key?('created_at') ? hash['created_at'] : SKIP file_name = hash.key?('file_name') ? hash['file_name'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP size_in_bytes = hash.key?('size_in_bytes') ? hash['size_in_bytes'] : SKIP # Create object from extracted values. TicketCommentsAttachment.new(content_type, content_url, created_at, file_name, id, size_in_bytes) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['content_type'] = 'content_type' @_hash['content_url'] = 'content_url' @_hash['created_at'] = 'created_at' @_hash['file_name'] = 'file_name' @_hash['id'] = 'id' @_hash['size_in_bytes'] = 'size_in_bytes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 49 def self.optionals %w[ content_type content_url created_at file_name id size_in_bytes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} content_type: #{@content_type.inspect}, content_url:"\ " #{@content_url.inspect}, created_at: #{@created_at.inspect}, file_name:"\ " #{@file_name.inspect}, id: #{@id.inspect}, size_in_bytes: #{@size_in_bytes.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/mist_api/models/ticket_comments_attachment.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} content_type: #{@content_type}, content_url: #{@content_url}, created_at:"\ " #{@created_at}, file_name: #{@file_name}, id: #{@id}, size_in_bytes: #{@size_in_bytes}>" end |