Class: Zernio::GetAccountPosts200ResponsePostsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zernio::GetAccountPosts200ResponsePostsInner
- Defined in:
- lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb
Instance Attribute Summary collapse
-
#cid ⇒ Object
Bluesky content id, required to reply to the post.
-
#comment_count ⇒ Object
Returns the value of attribute comment_count.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#id ⇒ Object
The platform's own post id (the video ID on YouTube).
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#media_type ⇒ Object
Returns the value of attribute media_type.
-
#message ⇒ Object
Caption or title, empty string when the post has no text.
-
#permalink ⇒ Object
Public URL of the post on the platform.
-
#picture ⇒ Object
Thumbnail or media URL.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#reaction_count ⇒ Object
Facebook and LinkedIn only.
-
#share_count ⇒ Object
Returns the value of attribute share_count.
-
#subreddit ⇒ Object
Reddit only.
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 = {}) ⇒ GetAccountPosts200ResponsePostsInner
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 = {}) ⇒ GetAccountPosts200ResponsePostsInner
Initializes the object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 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 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 107 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAccountPosts200ResponsePostsInner` 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::GetAccountPosts200ResponsePostsInner`. 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?(:'platform') self.platform = attributes[:'platform'] end if attributes.key?(:'message') self. = attributes[:'message'] end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] end if attributes.key?(:'permalink') self.permalink = attributes[:'permalink'] end if attributes.key?(:'picture') self.picture = attributes[:'picture'] end if attributes.key?(:'media_type') self.media_type = attributes[:'media_type'] end if attributes.key?(:'comment_count') self.comment_count = attributes[:'comment_count'] end if attributes.key?(:'like_count') self.like_count = attributes[:'like_count'] end if attributes.key?(:'reaction_count') self.reaction_count = attributes[:'reaction_count'] end if attributes.key?(:'share_count') self.share_count = attributes[:'share_count'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'subreddit') self.subreddit = attributes[:'subreddit'] end end |
Instance Attribute Details
#cid ⇒ Object
Bluesky content id, required to reply to the post
46 47 48 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 46 def cid @cid end |
#comment_count ⇒ Object
Returns the value of attribute comment_count.
36 37 38 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 36 def comment_count @comment_count end |
#created_time ⇒ Object
Returns the value of attribute created_time.
26 27 28 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 26 def created_time @created_time end |
#id ⇒ Object
The platform's own post id (the video ID on YouTube)
19 20 21 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 19 def id @id end |
#like_count ⇒ Object
Returns the value of attribute like_count.
38 39 40 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 38 def like_count @like_count end |
#media_type ⇒ Object
Returns the value of attribute media_type.
34 35 36 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 34 def media_type @media_type end |
#message ⇒ Object
Caption or title, empty string when the post has no text
24 25 26 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 24 def @message end |
#permalink ⇒ Object
Public URL of the post on the platform
29 30 31 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 29 def permalink @permalink end |
#picture ⇒ Object
Thumbnail or media URL
32 33 34 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 32 def picture @picture end |
#platform ⇒ Object
Returns the value of attribute platform.
21 22 23 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 21 def platform @platform end |
#reaction_count ⇒ Object
Facebook and LinkedIn only
41 42 43 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 41 def reaction_count @reaction_count end |
#share_count ⇒ Object
Returns the value of attribute share_count.
43 44 45 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 43 def share_count @share_count end |
#subreddit ⇒ Object
Reddit only
49 50 51 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 49 def subreddit @subreddit end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
71 72 73 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 71 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
76 77 78 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 76 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 52 def self.attribute_map { :'id' => :'id', :'platform' => :'platform', :'message' => :'message', :'created_time' => :'createdTime', :'permalink' => :'permalink', :'picture' => :'picture', :'media_type' => :'mediaType', :'comment_count' => :'commentCount', :'like_count' => :'likeCount', :'reaction_count' => :'reactionCount', :'share_count' => :'shareCount', :'cid' => :'cid', :'subreddit' => :'subreddit' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 224 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
100 101 102 103 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 100 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 81 def self.openapi_types { :'id' => :'String', :'platform' => :'String', :'message' => :'String', :'created_time' => :'Time', :'permalink' => :'String', :'picture' => :'String', :'media_type' => :'String', :'comment_count' => :'Integer', :'like_count' => :'Integer', :'reaction_count' => :'Integer', :'share_count' => :'Integer', :'cid' => :'String', :'subreddit' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 191 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && platform == o.platform && == o. && created_time == o.created_time && permalink == o.permalink && picture == o.picture && media_type == o.media_type && comment_count == o.comment_count && like_count == o.like_count && reaction_count == o.reaction_count && share_count == o.share_count && cid == o.cid && subreddit == o.subreddit end |
#eql?(o) ⇒ Boolean
211 212 213 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 211 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
217 218 219 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 217 def hash [id, platform, , created_time, permalink, picture, media_type, comment_count, like_count, reaction_count, share_count, cid, subreddit].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
176 177 178 179 180 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 176 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
246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 246 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
184 185 186 187 |
# File 'lib/zernio-sdk/models/get_account_posts200_response_posts_inner.rb', line 184 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |