Class: OSDNClient::UserStats
- Inherits:
-
Object
- Object
- OSDNClient::UserStats
- Defined in:
- lib/osdn-client/models/user_stats.rb
Instance Attribute Summary collapse
-
#bzr_count ⇒ Object
Returns the value of attribute bzr_count.
-
#chamber_file_count ⇒ Object
Returns the value of attribute chamber_file_count.
-
#chamber_vcs_count ⇒ Object
Returns the value of attribute chamber_vcs_count.
-
#cvs_count ⇒ Object
Returns the value of attribute cvs_count.
-
#date ⇒ Object
Returns the value of attribute date.
-
#forum_count ⇒ Object
Returns the value of attribute forum_count.
-
#forum_misc_count ⇒ Object
Returns the value of attribute forum_misc_count.
-
#ghosted_approve_count ⇒ Object
Returns the value of attribute ghosted_approve_count.
-
#ghosted_submit_count ⇒ Object
Returns the value of attribute ghosted_submit_count.
-
#git_count ⇒ Object
Returns the value of attribute git_count.
-
#group_approved_count ⇒ Object
Returns the value of attribute group_approved_count.
-
#group_history_count ⇒ Object
Returns the value of attribute group_history_count.
-
#hg_count ⇒ Object
Returns the value of attribute hg_count.
-
#news_count ⇒ Object
Returns the value of attribute news_count.
-
#project_review_rating_submit_count ⇒ Object
Returns the value of attribute project_review_rating_submit_count.
-
#project_review_submit_count ⇒ Object
Returns the value of attribute project_review_submit_count.
-
#project_review_update_count ⇒ Object
Returns the value of attribute project_review_update_count.
-
#svn_count ⇒ Object
Returns the value of attribute svn_count.
-
#ticket_close_count ⇒ Object
Returns the value of attribute ticket_close_count.
-
#ticket_comment_count ⇒ Object
Returns the value of attribute ticket_comment_count.
-
#ticket_milestone_count ⇒ Object
Returns the value of attribute ticket_milestone_count.
-
#ticket_misc_count ⇒ Object
Returns the value of attribute ticket_misc_count.
-
#ticket_open_count ⇒ Object
Returns the value of attribute ticket_open_count.
-
#ticket_owner_count ⇒ Object
Returns the value of attribute ticket_owner_count.
-
#user_point ⇒ Object
Returns the value of attribute user_point.
-
#wiki_count ⇒ Object
Returns the value of attribute wiki_count.
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
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UserStats
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UserStats
Initializes the object
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 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/osdn-client/models/user_stats.rb', line 148 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'date') self.date = attributes[:'date'] end if attributes.has_key?(:'user_point') self.user_point = attributes[:'user_point'] end if attributes.has_key?(:'news_count') self.news_count = attributes[:'news_count'] end if attributes.has_key?(:'git_count') self.git_count = attributes[:'git_count'] end if attributes.has_key?(:'svn_count') self.svn_count = attributes[:'svn_count'] end if attributes.has_key?(:'hg_count') self.hg_count = attributes[:'hg_count'] end if attributes.has_key?(:'bzr_count') self.bzr_count = attributes[:'bzr_count'] end if attributes.has_key?(:'cvs_count') self.cvs_count = attributes[:'cvs_count'] end if attributes.has_key?(:'wiki_count') self.wiki_count = attributes[:'wiki_count'] end if attributes.has_key?(:'forum_count') self.forum_count = attributes[:'forum_count'] end if attributes.has_key?(:'forum_misc_count') self.forum_misc_count = attributes[:'forum_misc_count'] end if attributes.has_key?(:'ticket_open_count') self.ticket_open_count = attributes[:'ticket_open_count'] end if attributes.has_key?(:'ticket_close_count') self.ticket_close_count = attributes[:'ticket_close_count'] end if attributes.has_key?(:'ticket_comment_count') self.ticket_comment_count = attributes[:'ticket_comment_count'] end if attributes.has_key?(:'ticket_owner_count') self.ticket_owner_count = attributes[:'ticket_owner_count'] end if attributes.has_key?(:'ticket_misc_count') self.ticket_misc_count = attributes[:'ticket_misc_count'] end if attributes.has_key?(:'ticket_milestone_count') self.ticket_milestone_count = attributes[:'ticket_milestone_count'] end if attributes.has_key?(:'group_approved_count') self.group_approved_count = attributes[:'group_approved_count'] end if attributes.has_key?(:'group_history_count') self.group_history_count = attributes[:'group_history_count'] end if attributes.has_key?(:'ghosted_submit_count') self.ghosted_submit_count = attributes[:'ghosted_submit_count'] end if attributes.has_key?(:'ghosted_approve_count') self.ghosted_approve_count = attributes[:'ghosted_approve_count'] end if attributes.has_key?(:'project_review_submit_count') self.project_review_submit_count = attributes[:'project_review_submit_count'] end if attributes.has_key?(:'project_review_update_count') self.project_review_update_count = attributes[:'project_review_update_count'] end if attributes.has_key?(:'project_review_rating_submit_count') self. = attributes[:'project_review_rating_submit_count'] end if attributes.has_key?(:'chamber_file_count') self.chamber_file_count = attributes[:'chamber_file_count'] end if attributes.has_key?(:'chamber_vcs_count') self.chamber_vcs_count = attributes[:'chamber_vcs_count'] end end |
Instance Attribute Details
#bzr_count ⇒ Object
Returns the value of attribute bzr_count.
41 42 43 |
# File 'lib/osdn-client/models/user_stats.rb', line 41 def bzr_count @bzr_count end |
#chamber_file_count ⇒ Object
Returns the value of attribute chamber_file_count.
77 78 79 |
# File 'lib/osdn-client/models/user_stats.rb', line 77 def chamber_file_count @chamber_file_count end |
#chamber_vcs_count ⇒ Object
Returns the value of attribute chamber_vcs_count.
79 80 81 |
# File 'lib/osdn-client/models/user_stats.rb', line 79 def chamber_vcs_count @chamber_vcs_count end |
#cvs_count ⇒ Object
Returns the value of attribute cvs_count.
43 44 45 |
# File 'lib/osdn-client/models/user_stats.rb', line 43 def cvs_count @cvs_count end |
#date ⇒ Object
Returns the value of attribute date.
29 30 31 |
# File 'lib/osdn-client/models/user_stats.rb', line 29 def date @date end |
#forum_count ⇒ Object
Returns the value of attribute forum_count.
47 48 49 |
# File 'lib/osdn-client/models/user_stats.rb', line 47 def forum_count @forum_count end |
#forum_misc_count ⇒ Object
Returns the value of attribute forum_misc_count.
49 50 51 |
# File 'lib/osdn-client/models/user_stats.rb', line 49 def forum_misc_count @forum_misc_count end |
#ghosted_approve_count ⇒ Object
Returns the value of attribute ghosted_approve_count.
69 70 71 |
# File 'lib/osdn-client/models/user_stats.rb', line 69 def ghosted_approve_count @ghosted_approve_count end |
#ghosted_submit_count ⇒ Object
Returns the value of attribute ghosted_submit_count.
67 68 69 |
# File 'lib/osdn-client/models/user_stats.rb', line 67 def ghosted_submit_count @ghosted_submit_count end |
#git_count ⇒ Object
Returns the value of attribute git_count.
35 36 37 |
# File 'lib/osdn-client/models/user_stats.rb', line 35 def git_count @git_count end |
#group_approved_count ⇒ Object
Returns the value of attribute group_approved_count.
63 64 65 |
# File 'lib/osdn-client/models/user_stats.rb', line 63 def group_approved_count @group_approved_count end |
#group_history_count ⇒ Object
Returns the value of attribute group_history_count.
65 66 67 |
# File 'lib/osdn-client/models/user_stats.rb', line 65 def group_history_count @group_history_count end |
#hg_count ⇒ Object
Returns the value of attribute hg_count.
39 40 41 |
# File 'lib/osdn-client/models/user_stats.rb', line 39 def hg_count @hg_count end |
#news_count ⇒ Object
Returns the value of attribute news_count.
33 34 35 |
# File 'lib/osdn-client/models/user_stats.rb', line 33 def news_count @news_count end |
#project_review_rating_submit_count ⇒ Object
Returns the value of attribute project_review_rating_submit_count.
75 76 77 |
# File 'lib/osdn-client/models/user_stats.rb', line 75 def @project_review_rating_submit_count end |
#project_review_submit_count ⇒ Object
Returns the value of attribute project_review_submit_count.
71 72 73 |
# File 'lib/osdn-client/models/user_stats.rb', line 71 def project_review_submit_count @project_review_submit_count end |
#project_review_update_count ⇒ Object
Returns the value of attribute project_review_update_count.
73 74 75 |
# File 'lib/osdn-client/models/user_stats.rb', line 73 def project_review_update_count @project_review_update_count end |
#svn_count ⇒ Object
Returns the value of attribute svn_count.
37 38 39 |
# File 'lib/osdn-client/models/user_stats.rb', line 37 def svn_count @svn_count end |
#ticket_close_count ⇒ Object
Returns the value of attribute ticket_close_count.
53 54 55 |
# File 'lib/osdn-client/models/user_stats.rb', line 53 def ticket_close_count @ticket_close_count end |
#ticket_comment_count ⇒ Object
Returns the value of attribute ticket_comment_count.
55 56 57 |
# File 'lib/osdn-client/models/user_stats.rb', line 55 def ticket_comment_count @ticket_comment_count end |
#ticket_milestone_count ⇒ Object
Returns the value of attribute ticket_milestone_count.
61 62 63 |
# File 'lib/osdn-client/models/user_stats.rb', line 61 def ticket_milestone_count @ticket_milestone_count end |
#ticket_misc_count ⇒ Object
Returns the value of attribute ticket_misc_count.
59 60 61 |
# File 'lib/osdn-client/models/user_stats.rb', line 59 def ticket_misc_count @ticket_misc_count end |
#ticket_open_count ⇒ Object
Returns the value of attribute ticket_open_count.
51 52 53 |
# File 'lib/osdn-client/models/user_stats.rb', line 51 def ticket_open_count @ticket_open_count end |
#ticket_owner_count ⇒ Object
Returns the value of attribute ticket_owner_count.
57 58 59 |
# File 'lib/osdn-client/models/user_stats.rb', line 57 def ticket_owner_count @ticket_owner_count end |
#user_point ⇒ Object
Returns the value of attribute user_point.
31 32 33 |
# File 'lib/osdn-client/models/user_stats.rb', line 31 def user_point @user_point end |
#wiki_count ⇒ Object
Returns the value of attribute wiki_count.
45 46 47 |
# File 'lib/osdn-client/models/user_stats.rb', line 45 def wiki_count @wiki_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/osdn-client/models/user_stats.rb', line 83 def self.attribute_map { :'date' => :'date', :'user_point' => :'user_point', :'news_count' => :'news_count', :'git_count' => :'git_count', :'svn_count' => :'svn_count', :'hg_count' => :'hg_count', :'bzr_count' => :'bzr_count', :'cvs_count' => :'cvs_count', :'wiki_count' => :'wiki_count', :'forum_count' => :'forum_count', :'forum_misc_count' => :'forum_misc_count', :'ticket_open_count' => :'ticket_open_count', :'ticket_close_count' => :'ticket_close_count', :'ticket_comment_count' => :'ticket_comment_count', :'ticket_owner_count' => :'ticket_owner_count', :'ticket_misc_count' => :'ticket_misc_count', :'ticket_milestone_count' => :'ticket_milestone_count', :'group_approved_count' => :'group_approved_count', :'group_history_count' => :'group_history_count', :'ghosted_submit_count' => :'ghosted_submit_count', :'ghosted_approve_count' => :'ghosted_approve_count', :'project_review_submit_count' => :'project_review_submit_count', :'project_review_update_count' => :'project_review_update_count', :'project_review_rating_submit_count' => :'project_review_rating_submit_count', :'chamber_file_count' => :'chamber_file_count', :'chamber_vcs_count' => :'chamber_vcs_count' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/osdn-client/models/user_stats.rb', line 115 def self.swagger_types { :'date' => :'String', :'user_point' => :'Integer', :'news_count' => :'Integer', :'git_count' => :'Integer', :'svn_count' => :'Integer', :'hg_count' => :'Integer', :'bzr_count' => :'Integer', :'cvs_count' => :'Integer', :'wiki_count' => :'Integer', :'forum_count' => :'Integer', :'forum_misc_count' => :'Integer', :'ticket_open_count' => :'Integer', :'ticket_close_count' => :'Integer', :'ticket_comment_count' => :'Integer', :'ticket_owner_count' => :'Integer', :'ticket_misc_count' => :'Integer', :'ticket_milestone_count' => :'Integer', :'group_approved_count' => :'Integer', :'group_history_count' => :'Integer', :'ghosted_submit_count' => :'Integer', :'ghosted_approve_count' => :'Integer', :'project_review_submit_count' => :'Integer', :'project_review_update_count' => :'Integer', :'project_review_rating_submit_count' => :'Integer', :'chamber_file_count' => :'Integer', :'chamber_vcs_count' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/osdn-client/models/user_stats.rb', line 275 def ==(o) return true if self.equal?(o) self.class == o.class && date == o.date && user_point == o.user_point && news_count == o.news_count && git_count == o.git_count && svn_count == o.svn_count && hg_count == o.hg_count && bzr_count == o.bzr_count && cvs_count == o.cvs_count && wiki_count == o.wiki_count && forum_count == o.forum_count && forum_misc_count == o.forum_misc_count && ticket_open_count == o.ticket_open_count && ticket_close_count == o.ticket_close_count && ticket_comment_count == o.ticket_comment_count && ticket_owner_count == o.ticket_owner_count && ticket_misc_count == o.ticket_misc_count && ticket_milestone_count == o.ticket_milestone_count && group_approved_count == o.group_approved_count && group_history_count == o.group_history_count && ghosted_submit_count == o.ghosted_submit_count && ghosted_approve_count == o.ghosted_approve_count && project_review_submit_count == o.project_review_submit_count && project_review_update_count == o.project_review_update_count && == o. && chamber_file_count == o.chamber_file_count && chamber_vcs_count == o.chamber_vcs_count end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/osdn-client/models/user_stats.rb', line 342 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = OSDNClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/osdn-client/models/user_stats.rb', line 408 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/osdn-client/models/user_stats.rb', line 321 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) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean
308 309 310 |
# File 'lib/osdn-client/models/user_stats.rb', line 308 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
314 315 316 |
# File 'lib/osdn-client/models/user_stats.rb', line 314 def hash [date, user_point, news_count, git_count, svn_count, hg_count, bzr_count, cvs_count, wiki_count, forum_count, forum_misc_count, ticket_open_count, ticket_close_count, ticket_comment_count, ticket_owner_count, ticket_misc_count, ticket_milestone_count, group_approved_count, group_history_count, ghosted_submit_count, ghosted_approve_count, project_review_submit_count, project_review_update_count, , chamber_file_count, chamber_vcs_count].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
262 263 264 265 |
# File 'lib/osdn-client/models/user_stats.rb', line 262 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
388 389 390 |
# File 'lib/osdn-client/models/user_stats.rb', line 388 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
394 395 396 397 398 399 400 401 402 |
# File 'lib/osdn-client/models/user_stats.rb', line 394 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
382 383 384 |
# File 'lib/osdn-client/models/user_stats.rb', line 382 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
269 270 271 |
# File 'lib/osdn-client/models/user_stats.rb', line 269 def valid? return true end |