Class: Zernio::GetInboxPostComments200ResponseCommentsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::GetInboxPostComments200ResponseCommentsInner
- Defined in:
- lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb
Instance Attribute Summary collapse
-
#can_delete ⇒ Object
Returns the value of attribute can_delete.
-
#can_hide ⇒ Object
Whether this comment can be hidden (Facebook, Instagram, Threads).
-
#can_like ⇒ Object
Whether this comment can be liked (Facebook, Twitter/X, Bluesky, Reddit).
-
#can_reply ⇒ Object
Returns the value of attribute can_reply.
-
#cid ⇒ Object
Bluesky content identifier.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#from ⇒ Object
Returns the value of attribute from.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_hidden ⇒ Object
Whether the comment is currently hidden.
-
#is_liked ⇒ Object
Whether the current user has liked this comment.
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#like_uri ⇒ Object
Bluesky like URI for unliking.
-
#message ⇒ Object
Returns the value of attribute message.
-
#parent_id ⇒ Object
Parent comment ID for nested replies.
-
#platform ⇒ Object
The platform this comment is from.
-
#replies ⇒ Object
Returns the value of attribute replies.
-
#reply_count ⇒ Object
Returns the value of attribute reply_count.
-
#root_cid ⇒ Object
Bluesky root post CID.
-
#root_uri ⇒ Object
Bluesky root post URI.
-
#url ⇒ Object
Direct link to the comment on the platform (if available).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetInboxPostComments200ResponseCommentsInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetInboxPostComments200ResponseCommentsInner
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 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 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 145 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetInboxPostComments200ResponseCommentsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetInboxPostComments200ResponseCommentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'message') self. = attributes[:'message'] end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] end if attributes.key?(:'from') self.from = attributes[:'from'] end if attributes.key?(:'like_count') self.like_count = attributes[:'like_count'] end if attributes.key?(:'reply_count') self.reply_count = attributes[:'reply_count'] end if attributes.key?(:'platform') self.platform = attributes[:'platform'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'replies') if (value = attributes[:'replies']).is_a?(Array) self.replies = value end end if attributes.key?(:'can_reply') self.can_reply = attributes[:'can_reply'] end if attributes.key?(:'can_delete') self.can_delete = attributes[:'can_delete'] end if attributes.key?(:'can_hide') self.can_hide = attributes[:'can_hide'] end if attributes.key?(:'can_like') self.can_like = attributes[:'can_like'] end if attributes.key?(:'is_hidden') self.is_hidden = attributes[:'is_hidden'] end if attributes.key?(:'is_liked') self.is_liked = attributes[:'is_liked'] end if attributes.key?(:'like_uri') self.like_uri = attributes[:'like_uri'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'parent_id') self.parent_id = attributes[:'parent_id'] end if attributes.key?(:'root_uri') self.root_uri = attributes[:'root_uri'] end if attributes.key?(:'root_cid') self.root_cid = attributes[:'root_cid'] end end |
Instance Attribute Details
#can_delete ⇒ Object
Returns the value of attribute can_delete.
40 41 42 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 40 def can_delete @can_delete end |
#can_hide ⇒ Object
Whether this comment can be hidden (Facebook, Instagram, Threads)
43 44 45 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 43 def can_hide @can_hide end |
#can_like ⇒ Object
Whether this comment can be liked (Facebook, Twitter/X, Bluesky, Reddit)
46 47 48 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 46 def can_like @can_like end |
#can_reply ⇒ Object
Returns the value of attribute can_reply.
38 39 40 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 38 def can_reply @can_reply end |
#cid ⇒ Object
Bluesky content identifier
58 59 60 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 58 def cid @cid end |
#created_time ⇒ Object
Returns the value of attribute created_time.
22 23 24 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 22 def created_time @created_time end |
#from ⇒ Object
Returns the value of attribute from.
24 25 26 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 24 def from @from end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 18 def id @id end |
#is_hidden ⇒ Object
Whether the comment is currently hidden
49 50 51 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 49 def is_hidden @is_hidden end |
#is_liked ⇒ Object
Whether the current user has liked this comment
52 53 54 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 52 def is_liked @is_liked end |
#like_count ⇒ Object
Returns the value of attribute like_count.
26 27 28 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 26 def like_count @like_count end |
#like_uri ⇒ Object
Bluesky like URI for unliking
55 56 57 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 55 def like_uri @like_uri end |
#message ⇒ Object
Returns the value of attribute message.
20 21 22 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 20 def @message end |
#parent_id ⇒ Object
Parent comment ID for nested replies
61 62 63 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 61 def parent_id @parent_id end |
#platform ⇒ Object
The platform this comment is from
31 32 33 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 31 def platform @platform end |
#replies ⇒ Object
Returns the value of attribute replies.
36 37 38 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 36 def replies @replies end |
#reply_count ⇒ Object
Returns the value of attribute reply_count.
28 29 30 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 28 def reply_count @reply_count end |
#root_cid ⇒ Object
Bluesky root post CID
67 68 69 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 67 def root_cid @root_cid end |
#root_uri ⇒ Object
Bluesky root post URI
64 65 66 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 64 def root_uri @root_uri end |
#url ⇒ Object
Direct link to the comment on the platform (if available)
34 35 36 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 34 def url @url end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
96 97 98 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 96 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
101 102 103 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 101 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 70 def self.attribute_map { :'id' => :'id', :'message' => :'message', :'created_time' => :'createdTime', :'from' => :'from', :'like_count' => :'likeCount', :'reply_count' => :'replyCount', :'platform' => :'platform', :'url' => :'url', :'replies' => :'replies', :'can_reply' => :'canReply', :'can_delete' => :'canDelete', :'can_hide' => :'canHide', :'can_like' => :'canLike', :'is_hidden' => :'isHidden', :'is_liked' => :'isLiked', :'like_uri' => :'likeUri', :'cid' => :'cid', :'parent_id' => :'parentId', :'root_uri' => :'rootUri', :'root_cid' => :'rootCid' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 299 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 132 def self.openapi_nullable Set.new([ :'url', :'like_uri', :'cid', :'parent_id', :'root_uri', :'root_cid' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 106 def self.openapi_types { :'id' => :'String', :'message' => :'String', :'created_time' => :'Time', :'from' => :'GetInboxPostComments200ResponseCommentsInnerFrom', :'like_count' => :'Integer', :'reply_count' => :'Integer', :'platform' => :'String', :'url' => :'String', :'replies' => :'Array<Object>', :'can_reply' => :'Boolean', :'can_delete' => :'Boolean', :'can_hide' => :'Boolean', :'can_like' => :'Boolean', :'is_hidden' => :'Boolean', :'is_liked' => :'Boolean', :'like_uri' => :'String', :'cid' => :'String', :'parent_id' => :'String', :'root_uri' => :'String', :'root_cid' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 259 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && == o. && created_time == o.created_time && from == o.from && like_count == o.like_count && reply_count == o.reply_count && platform == o.platform && url == o.url && replies == o.replies && can_reply == o.can_reply && can_delete == o.can_delete && can_hide == o.can_hide && can_like == o.can_like && is_hidden == o.is_hidden && is_liked == o.is_liked && like_uri == o.like_uri && cid == o.cid && parent_id == o.parent_id && root_uri == o.root_uri && root_cid == o.root_cid end |
#eql?(o) ⇒ Boolean
286 287 288 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 286 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
292 293 294 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 292 def hash [id, , created_time, from, like_count, reply_count, platform, url, replies, can_reply, can_delete, can_hide, can_like, is_hidden, is_liked, like_uri, cid, parent_id, root_uri, root_cid].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
244 245 246 247 248 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 244 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 321 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
252 253 254 255 |
# File 'lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb', line 252 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |