001// Automatically generated by the Thrifty compiler; do not edit! 002// Generated on: 2020-11-05T09:22:38.114Z 003// Source: J:\facelog\facelog-service\IFaceLog.thrift at 102:1 004package net.gdface.facelog.client.thrift; 005 006import com.microsoft.thrifty.Adapter; 007import com.microsoft.thrifty.Struct; 008import com.microsoft.thrifty.StructBuilder; 009import com.microsoft.thrifty.TType; 010import com.microsoft.thrifty.ThriftField; 011import com.microsoft.thrifty.protocol.FieldMetadata; 012import com.microsoft.thrifty.protocol.Protocol; 013import com.microsoft.thrifty.util.ProtocolUtil; 014import java.io.IOException; 015import javax.annotation.Generated; 016 017@Generated( 018 value = "com.microsoft.thrifty.gen.ThriftyCodeGenerator", 019 comments = "https://github.com/microsoft/thrifty" 020) 021public final class LogBean implements Struct { 022 public static final Adapter<LogBean, Builder> ADAPTER = new LogBeanAdapter(); 023 024 @ThriftField( 025 fieldId = 1, 026 isRequired = true 027 ) 028 public final Boolean _new; 029 030 @ThriftField( 031 fieldId = 2, 032 isRequired = true 033 ) 034 public final Integer modified; 035 036 @ThriftField( 037 fieldId = 3, 038 isRequired = true 039 ) 040 public final Integer initialized; 041 042 @ThriftField( 043 fieldId = 4, 044 isOptional = true 045 ) 046 public final Integer id; 047 048 @ThriftField( 049 fieldId = 5, 050 isOptional = true 051 ) 052 public final Integer personId; 053 054 @ThriftField( 055 fieldId = 6, 056 isOptional = true 057 ) 058 public final Integer deviceId; 059 060 @ThriftField( 061 fieldId = 7, 062 isOptional = true 063 ) 064 public final String verifyFeature; 065 066 @ThriftField( 067 fieldId = 8, 068 isOptional = true 069 ) 070 public final String imageMd5; 071 072 @ThriftField( 073 fieldId = 9, 074 isOptional = true 075 ) 076 public final Integer compareFace; 077 078 @ThriftField( 079 fieldId = 10, 080 isOptional = true 081 ) 082 public final Integer verifyStatus; 083 084 @ThriftField( 085 fieldId = 11, 086 isOptional = true 087 ) 088 public final Double similarty; 089 090 @ThriftField( 091 fieldId = 12, 092 isOptional = true 093 ) 094 public final Integer direction; 095 096 @ThriftField( 097 fieldId = 13, 098 isOptional = true 099 ) 100 public final Double temperature; 101 102 @ThriftField( 103 fieldId = 14, 104 isOptional = true 105 ) 106 public final String props; 107 108 @ThriftField( 109 fieldId = 15, 110 isOptional = true 111 ) 112 public final Integer verifyType; 113 114 @ThriftField( 115 fieldId = 16, 116 isOptional = true 117 ) 118 public final Long verifyTime; 119 120 @ThriftField( 121 fieldId = 17, 122 isOptional = true 123 ) 124 public final Long createTime; 125 126 private LogBean(Builder builder) { 127 this._new = builder._new; 128 this.modified = builder.modified; 129 this.initialized = builder.initialized; 130 this.id = builder.id; 131 this.personId = builder.personId; 132 this.deviceId = builder.deviceId; 133 this.verifyFeature = builder.verifyFeature; 134 this.imageMd5 = builder.imageMd5; 135 this.compareFace = builder.compareFace; 136 this.verifyStatus = builder.verifyStatus; 137 this.similarty = builder.similarty; 138 this.direction = builder.direction; 139 this.temperature = builder.temperature; 140 this.props = builder.props; 141 this.verifyType = builder.verifyType; 142 this.verifyTime = builder.verifyTime; 143 this.createTime = builder.createTime; 144 } 145 146 @Override 147 @SuppressWarnings({"NumberEquality", "StringEquality"}) 148 public boolean equals(Object other) { 149 if (this == other) return true; 150 if (other == null) return false; 151 if (!(other instanceof LogBean)) return false; 152 LogBean that = (LogBean) other; 153 return (this._new == that._new || this._new.equals(that._new)) 154 && (this.modified == that.modified || this.modified.equals(that.modified)) 155 && (this.initialized == that.initialized || this.initialized.equals(that.initialized)) 156 && (this.id == that.id || (this.id != null && this.id.equals(that.id))) 157 && (this.personId == that.personId || (this.personId != null && this.personId.equals(that.personId))) 158 && (this.deviceId == that.deviceId || (this.deviceId != null && this.deviceId.equals(that.deviceId))) 159 && (this.verifyFeature == that.verifyFeature || (this.verifyFeature != null && this.verifyFeature.equals(that.verifyFeature))) 160 && (this.imageMd5 == that.imageMd5 || (this.imageMd5 != null && this.imageMd5.equals(that.imageMd5))) 161 && (this.compareFace == that.compareFace || (this.compareFace != null && this.compareFace.equals(that.compareFace))) 162 && (this.verifyStatus == that.verifyStatus || (this.verifyStatus != null && this.verifyStatus.equals(that.verifyStatus))) 163 && (this.similarty == that.similarty || (this.similarty != null && this.similarty.equals(that.similarty))) 164 && (this.direction == that.direction || (this.direction != null && this.direction.equals(that.direction))) 165 && (this.temperature == that.temperature || (this.temperature != null && this.temperature.equals(that.temperature))) 166 && (this.props == that.props || (this.props != null && this.props.equals(that.props))) 167 && (this.verifyType == that.verifyType || (this.verifyType != null && this.verifyType.equals(that.verifyType))) 168 && (this.verifyTime == that.verifyTime || (this.verifyTime != null && this.verifyTime.equals(that.verifyTime))) 169 && (this.createTime == that.createTime || (this.createTime != null && this.createTime.equals(that.createTime))); 170 } 171 172 @Override 173 public int hashCode() { 174 int code = 16777619; 175 code ^= this._new.hashCode(); 176 code *= 0x811c9dc5; 177 code ^= this.modified.hashCode(); 178 code *= 0x811c9dc5; 179 code ^= this.initialized.hashCode(); 180 code *= 0x811c9dc5; 181 code ^= (this.id == null) ? 0 : this.id.hashCode(); 182 code *= 0x811c9dc5; 183 code ^= (this.personId == null) ? 0 : this.personId.hashCode(); 184 code *= 0x811c9dc5; 185 code ^= (this.deviceId == null) ? 0 : this.deviceId.hashCode(); 186 code *= 0x811c9dc5; 187 code ^= (this.verifyFeature == null) ? 0 : this.verifyFeature.hashCode(); 188 code *= 0x811c9dc5; 189 code ^= (this.imageMd5 == null) ? 0 : this.imageMd5.hashCode(); 190 code *= 0x811c9dc5; 191 code ^= (this.compareFace == null) ? 0 : this.compareFace.hashCode(); 192 code *= 0x811c9dc5; 193 code ^= (this.verifyStatus == null) ? 0 : this.verifyStatus.hashCode(); 194 code *= 0x811c9dc5; 195 code ^= (this.similarty == null) ? 0 : this.similarty.hashCode(); 196 code *= 0x811c9dc5; 197 code ^= (this.direction == null) ? 0 : this.direction.hashCode(); 198 code *= 0x811c9dc5; 199 code ^= (this.temperature == null) ? 0 : this.temperature.hashCode(); 200 code *= 0x811c9dc5; 201 code ^= (this.props == null) ? 0 : this.props.hashCode(); 202 code *= 0x811c9dc5; 203 code ^= (this.verifyType == null) ? 0 : this.verifyType.hashCode(); 204 code *= 0x811c9dc5; 205 code ^= (this.verifyTime == null) ? 0 : this.verifyTime.hashCode(); 206 code *= 0x811c9dc5; 207 code ^= (this.createTime == null) ? 0 : this.createTime.hashCode(); 208 code *= 0x811c9dc5; 209 return code; 210 } 211 212 @Override 213 public String toString() { 214 return "LogBean{_new=" + this._new + ", modified=" + this.modified + ", initialized=" + this.initialized + ", id=" + this.id + ", personId=" + this.personId + ", deviceId=" + this.deviceId + ", verifyFeature=" + this.verifyFeature + ", imageMd5=" + this.imageMd5 + ", compareFace=" + this.compareFace + ", verifyStatus=" + this.verifyStatus + ", similarty=" + this.similarty + ", direction=" + this.direction + ", temperature=" + this.temperature + ", props=" + this.props + ", verifyType=" + this.verifyType + ", verifyTime=" + this.verifyTime + ", createTime=" + this.createTime + "}"; 215 } 216 217 @Override 218 public void write(Protocol protocol) throws IOException { 219 ADAPTER.write(protocol, this); 220 } 221 222 public static final class Builder implements StructBuilder<LogBean> { 223 private Boolean _new; 224 225 private Integer modified; 226 227 private Integer initialized; 228 229 private Integer id; 230 231 private Integer personId; 232 233 private Integer deviceId; 234 235 private String verifyFeature; 236 237 private String imageMd5; 238 239 private Integer compareFace; 240 241 private Integer verifyStatus; 242 243 private Double similarty; 244 245 private Integer direction; 246 247 private Double temperature; 248 249 private String props; 250 251 private Integer verifyType; 252 253 private Long verifyTime; 254 255 private Long createTime; 256 257 public Builder() { 258 } 259 260 public Builder(LogBean struct) { 261 this._new = struct._new; 262 this.modified = struct.modified; 263 this.initialized = struct.initialized; 264 this.id = struct.id; 265 this.personId = struct.personId; 266 this.deviceId = struct.deviceId; 267 this.verifyFeature = struct.verifyFeature; 268 this.imageMd5 = struct.imageMd5; 269 this.compareFace = struct.compareFace; 270 this.verifyStatus = struct.verifyStatus; 271 this.similarty = struct.similarty; 272 this.direction = struct.direction; 273 this.temperature = struct.temperature; 274 this.props = struct.props; 275 this.verifyType = struct.verifyType; 276 this.verifyTime = struct.verifyTime; 277 this.createTime = struct.createTime; 278 } 279 280 public Builder _new(Boolean _new) { 281 if (_new == null) { 282 throw new NullPointerException("Required field '_new' cannot be null"); 283 } 284 this._new = _new; 285 return this; 286 } 287 288 public Builder modified(Integer modified) { 289 if (modified == null) { 290 throw new NullPointerException("Required field 'modified' cannot be null"); 291 } 292 this.modified = modified; 293 return this; 294 } 295 296 public Builder initialized(Integer initialized) { 297 if (initialized == null) { 298 throw new NullPointerException("Required field 'initialized' cannot be null"); 299 } 300 this.initialized = initialized; 301 return this; 302 } 303 304 public Builder id(Integer id) { 305 this.id = id; 306 return this; 307 } 308 309 public Builder personId(Integer personId) { 310 this.personId = personId; 311 return this; 312 } 313 314 public Builder deviceId(Integer deviceId) { 315 this.deviceId = deviceId; 316 return this; 317 } 318 319 public Builder verifyFeature(String verifyFeature) { 320 this.verifyFeature = verifyFeature; 321 return this; 322 } 323 324 public Builder imageMd5(String imageMd5) { 325 this.imageMd5 = imageMd5; 326 return this; 327 } 328 329 public Builder compareFace(Integer compareFace) { 330 this.compareFace = compareFace; 331 return this; 332 } 333 334 public Builder verifyStatus(Integer verifyStatus) { 335 this.verifyStatus = verifyStatus; 336 return this; 337 } 338 339 public Builder similarty(Double similarty) { 340 this.similarty = similarty; 341 return this; 342 } 343 344 public Builder direction(Integer direction) { 345 this.direction = direction; 346 return this; 347 } 348 349 public Builder temperature(Double temperature) { 350 this.temperature = temperature; 351 return this; 352 } 353 354 public Builder props(String props) { 355 this.props = props; 356 return this; 357 } 358 359 public Builder verifyType(Integer verifyType) { 360 this.verifyType = verifyType; 361 return this; 362 } 363 364 public Builder verifyTime(Long verifyTime) { 365 this.verifyTime = verifyTime; 366 return this; 367 } 368 369 public Builder createTime(Long createTime) { 370 this.createTime = createTime; 371 return this; 372 } 373 374 @Override 375 public LogBean build() { 376 if (this._new == null) { 377 throw new IllegalStateException("Required field '_new' is missing"); 378 } 379 if (this.modified == null) { 380 throw new IllegalStateException("Required field 'modified' is missing"); 381 } 382 if (this.initialized == null) { 383 throw new IllegalStateException("Required field 'initialized' is missing"); 384 } 385 return new LogBean(this); 386 } 387 388 @Override 389 public void reset() { 390 this._new = null; 391 this.modified = null; 392 this.initialized = null; 393 this.id = null; 394 this.personId = null; 395 this.deviceId = null; 396 this.verifyFeature = null; 397 this.imageMd5 = null; 398 this.compareFace = null; 399 this.verifyStatus = null; 400 this.similarty = null; 401 this.direction = null; 402 this.temperature = null; 403 this.props = null; 404 this.verifyType = null; 405 this.verifyTime = null; 406 this.createTime = null; 407 } 408 } 409 410 private static final class LogBeanAdapter implements Adapter<LogBean, Builder> { 411 @Override 412 public void write(Protocol protocol, LogBean struct) throws IOException { 413 protocol.writeStructBegin("LogBean"); 414 protocol.writeFieldBegin("_new", 1, TType.BOOL); 415 protocol.writeBool(struct._new); 416 protocol.writeFieldEnd(); 417 protocol.writeFieldBegin("modified", 2, TType.I32); 418 protocol.writeI32(struct.modified); 419 protocol.writeFieldEnd(); 420 protocol.writeFieldBegin("initialized", 3, TType.I32); 421 protocol.writeI32(struct.initialized); 422 protocol.writeFieldEnd(); 423 if (struct.id != null) { 424 protocol.writeFieldBegin("id", 4, TType.I32); 425 protocol.writeI32(struct.id); 426 protocol.writeFieldEnd(); 427 } 428 if (struct.personId != null) { 429 protocol.writeFieldBegin("personId", 5, TType.I32); 430 protocol.writeI32(struct.personId); 431 protocol.writeFieldEnd(); 432 } 433 if (struct.deviceId != null) { 434 protocol.writeFieldBegin("deviceId", 6, TType.I32); 435 protocol.writeI32(struct.deviceId); 436 protocol.writeFieldEnd(); 437 } 438 if (struct.verifyFeature != null) { 439 protocol.writeFieldBegin("verifyFeature", 7, TType.STRING); 440 protocol.writeString(struct.verifyFeature); 441 protocol.writeFieldEnd(); 442 } 443 if (struct.imageMd5 != null) { 444 protocol.writeFieldBegin("imageMd5", 8, TType.STRING); 445 protocol.writeString(struct.imageMd5); 446 protocol.writeFieldEnd(); 447 } 448 if (struct.compareFace != null) { 449 protocol.writeFieldBegin("compareFace", 9, TType.I32); 450 protocol.writeI32(struct.compareFace); 451 protocol.writeFieldEnd(); 452 } 453 if (struct.verifyStatus != null) { 454 protocol.writeFieldBegin("verifyStatus", 10, TType.I32); 455 protocol.writeI32(struct.verifyStatus); 456 protocol.writeFieldEnd(); 457 } 458 if (struct.similarty != null) { 459 protocol.writeFieldBegin("similarty", 11, TType.DOUBLE); 460 protocol.writeDouble(struct.similarty); 461 protocol.writeFieldEnd(); 462 } 463 if (struct.direction != null) { 464 protocol.writeFieldBegin("direction", 12, TType.I32); 465 protocol.writeI32(struct.direction); 466 protocol.writeFieldEnd(); 467 } 468 if (struct.temperature != null) { 469 protocol.writeFieldBegin("temperature", 13, TType.DOUBLE); 470 protocol.writeDouble(struct.temperature); 471 protocol.writeFieldEnd(); 472 } 473 if (struct.props != null) { 474 protocol.writeFieldBegin("props", 14, TType.STRING); 475 protocol.writeString(struct.props); 476 protocol.writeFieldEnd(); 477 } 478 if (struct.verifyType != null) { 479 protocol.writeFieldBegin("verifyType", 15, TType.I32); 480 protocol.writeI32(struct.verifyType); 481 protocol.writeFieldEnd(); 482 } 483 if (struct.verifyTime != null) { 484 protocol.writeFieldBegin("verifyTime", 16, TType.I64); 485 protocol.writeI64(struct.verifyTime); 486 protocol.writeFieldEnd(); 487 } 488 if (struct.createTime != null) { 489 protocol.writeFieldBegin("createTime", 17, TType.I64); 490 protocol.writeI64(struct.createTime); 491 protocol.writeFieldEnd(); 492 } 493 protocol.writeFieldStop(); 494 protocol.writeStructEnd(); 495 } 496 497 @Override 498 public LogBean read(Protocol protocol, Builder builder) throws IOException { 499 protocol.readStructBegin(); 500 while (true) { 501 FieldMetadata field = protocol.readFieldBegin(); 502 if (field.typeId == TType.STOP) { 503 break; 504 } 505 switch (field.fieldId) { 506 case 1: { 507 if (field.typeId == TType.BOOL) { 508 boolean value = protocol.readBool(); 509 builder._new(value); 510 } else { 511 ProtocolUtil.skip(protocol, field.typeId); 512 } 513 } 514 break; 515 case 2: { 516 if (field.typeId == TType.I32) { 517 int value = protocol.readI32(); 518 builder.modified(value); 519 } else { 520 ProtocolUtil.skip(protocol, field.typeId); 521 } 522 } 523 break; 524 case 3: { 525 if (field.typeId == TType.I32) { 526 int value = protocol.readI32(); 527 builder.initialized(value); 528 } else { 529 ProtocolUtil.skip(protocol, field.typeId); 530 } 531 } 532 break; 533 case 4: { 534 if (field.typeId == TType.I32) { 535 int value = protocol.readI32(); 536 builder.id(value); 537 } else { 538 ProtocolUtil.skip(protocol, field.typeId); 539 } 540 } 541 break; 542 case 5: { 543 if (field.typeId == TType.I32) { 544 int value = protocol.readI32(); 545 builder.personId(value); 546 } else { 547 ProtocolUtil.skip(protocol, field.typeId); 548 } 549 } 550 break; 551 case 6: { 552 if (field.typeId == TType.I32) { 553 int value = protocol.readI32(); 554 builder.deviceId(value); 555 } else { 556 ProtocolUtil.skip(protocol, field.typeId); 557 } 558 } 559 break; 560 case 7: { 561 if (field.typeId == TType.STRING) { 562 String value = protocol.readString(); 563 builder.verifyFeature(value); 564 } else { 565 ProtocolUtil.skip(protocol, field.typeId); 566 } 567 } 568 break; 569 case 8: { 570 if (field.typeId == TType.STRING) { 571 String value = protocol.readString(); 572 builder.imageMd5(value); 573 } else { 574 ProtocolUtil.skip(protocol, field.typeId); 575 } 576 } 577 break; 578 case 9: { 579 if (field.typeId == TType.I32) { 580 int value = protocol.readI32(); 581 builder.compareFace(value); 582 } else { 583 ProtocolUtil.skip(protocol, field.typeId); 584 } 585 } 586 break; 587 case 10: { 588 if (field.typeId == TType.I32) { 589 int value = protocol.readI32(); 590 builder.verifyStatus(value); 591 } else { 592 ProtocolUtil.skip(protocol, field.typeId); 593 } 594 } 595 break; 596 case 11: { 597 if (field.typeId == TType.DOUBLE) { 598 double value = protocol.readDouble(); 599 builder.similarty(value); 600 } else { 601 ProtocolUtil.skip(protocol, field.typeId); 602 } 603 } 604 break; 605 case 12: { 606 if (field.typeId == TType.I32) { 607 int value = protocol.readI32(); 608 builder.direction(value); 609 } else { 610 ProtocolUtil.skip(protocol, field.typeId); 611 } 612 } 613 break; 614 case 13: { 615 if (field.typeId == TType.DOUBLE) { 616 double value = protocol.readDouble(); 617 builder.temperature(value); 618 } else { 619 ProtocolUtil.skip(protocol, field.typeId); 620 } 621 } 622 break; 623 case 14: { 624 if (field.typeId == TType.STRING) { 625 String value = protocol.readString(); 626 builder.props(value); 627 } else { 628 ProtocolUtil.skip(protocol, field.typeId); 629 } 630 } 631 break; 632 case 15: { 633 if (field.typeId == TType.I32) { 634 int value = protocol.readI32(); 635 builder.verifyType(value); 636 } else { 637 ProtocolUtil.skip(protocol, field.typeId); 638 } 639 } 640 break; 641 case 16: { 642 if (field.typeId == TType.I64) { 643 long value = protocol.readI64(); 644 builder.verifyTime(value); 645 } else { 646 ProtocolUtil.skip(protocol, field.typeId); 647 } 648 } 649 break; 650 case 17: { 651 if (field.typeId == TType.I64) { 652 long value = protocol.readI64(); 653 builder.createTime(value); 654 } else { 655 ProtocolUtil.skip(protocol, field.typeId); 656 } 657 } 658 break; 659 default: { 660 ProtocolUtil.skip(protocol, field.typeId); 661 } 662 break; 663 } 664 protocol.readFieldEnd(); 665 } 666 protocol.readStructEnd(); 667 return builder.build(); 668 } 669 670 @Override 671 public LogBean read(Protocol protocol) throws IOException { 672 return read(protocol, new Builder()); 673 } 674 } 675}