Class: Crisphive::JobRequest
- Inherits:
-
Object
- Object
- Crisphive::JobRequest
- Defined in:
- lib/crisphive/models/job_request.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#action_audit ⇒ Object
ActionAudit is the per-action audit log keyed by action_key.
-
#address ⇒ Object
The job's service address snapshot.
-
#archive ⇒ Object
The job's archive state.
-
#assigned_vehicle ⇒ Object
AssignedVehicle is the carpool vehicle (the lead drives).
-
#assignment ⇒ Object
Who/what is assigned to the job.
-
#attention ⇒ Object
Attention is the dispatch-board "needs attention" marker (exception tray); null when the job needs no attention.
-
#business_id ⇒ Object
UUID of the owning business.
-
#completed_at ⇒ Object
When the job was completed (UTC); null until completed.
-
#completed_by_user_id ⇒ Object
UUID of the user who fired complete; null until completed.
-
#created_at ⇒ Object
When the job was created (UTC).
-
#crew ⇒ Object
Crew is the multi-person crew on the job (lead first).
-
#current_status ⇒ Object
The job's current workflow status.
-
#customer ⇒ Object
The job's customer contact snapshot.
-
#customer_url ⇒ Object
Ready-to-share customer URL embedding the magic token.
-
#deleted_at ⇒ Object
When the job was soft-deleted (UTC); omitted unless deleted.
-
#description ⇒ Object
Free-text job description; null if none.
-
#id ⇒ Object
Job request UUID.
-
#job_type_id ⇒ Object
UUID of the job type, or null if unclassified.
-
#job_type_name ⇒ Object
Job type display name (resolved to locale).
-
#next_actions ⇒ Object
The action(s) the job is currently waiting on.
-
#priority ⇒ Object
Scheduling priority.
-
#quote ⇒ Object
The time-bundle quoted for the job.
-
#rating ⇒ Object
The customer's rating of the completed job.
-
#schedule ⇒ Object
When/how the job is scheduled and its per-day plan.
-
#short_code ⇒ Object
Human-friendly short code.
-
#skills ⇒ Object
Desired skills for the job (resolved id+name).
-
#sla_deadline ⇒ Object
SLA deadline (UTC) armed on a p1 job; omitted when no SLA.
-
#sla_escalated_at ⇒ Object
When the SLA sweep auto-escalated this job to p0 (UTC); omitted if never.
-
#sla_warned_at ⇒ Object
When the sweep fired the one-shot pre-escalation warning (UTC); omitted if never.
-
#status_version ⇒ Object
Optimistic-lock version; pass back as status_version on transitions to avoid races.
-
#updated_at ⇒ Object
When the job was last modified (UTC).
-
#workflow_id ⇒ Object
UUID of the workflow snapshot driving this job's state machine.
-
#workflow_name ⇒ Object
Workflow display name.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ JobRequest
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 = {}) ⇒ JobRequest
Initializes the object
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 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 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 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 379 380 381 382 |
# File 'lib/crisphive/models/job_request.rb', line 230 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Crisphive::JobRequest` 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 `Crisphive::JobRequest`. 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?(:'action_audit') if (value = attributes[:'action_audit']).is_a?(Hash) self.action_audit = value end end if attributes.key?(:'address') self.address = attributes[:'address'] end if attributes.key?(:'archive') self.archive = attributes[:'archive'] end if attributes.key?(:'assigned_vehicle') self.assigned_vehicle = attributes[:'assigned_vehicle'] end if attributes.key?(:'assignment') self.assignment = attributes[:'assignment'] end if attributes.key?(:'attention') self.attention = attributes[:'attention'] end if attributes.key?(:'business_id') self.business_id = attributes[:'business_id'] end if attributes.key?(:'completed_at') self.completed_at = attributes[:'completed_at'] end if attributes.key?(:'completed_by_user_id') self.completed_by_user_id = attributes[:'completed_by_user_id'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'crew') if (value = attributes[:'crew']).is_a?(Array) self.crew = value end end if attributes.key?(:'current_status') self.current_status = attributes[:'current_status'] end if attributes.key?(:'customer') self.customer = attributes[:'customer'] end if attributes.key?(:'customer_url') self.customer_url = attributes[:'customer_url'] end if attributes.key?(:'deleted_at') self.deleted_at = attributes[:'deleted_at'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'job_type_id') self.job_type_id = attributes[:'job_type_id'] end if attributes.key?(:'job_type_name') self.job_type_name = attributes[:'job_type_name'] end if attributes.key?(:'next_actions') if (value = attributes[:'next_actions']).is_a?(Array) self.next_actions = value end end if attributes.key?(:'priority') self.priority = attributes[:'priority'] end if attributes.key?(:'quote') self.quote = attributes[:'quote'] end if attributes.key?(:'rating') self. = attributes[:'rating'] end if attributes.key?(:'schedule') self.schedule = attributes[:'schedule'] end if attributes.key?(:'short_code') self.short_code = attributes[:'short_code'] end if attributes.key?(:'skills') if (value = attributes[:'skills']).is_a?(Array) self.skills = value end end if attributes.key?(:'sla_deadline') self.sla_deadline = attributes[:'sla_deadline'] end if attributes.key?(:'sla_escalated_at') self.sla_escalated_at = attributes[:'sla_escalated_at'] end if attributes.key?(:'sla_warned_at') self.sla_warned_at = attributes[:'sla_warned_at'] end if attributes.key?(:'status_version') self.status_version = attributes[:'status_version'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'workflow_id') self.workflow_id = attributes[:'workflow_id'] end if attributes.key?(:'workflow_name') self.workflow_name = attributes[:'workflow_name'] end end |
Instance Attribute Details
#action_audit ⇒ Object
ActionAudit is the per-action audit log keyed by action_key. complete fixed action không xuất hiện ở đây — actor lookup qua CompletedByUserID.
19 20 21 |
# File 'lib/crisphive/models/job_request.rb', line 19 def action_audit @action_audit end |
#address ⇒ Object
The job's service address snapshot.
22 23 24 |
# File 'lib/crisphive/models/job_request.rb', line 22 def address @address end |
#archive ⇒ Object
The job's archive state.
25 26 27 |
# File 'lib/crisphive/models/job_request.rb', line 25 def archive @archive end |
#assigned_vehicle ⇒ Object
AssignedVehicle is the carpool vehicle (the lead drives). Omitted when the job has no vehicle.
28 29 30 |
# File 'lib/crisphive/models/job_request.rb', line 28 def assigned_vehicle @assigned_vehicle end |
#assignment ⇒ Object
Who/what is assigned to the job.
31 32 33 |
# File 'lib/crisphive/models/job_request.rb', line 31 def assignment @assignment end |
#attention ⇒ Object
Attention is the dispatch-board "needs attention" marker (exception tray); null when the job needs no attention.
34 35 36 |
# File 'lib/crisphive/models/job_request.rb', line 34 def attention @attention end |
#business_id ⇒ Object
UUID of the owning business.
37 38 39 |
# File 'lib/crisphive/models/job_request.rb', line 37 def business_id @business_id end |
#completed_at ⇒ Object
When the job was completed (UTC); null until completed.
40 41 42 |
# File 'lib/crisphive/models/job_request.rb', line 40 def completed_at @completed_at end |
#completed_by_user_id ⇒ Object
UUID of the user who fired complete; null until completed.
43 44 45 |
# File 'lib/crisphive/models/job_request.rb', line 43 def completed_by_user_id @completed_by_user_id end |
#created_at ⇒ Object
When the job was created (UTC).
46 47 48 |
# File 'lib/crisphive/models/job_request.rb', line 46 def created_at @created_at end |
#crew ⇒ Object
Crew is the multi-person crew on the job (lead first). A single-person job has one member. Omitted when no session plan exists.
49 50 51 |
# File 'lib/crisphive/models/job_request.rb', line 49 def crew @crew end |
#current_status ⇒ Object
The job's current workflow status.
52 53 54 |
# File 'lib/crisphive/models/job_request.rb', line 52 def current_status @current_status end |
#customer ⇒ Object
The job's customer contact snapshot.
55 56 57 |
# File 'lib/crisphive/models/job_request.rb', line 55 def customer @customer end |
#customer_url ⇒ Object
Ready-to-share customer URL embedding the magic token. Omitted if not issued.
58 59 60 |
# File 'lib/crisphive/models/job_request.rb', line 58 def customer_url @customer_url end |
#deleted_at ⇒ Object
When the job was soft-deleted (UTC); omitted unless deleted.
61 62 63 |
# File 'lib/crisphive/models/job_request.rb', line 61 def deleted_at @deleted_at end |
#description ⇒ Object
Free-text job description; null if none.
64 65 66 |
# File 'lib/crisphive/models/job_request.rb', line 64 def description @description end |
#id ⇒ Object
Job request UUID.
67 68 69 |
# File 'lib/crisphive/models/job_request.rb', line 67 def id @id end |
#job_type_id ⇒ Object
UUID of the job type, or null if unclassified.
70 71 72 |
# File 'lib/crisphive/models/job_request.rb', line 70 def job_type_id @job_type_id end |
#job_type_name ⇒ Object
Job type display name (resolved to locale). Omitted if unclassified.
73 74 75 |
# File 'lib/crisphive/models/job_request.rb', line 73 def job_type_name @job_type_name end |
#next_actions ⇒ Object
The action(s) the job is currently waiting on. Omitted in a terminal status.
76 77 78 |
# File 'lib/crisphive/models/job_request.rb', line 76 def next_actions @next_actions end |
#priority ⇒ Object
Scheduling priority. p0=emergency (interrupt-driven), p1=top (displaced only by p0), p2=standard, p3=deferrable (first candidate for displacement).
79 80 81 |
# File 'lib/crisphive/models/job_request.rb', line 79 def priority @priority end |
#quote ⇒ Object
The time-bundle quoted for the job.
82 83 84 |
# File 'lib/crisphive/models/job_request.rb', line 82 def quote @quote end |
#rating ⇒ Object
The customer's rating of the completed job.
85 86 87 |
# File 'lib/crisphive/models/job_request.rb', line 85 def @rating end |
#schedule ⇒ Object
When/how the job is scheduled and its per-day plan.
88 89 90 |
# File 'lib/crisphive/models/job_request.rb', line 88 def schedule @schedule end |
#short_code ⇒ Object
Human-friendly short code. Omitted if not assigned.
91 92 93 |
# File 'lib/crisphive/models/job_request.rb', line 91 def short_code @short_code end |
#skills ⇒ Object
Desired skills for the job (resolved id+name).
94 95 96 |
# File 'lib/crisphive/models/job_request.rb', line 94 def skills @skills end |
#sla_deadline ⇒ Object
SLA deadline (UTC) armed on a p1 job; omitted when no SLA.
97 98 99 |
# File 'lib/crisphive/models/job_request.rb', line 97 def sla_deadline @sla_deadline end |
#sla_escalated_at ⇒ Object
When the SLA sweep auto-escalated this job to p0 (UTC); omitted if never.
100 101 102 |
# File 'lib/crisphive/models/job_request.rb', line 100 def sla_escalated_at @sla_escalated_at end |
#sla_warned_at ⇒ Object
When the sweep fired the one-shot pre-escalation warning (UTC); omitted if never.
103 104 105 |
# File 'lib/crisphive/models/job_request.rb', line 103 def sla_warned_at @sla_warned_at end |
#status_version ⇒ Object
Optimistic-lock version; pass back as status_version on transitions to avoid races.
106 107 108 |
# File 'lib/crisphive/models/job_request.rb', line 106 def status_version @status_version end |
#updated_at ⇒ Object
When the job was last modified (UTC).
109 110 111 |
# File 'lib/crisphive/models/job_request.rb', line 109 def updated_at @updated_at end |
#workflow_id ⇒ Object
UUID of the workflow snapshot driving this job's state machine.
112 113 114 |
# File 'lib/crisphive/models/job_request.rb', line 112 def workflow_id @workflow_id end |
#workflow_name ⇒ Object
Workflow display name.
115 116 117 |
# File 'lib/crisphive/models/job_request.rb', line 115 def workflow_name @workflow_name end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/crisphive/models/job_request.rb', line 490 def self._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 = Crisphive.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
179 180 181 |
# File 'lib/crisphive/models/job_request.rb', line 179 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/crisphive/models/job_request.rb', line 140 def self.attribute_map { :'action_audit' => :'action_audit', :'address' => :'address', :'archive' => :'archive', :'assigned_vehicle' => :'assigned_vehicle', :'assignment' => :'assignment', :'attention' => :'attention', :'business_id' => :'business_id', :'completed_at' => :'completed_at', :'completed_by_user_id' => :'completed_by_user_id', :'created_at' => :'created_at', :'crew' => :'crew', :'current_status' => :'current_status', :'customer' => :'customer', :'customer_url' => :'customer_url', :'deleted_at' => :'deleted_at', :'description' => :'description', :'id' => :'id', :'job_type_id' => :'job_type_id', :'job_type_name' => :'job_type_name', :'next_actions' => :'next_actions', :'priority' => :'priority', :'quote' => :'quote', :'rating' => :'rating', :'schedule' => :'schedule', :'short_code' => :'short_code', :'skills' => :'skills', :'sla_deadline' => :'sla_deadline', :'sla_escalated_at' => :'sla_escalated_at', :'sla_warned_at' => :'sla_warned_at', :'status_version' => :'status_version', :'updated_at' => :'updated_at', :'workflow_id' => :'workflow_id', :'workflow_name' => :'workflow_name' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/crisphive/models/job_request.rb', line 466 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
223 224 225 226 |
# File 'lib/crisphive/models/job_request.rb', line 223 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/crisphive/models/job_request.rb', line 184 def self.openapi_types { :'action_audit' => :'Hash<String, JobRequestActionAuditEntry>', :'address' => :'JobRequestAddressSummary', :'archive' => :'JobRequestArchiveSummary', :'assigned_vehicle' => :'JobRequestAssignedVehicle', :'assignment' => :'JobRequestAssignmentSummary', :'attention' => :'JobRequestAttentionSummary', :'business_id' => :'String', :'completed_at' => :'Time', :'completed_by_user_id' => :'String', :'created_at' => :'Time', :'crew' => :'Array<JobRequestCrewMember>', :'current_status' => :'JobRequestStatusSummary', :'customer' => :'JobRequestCustomerSummary', :'customer_url' => :'String', :'deleted_at' => :'Time', :'description' => :'String', :'id' => :'String', :'job_type_id' => :'String', :'job_type_name' => :'String', :'next_actions' => :'Array<JobRequestActionSummary>', :'priority' => :'String', :'quote' => :'JobRequestQuoteSummary', :'rating' => :'JobRequestRatingSummary', :'schedule' => :'JobRequestSchedule', :'short_code' => :'String', :'skills' => :'Array<JobRequestSkillSummary>', :'sla_deadline' => :'Time', :'sla_escalated_at' => :'Time', :'sla_warned_at' => :'Time', :'status_version' => :'Integer', :'updated_at' => :'Time', :'workflow_id' => :'String', :'workflow_name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/crisphive/models/job_request.rb', line 413 def ==(o) return true if self.equal?(o) self.class == o.class && action_audit == o.action_audit && address == o.address && archive == o.archive && assigned_vehicle == o.assigned_vehicle && assignment == o.assignment && attention == o.attention && business_id == o.business_id && completed_at == o.completed_at && completed_by_user_id == o.completed_by_user_id && created_at == o.created_at && crew == o.crew && current_status == o.current_status && customer == o.customer && customer_url == o.customer_url && deleted_at == o.deleted_at && description == o.description && id == o.id && job_type_id == o.job_type_id && job_type_name == o.job_type_name && next_actions == o.next_actions && priority == o.priority && quote == o.quote && == o. && schedule == o.schedule && short_code == o.short_code && skills == o.skills && sla_deadline == o.sla_deadline && sla_escalated_at == o.sla_escalated_at && sla_warned_at == o.sla_warned_at && status_version == o.status_version && updated_at == o.updated_at && workflow_id == o.workflow_id && workflow_name == o.workflow_name end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/crisphive/models/job_request.rb', line 561 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 |
#eql?(o) ⇒ Boolean
453 454 455 |
# File 'lib/crisphive/models/job_request.rb', line 453 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
459 460 461 |
# File 'lib/crisphive/models/job_request.rb', line 459 def hash [action_audit, address, archive, assigned_vehicle, assignment, attention, business_id, completed_at, completed_by_user_id, created_at, crew, current_status, customer, customer_url, deleted_at, description, id, job_type_id, job_type_name, next_actions, priority, quote, , schedule, short_code, skills, sla_deadline, sla_escalated_at, sla_warned_at, status_version, updated_at, workflow_id, workflow_name].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
386 387 388 389 390 |
# File 'lib/crisphive/models/job_request.rb', line 386 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
537 538 539 |
# File 'lib/crisphive/models/job_request.rb', line 537 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/crisphive/models/job_request.rb', line 543 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
531 532 533 |
# File 'lib/crisphive/models/job_request.rb', line 531 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
394 395 396 397 398 399 |
# File 'lib/crisphive/models/job_request.rb', line 394 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' priority_validator = EnumAttributeValidator.new('String', ["p0", "p1", "p2", "p3"]) return false unless priority_validator.valid?(@priority) true end |