|
10 | 10 |
|
11 | 11 | @XmlAccessorType(XmlAccessType.FIELD) |
12 | 12 | @JsonIgnoreProperties(ignoreUnknown = true) |
13 | | -public class AbstractUser { |
| 13 | +public abstract class AbstractUser<U extends AbstractUser<U>> { |
14 | 14 |
|
15 | 15 | private String avatarUrl; |
16 | 16 | private String bio; |
@@ -300,4 +300,197 @@ public List<CustomAttribute> getCustomAttributes() { |
300 | 300 | public void setCustomAttributes(List<CustomAttribute> customAttributes) { |
301 | 301 | this.customAttributes = customAttributes; |
302 | 302 | } |
| 303 | + |
| 304 | + |
| 305 | + @SuppressWarnings("unchecked") |
| 306 | + public U withAvatarUrl(String avatarUrl) { |
| 307 | + this.avatarUrl = avatarUrl; |
| 308 | + return (U)this; |
| 309 | + } |
| 310 | + |
| 311 | + @SuppressWarnings("unchecked") |
| 312 | + public U withBio(String bio) { |
| 313 | + this.bio = bio; |
| 314 | + return (U)this; |
| 315 | + } |
| 316 | + |
| 317 | + @SuppressWarnings("unchecked") |
| 318 | + public U withCanCreateGroup(Boolean canCreateGroup) { |
| 319 | + this.canCreateGroup = canCreateGroup; |
| 320 | + return (U)this; |
| 321 | + } |
| 322 | + |
| 323 | + @SuppressWarnings("unchecked") |
| 324 | + public U withCanCreateProject(Boolean canCreateProject) { |
| 325 | + this.canCreateProject = canCreateProject; |
| 326 | + return (U)this; |
| 327 | + } |
| 328 | + |
| 329 | + @SuppressWarnings("unchecked") |
| 330 | + public U withColorSchemeId(Integer colorSchemeId) { |
| 331 | + this.colorSchemeId = colorSchemeId; |
| 332 | + return (U)this; |
| 333 | + } |
| 334 | + |
| 335 | + @SuppressWarnings("unchecked") |
| 336 | + public U withConfirmedAt(Date confirmedAt) { |
| 337 | + this.confirmedAt = confirmedAt; |
| 338 | + return (U)this; |
| 339 | + } |
| 340 | + |
| 341 | + @SuppressWarnings("unchecked") |
| 342 | + public U withCreatedAt(Date createdAt) { |
| 343 | + this.createdAt = createdAt; |
| 344 | + return (U)this; |
| 345 | + } |
| 346 | + |
| 347 | + @SuppressWarnings("unchecked") |
| 348 | + public U withCurrentSignInAt(Date currentSignInAt) { |
| 349 | + this.currentSignInAt = currentSignInAt; |
| 350 | + return (U)this; |
| 351 | + } |
| 352 | + |
| 353 | + @SuppressWarnings("unchecked") |
| 354 | + public U withEmail(String email) { |
| 355 | + this.email = email; |
| 356 | + return (U)this; |
| 357 | + } |
| 358 | + |
| 359 | + @SuppressWarnings("unchecked") |
| 360 | + public U withExternal(Boolean external) { |
| 361 | + this.external = external; |
| 362 | + return (U)this; |
| 363 | + } |
| 364 | + |
| 365 | + @SuppressWarnings("unchecked") |
| 366 | + public U withId(Integer id) { |
| 367 | + this.id = id; |
| 368 | + return (U)this; |
| 369 | + } |
| 370 | + |
| 371 | + @SuppressWarnings("unchecked") |
| 372 | + public U withIdentities(List<Identity> identities) { |
| 373 | + this.identities = identities; |
| 374 | + return (U)this; |
| 375 | + } |
| 376 | + |
| 377 | + @SuppressWarnings("unchecked") |
| 378 | + public U withIsAdmin(Boolean isAdmin) { |
| 379 | + this.isAdmin = isAdmin; |
| 380 | + return (U)this; |
| 381 | + } |
| 382 | + |
| 383 | + @SuppressWarnings("unchecked") |
| 384 | + public U withLastActivityOn(Date lastActivityOn) { |
| 385 | + this.lastActivityOn = lastActivityOn; |
| 386 | + return (U)this; |
| 387 | + } |
| 388 | + |
| 389 | + @SuppressWarnings("unchecked") |
| 390 | + public U withLastSignInAt(Date lastSignInAt) { |
| 391 | + this.lastSignInAt = lastSignInAt; |
| 392 | + return (U)this; |
| 393 | + } |
| 394 | + |
| 395 | + @SuppressWarnings("unchecked") |
| 396 | + public U withLinkedin(String linkedin) { |
| 397 | + this.linkedin = linkedin; |
| 398 | + return (U)this; |
| 399 | + } |
| 400 | + |
| 401 | + @SuppressWarnings("unchecked") |
| 402 | + public U withLocation(String location) { |
| 403 | + this.location = location; |
| 404 | + return (U)this; |
| 405 | + } |
| 406 | + |
| 407 | + @SuppressWarnings("unchecked") |
| 408 | + public U withName(String name) { |
| 409 | + this.name = name; |
| 410 | + return (U)this; |
| 411 | + } |
| 412 | + |
| 413 | + @SuppressWarnings("unchecked") |
| 414 | + public U withOrganization(String organization) { |
| 415 | + this.organization = organization; |
| 416 | + return (U)this; |
| 417 | + } |
| 418 | + |
| 419 | + @SuppressWarnings("unchecked") |
| 420 | + public U withProjectsLimit(Integer projectsLimit) { |
| 421 | + this.projectsLimit = projectsLimit; |
| 422 | + return (U)this; |
| 423 | + } |
| 424 | + |
| 425 | + @SuppressWarnings("unchecked") |
| 426 | + public U withProvider(String provider) { |
| 427 | + this.provider = provider; |
| 428 | + return (U)this; |
| 429 | + } |
| 430 | + |
| 431 | + @SuppressWarnings("unchecked") |
| 432 | + public U withSharedRunnersMinutesLimit(Integer sharedRunnersMinutesLimit) { |
| 433 | + this.sharedRunnersMinutesLimit = sharedRunnersMinutesLimit; |
| 434 | + return (U)this; |
| 435 | + } |
| 436 | + |
| 437 | + @SuppressWarnings("unchecked") |
| 438 | + public U withSkype(String skype) { |
| 439 | + this.skype = skype; |
| 440 | + return (U)this; |
| 441 | + } |
| 442 | + |
| 443 | + @SuppressWarnings("unchecked") |
| 444 | + public U withState(String state) { |
| 445 | + this.state = state; |
| 446 | + return (U)this; |
| 447 | + } |
| 448 | + |
| 449 | + @SuppressWarnings("unchecked") |
| 450 | + public U withThemeId(Integer themeId) { |
| 451 | + this.themeId = themeId; |
| 452 | + return (U)this; |
| 453 | + } |
| 454 | + |
| 455 | + @SuppressWarnings("unchecked") |
| 456 | + public U withTwitter(String twitter) { |
| 457 | + this.twitter = twitter; |
| 458 | + return (U)this; |
| 459 | + } |
| 460 | + |
| 461 | + @SuppressWarnings("unchecked") |
| 462 | + public U withTwoFactorEnabled(Boolean twoFactorEnabled) { |
| 463 | + this.twoFactorEnabled = twoFactorEnabled; |
| 464 | + return (U)this; |
| 465 | + } |
| 466 | + |
| 467 | + @SuppressWarnings("unchecked") |
| 468 | + public U withUsername(String username) { |
| 469 | + this.username = username; |
| 470 | + return (U)this; |
| 471 | + } |
| 472 | + |
| 473 | + @SuppressWarnings("unchecked") |
| 474 | + public U withWebsiteUrl(String websiteUrl) { |
| 475 | + this.websiteUrl = websiteUrl; |
| 476 | + return (U)this; |
| 477 | + } |
| 478 | + |
| 479 | + @SuppressWarnings("unchecked") |
| 480 | + public U withWebUrl(String webUrl) { |
| 481 | + this.webUrl = webUrl; |
| 482 | + return (U)this; |
| 483 | + } |
| 484 | + |
| 485 | + @SuppressWarnings("unchecked") |
| 486 | + public U withSkipConfirmation(Boolean skipConfirmation) { |
| 487 | + this.skipConfirmation = skipConfirmation; |
| 488 | + return (U)this; |
| 489 | + } |
| 490 | + |
| 491 | + @SuppressWarnings("unchecked") |
| 492 | + public U withCustomAttributes(List<CustomAttribute> customAttributes) { |
| 493 | + this.customAttributes = customAttributes; |
| 494 | + return (U)this; |
| 495 | + } |
303 | 496 | } |
0 commit comments