Class: Athenian::JIRAEpicIssueCommon
- Inherits:
-
Object
- Object
- Athenian::JIRAEpicIssueCommon
- Defined in:
- lib/athenian/models/jira_epic_issue_common.rb
Overview
Common properies if a JIRA issue or epic.
Instance Attribute Summary collapse
-
#acknowledge_time ⇒ Object
Returns the value of attribute acknowledge_time.
-
#assignee ⇒ Object
Name of the assigned person.
-
#comment_list ⇒ Object
The list of comments for the issue.
-
#comments ⇒ Object
Number of comments in the issue excluding sub-tasks and children.
-
#created ⇒ Object
When this issue was created.
-
#id ⇒ Object
JIRA issue key ‘PROJECT-###`.
-
#lead_time ⇒ Object
Returns the value of attribute lead_time.
-
#life_time ⇒ Object
Returns the value of attribute life_time.
-
#priority ⇒ Object
Name of the priority.
-
#rendered_description ⇒ Object
The description of the issue rendered as HTML.
-
#reporter ⇒ Object
Name of the person who reported the issue.
-
#resolved ⇒ Object
When the issue finished: the stage is "Done" and all PRs are either released or rejected.
-
#status ⇒ Object
Name of the status.
-
#story_points ⇒ Object
Value of the "story points" field.
-
#title ⇒ Object
Title of this issue.
-
#type ⇒ Object
Name of the issue type.
-
#updated ⇒ Object
When this issue was last updated.
-
#url ⇒ Object
Link to the issue in JIRA web application.
-
#work_began ⇒ Object
When the issue entered the "In Progress" stage or received a PR.
Class Method Summary collapse
-
.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.
-
#_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 ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ JIRAEpicIssueCommon
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 = {}) ⇒ JIRAEpicIssueCommon
Initializes the object
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 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 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 134 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, 'The input argument (attributes) must be a hash in `Athenian::JIRAEpicIssueCommon` initialize method' end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Athenian::JIRAEpicIssueCommon`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'title') self.title = attributes[:'title'] end if attributes.key?(:'created') self.created = attributes[:'created'] end if attributes.key?(:'updated') self.updated = attributes[:'updated'] end if attributes.key?(:'work_began') self.work_began = attributes[:'work_began'] end if attributes.key?(:'resolved') self.resolved = attributes[:'resolved'] end if attributes.key?(:'acknowledge_time') self.acknowledge_time = attributes[:'acknowledge_time'] end if attributes.key?(:'lead_time') self.lead_time = attributes[:'lead_time'] end if attributes.key?(:'life_time') self.life_time = attributes[:'life_time'] end if attributes.key?(:'reporter') self.reporter = attributes[:'reporter'] end if attributes.key?(:'assignee') self.assignee = attributes[:'assignee'] end if attributes.key?(:'comments') self.comments = attributes[:'comments'] end if attributes.key?(:'comment_list') if (value = attributes[:'comment_list']).is_a?(Array) self.comment_list = value end end if attributes.key?(:'priority') self.priority = attributes[:'priority'] end if attributes.key?(:'rendered_description') self.rendered_description = attributes[:'rendered_description'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'story_points') self.story_points = attributes[:'story_points'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'url') self.url = attributes[:'url'] end end |
Instance Attribute Details
#acknowledge_time ⇒ Object
Returns the value of attribute acknowledge_time.
34 35 36 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 34 def acknowledge_time @acknowledge_time end |
#assignee ⇒ Object
Name of the assigned person.
44 45 46 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 44 def assignee @assignee end |
#comment_list ⇒ Object
The list of comments for the issue.
50 51 52 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 50 def comment_list @comment_list end |
#comments ⇒ Object
Number of comments in the issue excluding sub-tasks and children.
47 48 49 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 47 def comments @comments end |
#created ⇒ Object
When this issue was created.
23 24 25 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 23 def created @created end |
#id ⇒ Object
JIRA issue key ‘PROJECT-###`.
17 18 19 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 17 def id @id end |
#lead_time ⇒ Object
Returns the value of attribute lead_time.
36 37 38 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 36 def lead_time @lead_time end |
#life_time ⇒ Object
Returns the value of attribute life_time.
38 39 40 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 38 def life_time @life_time end |
#priority ⇒ Object
Name of the priority. The details are returned in ‘FilteredJIRAStuff.priorities`.
53 54 55 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 53 def priority @priority end |
#rendered_description ⇒ Object
The description of the issue rendered as HTML.
56 57 58 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 56 def rendered_description @rendered_description end |
#reporter ⇒ Object
Name of the person who reported the issue.
41 42 43 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 41 def reporter @reporter end |
#resolved ⇒ Object
When the issue finished: the stage is "Done" and all PRs are either released or rejected. This timestamp can be missing and is always greater than or equal to ‘work_began`.
32 33 34 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 32 def resolved @resolved end |
#status ⇒ Object
Name of the status. The details are returned in ‘FilteredJIRAStuff.statuses`.
59 60 61 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 59 def status @status end |
#story_points ⇒ Object
Value of the "story points" field.
62 63 64 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 62 def story_points @story_points end |
#title ⇒ Object
Title of this issue.
20 21 22 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 20 def title @title end |
#type ⇒ Object
Name of the issue type. The details are returned in ‘FilteredJIRAStuff.issue_types`.
65 66 67 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 65 def type @type end |
#updated ⇒ Object
When this issue was last updated.
26 27 28 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 26 def updated @updated end |
#url ⇒ Object
Link to the issue in JIRA web application.
68 69 70 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 68 def url @url end |
#work_began ⇒ Object
When the issue entered the "In Progress" stage or received a PR. This timestamp can be missing and is always less than or equal to ‘resolved`.
29 30 31 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 29 def work_began @work_began end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
96 97 98 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 96 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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/athenian/models/jira_epic_issue_common.rb', line 71 def self.attribute_map { :'id' => :'id', :'title' => :'title', :'created' => :'created', :'updated' => :'updated', :'work_began' => :'work_began', :'resolved' => :'resolved', :'acknowledge_time' => :'acknowledge_time', :'lead_time' => :'lead_time', :'life_time' => :'life_time', :'reporter' => :'reporter', :'assignee' => :'assignee', :'comments' => :'comments', :'comment_list' => :'comment_list', :'priority' => :'priority', :'rendered_description' => :'rendered_description', :'status' => :'status', :'story_points' => :'story_points', :'type' => :'type', :'url' => :'url' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
335 336 337 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 335 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
126 127 128 129 130 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 126 def self.openapi_nullable Set.new([ :'priority', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 101 def self.openapi_types { :'id' => :'String', :'title' => :'String', :'created' => :'Time', :'updated' => :'Time', :'work_began' => :'Time', :'resolved' => :'Time', :'acknowledge_time' => :'Object', :'lead_time' => :'Object', :'life_time' => :'Object', :'reporter' => :'String', :'assignee' => :'String', :'comments' => :'Integer', :'comment_list' => :'Array<JIRAComment>', :'priority' => :'String', :'rendered_description' => :'String', :'status' => :'String', :'story_points' => :'Float', :'type' => :'String', :'url' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 296 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && title == o.title && created == o.created && updated == o.updated && work_began == o.work_began && resolved == o.resolved && acknowledge_time == o.acknowledge_time && lead_time == o.lead_time && life_time == o.life_time && reporter == o.reporter && assignee == o.assignee && comments == o.comments && comment_list == o.comment_list && priority == o.priority && rendered_description == o.rendered_description && status == o.status && story_points == o.story_points && type == o.type && url == o.url end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 366 def _deserialize(type, value) case type.to_sym when :Time Time.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 =~ /\A(true|t|yes|y|1)\z/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 # models (e.g. Pet) or oneOf klass = Athenian.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 437 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
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 342 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[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 end self end |
#eql?(o) ⇒ Boolean
322 323 324 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 322 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
328 329 330 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 328 def hash [id, title, created, updated, work_began, resolved, acknowledge_time, lead_time, life_time, reporter, assignee, comments, comment_list, priority, rendered_description, status, story_points, type, url].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 228 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @title.nil? invalid_properties.push('invalid value for "title", title cannot be nil.') end if @created.nil? invalid_properties.push('invalid value for "created", created cannot be nil.') end if @updated.nil? invalid_properties.push('invalid value for "updated", updated cannot be nil.') end if @acknowledge_time.nil? invalid_properties.push('invalid value for "acknowledge_time", acknowledge_time cannot be nil.') end if @life_time.nil? invalid_properties.push('invalid value for "life_time", life_time cannot be nil.') end if @reporter.nil? invalid_properties.push('invalid value for "reporter", reporter cannot be nil.') end if @comments.nil? invalid_properties.push('invalid value for "comments", comments cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @url.nil? invalid_properties.push('invalid value for "url", url cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
413 414 415 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 413 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 419 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 |
#to_s ⇒ String
Returns the string representation of the object
407 408 409 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 407 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/athenian/models/jira_epic_issue_common.rb', line 279 def valid? return false if @id.nil? return false if @title.nil? return false if @created.nil? return false if @updated.nil? return false if @acknowledge_time.nil? return false if @life_time.nil? return false if @reporter.nil? return false if @comments.nil? return false if @status.nil? return false if @type.nil? return false if @url.nil? true end |