diff --git a/docs/CreateUserOption.md b/docs/CreateUserOption.md index 6b98e7f..a79981e 100644 --- a/docs/CreateUserOption.md +++ b/docs/CreateUserOption.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**createdAt** | [**Date**](Date.md) | For explicitly setting the user creation timestamp. Useful when users are migrated from other systems. When omitted, the user's creation timestamp will be set to \"now\". | [optional] **email** | **String** | | **fullName** | **String** | | [optional] **loginName** | **String** | | [optional] diff --git a/src/main/java/org/gitnex/tea4j/v2/models/CreateUserOption.java b/src/main/java/org/gitnex/tea4j/v2/models/CreateUserOption.java index b718ddb..86ef911 100644 --- a/src/main/java/org/gitnex/tea4j/v2/models/CreateUserOption.java +++ b/src/main/java/org/gitnex/tea4j/v2/models/CreateUserOption.java @@ -15,6 +15,7 @@ package org.gitnex.tea4j.v2.models; import com.google.gson.annotations.SerializedName; import io.swagger.v3.oas.annotations.media.Schema; import java.io.Serializable; +import java.util.Date; import java.util.Objects; /** CreateUserOption create user options */ @@ -22,6 +23,9 @@ import java.util.Objects; public class CreateUserOption implements Serializable { private static final long serialVersionUID = 1L; + @SerializedName("created_at") + private Date createdAt = null; + @SerializedName("email") private String email = null; @@ -52,6 +56,30 @@ public class CreateUserOption implements Serializable { @SerializedName("visibility") private String visibility = null; + public CreateUserOption createdAt(Date createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * For explicitly setting the user creation timestamp. Useful when users are migrated from other + * systems. When omitted, the user's creation timestamp will be set to \"now\". + * + * @return createdAt + */ + @Schema( + description = + "For explicitly setting the user creation timestamp. Useful when users are migrated from" + + " other systems. When omitted, the user's creation timestamp will be set to" + + " \"now\".") + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + public CreateUserOption email(String email) { this.email = email; return this; @@ -251,7 +279,8 @@ public class CreateUserOption implements Serializable { return false; } CreateUserOption createUserOption = (CreateUserOption) o; - return Objects.equals(this.email, createUserOption.email) + return Objects.equals(this.createdAt, createUserOption.createdAt) + && Objects.equals(this.email, createUserOption.email) && Objects.equals(this.fullName, createUserOption.fullName) && Objects.equals(this.loginName, createUserOption.loginName) && Objects.equals(this.mustChangePassword, createUserOption.mustChangePassword) @@ -266,6 +295,7 @@ public class CreateUserOption implements Serializable { @Override public int hashCode() { return Objects.hash( + createdAt, email, fullName, loginName, @@ -283,6 +313,7 @@ public class CreateUserOption implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("class CreateUserOption {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n");