diff --git a/README.md b/README.md
index 6540e87..21f802e 100644
--- a/README.md
+++ b/README.md
@@ -37,21 +37,21 @@ Then add the dependencies you need:
com.fastcomments
client
- 3.1.1
+ 3.1.2
com.fastcomments
core
- 3.1.1
+ 3.1.2
com.fastcomments
pubsub
- 3.1.1
+ 3.1.2
```
@@ -70,13 +70,13 @@ repositories {
dependencies {
// API Client
- implementation "com.fastcomments:client:3.1.1"
+ implementation "com.fastcomments:client:3.1.2"
// Core Library (includes SSO)
- implementation "com.fastcomments:core:3.1.1"
+ implementation "com.fastcomments:core:3.1.2"
// PubSub Library (for live events)
- implementation "com.fastcomments:pubsub:3.1.1"
+ implementation "com.fastcomments:pubsub:3.1.2"
}
```
diff --git a/client/README.md b/client/README.md
index fab1d76..96d9706 100644
--- a/client/README.md
+++ b/client/README.md
@@ -40,7 +40,7 @@ Add this dependency to your project's POM:
com.fastcomments
client
- 3.1.1
+ 3.1.2
compile
```
@@ -56,7 +56,7 @@ Add this dependency to your project's build file:
}
dependencies {
- implementation "com.fastcomments:client:3.1.1"
+ implementation "com.fastcomments:client:3.1.2"
}
```
@@ -70,7 +70,7 @@ mvn clean package
Then manually install the following JARs:
-* `target/client-3.1.1.jar`
+* `target/client-3.1.2.jar`
* `target/lib/*.jar`
## Getting Started
diff --git a/client/api/openapi.yaml b/client/api/openapi.yaml
index 2d73d98..b64b95a 100644
--- a/client/api/openapi.yaml
+++ b/client/api/openapi.yaml
@@ -11388,7 +11388,6 @@ components:
- onThisSite
type: string
UserSearchResult:
- additionalProperties: false
example:
displayName: displayName
name: name
@@ -11416,7 +11415,6 @@ components:
- type
type: object
UserSearchSectionResult:
- additionalProperties: false
example:
section: moderators
users:
@@ -11554,7 +11552,6 @@ components:
- 2
type: integer
SpamRule:
- additionalProperties: false
example:
commentContains: commentContains
actions:
@@ -11625,7 +11622,6 @@ components:
- 3
type: integer
TOSConfig:
- additionalProperties: false
example:
lastUpdated: 2000-01-23T04:56:07.000+00:00
textByLocale:
@@ -11652,7 +11648,6 @@ components:
- manual
type: string
CustomConfigParameters:
- additionalProperties: false
example:
disableAutoHashTagCreation: true
disableCommenterCommentDelete: true
@@ -11756,6 +11751,7 @@ components:
ticketFileUploadsEnabled: true
maxCommentCharacterLength: 5
useSingleLineCommentInput: true
+ autoVerifySimpleSSOComments: true
allowedLanguages:
- allowedLanguages
- allowedLanguages
@@ -11764,6 +11760,7 @@ components:
widgetQuestionResultsStyle: 2
showLiveRightAway: true
widgetQuestionsRequired: 1
+ allowSimpleSSOAdmins: true
hasDarkBackground: true
wrap: true
ticketBaseUrl: ticketBaseUrl
@@ -11783,10 +11780,18 @@ components:
type: string
nullable: true
type: array
+ allowSimpleSSOAdmins:
+ description: "Simple SSO users on this page or domain can be admins and\
+ \ moderators: they keep those flags and pick them up from a matching email."
+ type: boolean
autoGenerateUsername:
description: Serve each new visitor a unique generated username as the prefilled
defaultUsername.
type: boolean
+ autoVerifySimpleSSOComments:
+ description: "Comments from Simple SSO users on this page or domain are\
+ \ verified right away, instead of through an emailed link."
+ type: boolean
collapseReplies:
type: boolean
commentCountFormat:
@@ -12004,7 +12009,6 @@ components:
nullable: true
type: object
APIError:
- additionalProperties: false
example:
reason: reason
code: code
@@ -12112,6 +12116,7 @@ components:
ticketFileUploadsEnabled: true
maxCommentCharacterLength: 5
useSingleLineCommentInput: true
+ autoVerifySimpleSSOComments: true
allowedLanguages:
- allowedLanguages
- allowedLanguages
@@ -12120,6 +12125,7 @@ components:
widgetQuestionResultsStyle: 2
showLiveRightAway: true
widgetQuestionsRequired: 1
+ allowSimpleSSOAdmins: true
hasDarkBackground: true
wrap: true
ticketBaseUrl: ticketBaseUrl
@@ -12382,7 +12388,6 @@ components:
- status
type: object
ResetUserNotificationsResponse:
- additionalProperties: false
example:
code: ignored-since-impersonated
status: success
@@ -12398,7 +12403,6 @@ components:
- status
type: object
GetUserNotificationCountResponse:
- additionalProperties: false
example:
count: 0
status: success
@@ -12416,7 +12420,6 @@ components:
properties: {}
type: object
NotificationAndCount:
- additionalProperties: false
properties:
type:
$ref: "#/components/schemas/NotificationType"
@@ -12428,7 +12431,6 @@ components:
- type
type: object
HeaderAccountNotification:
- additionalProperties: false
properties:
_id:
type: string
@@ -12472,7 +12474,6 @@ components:
- title
type: object
HeaderState:
- additionalProperties: false
properties:
status:
$ref: "#/components/schemas/APIStatus"
@@ -12500,7 +12501,6 @@ components:
- userIdWS
type: object
UserNotificationWriteResponse:
- additionalProperties: false
example:
modifiedCount: 6
matchedCount: 0
@@ -12520,7 +12520,6 @@ components:
- status
type: object
IgnoredResponse:
- additionalProperties: false
properties:
status:
$ref: "#/components/schemas/APIStatus"
@@ -12534,7 +12533,6 @@ components:
- status
type: object
MediaAsset:
- additionalProperties: false
example:
src: src
w: 0
@@ -12554,7 +12552,6 @@ components:
- w
type: object
UploadImageResponse:
- additionalProperties: false
example:
reason: reason
code: code
@@ -12795,7 +12792,6 @@ components:
- users
type: object
CommentPollOption:
- additionalProperties: false
example:
votes: 0
id: id
@@ -12824,7 +12820,6 @@ components:
- 2
type: integer
CommentPoll:
- additionalProperties: false
description: A poll attached to a comment. Vote counts are denormalized here;
individual votes live in PollVote.
example:
@@ -12867,7 +12862,6 @@ components:
- totalVotes
type: object
VotePollResponse:
- additionalProperties: false
example:
myPollVotes:
- myPollVotes
@@ -12905,7 +12899,6 @@ components:
- voterId
type: object
VotePollBody:
- additionalProperties: false
example:
optionId: optionId
properties:
@@ -12915,7 +12908,6 @@ components:
- optionId
type: object
PollVoterEntry:
- additionalProperties: false
example:
optionLabel: optionLabel
name: name
@@ -12929,7 +12921,6 @@ components:
- optionLabel
type: object
GetPollVoterNamesSuccessResponse:
- additionalProperties: false
example:
total: 1
voters:
@@ -13143,7 +13134,6 @@ components:
DeleteV2PageReact:
$ref: "#/components/schemas/CreateV1PageReact"
ModerationFilter:
- additionalProperties: false
example:
flagCountGt: 7.061401241503109
approved: true
@@ -13199,7 +13189,6 @@ components:
type: string
type: object
BuildModerationFilterResponse:
- additionalProperties: false
properties:
status:
type: string
@@ -13227,7 +13216,6 @@ components:
- userId
type: object
ModerationAPICountCommentsResponse:
- additionalProperties: false
example:
count: 0.8008281904610115
status: success
@@ -13265,7 +13253,6 @@ components:
UserId:
type: string
CommentUserBadgeInfo:
- additionalProperties: false
example:
displayLabel: displayLabel
backgroundColor: backgroundColor
@@ -13308,7 +13295,6 @@ components:
- type
type: object
ModerationAPIComment:
- additionalProperties: false
example:
date: 2000-01-23T04:56:07.000+00:00
votesDown: 5.962133916683182
@@ -13504,7 +13490,6 @@ components:
- verified
type: object
ModerationAPIGetCommentsResponse:
- additionalProperties: false
example:
moderationFilter:
flagCountGt: 7.061401241503109
@@ -13658,7 +13643,6 @@ components:
status:
$ref: "#/components/schemas/APIStatus"
translations:
- additionalProperties: false
type: object
comments:
items:
@@ -13672,7 +13656,6 @@ components:
- translations
type: object
ModerationExportResponse:
- additionalProperties: false
example:
batchJobId: batchJobId
status: status
@@ -13686,7 +13669,6 @@ components:
- status
type: object
ModerationExportStatusResponse:
- additionalProperties: false
example:
jobStatus: jobStatus
recordCount: 0
@@ -13708,7 +13690,6 @@ components:
- status
type: object
ModerationUserSearchProjected:
- additionalProperties: false
example:
displayName: displayName
avatarSrc: avatarSrc
@@ -13753,7 +13734,6 @@ components:
- users
type: object
ModerationPageSearchProjected:
- additionalProperties: false
example:
urlId: urlId
title: title
@@ -13799,7 +13779,6 @@ components:
- status
type: object
ModerationSiteSearchProjected:
- additionalProperties: false
example:
logoSrc100px: logoSrc100px
domain: domain
@@ -13846,7 +13825,6 @@ components:
- status
type: object
ModerationSuggestResponse:
- additionalProperties: false
example:
pages:
- urlId: urlId
@@ -13885,7 +13863,6 @@ components:
- status
type: object
PreBanSummary:
- additionalProperties: false
example:
count: 0.8008281904610115
usernames:
@@ -13908,7 +13885,6 @@ components:
- usernames
type: object
BulkPreBanSummary:
- additionalProperties: false
example:
emails:
- emails
@@ -13955,7 +13931,6 @@ components:
- userIds
type: object
BulkPreBanParams:
- additionalProperties: false
example:
commentIds:
- commentIds
@@ -13969,7 +13944,6 @@ components:
- commentIds
type: object
APIBannedUser:
- additionalProperties: false
example:
bannedUntil: 2000-01-23T04:56:07.000+00:00
ipHash: ipHash
@@ -14029,7 +14003,6 @@ components:
- tenantId
type: object
APIBanUserChangedValues:
- additionalProperties: false
example:
bannedUntil: 2000-01-23T04:56:07.000+00:00
ipHash: ipHash
@@ -14080,7 +14053,6 @@ components:
type: string
type: object
APIBanUserChangeLog:
- additionalProperties: false
example:
deletedBannedUsers:
- bannedUntil: 2000-01-23T04:56:07.000+00:00
@@ -14138,7 +14110,6 @@ components:
$ref: "#/components/schemas/APIBanUserChangedValues"
type: object
BanUserFromCommentResult:
- additionalProperties: false
example:
reason: reason
code: code
@@ -14207,7 +14178,6 @@ components:
- IP
type: string
BannedUserMatch:
- additionalProperties: false
example:
matchedOn: userId
matchedOnValue: BannedUserMatch_matchedOnValue
@@ -14221,7 +14191,6 @@ components:
- matchedOnValue
type: object
APICommentCommonBannedUser:
- additionalProperties: false
properties:
_id:
type: string
@@ -14332,7 +14301,6 @@ components:
- status
type: object
BanUserUndoParams:
- additionalProperties: false
example:
changelog:
deletedBannedUsers:
@@ -14404,7 +14372,6 @@ components:
- status
type: object
RemoveCommentActionResponse:
- additionalProperties: false
properties:
status:
type: string
@@ -14427,7 +14394,6 @@ components:
- status
type: object
ModerationAPICommentLog:
- additionalProperties: false
example:
date: 2000-01-23T04:56:07.000+00:00
messageHTML: messageHTML
@@ -14692,7 +14658,6 @@ components:
- status
type: object
CommentsByIdsParams:
- additionalProperties: false
example:
ids:
- ids
@@ -14732,7 +14697,6 @@ components:
- status
type: object
SetCommentTextParams:
- additionalProperties: false
example:
comment: comment
properties:
@@ -14742,7 +14706,6 @@ components:
- comment
type: object
AdjustVotesResponse:
- additionalProperties: false
example:
newCommentVotes: 0
status: status
@@ -14757,7 +14720,6 @@ components:
- status
type: object
AdjustCommentVotesParams:
- additionalProperties: false
example:
adjustVoteAmount: 0.8008281904610115
properties:
@@ -14768,7 +14730,6 @@ components:
- adjustVoteAmount
type: object
VoteResponseUser:
- additionalProperties: false
example:
sessionId: sessionId
properties:
@@ -14777,7 +14738,6 @@ components:
type: string
type: object
VoteResponse:
- additionalProperties: false
example:
editKey: editKey
isVerified: true
@@ -14804,7 +14764,6 @@ components:
- status
type: object
VoteDeleteResponse:
- additionalProperties: false
example:
wasPendingVote: true
status: success
@@ -14817,7 +14776,6 @@ components:
- status
type: object
GetCommentBanStatusResponse:
- additionalProperties: false
example:
emailDomain: emailDomain
canIPBan: true
@@ -14837,7 +14795,6 @@ components:
- status
type: object
APIModerateUserBanPreferences:
- additionalProperties: false
properties:
shouldBanEmail:
type: boolean
@@ -14869,7 +14826,6 @@ components:
- status
type: object
TenantBadge:
- additionalProperties: false
example:
displayLabel: displayLabel
createdByUserId: createdByUserId
@@ -15025,7 +14981,6 @@ components:
- status
type: object
UserBadge:
- additionalProperties: false
example:
displayLabel: displayLabel
backgroundColor: backgroundColor
@@ -15354,7 +15309,6 @@ components:
- status
type: object
FeedPostMediaItemAsset:
- additionalProperties: false
example:
src: src
w: 6
@@ -15374,7 +15328,6 @@ components:
- w
type: object
FeedPostMediaItem:
- additionalProperties: false
example:
sizes:
- src: src
@@ -15398,7 +15351,6 @@ components:
- sizes
type: object
FeedPostLink:
- additionalProperties: false
example:
description: description
text: text
@@ -15421,7 +15373,6 @@ components:
properties: {}
type: object
FeedPost:
- additionalProperties: false
example:
fromUserDisplayName: fromUserDisplayName
fromUserId: fromUserId
@@ -15529,7 +15480,6 @@ components:
- tenantId
type: object
UserSessionInfo:
- additionalProperties: false
properties:
id:
type: string
@@ -15568,7 +15518,6 @@ components:
type: string
type: object
GetPublicFeedPostsResponse:
- additionalProperties: false
properties:
status:
$ref: "#/components/schemas/APIStatus"
@@ -15716,7 +15665,6 @@ components:
tenantIdWS: tenantIdWS
status: success
ReactFeedPostResponse:
- additionalProperties: false
example:
isUndo: true
reactType: reactType
@@ -15734,7 +15682,6 @@ components:
- status
type: object
ReactBodyParams:
- additionalProperties: false
example:
reactType: reactType
properties:
@@ -15742,7 +15689,6 @@ components:
type: string
type: object
UserReactsResponse:
- additionalProperties: false
example:
reacts:
key:
@@ -15764,7 +15710,6 @@ components:
- status
type: object
CreateFeedPostResponse:
- additionalProperties: false
example:
feedPost:
fromUserDisplayName: fromUserDisplayName
@@ -15824,7 +15769,6 @@ components:
- status
type: object
CreateFeedPostParams:
- additionalProperties: false
example:
fromUserDisplayName: fromUserDisplayName
fromUserId: fromUserId
@@ -15893,7 +15837,6 @@ components:
type: object
type: object
UpdateFeedPostParams:
- additionalProperties: false
example:
meta:
key: meta
@@ -15956,7 +15899,6 @@ components:
type: object
type: object
FeedPostStats:
- additionalProperties: false
example:
reacts:
key: 0
@@ -15973,7 +15915,6 @@ components:
type: integer
type: object
FeedPostsStatsResponse:
- additionalProperties: false
example:
stats:
key:
@@ -15994,7 +15935,6 @@ components:
- status
type: object
EventLogEntry:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
data: data
@@ -16087,7 +16027,6 @@ components:
TenantId:
type: string
UserNotification:
- additionalProperties: false
example:
isUnreadMessage: true
fromUserAvatarSrc: fromUserAvatarSrc
@@ -16199,7 +16138,6 @@ components:
- viewed
type: object
PubSubVote:
- additionalProperties: false
properties:
_id:
type: string
@@ -16236,7 +16174,6 @@ components:
FDomain:
type: string
PubSubCommentBase:
- additionalProperties: false
properties:
_id:
type: string
@@ -16410,7 +16347,6 @@ components:
CommentPositions:
$ref: "#/components/schemas/Record_string._before-string-or-null--after-string-or-null__"
LiveEvent:
- additionalProperties: false
properties:
type:
$ref: "#/components/schemas/LiveEventType"
@@ -16443,7 +16379,6 @@ components:
extraInfo:
$ref: "#/components/schemas/LiveEvent_extraInfo"
config:
- additionalProperties: false
type: object
isClosed:
type: boolean
@@ -16485,7 +16420,6 @@ components:
- status
type: object
SetCommentTextResult:
- additionalProperties: false
example:
commentHTML: commentHTML
approved: true
@@ -16514,7 +16448,6 @@ components:
- status
type: object
CommentUserMentionInfo:
- additionalProperties: false
example:
rawTag: rawTag
id: id
@@ -16540,7 +16473,6 @@ components:
- tag
type: object
CommentUserHashTagInfo:
- additionalProperties: false
example:
retain: true
id: id
@@ -16562,7 +16494,6 @@ components:
- url
type: object
CommentTextUpdateRequest:
- additionalProperties: false
example:
hashTags:
- retain: true
@@ -16728,7 +16659,6 @@ components:
isSpam: true
isByAdmin: true
PublicCommentBase:
- additionalProperties: false
properties:
_id:
type: string
@@ -16831,7 +16761,6 @@ components:
properties: {}
type: object
GetCommentsResponse_PublicComment_:
- additionalProperties: false
properties:
statusCode:
format: int32
@@ -17021,6 +16950,7 @@ components:
ticketFileUploadsEnabled: true
maxCommentCharacterLength: 5
useSingleLineCommentInput: true
+ autoVerifySimpleSSOComments: true
allowedLanguages:
- allowedLanguages
- allowedLanguages
@@ -17029,6 +16959,7 @@ components:
widgetQuestionResultsStyle: 2
showLiveRightAway: true
widgetQuestionsRequired: 1
+ allowSimpleSSOAdmins: true
hasDarkBackground: true
wrap: true
ticketBaseUrl: ticketBaseUrl
@@ -17182,7 +17113,6 @@ components:
statusCode: 0
status: status
SaveCommentResponseOptimized:
- additionalProperties: false
properties:
status:
$ref: "#/components/schemas/APIStatus"
@@ -17288,7 +17218,6 @@ components:
properties: {}
type: object
CommentPollInput:
- additionalProperties: false
example:
question: question
options:
@@ -17319,7 +17248,6 @@ components:
- question
type: object
CommentData:
- additionalProperties: false
example:
date: 0
pageTitle: pageTitle
@@ -17426,7 +17354,6 @@ components:
urlId:
type: string
meta:
- additionalProperties: false
type: object
moderationGroupIds:
items:
@@ -17463,7 +17390,6 @@ components:
- urlId
type: object
DeletedCommentResultComment:
- additionalProperties: false
example:
commentHTML: commentHTML
isDeleted: true
@@ -17522,7 +17448,6 @@ components:
- status
type: object
VoteBodyParams:
- additionalProperties: false
example:
commenterName: commenterName
voteDir: up
@@ -17550,7 +17475,6 @@ components:
- voteDir
type: object
GetCommentVoteUserNamesSuccessResponse:
- additionalProperties: false
example:
hasMore: true
voteUserNames:
@@ -17572,7 +17496,6 @@ components:
- voteUserNames
type: object
CommentTranslationPublic:
- additionalProperties: false
properties:
commentHTML:
type: string
@@ -17591,7 +17514,6 @@ components:
properties: {}
type: object
CommentTranslationsResponse:
- additionalProperties: false
example:
translations:
key: ""
@@ -17625,7 +17547,6 @@ components:
- translations
type: object
CommentTranslationsRequest:
- additionalProperties: false
example:
commentIds:
- commentIds
@@ -17659,7 +17580,6 @@ components:
- status
type: object
BlockSuccess:
- additionalProperties: false
example:
commentStatuses:
key: true
@@ -17678,7 +17598,6 @@ components:
- status
type: object
PublicBlockFromCommentParams:
- additionalProperties: false
example:
commentIds:
- commentIds
@@ -17695,7 +17614,6 @@ components:
- commentIds
type: object
UnblockSuccess:
- additionalProperties: false
example:
commentStatuses:
key: true
@@ -17884,7 +17802,6 @@ components:
- status
type: object
APISSOUser:
- additionalProperties: false
example:
displayLabel: displayLabel
displayName: displayName
@@ -18611,7 +18528,6 @@ components:
- domain
type: string
PageMigration:
- additionalProperties: false
example:
from: from
to: to
@@ -18736,7 +18652,6 @@ components:
- api
type: string
PublicWebhook:
- additionalProperties: false
example:
disabledReason: auto
method: PUT
@@ -18797,7 +18712,6 @@ components:
- url
type: object
GetWebhooksResponse:
- additionalProperties: false
example:
webhooks:
- disabledReason: auto
@@ -18839,7 +18753,6 @@ components:
- webhooks
type: object
WebhookComment:
- additionalProperties: false
example:
date: date
pageNumber: 5.962133916683182
@@ -18862,6 +18775,25 @@ components:
url: url
parentId: parentId
commenterEmail: commenterEmail
+ badges:
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
moderationGroupIds:
- moderationGroupIds
- moderationGroupIds
@@ -18963,10 +18895,15 @@ components:
items:
type: string
type: array
+ badges:
+ items:
+ $ref: "#/components/schemas/CommentUserBadgeInfo"
+ type: array
required:
- aiDeterminedSpam
- approved
- avatarSrc
+ - badges
- comment
- commentHTML
- commenterEmail
@@ -18995,7 +18932,6 @@ components:
- votesUp
type: object
GetWebhookSamplePayloadsResponse:
- additionalProperties: false
example:
payloads:
- date: date
@@ -19019,6 +18955,25 @@ components:
url: url
parentId: parentId
commenterEmail: commenterEmail
+ badges:
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
moderationGroupIds:
- moderationGroupIds
- moderationGroupIds
@@ -19060,6 +19015,25 @@ components:
url: url
parentId: parentId
commenterEmail: commenterEmail
+ badges:
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
+ - displayLabel: displayLabel
+ backgroundColor: backgroundColor
+ borderColor: borderColor
+ cssClass: cssClass
+ description: description
+ id: id
+ type: 2
+ textColor: textColor
+ displaySrc: displaySrc
moderationGroupIds:
- moderationGroupIds
- moderationGroupIds
@@ -19093,7 +19067,6 @@ components:
- status
type: object
CreateWebhookResponse:
- additionalProperties: false
example:
webhook:
disabledReason: auto
@@ -19120,7 +19093,6 @@ components:
- webhook
type: object
CreateWebhookParams:
- additionalProperties: false
example:
method: PUT
domain: domain
@@ -19143,7 +19115,6 @@ components:
- url
type: object
PublicVote:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
commentId: commentId
@@ -19174,7 +19145,6 @@ components:
- userId
type: object
GetVotesResponse:
- additionalProperties: false
example:
appliedAuthorizedVotes:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -19238,7 +19208,6 @@ components:
- status
type: object
GetVotesForUserResponse:
- additionalProperties: false
example:
appliedAuthorizedVotes:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -19318,7 +19287,6 @@ components:
AgentApprovalNotificationFrequency:
$ref: "#/components/schemas/ImportedAgentApprovalNotificationFrequency"
User:
- additionalProperties: false
example:
socialLinks:
- socialLinks
@@ -19539,7 +19507,6 @@ components:
- verified
type: object
GetUserResponse:
- additionalProperties: false
example:
user:
socialLinks:
@@ -19617,7 +19584,6 @@ components:
- user
type: object
APIGetUserBadgeResponse:
- additionalProperties: false
example:
userBadge:
displayLabel: displayLabel
@@ -19650,7 +19616,6 @@ components:
- userBadge
type: object
APIGetUserBadgesResponse:
- additionalProperties: false
example:
userBadges:
- displayLabel: displayLabel
@@ -19704,7 +19669,6 @@ components:
- userBadges
type: object
APICreateUserBadgeResponse:
- additionalProperties: false
example:
userBadge:
displayLabel: displayLabel
@@ -19744,7 +19708,6 @@ components:
- userBadge
type: object
CreateUserBadgeParams:
- additionalProperties: false
example:
badgeId: badgeId
userId: userId
@@ -19761,7 +19724,6 @@ components:
- userId
type: object
APIEmptySuccessResponse:
- additionalProperties: false
example:
status: success
properties:
@@ -19771,7 +19733,6 @@ components:
- status
type: object
UpdateUserBadgeParams:
- additionalProperties: false
example:
displayedOnComments: true
properties:
@@ -19779,7 +19740,6 @@ components:
type: boolean
type: object
UserBadgeProgress:
- additionalProperties: false
example:
firstCommentDate: 2000-01-23T04:56:07.000+00:00
autoTrustFactor: 0.8008281904610115
@@ -19828,7 +19788,6 @@ components:
- userId
type: object
APIGetUserBadgeProgressResponse:
- additionalProperties: false
example:
userBadgeProgress:
firstCommentDate: 2000-01-23T04:56:07.000+00:00
@@ -19852,7 +19811,6 @@ components:
- userBadgeProgress
type: object
APIGetUserBadgeProgressListResponse:
- additionalProperties: false
example:
status: success
userBadgeProgresses:
@@ -19888,7 +19846,6 @@ components:
- userBadgeProgresses
type: object
APITicket:
- additionalProperties: false
example:
createdAt: createdAt
subject: subject
@@ -19936,7 +19893,6 @@ components:
- userId
type: object
GetTicketsResponse:
- additionalProperties: false
example:
tickets:
- createdAt: createdAt
@@ -19974,7 +19930,6 @@ components:
- tickets
type: object
CreateTicketResponse:
- additionalProperties: false
example:
ticket:
createdAt: createdAt
@@ -19999,7 +19954,6 @@ components:
- ticket
type: object
CreateTicketBody:
- additionalProperties: false
example:
subject: subject
properties:
@@ -20009,7 +19963,6 @@ components:
- subject
type: object
APITicketFile:
- additionalProperties: false
example:
originalFileName: originalFileName
s3Key: s3Key
@@ -20055,7 +20008,6 @@ components:
- url
type: object
APITicketDetail:
- additionalProperties: false
example:
resolvedAt: resolvedAt
subject: subject
@@ -20141,7 +20093,6 @@ components:
- userId
type: object
GetTicketResponse:
- additionalProperties: false
example:
availableStates:
- 5.962133916683182
@@ -20199,7 +20150,6 @@ components:
- ticket
type: object
ChangeTicketStateResponse:
- additionalProperties: false
example:
ticket:
createdAt: createdAt
@@ -20224,7 +20174,6 @@ components:
- ticket
type: object
ChangeTicketStateBody:
- additionalProperties: false
example:
state: 0
properties:
@@ -20243,7 +20192,6 @@ components:
SiteType:
$ref: "#/components/schemas/ImportedSiteType"
APIDomainConfiguration:
- additionalProperties: false
example:
emailFromEmail: emailFromEmail
footerUnsubscribeURL: footerUnsubscribeURL
@@ -20311,7 +20259,6 @@ components:
- id
type: object
BillingInfo:
- additionalProperties: false
example:
zip: zip
country: country
@@ -20356,7 +20303,6 @@ components:
- zip
type: object
APITenant:
- additionalProperties: false
example:
enableProfanityFilter: true
paymentFrequency: 6.027456183070403
@@ -20516,7 +20462,6 @@ components:
- signUpDate
type: object
GetTenantResponse:
- additionalProperties: false
example:
tenant:
enableProfanityFilter: true
@@ -20601,7 +20546,6 @@ components:
- tenant
type: object
GetTenantsResponse:
- additionalProperties: false
example:
tenants:
- enableProfanityFilter: true
@@ -20759,7 +20703,6 @@ components:
- tenants
type: object
CreateTenantResponse:
- additionalProperties: false
example:
tenant:
enableProfanityFilter: true
@@ -20844,7 +20787,6 @@ components:
- tenant
type: object
CreateTenantBody:
- additionalProperties: false
example:
enableProfanityFilter: true
stripePlanId: stripePlanId
@@ -20971,7 +20913,6 @@ components:
- name
type: object
UpdateTenantBody:
- additionalProperties: false
example:
enableProfanityFilter: true
stripePlanId: stripePlanId
@@ -21098,7 +21039,6 @@ components:
type: string
type: object
GetTenantUserResponse:
- additionalProperties: false
example:
tenantUser:
socialLinks:
@@ -21176,7 +21116,6 @@ components:
- tenantUser
type: object
GetTenantUsersResponse:
- additionalProperties: false
example:
tenantUsers:
- socialLinks:
@@ -21320,7 +21259,6 @@ components:
- tenantUsers
type: object
CreateTenantUserResponse:
- additionalProperties: false
example:
tenantUser:
socialLinks:
@@ -21398,7 +21336,6 @@ components:
- tenantUser
type: object
CreateTenantUserBody:
- additionalProperties: false
example:
isHelpRequestAdmin: true
displayLabel: displayLabel
@@ -21485,7 +21422,6 @@ components:
- username
type: object
ReplaceTenantUserBody:
- additionalProperties: false
example:
isHelpRequestAdmin: true
displayName: displayName
@@ -21586,7 +21522,6 @@ components:
- username
type: object
UpdateTenantUserBody:
- additionalProperties: false
example:
isHelpRequestAdmin: true
displayLabel: displayLabel
@@ -21670,55 +21605,57 @@ components:
type: string
type: object
TenantPackage:
- additionalProperties: false
example:
- maxMonthlySmallWidgetsCredits: 5.637376656633329
- flexAPICreditCostCents: 9.965781217890562
- flexMinimumCostCents: 3.353193347011243
- flexCommentUnit: 1.1730742509559433
- maxMonthlyAPICredits: 5.962133916683182
+ maxMonthlySmallWidgetsCredits: 7.061401241503109
+ flexAPICreditCostCents: 6.683562403749608
+ flexMinimumCostCents: 7.143538047012306
+ monthlyCostLocal: 1.4658129805029452
+ flexCommentUnit: 5.025004791520295
+ maxMonthlyAPICredits: 2.3021358869347655
templateId: templateId
createdAt: 2000-01-23T04:56:07.000+00:00
- flexManagedTenantCostCents: 3.0937452626664474
- flexSmallWidgetsCreditUnit: 8.762042012749001
+ flexManagedTenantCostCents: 0.8851374739011653
+ flexSmallWidgetsCreditUnit: 6.438423552598547
yearlyStripePlanId: yearlyStripePlanId
- aiAgentDailyBudgetCents: 8.969578798196912
- maxSSOUsers: 3.616076749251911
+ aiAgentDailyBudgetCents: 3.0205796992916243
+ maxSSOUsers: 4.145608029883936
hasFlexPricing: true
- flexSSOModeratorCostCents: 7.058770351582356
+ flexSSOModeratorCostCents: 0.10263654006109402
monthlyCostUSD: 0.8008281904610115
- maxTenantUsers: 9.301444243932576
- maxCustomCollectionSize: 1.0246457001441578
+ maxTenantUsers: 2.027123023002322
+ maxCustomCollectionSize: 6.84685269835264
enableSAML: true
enableCanvasLTI: true
forWhoText: forWhoText
- flexAPICreditUnit: 9.369310271410669
- flexAdminCostCents: 3.5571952270680973
- maxConcurrentUsers: 7.061401241503109
- flexLLMCostCents: 5.944895607614016
+ flexAPICreditUnit: 8.762042012749001
+ flexAdminCostCents: 1.284659006116532
+ maxConcurrentUsers: 3.616076749251911
+ flexLLMCostCents: 3.353193347011243
name: name
_id: _id
- aiAgentMonthlyBudgetCents: 7.740351818741173
- flexModeratorUnit: 6.438423552598547
- flexChatGPTCostCents: 6.778324963048013
- flexSSOAdminCostCents: 7.143538047012306
- flexSSOUserCostCents: 4.965218492984954
- flexLLMUnit: 6.704019297950036
- flexFreeModerators: 0.10263654006109402
- flexSSOModeratorUnit: 6.519180951018382
- maxDomains: 4.145608029883936
- maxMonthlyEventLogRequests: 1.2315135367772556
- maxAIAgents: 4.652396432933246
- flexDomainUnit: 2.8841621266687802
+ aiAgentMonthlyBudgetCents: 3.0576100241049344
+ yearlyCostLocal: 5.962133916683182
+ flexModeratorUnit: 6.965117697638846
+ flexChatGPTCostCents: 5.944895607614016
+ pricingCurrency: pricingCurrency
+ flexSSOAdminCostCents: 7.058770351582356
+ flexSSOUserCostCents: 9.965781217890562
+ flexLLMUnit: 3.0937452626664474
+ flexFreeModerators: 8.969578798196912
+ flexSSOModeratorUnit: 4.652396432933246
+ maxDomains: 1.2315135367772556
+ maxMonthlyEventLogRequests: 1.4894159098541704
+ maxAIAgents: 7.740351818741173
+ flexDomainUnit: 6.878052220127876
hasWhiteLabeling: true
- flexChatGPTUnit: 6.878052220127876
- maxMonthlyComments: 2.3021358869347655
- maxModerators: 2.027123023002322
+ flexChatGPTUnit: 6.704019297950036
+ maxMonthlyComments: 9.301444243932576
+ maxModerators: 7.386281948385884
hasAuditing: true
hasAIAgents: true
- flexSSOUserUnit: 5.025004791520295
- maxMonthlyPageLoads: 1.4658129805029452
- flexDomainCostCents: 1.284659006116532
+ flexSSOUserUnit: 9.369310271410669
+ maxMonthlyPageLoads: 5.637376656633329
+ flexDomainCostCents: 6.778324963048013
hasLLMSpamDetection: true
isSSOBillingMonthlyActiveUsers: true
featureTaglines:
@@ -21726,16 +21663,16 @@ components:
- featureTaglines
yearlyCostUSD: 6.027456183070403
hasDebranding: true
- flexPageLoadCostCents: 1.4894159098541704
- flexAdminUnit: 6.965117697638846
- maxWhiteLabeledTenants: 7.386281948385884
- flexSmallWidgetsCreditCostCents: 6.683562403749608
+ flexPageLoadCostCents: 7.457744773683766
+ flexAdminUnit: 2.8841621266687802
+ maxWhiteLabeledTenants: 1.0246457001441578
+ flexSmallWidgetsCreditCostCents: 9.018348186070783
tenantId: tenantId
- flexCommentCostCents: 7.457744773683766
- flexModeratorCostCents: 9.018348186070783
- flexPageLoadUnit: 6.84685269835264
+ flexCommentCostCents: 4.965218492984954
+ flexModeratorCostCents: 3.5571952270680973
+ flexPageLoadUnit: 1.1730742509559433
monthlyStripePlanId: monthlyStripePlanId
- flexSSOAdminUnit: 0.8851374739011653
+ flexSSOAdminUnit: 6.519180951018382
properties:
_id:
type: string
@@ -21749,6 +21686,8 @@ components:
templateId:
type: string
monthlyCostUSD:
+ description: "Always the USD list price, also on regionally priced tenants\
+ \ (commissions and plan comparisons read it)."
format: double
nullable: true
type: number
@@ -21756,6 +21695,18 @@ components:
format: double
nullable: true
type: number
+ pricingCurrency:
+ description: "Regional prices the tenant is charged, when pricingCurrency\
+ \ is set; the Stripe plan ids below are then in that currency."
+ type: string
+ monthlyCostLocal:
+ format: double
+ nullable: true
+ type: number
+ yearlyCostLocal:
+ format: double
+ nullable: true
+ type: number
monthlyStripePlanId:
nullable: true
type: string
@@ -21942,56 +21893,58 @@ components:
- yearlyStripePlanId
type: object
GetTenantPackageResponse:
- additionalProperties: false
example:
tenantPackage:
- maxMonthlySmallWidgetsCredits: 5.637376656633329
- flexAPICreditCostCents: 9.965781217890562
- flexMinimumCostCents: 3.353193347011243
- flexCommentUnit: 1.1730742509559433
- maxMonthlyAPICredits: 5.962133916683182
+ maxMonthlySmallWidgetsCredits: 7.061401241503109
+ flexAPICreditCostCents: 6.683562403749608
+ flexMinimumCostCents: 7.143538047012306
+ monthlyCostLocal: 1.4658129805029452
+ flexCommentUnit: 5.025004791520295
+ maxMonthlyAPICredits: 2.3021358869347655
templateId: templateId
createdAt: 2000-01-23T04:56:07.000+00:00
- flexManagedTenantCostCents: 3.0937452626664474
- flexSmallWidgetsCreditUnit: 8.762042012749001
+ flexManagedTenantCostCents: 0.8851374739011653
+ flexSmallWidgetsCreditUnit: 6.438423552598547
yearlyStripePlanId: yearlyStripePlanId
- aiAgentDailyBudgetCents: 8.969578798196912
- maxSSOUsers: 3.616076749251911
+ aiAgentDailyBudgetCents: 3.0205796992916243
+ maxSSOUsers: 4.145608029883936
hasFlexPricing: true
- flexSSOModeratorCostCents: 7.058770351582356
+ flexSSOModeratorCostCents: 0.10263654006109402
monthlyCostUSD: 0.8008281904610115
- maxTenantUsers: 9.301444243932576
- maxCustomCollectionSize: 1.0246457001441578
+ maxTenantUsers: 2.027123023002322
+ maxCustomCollectionSize: 6.84685269835264
enableSAML: true
enableCanvasLTI: true
forWhoText: forWhoText
- flexAPICreditUnit: 9.369310271410669
- flexAdminCostCents: 3.5571952270680973
- maxConcurrentUsers: 7.061401241503109
- flexLLMCostCents: 5.944895607614016
+ flexAPICreditUnit: 8.762042012749001
+ flexAdminCostCents: 1.284659006116532
+ maxConcurrentUsers: 3.616076749251911
+ flexLLMCostCents: 3.353193347011243
name: name
_id: _id
- aiAgentMonthlyBudgetCents: 7.740351818741173
- flexModeratorUnit: 6.438423552598547
- flexChatGPTCostCents: 6.778324963048013
- flexSSOAdminCostCents: 7.143538047012306
- flexSSOUserCostCents: 4.965218492984954
- flexLLMUnit: 6.704019297950036
- flexFreeModerators: 0.10263654006109402
- flexSSOModeratorUnit: 6.519180951018382
- maxDomains: 4.145608029883936
- maxMonthlyEventLogRequests: 1.2315135367772556
- maxAIAgents: 4.652396432933246
- flexDomainUnit: 2.8841621266687802
+ aiAgentMonthlyBudgetCents: 3.0576100241049344
+ yearlyCostLocal: 5.962133916683182
+ flexModeratorUnit: 6.965117697638846
+ flexChatGPTCostCents: 5.944895607614016
+ pricingCurrency: pricingCurrency
+ flexSSOAdminCostCents: 7.058770351582356
+ flexSSOUserCostCents: 9.965781217890562
+ flexLLMUnit: 3.0937452626664474
+ flexFreeModerators: 8.969578798196912
+ flexSSOModeratorUnit: 4.652396432933246
+ maxDomains: 1.2315135367772556
+ maxMonthlyEventLogRequests: 1.4894159098541704
+ maxAIAgents: 7.740351818741173
+ flexDomainUnit: 6.878052220127876
hasWhiteLabeling: true
- flexChatGPTUnit: 6.878052220127876
- maxMonthlyComments: 2.3021358869347655
- maxModerators: 2.027123023002322
+ flexChatGPTUnit: 6.704019297950036
+ maxMonthlyComments: 9.301444243932576
+ maxModerators: 7.386281948385884
hasAuditing: true
hasAIAgents: true
- flexSSOUserUnit: 5.025004791520295
- maxMonthlyPageLoads: 1.4658129805029452
- flexDomainCostCents: 1.284659006116532
+ flexSSOUserUnit: 9.369310271410669
+ maxMonthlyPageLoads: 5.637376656633329
+ flexDomainCostCents: 6.778324963048013
hasLLMSpamDetection: true
isSSOBillingMonthlyActiveUsers: true
featureTaglines:
@@ -21999,16 +21952,16 @@ components:
- featureTaglines
yearlyCostUSD: 6.027456183070403
hasDebranding: true
- flexPageLoadCostCents: 1.4894159098541704
- flexAdminUnit: 6.965117697638846
- maxWhiteLabeledTenants: 7.386281948385884
- flexSmallWidgetsCreditCostCents: 6.683562403749608
+ flexPageLoadCostCents: 7.457744773683766
+ flexAdminUnit: 2.8841621266687802
+ maxWhiteLabeledTenants: 1.0246457001441578
+ flexSmallWidgetsCreditCostCents: 9.018348186070783
tenantId: tenantId
- flexCommentCostCents: 7.457744773683766
- flexModeratorCostCents: 9.018348186070783
- flexPageLoadUnit: 6.84685269835264
+ flexCommentCostCents: 4.965218492984954
+ flexModeratorCostCents: 3.5571952270680973
+ flexPageLoadUnit: 1.1730742509559433
monthlyStripePlanId: monthlyStripePlanId
- flexSSOAdminUnit: 0.8851374739011653
+ flexSSOAdminUnit: 6.519180951018382
status: success
properties:
status:
@@ -22020,56 +21973,58 @@ components:
- tenantPackage
type: object
GetTenantPackagesResponse:
- additionalProperties: false
example:
tenantPackages:
- - maxMonthlySmallWidgetsCredits: 5.637376656633329
- flexAPICreditCostCents: 9.965781217890562
- flexMinimumCostCents: 3.353193347011243
- flexCommentUnit: 1.1730742509559433
- maxMonthlyAPICredits: 5.962133916683182
+ - maxMonthlySmallWidgetsCredits: 7.061401241503109
+ flexAPICreditCostCents: 6.683562403749608
+ flexMinimumCostCents: 7.143538047012306
+ monthlyCostLocal: 1.4658129805029452
+ flexCommentUnit: 5.025004791520295
+ maxMonthlyAPICredits: 2.3021358869347655
templateId: templateId
createdAt: 2000-01-23T04:56:07.000+00:00
- flexManagedTenantCostCents: 3.0937452626664474
- flexSmallWidgetsCreditUnit: 8.762042012749001
+ flexManagedTenantCostCents: 0.8851374739011653
+ flexSmallWidgetsCreditUnit: 6.438423552598547
yearlyStripePlanId: yearlyStripePlanId
- aiAgentDailyBudgetCents: 8.969578798196912
- maxSSOUsers: 3.616076749251911
+ aiAgentDailyBudgetCents: 3.0205796992916243
+ maxSSOUsers: 4.145608029883936
hasFlexPricing: true
- flexSSOModeratorCostCents: 7.058770351582356
+ flexSSOModeratorCostCents: 0.10263654006109402
monthlyCostUSD: 0.8008281904610115
- maxTenantUsers: 9.301444243932576
- maxCustomCollectionSize: 1.0246457001441578
+ maxTenantUsers: 2.027123023002322
+ maxCustomCollectionSize: 6.84685269835264
enableSAML: true
enableCanvasLTI: true
forWhoText: forWhoText
- flexAPICreditUnit: 9.369310271410669
- flexAdminCostCents: 3.5571952270680973
- maxConcurrentUsers: 7.061401241503109
- flexLLMCostCents: 5.944895607614016
+ flexAPICreditUnit: 8.762042012749001
+ flexAdminCostCents: 1.284659006116532
+ maxConcurrentUsers: 3.616076749251911
+ flexLLMCostCents: 3.353193347011243
name: name
_id: _id
- aiAgentMonthlyBudgetCents: 7.740351818741173
- flexModeratorUnit: 6.438423552598547
- flexChatGPTCostCents: 6.778324963048013
- flexSSOAdminCostCents: 7.143538047012306
- flexSSOUserCostCents: 4.965218492984954
- flexLLMUnit: 6.704019297950036
- flexFreeModerators: 0.10263654006109402
- flexSSOModeratorUnit: 6.519180951018382
- maxDomains: 4.145608029883936
- maxMonthlyEventLogRequests: 1.2315135367772556
- maxAIAgents: 4.652396432933246
- flexDomainUnit: 2.8841621266687802
+ aiAgentMonthlyBudgetCents: 3.0576100241049344
+ yearlyCostLocal: 5.962133916683182
+ flexModeratorUnit: 6.965117697638846
+ flexChatGPTCostCents: 5.944895607614016
+ pricingCurrency: pricingCurrency
+ flexSSOAdminCostCents: 7.058770351582356
+ flexSSOUserCostCents: 9.965781217890562
+ flexLLMUnit: 3.0937452626664474
+ flexFreeModerators: 8.969578798196912
+ flexSSOModeratorUnit: 4.652396432933246
+ maxDomains: 1.2315135367772556
+ maxMonthlyEventLogRequests: 1.4894159098541704
+ maxAIAgents: 7.740351818741173
+ flexDomainUnit: 6.878052220127876
hasWhiteLabeling: true
- flexChatGPTUnit: 6.878052220127876
- maxMonthlyComments: 2.3021358869347655
- maxModerators: 2.027123023002322
+ flexChatGPTUnit: 6.704019297950036
+ maxMonthlyComments: 9.301444243932576
+ maxModerators: 7.386281948385884
hasAuditing: true
hasAIAgents: true
- flexSSOUserUnit: 5.025004791520295
- maxMonthlyPageLoads: 1.4658129805029452
- flexDomainCostCents: 1.284659006116532
+ flexSSOUserUnit: 9.369310271410669
+ maxMonthlyPageLoads: 5.637376656633329
+ flexDomainCostCents: 6.778324963048013
hasLLMSpamDetection: true
isSSOBillingMonthlyActiveUsers: true
featureTaglines:
@@ -22077,63 +22032,66 @@ components:
- featureTaglines
yearlyCostUSD: 6.027456183070403
hasDebranding: true
- flexPageLoadCostCents: 1.4894159098541704
- flexAdminUnit: 6.965117697638846
- maxWhiteLabeledTenants: 7.386281948385884
- flexSmallWidgetsCreditCostCents: 6.683562403749608
+ flexPageLoadCostCents: 7.457744773683766
+ flexAdminUnit: 2.8841621266687802
+ maxWhiteLabeledTenants: 1.0246457001441578
+ flexSmallWidgetsCreditCostCents: 9.018348186070783
tenantId: tenantId
- flexCommentCostCents: 7.457744773683766
- flexModeratorCostCents: 9.018348186070783
- flexPageLoadUnit: 6.84685269835264
+ flexCommentCostCents: 4.965218492984954
+ flexModeratorCostCents: 3.5571952270680973
+ flexPageLoadUnit: 1.1730742509559433
monthlyStripePlanId: monthlyStripePlanId
- flexSSOAdminUnit: 0.8851374739011653
- - maxMonthlySmallWidgetsCredits: 5.637376656633329
- flexAPICreditCostCents: 9.965781217890562
- flexMinimumCostCents: 3.353193347011243
- flexCommentUnit: 1.1730742509559433
- maxMonthlyAPICredits: 5.962133916683182
+ flexSSOAdminUnit: 6.519180951018382
+ - maxMonthlySmallWidgetsCredits: 7.061401241503109
+ flexAPICreditCostCents: 6.683562403749608
+ flexMinimumCostCents: 7.143538047012306
+ monthlyCostLocal: 1.4658129805029452
+ flexCommentUnit: 5.025004791520295
+ maxMonthlyAPICredits: 2.3021358869347655
templateId: templateId
createdAt: 2000-01-23T04:56:07.000+00:00
- flexManagedTenantCostCents: 3.0937452626664474
- flexSmallWidgetsCreditUnit: 8.762042012749001
+ flexManagedTenantCostCents: 0.8851374739011653
+ flexSmallWidgetsCreditUnit: 6.438423552598547
yearlyStripePlanId: yearlyStripePlanId
- aiAgentDailyBudgetCents: 8.969578798196912
- maxSSOUsers: 3.616076749251911
+ aiAgentDailyBudgetCents: 3.0205796992916243
+ maxSSOUsers: 4.145608029883936
hasFlexPricing: true
- flexSSOModeratorCostCents: 7.058770351582356
+ flexSSOModeratorCostCents: 0.10263654006109402
monthlyCostUSD: 0.8008281904610115
- maxTenantUsers: 9.301444243932576
- maxCustomCollectionSize: 1.0246457001441578
+ maxTenantUsers: 2.027123023002322
+ maxCustomCollectionSize: 6.84685269835264
enableSAML: true
enableCanvasLTI: true
forWhoText: forWhoText
- flexAPICreditUnit: 9.369310271410669
- flexAdminCostCents: 3.5571952270680973
- maxConcurrentUsers: 7.061401241503109
- flexLLMCostCents: 5.944895607614016
+ flexAPICreditUnit: 8.762042012749001
+ flexAdminCostCents: 1.284659006116532
+ maxConcurrentUsers: 3.616076749251911
+ flexLLMCostCents: 3.353193347011243
name: name
_id: _id
- aiAgentMonthlyBudgetCents: 7.740351818741173
- flexModeratorUnit: 6.438423552598547
- flexChatGPTCostCents: 6.778324963048013
- flexSSOAdminCostCents: 7.143538047012306
- flexSSOUserCostCents: 4.965218492984954
- flexLLMUnit: 6.704019297950036
- flexFreeModerators: 0.10263654006109402
- flexSSOModeratorUnit: 6.519180951018382
- maxDomains: 4.145608029883936
- maxMonthlyEventLogRequests: 1.2315135367772556
- maxAIAgents: 4.652396432933246
- flexDomainUnit: 2.8841621266687802
+ aiAgentMonthlyBudgetCents: 3.0576100241049344
+ yearlyCostLocal: 5.962133916683182
+ flexModeratorUnit: 6.965117697638846
+ flexChatGPTCostCents: 5.944895607614016
+ pricingCurrency: pricingCurrency
+ flexSSOAdminCostCents: 7.058770351582356
+ flexSSOUserCostCents: 9.965781217890562
+ flexLLMUnit: 3.0937452626664474
+ flexFreeModerators: 8.969578798196912
+ flexSSOModeratorUnit: 4.652396432933246
+ maxDomains: 1.2315135367772556
+ maxMonthlyEventLogRequests: 1.4894159098541704
+ maxAIAgents: 7.740351818741173
+ flexDomainUnit: 6.878052220127876
hasWhiteLabeling: true
- flexChatGPTUnit: 6.878052220127876
- maxMonthlyComments: 2.3021358869347655
- maxModerators: 2.027123023002322
+ flexChatGPTUnit: 6.704019297950036
+ maxMonthlyComments: 9.301444243932576
+ maxModerators: 7.386281948385884
hasAuditing: true
hasAIAgents: true
- flexSSOUserUnit: 5.025004791520295
- maxMonthlyPageLoads: 1.4658129805029452
- flexDomainCostCents: 1.284659006116532
+ flexSSOUserUnit: 9.369310271410669
+ maxMonthlyPageLoads: 5.637376656633329
+ flexDomainCostCents: 6.778324963048013
hasLLMSpamDetection: true
isSSOBillingMonthlyActiveUsers: true
featureTaglines:
@@ -22141,16 +22099,16 @@ components:
- featureTaglines
yearlyCostUSD: 6.027456183070403
hasDebranding: true
- flexPageLoadCostCents: 1.4894159098541704
- flexAdminUnit: 6.965117697638846
- maxWhiteLabeledTenants: 7.386281948385884
- flexSmallWidgetsCreditCostCents: 6.683562403749608
+ flexPageLoadCostCents: 7.457744773683766
+ flexAdminUnit: 2.8841621266687802
+ maxWhiteLabeledTenants: 1.0246457001441578
+ flexSmallWidgetsCreditCostCents: 9.018348186070783
tenantId: tenantId
- flexCommentCostCents: 7.457744773683766
- flexModeratorCostCents: 9.018348186070783
- flexPageLoadUnit: 6.84685269835264
+ flexCommentCostCents: 4.965218492984954
+ flexModeratorCostCents: 3.5571952270680973
+ flexPageLoadUnit: 1.1730742509559433
monthlyStripePlanId: monthlyStripePlanId
- flexSSOAdminUnit: 0.8851374739011653
+ flexSSOAdminUnit: 6.519180951018382
status: success
properties:
status:
@@ -22164,56 +22122,58 @@ components:
- tenantPackages
type: object
CreateTenantPackageResponse:
- additionalProperties: false
example:
tenantPackage:
- maxMonthlySmallWidgetsCredits: 5.637376656633329
- flexAPICreditCostCents: 9.965781217890562
- flexMinimumCostCents: 3.353193347011243
- flexCommentUnit: 1.1730742509559433
- maxMonthlyAPICredits: 5.962133916683182
+ maxMonthlySmallWidgetsCredits: 7.061401241503109
+ flexAPICreditCostCents: 6.683562403749608
+ flexMinimumCostCents: 7.143538047012306
+ monthlyCostLocal: 1.4658129805029452
+ flexCommentUnit: 5.025004791520295
+ maxMonthlyAPICredits: 2.3021358869347655
templateId: templateId
createdAt: 2000-01-23T04:56:07.000+00:00
- flexManagedTenantCostCents: 3.0937452626664474
- flexSmallWidgetsCreditUnit: 8.762042012749001
+ flexManagedTenantCostCents: 0.8851374739011653
+ flexSmallWidgetsCreditUnit: 6.438423552598547
yearlyStripePlanId: yearlyStripePlanId
- aiAgentDailyBudgetCents: 8.969578798196912
- maxSSOUsers: 3.616076749251911
+ aiAgentDailyBudgetCents: 3.0205796992916243
+ maxSSOUsers: 4.145608029883936
hasFlexPricing: true
- flexSSOModeratorCostCents: 7.058770351582356
+ flexSSOModeratorCostCents: 0.10263654006109402
monthlyCostUSD: 0.8008281904610115
- maxTenantUsers: 9.301444243932576
- maxCustomCollectionSize: 1.0246457001441578
+ maxTenantUsers: 2.027123023002322
+ maxCustomCollectionSize: 6.84685269835264
enableSAML: true
enableCanvasLTI: true
forWhoText: forWhoText
- flexAPICreditUnit: 9.369310271410669
- flexAdminCostCents: 3.5571952270680973
- maxConcurrentUsers: 7.061401241503109
- flexLLMCostCents: 5.944895607614016
+ flexAPICreditUnit: 8.762042012749001
+ flexAdminCostCents: 1.284659006116532
+ maxConcurrentUsers: 3.616076749251911
+ flexLLMCostCents: 3.353193347011243
name: name
_id: _id
- aiAgentMonthlyBudgetCents: 7.740351818741173
- flexModeratorUnit: 6.438423552598547
- flexChatGPTCostCents: 6.778324963048013
- flexSSOAdminCostCents: 7.143538047012306
- flexSSOUserCostCents: 4.965218492984954
- flexLLMUnit: 6.704019297950036
- flexFreeModerators: 0.10263654006109402
- flexSSOModeratorUnit: 6.519180951018382
- maxDomains: 4.145608029883936
- maxMonthlyEventLogRequests: 1.2315135367772556
- maxAIAgents: 4.652396432933246
- flexDomainUnit: 2.8841621266687802
+ aiAgentMonthlyBudgetCents: 3.0576100241049344
+ yearlyCostLocal: 5.962133916683182
+ flexModeratorUnit: 6.965117697638846
+ flexChatGPTCostCents: 5.944895607614016
+ pricingCurrency: pricingCurrency
+ flexSSOAdminCostCents: 7.058770351582356
+ flexSSOUserCostCents: 9.965781217890562
+ flexLLMUnit: 3.0937452626664474
+ flexFreeModerators: 8.969578798196912
+ flexSSOModeratorUnit: 4.652396432933246
+ maxDomains: 1.2315135367772556
+ maxMonthlyEventLogRequests: 1.4894159098541704
+ maxAIAgents: 7.740351818741173
+ flexDomainUnit: 6.878052220127876
hasWhiteLabeling: true
- flexChatGPTUnit: 6.878052220127876
- maxMonthlyComments: 2.3021358869347655
- maxModerators: 2.027123023002322
+ flexChatGPTUnit: 6.704019297950036
+ maxMonthlyComments: 9.301444243932576
+ maxModerators: 7.386281948385884
hasAuditing: true
hasAIAgents: true
- flexSSOUserUnit: 5.025004791520295
- maxMonthlyPageLoads: 1.4658129805029452
- flexDomainCostCents: 1.284659006116532
+ flexSSOUserUnit: 9.369310271410669
+ maxMonthlyPageLoads: 5.637376656633329
+ flexDomainCostCents: 6.778324963048013
hasLLMSpamDetection: true
isSSOBillingMonthlyActiveUsers: true
featureTaglines:
@@ -22221,16 +22181,16 @@ components:
- featureTaglines
yearlyCostUSD: 6.027456183070403
hasDebranding: true
- flexPageLoadCostCents: 1.4894159098541704
- flexAdminUnit: 6.965117697638846
- maxWhiteLabeledTenants: 7.386281948385884
- flexSmallWidgetsCreditCostCents: 6.683562403749608
+ flexPageLoadCostCents: 7.457744773683766
+ flexAdminUnit: 2.8841621266687802
+ maxWhiteLabeledTenants: 1.0246457001441578
+ flexSmallWidgetsCreditCostCents: 9.018348186070783
tenantId: tenantId
- flexCommentCostCents: 7.457744773683766
- flexModeratorCostCents: 9.018348186070783
- flexPageLoadUnit: 6.84685269835264
+ flexCommentCostCents: 4.965218492984954
+ flexModeratorCostCents: 3.5571952270680973
+ flexPageLoadUnit: 1.1730742509559433
monthlyStripePlanId: monthlyStripePlanId
- flexSSOAdminUnit: 0.8851374739011653
+ flexSSOAdminUnit: 6.519180951018382
status: success
properties:
status:
@@ -22242,7 +22202,6 @@ components:
- tenantPackage
type: object
CreateTenantPackageBody:
- additionalProperties: false
example:
maxMonthlySmallWidgetsCredits: 5.637376656633329
flexAPICreditCostCents: 9.965781217890562
@@ -22454,7 +22413,6 @@ components:
- name
type: object
ReplaceTenantPackageBody:
- additionalProperties: false
example:
flexAPICreditCostCents: 1.1730742509559433
flexMinimumCostCents: 6.438423552598547
@@ -22598,7 +22556,6 @@ components:
- yearlyCostUSD
type: object
UpdateTenantPackageBody:
- additionalProperties: false
example:
flexAPICreditCostCents: 1.1730742509559433
flexMinimumCostCents: 6.438423552598547
@@ -22729,7 +22686,6 @@ components:
type: number
type: object
APITenantDailyUsage:
- additionalProperties: false
example:
commentFetchCount: 5.962133916683182
ignored: true
@@ -22826,7 +22782,6 @@ components:
- yearNumber
type: object
GetTenantDailyUsagesResponse:
- additionalProperties: false
example:
tenantDailyUsages:
- commentFetchCount: 5.962133916683182
@@ -22880,7 +22835,6 @@ components:
- tenantDailyUsages
type: object
MetaItem:
- additionalProperties: false
example:
values:
- values
@@ -22898,7 +22852,6 @@ components:
- values
type: object
QuestionResult:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
questionId: questionId
@@ -22971,7 +22924,6 @@ components:
- value
type: object
GetQuestionResultResponse:
- additionalProperties: false
example:
questionResult:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -23007,7 +22959,6 @@ components:
- status
type: object
GetQuestionResultsResponse:
- additionalProperties: false
example:
questionResults:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -23067,7 +23018,6 @@ components:
- status
type: object
CreateQuestionResultResponse:
- additionalProperties: false
example:
questionResult:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -23209,7 +23159,6 @@ components:
properties: {}
type: object
QuestionDatum:
- additionalProperties: false
example:
total: 6
v:
@@ -23236,7 +23185,6 @@ components:
properties: {}
type: object
QuestionResultAggregationOverall:
- additionalProperties: false
example:
average: 5.637376656633329
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -23286,7 +23234,6 @@ components:
- total
type: object
AggregateQuestionResultsResponse:
- additionalProperties: false
example:
data:
average: 5.637376656633329
@@ -23327,7 +23274,6 @@ components:
properties: {}
type: object
BulkAggregateQuestionResultsResponse:
- additionalProperties: false
example:
data:
key:
@@ -23361,7 +23307,6 @@ components:
- status
type: object
BulkAggregateQuestionItem:
- additionalProperties: false
example:
questionId: questionId
timeBucket: day
@@ -23391,7 +23336,6 @@ components:
- aggId
type: object
BulkAggregateQuestionResultsRequest:
- additionalProperties: false
example:
aggregations:
- questionId: questionId
@@ -23419,7 +23363,6 @@ components:
- aggregations
type: object
CommentTranslation:
- additionalProperties: false
properties:
comment:
type: string
@@ -23550,7 +23493,6 @@ components:
- 15
type: integer
CommentLogData:
- additionalProperties: false
example:
votesDownAfter: 9.369310271410669
repeatAction: 6
@@ -23738,7 +23680,6 @@ components:
type: boolean
type: object
CommentLogEntry:
- additionalProperties: false
example:
d: 2000-01-23T04:56:07.000+00:00
t: 7
@@ -23811,7 +23752,6 @@ components:
- t
type: object
FComment:
- additionalProperties: false
example:
date: 2000-01-23T04:56:07.000+00:00
editKey: editKey
@@ -24286,7 +24226,6 @@ components:
- verified
type: object
FindCommentsByRangeItem:
- additionalProperties: false
example:
result:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -24324,7 +24263,6 @@ components:
- result
type: object
FindCommentsByRangeResponse:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
results:
@@ -24389,7 +24327,6 @@ components:
- results
type: object
CombineQuestionResultsWithCommentsResponse:
- additionalProperties: false
example:
data:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -24464,7 +24401,6 @@ components:
- excludes
type: string
SubQuestionCondition:
- additionalProperties: false
example:
subQuestionId: subQuestionId
value: 2.3021358869347655
@@ -24483,7 +24419,6 @@ components:
- value
type: object
QuestionCondition:
- additionalProperties: false
description: |-
A rule evaluated against a question's answer. value is the score for nps/slider/star/emoji/scale, 1 or 0 for
thumbs, and the option index for choice/multi.
@@ -24501,7 +24436,6 @@ components:
- value
type: object
QuestionConfig:
- additionalProperties: false
example:
commentBoxCondition:
value: 7.061401241503109
@@ -24635,7 +24569,6 @@ components:
- usedCount
type: object
GetQuestionConfigResponse:
- additionalProperties: false
example:
status: success
questionConfig:
@@ -24687,7 +24620,6 @@ components:
- status
type: object
GetQuestionConfigsResponse:
- additionalProperties: false
example:
questionConfigs:
- commentBoxCondition:
@@ -24779,7 +24711,6 @@ components:
- status
type: object
CreateQuestionConfigResponse:
- additionalProperties: false
example:
status: success
questionConfig:
@@ -25005,7 +24936,6 @@ components:
type: number
type: object
GetPollResponse:
- additionalProperties: false
example:
poll:
question: question
@@ -25031,7 +24961,6 @@ components:
- status
type: object
SavePollResponse:
- additionalProperties: false
example:
poll:
question: question
@@ -25057,7 +24986,6 @@ components:
- status
type: object
CommentPollOptionInput:
- additionalProperties: false
example:
id: id
label: label
@@ -25071,7 +24999,6 @@ components:
- label
type: object
CommentPollPutInput:
- additionalProperties: false
example:
question: question
options:
@@ -25104,7 +25031,6 @@ components:
- question
type: object
CommentPollPatch:
- additionalProperties: false
example:
question: question
options:
@@ -25136,7 +25062,6 @@ components:
type: boolean
type: object
PublicPollVote:
- additionalProperties: false
description: A single vote cast on a comment's poll.
example:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -25176,7 +25101,6 @@ components:
- voterId
type: object
GetPollVotesResponse:
- additionalProperties: false
example:
pollVotes:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -25208,7 +25132,6 @@ components:
- status
type: object
GetPollVoteResponse:
- additionalProperties: false
example:
pollVote:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -25230,7 +25153,6 @@ components:
- status
type: object
CreatePollVoteResponse:
- additionalProperties: false
example:
pollVote:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -25268,7 +25190,6 @@ components:
- status
type: object
CreatePollVoteBody:
- additionalProperties: false
example:
ip: ip
commentId: commentId
@@ -25291,7 +25212,6 @@ components:
- optionId
type: object
DeletePollVoteResponse:
- additionalProperties: false
example:
poll:
question: question
@@ -25317,7 +25237,6 @@ components:
- status
type: object
PendingCommentToSyncOutbound:
- additionalProperties: false
example:
lastError: "{}"
webhookId: webhookId
@@ -25599,7 +25518,6 @@ components:
domain:
type: string
lastError:
- additionalProperties: false
type: object
webhookId:
type: string
@@ -25617,7 +25535,6 @@ components:
- type
type: object
GetPendingWebhookEventsResponse:
- additionalProperties: false
example:
pendingWebhookEvents:
- lastError: "{}"
@@ -26133,7 +26050,6 @@ components:
- status
type: object
GetPendingWebhookEventCountResponse:
- additionalProperties: false
example:
count: 0.8008281904610115
status: success
@@ -26148,7 +26064,6 @@ components:
- status
type: object
GetNotificationsResponse:
- additionalProperties: false
example:
notifications:
- isUnreadMessage: true
@@ -26224,7 +26139,6 @@ components:
- status
type: object
GetNotificationCountResponse:
- additionalProperties: false
example:
count: 0.8008281904610115
status: success
@@ -26250,7 +26164,6 @@ components:
type: boolean
type: object
UserNotificationCount:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
count: 0.8008281904610115
@@ -26275,7 +26188,6 @@ components:
- expireAt
type: object
GetCachedNotificationCountResponse:
- additionalProperties: false
example:
data:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -26293,7 +26205,6 @@ components:
- status
type: object
Moderator:
- additionalProperties: false
example:
unFlaggedCount: 3.616076749251911
isEmailSuppressed: true
@@ -26393,7 +26304,6 @@ components:
- verificationId
type: object
GetModeratorResponse:
- additionalProperties: false
example:
moderator:
unFlaggedCount: 3.616076749251911
@@ -26428,7 +26338,6 @@ components:
- status
type: object
GetModeratorsResponse:
- additionalProperties: false
example:
status: success
moderators:
@@ -26486,7 +26395,6 @@ components:
- status
type: object
CreateModeratorResponse:
- additionalProperties: false
example:
moderator:
unFlaggedCount: 3.616076749251911
@@ -26576,7 +26484,6 @@ components:
- write
type: string
GetMeResponse:
- additionalProperties: false
example:
tenantName: tenantName
tenantId: tenantId
@@ -26617,7 +26524,6 @@ components:
- tenantName
type: object
TenantHashTag:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
tenantId: tenantId
@@ -26643,7 +26549,6 @@ components:
- tenantId
type: object
GetHashTagsResponse:
- additionalProperties: false
example:
hashTags:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -26669,7 +26574,6 @@ components:
- status
type: object
CreateHashTagResponse:
- additionalProperties: false
example:
status: success
hashTag:
@@ -26688,7 +26592,6 @@ components:
- status
type: object
CreateHashTagBody:
- additionalProperties: false
example:
tenantId: tenantId
tag: tag
@@ -26704,7 +26607,6 @@ components:
- tag
type: object
BulkCreateHashTagsResponse:
- additionalProperties: false
example:
results:
- status: success
@@ -26734,7 +26636,6 @@ components:
- status
type: object
BulkCreateHashTagsBody:
- additionalProperties: false
example:
tenantId: tenantId
tags:
@@ -26753,7 +26654,6 @@ components:
- tags
type: object
UpdateHashTagResponse:
- additionalProperties: false
example:
status: success
hashTag:
@@ -26772,7 +26672,6 @@ components:
- status
type: object
UpdateHashTagBody:
- additionalProperties: false
example:
tenantId: tenantId
tag: tag
@@ -26786,7 +26685,6 @@ components:
type: string
type: object
GetFeedPostsResponse:
- additionalProperties: false
example:
feedPosts:
- fromUserDisplayName: fromUserDisplayName
@@ -26894,7 +26792,6 @@ components:
- status
type: object
CreateFeedPostsResponse:
- additionalProperties: false
example:
feedPost:
fromUserDisplayName: fromUserDisplayName
@@ -26965,7 +26862,6 @@ components:
properties: {}
type: object
EmailTemplateDefinition:
- additionalProperties: false
example:
emailTemplateId: emailTemplateId
defaultTranslationsByLocale:
@@ -26996,7 +26892,6 @@ components:
- emailTemplateId
type: object
GetEmailTemplateDefinitionsResponse:
- additionalProperties: false
example:
definitions:
- emailTemplateId: emailTemplateId
@@ -27024,7 +26919,6 @@ components:
- status
type: object
EmailTemplateRenderErrorResponse:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
customTemplateId: customTemplateId
@@ -27061,7 +26955,6 @@ components:
- tenantId
type: object
GetEmailTemplateRenderErrorsResponse:
- additionalProperties: false
example:
renderErrors:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -27091,7 +26984,6 @@ components:
- status
type: object
CustomEmailTemplate:
- additionalProperties: false
example:
createdAt: 2000-01-23T04:56:07.000+00:00
testData: ""
@@ -27149,7 +27041,6 @@ components:
- updatedByUserId
type: object
GetEmailTemplateResponse:
- additionalProperties: false
example:
emailTemplate:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -27175,7 +27066,6 @@ components:
- status
type: object
GetEmailTemplatesResponse:
- additionalProperties: false
example:
emailTemplates:
- createdAt: 2000-01-23T04:56:07.000+00:00
@@ -27215,7 +27105,6 @@ components:
- status
type: object
CreateEmailTemplateResponse:
- additionalProperties: false
example:
emailTemplate:
createdAt: 2000-01-23T04:56:07.000+00:00
@@ -27241,7 +27130,6 @@ components:
- status
type: object
CreateEmailTemplateBody:
- additionalProperties: false
example:
testData:
key: ""
@@ -27277,7 +27165,6 @@ components:
- emailTemplateId
type: object
UpdateEmailTemplateBody:
- additionalProperties: false
example:
testData:
key: ""
@@ -27309,7 +27196,6 @@ components:
type: object
type: object
RenderEmailTemplateResponse:
- additionalProperties: false
example:
html: html
status: success
@@ -27323,7 +27209,6 @@ components:
- status
type: object
RenderEmailTemplateBody:
- additionalProperties: false
example:
testData:
key: ""
@@ -27352,7 +27237,6 @@ components:
- emailTemplateId
type: object
AddDomainConfigParams:
- additionalProperties: false
example:
emailHeaders: {}
emailFromName: emailFromName
@@ -27385,7 +27269,6 @@ components:
- domain
type: object
UpdateDomainConfigParams:
- additionalProperties: false
example:
emailHeaders: {}
emailFromName: emailFromName
@@ -27418,7 +27301,6 @@ components:
- domain
type: object
PatchDomainConfigParams:
- additionalProperties: false
example:
emailHeaders: {}
emailFromName: emailFromName
@@ -27449,7 +27331,6 @@ components:
type: object
type: object
APICommentBase:
- additionalProperties: false
properties:
id:
type: string
@@ -27725,7 +27606,6 @@ components:
votes: 5
isByAdmin: true
APIGetCommentResponse:
- additionalProperties: false
example:
comment:
date: 9.301444243932576
@@ -27834,7 +27714,6 @@ components:
- status
type: object
APIGetCommentsResponse:
- additionalProperties: false
example:
comments:
- date: 9.301444243932576
@@ -28040,7 +27919,6 @@ components:
- status
type: object
UpdatableCommentParams:
- additionalProperties: false
example:
date: 0.8008281904610115
externalParentId: externalParentId
@@ -28201,7 +28079,6 @@ components:
type: array
type: object
APISaveCommentResponse:
- additionalProperties: false
example:
comment:
date: 9.301444243932576
@@ -28323,7 +28200,6 @@ components:
- user
type: object
CreateCommentParams:
- additionalProperties: false
example:
date: 0
votesDown: 7
@@ -28440,7 +28316,6 @@ components:
urlId:
type: string
meta:
- additionalProperties: false
type: object
moderationGroupIds:
items:
@@ -28502,7 +28377,6 @@ components:
- urlId
type: object
FlagCommentResponse:
- additionalProperties: false
example:
reason: reason
code: code
@@ -28525,7 +28399,6 @@ components:
- status
type: object
BlockFromCommentParams:
- additionalProperties: false
example:
commentIdsToCheck:
- commentIdsToCheck
@@ -28537,7 +28410,6 @@ components:
type: array
type: object
UnBlockFromCommentParams:
- additionalProperties: false
example:
commentIdsToCheck:
- commentIdsToCheck
@@ -28549,7 +28421,6 @@ components:
type: array
type: object
PageMigrationSuccess:
- additionalProperties: false
example:
commentsMigrated: 5
from: from
@@ -28576,7 +28447,6 @@ components:
- type
type: object
PageMigrationFailure:
- additionalProperties: false
properties:
from:
type: string
@@ -28599,7 +28469,6 @@ components:
- type
type: object
PageMigrationUndoCounts:
- additionalProperties: false
example:
notRestorable: 1
restored: 0
@@ -28803,7 +28672,6 @@ components:
- status
type: object
APIAuditLog:
- additionalProperties: false
example:
targetId: targetId
ip: ip
@@ -28877,7 +28745,6 @@ components:
- resourceName
type: object
GetAuditLogsResponse:
- additionalProperties: false
example:
auditLogs:
- targetId: targetId
@@ -28974,7 +28841,6 @@ components:
example:
groups: null
AggregationResponse:
- additionalProperties: false
description: The API response returns the aggregated data along with simple
stats
example:
@@ -28999,7 +28865,6 @@ components:
- status
type: object
AggregationAPIError:
- additionalProperties: false
properties:
status:
$ref: "#/components/schemas/APIStatus"
@@ -29017,7 +28882,6 @@ components:
- status
type: object
QueryPredicate:
- additionalProperties: false
example:
value: QueryPredicate_value
key: key
@@ -29052,7 +28916,6 @@ components:
- count
type: string
AggregationOperation:
- additionalProperties: false
description: An operation that will be applied on a field
example:
op: sum
@@ -29076,7 +28939,6 @@ components:
- op
type: object
AggregationRequest:
- additionalProperties: false
description: "The aggregation request accepts a resource, optional grouping\
\ keys, an array of operations, and an optional sort"
example:
@@ -29125,7 +28987,6 @@ components:
- resourceName
type: object
CreateAgentTenantResponse:
- additionalProperties: false
example:
apiBaseUrl: apiBaseUrl
mcpUrl: mcpUrl
@@ -29166,7 +29027,6 @@ components:
- tenantId
type: object
CreateAgentTenantBody:
- additionalProperties: false
example:
agent: agent
name: name
diff --git a/client/build.gradle b/client/build.gradle
index 2eaff38..7991403 100644
--- a/client/build.gradle
+++ b/client/build.gradle
@@ -4,7 +4,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
group = 'com.fastcomments'
-version = '3.1.1'
+version = '3.1.2'
buildscript {
repositories {
diff --git a/client/build.sbt b/client/build.sbt
index 154c40b..427ecc6 100644
--- a/client/build.sbt
+++ b/client/build.sbt
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.fastcomments",
name := "client",
- version := "3.1.1",
+ version := "3.1.2",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
diff --git a/client/docs/CustomConfigParameters.md b/client/docs/CustomConfigParameters.md
index c9127c9..1de958f 100644
--- a/client/docs/CustomConfigParameters.md
+++ b/client/docs/CustomConfigParameters.md
@@ -13,7 +13,9 @@
|**allowAnonFlag** | **Boolean** | | [optional] |
|**allowAnonVotes** | **Boolean** | | [optional] |
|**allowedLanguages** | **List<String>** | | [optional] |
+|**allowSimpleSSOAdmins** | **Boolean** | Simple SSO users on this page or domain can be admins and moderators: they keep those flags and pick them up from a matching email. | [optional] |
|**autoGenerateUsername** | **Boolean** | Serve each new visitor a unique generated username as the prefilled defaultUsername. | [optional] |
+|**autoVerifySimpleSSOComments** | **Boolean** | Comments from Simple SSO users on this page or domain are verified right away, instead of through an emailed link. | [optional] |
|**collapseReplies** | **Boolean** | | [optional] |
|**commentCountFormat** | **String** | | [optional] |
|**commentHTMLRenderingMode** | **CommentHTMLRenderingMode** | | [optional] |
diff --git a/client/docs/TenantPackage.md b/client/docs/TenantPackage.md
index 1be73f0..0e470cc 100644
--- a/client/docs/TenantPackage.md
+++ b/client/docs/TenantPackage.md
@@ -12,8 +12,11 @@
|**tenantId** | **String** | | |
|**createdAt** | **OffsetDateTime** | | |
|**templateId** | **String** | | [optional] |
-|**monthlyCostUSD** | **Double** | | |
+|**monthlyCostUSD** | **Double** | Always the USD list price, also on regionally priced tenants (commissions and plan comparisons read it). | |
|**yearlyCostUSD** | **Double** | | |
+|**pricingCurrency** | **String** | Regional prices the tenant is charged, when pricingCurrency is set; the Stripe plan ids below are then in that currency. | [optional] |
+|**monthlyCostLocal** | **Double** | | [optional] |
+|**yearlyCostLocal** | **Double** | | [optional] |
|**monthlyStripePlanId** | **String** | | |
|**yearlyStripePlanId** | **String** | | |
|**maxMonthlyPageLoads** | **Double** | | |
diff --git a/client/docs/WebhookComment.md b/client/docs/WebhookComment.md
index 4167cc2..7d17439 100644
--- a/client/docs/WebhookComment.md
+++ b/client/docs/WebhookComment.md
@@ -36,6 +36,7 @@
|**mentions** | [**List<CommentUserMentionInfo>**](CommentUserMentionInfo.md) | | |
|**domain** | **String** | | |
|**moderationGroupIds** | **List<String>** | | |
+|**badges** | [**List<CommentUserBadgeInfo>**](CommentUserBadgeInfo.md) | | |
diff --git a/client/pom.xml b/client/pom.xml
index e479ab4..73a5500 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -5,7 +5,7 @@
client
jar
client
- 3.1.1
+ 3.1.2
https://fastcomments.com
FastComments API Client - A SDK for interacting with the FastComments API
diff --git a/client/src/main/java/com/fastcomments/invoker/ApiClient.java b/client/src/main/java/com/fastcomments/invoker/ApiClient.java
index df79615..a04c05b 100644
--- a/client/src/main/java/com/fastcomments/invoker/ApiClient.java
+++ b/client/src/main/java/com/fastcomments/invoker/ApiClient.java
@@ -147,7 +147,7 @@ protected void init() {
json = new JSON();
// Set default User-Agent.
- setUserAgent("OpenAPI-Generator/3.1.1/java");
+ setUserAgent("OpenAPI-Generator/3.1.2/java");
authentications = new HashMap();
}
diff --git a/client/src/main/java/com/fastcomments/invoker/Configuration.java b/client/src/main/java/com/fastcomments/invoker/Configuration.java
index 2b2d995..46a7899 100644
--- a/client/src/main/java/com/fastcomments/invoker/Configuration.java
+++ b/client/src/main/java/com/fastcomments/invoker/Configuration.java
@@ -19,7 +19,7 @@
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.23.0-SNAPSHOT")
public class Configuration {
- public static final String VERSION = "3.1.1";
+ public static final String VERSION = "3.1.2";
private static final AtomicReference defaultApiClient = new AtomicReference<>();
private static volatile Supplier apiClientFactory = ApiClient::new;
diff --git a/client/src/main/java/com/fastcomments/model/APIAuditLog.java b/client/src/main/java/com/fastcomments/model/APIAuditLog.java
index 769e272..1796a1c 100644
--- a/client/src/main/java/com/fastcomments/model/APIAuditLog.java
+++ b/client/src/main/java/com/fastcomments/model/APIAuditLog.java
@@ -559,6 +559,50 @@ public void setsIdHashed(@javax.annotation.Nullable String sIdHashed) {
this.sIdHashed = sIdHashed;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIAuditLog instance itself
+ */
+ public APIAuditLog putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -585,12 +629,13 @@ public boolean equals(Object o) {
Objects.equals(this.targetId, apIAuditLog.targetId) &&
Objects.equals(this.targetLabel, apIAuditLog.targetLabel) &&
Objects.equals(this.ua, apIAuditLog.ua) &&
- Objects.equals(this.sIdHashed, apIAuditLog.sIdHashed);
+ Objects.equals(this.sIdHashed, apIAuditLog.sIdHashed)&&
+ Objects.equals(this.additionalProperties, apIAuditLog.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, userId, username, resourceName, crudType, from, url, ip, when, description, serverStartDate, objectDetails, targetId, targetLabel, ua, sIdHashed);
+ return Objects.hash(id, userId, username, resourceName, crudType, from, url, ip, when, description, serverStartDate, objectDetails, targetId, targetLabel, ua, sIdHashed, additionalProperties);
}
@Override
@@ -613,6 +658,7 @@ public String toString() {
sb.append(" targetLabel: ").append(toIndentedString(targetLabel)).append("\n");
sb.append(" ua: ").append(toIndentedString(ua)).append("\n");
sb.append(" sIdHashed: ").append(toIndentedString(sIdHashed)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -650,14 +696,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIAuditLog.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIAuditLog` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIAuditLog.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -727,6 +765,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIAuditLog value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -734,7 +794,28 @@ public void write(JsonWriter out, APIAuditLog value) throws IOException {
public APIAuditLog read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIAuditLog instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIBanUserChangeLog.java b/client/src/main/java/com/fastcomments/model/APIBanUserChangeLog.java
index 3685225..481e0df 100644
--- a/client/src/main/java/com/fastcomments/model/APIBanUserChangeLog.java
+++ b/client/src/main/java/com/fastcomments/model/APIBanUserChangeLog.java
@@ -160,6 +160,50 @@ public void setChangedValuesBefore(@javax.annotation.Nullable APIBanUserChangedV
this.changedValuesBefore = changedValuesBefore;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIBanUserChangeLog instance itself
+ */
+ public APIBanUserChangeLog putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -174,12 +218,13 @@ public boolean equals(Object o) {
return Objects.equals(this.createdBannedUserId, apIBanUserChangeLog.createdBannedUserId) &&
Objects.equals(this.updatedBannedUserId, apIBanUserChangeLog.updatedBannedUserId) &&
Objects.equals(this.deletedBannedUsers, apIBanUserChangeLog.deletedBannedUsers) &&
- Objects.equals(this.changedValuesBefore, apIBanUserChangeLog.changedValuesBefore);
+ Objects.equals(this.changedValuesBefore, apIBanUserChangeLog.changedValuesBefore)&&
+ Objects.equals(this.additionalProperties, apIBanUserChangeLog.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(createdBannedUserId, updatedBannedUserId, deletedBannedUsers, changedValuesBefore);
+ return Objects.hash(createdBannedUserId, updatedBannedUserId, deletedBannedUsers, changedValuesBefore, additionalProperties);
}
@Override
@@ -190,6 +235,7 @@ public String toString() {
sb.append(" updatedBannedUserId: ").append(toIndentedString(updatedBannedUserId)).append("\n");
sb.append(" deletedBannedUsers: ").append(toIndentedString(deletedBannedUsers)).append("\n");
sb.append(" changedValuesBefore: ").append(toIndentedString(changedValuesBefore)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -226,14 +272,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIBanUserChangeLog is not found in the empty JSON string", APIBanUserChangeLog.openapiRequiredFields.toString()));
}
}
-
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIBanUserChangeLog.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIBanUserChangeLog` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("createdBannedUserId") != null && !jsonObj.get("createdBannedUserId").isJsonNull()) && !jsonObj.get("createdBannedUserId").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `createdBannedUserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBannedUserId").toString()));
@@ -276,6 +314,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIBanUserChangeLog value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -283,7 +343,28 @@ public void write(JsonWriter out, APIBanUserChangeLog value) throws IOException
public APIBanUserChangeLog read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIBanUserChangeLog instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIBanUserChangedValues.java b/client/src/main/java/com/fastcomments/model/APIBanUserChangedValues.java
index aee9500..7172b34 100644
--- a/client/src/main/java/com/fastcomments/model/APIBanUserChangedValues.java
+++ b/client/src/main/java/com/fastcomments/model/APIBanUserChangedValues.java
@@ -365,6 +365,50 @@ public void setBanReason(@javax.annotation.Nullable String banReason) {
this.banReason = banReason;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIBanUserChangedValues instance itself
+ */
+ public APIBanUserChangedValues putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -388,12 +432,13 @@ public boolean equals(Object o) {
Objects.equals(this.banType, apIBanUserChangedValues.banType) &&
Objects.equals(this.bannedUntil, apIBanUserChangedValues.bannedUntil) &&
Objects.equals(this.hasEmailWildcard, apIBanUserChangedValues.hasEmailWildcard) &&
- Objects.equals(this.banReason, apIBanUserChangedValues.banReason);
+ Objects.equals(this.banReason, apIBanUserChangedValues.banReason)&&
+ Objects.equals(this.additionalProperties, apIBanUserChangedValues.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, tenantId, userId, email, username, ipHash, createdAt, bannedByUserId, bannedCommentText, banType, bannedUntil, hasEmailWildcard, banReason);
+ return Objects.hash(id, tenantId, userId, email, username, ipHash, createdAt, bannedByUserId, bannedCommentText, banType, bannedUntil, hasEmailWildcard, banReason, additionalProperties);
}
@Override
@@ -413,6 +458,7 @@ public String toString() {
sb.append(" bannedUntil: ").append(toIndentedString(bannedUntil)).append("\n");
sb.append(" hasEmailWildcard: ").append(toIndentedString(hasEmailWildcard)).append("\n");
sb.append(" banReason: ").append(toIndentedString(banReason)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -449,14 +495,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The required field(s) %s in APIBanUserChangedValues is not found in the empty JSON string", APIBanUserChangedValues.openapiRequiredFields.toString()));
}
}
-
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIBanUserChangedValues.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIBanUserChangedValues` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("_id") != null && !jsonObj.get("_id").isJsonNull()) && !jsonObj.get("_id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("_id").toString()));
@@ -505,6 +543,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIBanUserChangedValues value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -512,7 +572,28 @@ public void write(JsonWriter out, APIBanUserChangedValues value) throws IOExcept
public APIBanUserChangedValues read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIBanUserChangedValues instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIBannedUser.java b/client/src/main/java/com/fastcomments/model/APIBannedUser.java
index faad2cd..3d72ec7 100644
--- a/client/src/main/java/com/fastcomments/model/APIBannedUser.java
+++ b/client/src/main/java/com/fastcomments/model/APIBannedUser.java
@@ -365,6 +365,50 @@ public void setBanReason(@javax.annotation.Nullable String banReason) {
this.banReason = banReason;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIBannedUser instance itself
+ */
+ public APIBannedUser putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -388,12 +432,13 @@ public boolean equals(Object o) {
Objects.equals(this.banType, apIBannedUser.banType) &&
Objects.equals(this.bannedUntil, apIBannedUser.bannedUntil) &&
Objects.equals(this.hasEmailWildcard, apIBannedUser.hasEmailWildcard) &&
- Objects.equals(this.banReason, apIBannedUser.banReason);
+ Objects.equals(this.banReason, apIBannedUser.banReason)&&
+ Objects.equals(this.additionalProperties, apIBannedUser.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, tenantId, userId, email, username, ipHash, createdAt, bannedByUserId, bannedCommentText, banType, bannedUntil, hasEmailWildcard, banReason);
+ return Objects.hash(id, tenantId, userId, email, username, ipHash, createdAt, bannedByUserId, bannedCommentText, banType, bannedUntil, hasEmailWildcard, banReason, additionalProperties);
}
@Override
@@ -413,6 +458,7 @@ public String toString() {
sb.append(" bannedUntil: ").append(toIndentedString(bannedUntil)).append("\n");
sb.append(" hasEmailWildcard: ").append(toIndentedString(hasEmailWildcard)).append("\n");
sb.append(" banReason: ").append(toIndentedString(banReason)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -450,14 +496,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIBannedUser.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIBannedUser` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIBannedUser.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -512,6 +550,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIBannedUser value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -519,7 +579,28 @@ public void write(JsonWriter out, APIBannedUser value) throws IOException {
public APIBannedUser read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIBannedUser instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APICommentBase.java b/client/src/main/java/com/fastcomments/model/APICommentBase.java
index 14a9d3e..4681016 100644
--- a/client/src/main/java/com/fastcomments/model/APICommentBase.java
+++ b/client/src/main/java/com/fastcomments/model/APICommentBase.java
@@ -1371,6 +1371,50 @@ public void setVotesUp(@javax.annotation.Nullable Integer votesUp) {
this.votesUp = votesUp;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APICommentBase instance itself
+ */
+ public APICommentBase putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -1434,12 +1478,13 @@ public boolean equals(Object o) {
Objects.equals(this.verifiedDate, apICommentBase.verifiedDate) &&
Objects.equals(this.votes, apICommentBase.votes) &&
Objects.equals(this.votesDown, apICommentBase.votesDown) &&
- Objects.equals(this.votesUp, apICommentBase.votesUp);
+ Objects.equals(this.votesUp, apICommentBase.votesUp)&&
+ Objects.equals(this.additionalProperties, apICommentBase.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, aiDeterminedSpam, anonUserId, approved, avatarSrc, badges, comment, commentHTML, commenterEmail, commenterLink, commenterName, date, displayLabel, domain, externalId, externalParentId, expireAt, feedbackIds, flagCount, fromProductId, hasCode, hasImages, hasLinks, hashTags, isByAdmin, isByModerator, isDeleted, isDeletedUser, isPinned, isLocked, isSpam, localDateHours, localDateString, locale, mentions, meta, moderationGroupIds, notificationSentForParent, notificationSentForParentTenant, pageTitle, parentId, rating, reviewed, tenantId, url, urlId, urlIdRaw, userId, verified, verifiedDate, votes, votesDown, votesUp);
+ return Objects.hash(id, aiDeterminedSpam, anonUserId, approved, avatarSrc, badges, comment, commentHTML, commenterEmail, commenterLink, commenterName, date, displayLabel, domain, externalId, externalParentId, expireAt, feedbackIds, flagCount, fromProductId, hasCode, hasImages, hasLinks, hashTags, isByAdmin, isByModerator, isDeleted, isDeletedUser, isPinned, isLocked, isSpam, localDateHours, localDateString, locale, mentions, meta, moderationGroupIds, notificationSentForParent, notificationSentForParentTenant, pageTitle, parentId, rating, reviewed, tenantId, url, urlId, urlIdRaw, userId, verified, verifiedDate, votes, votesDown, votesUp, additionalProperties);
}
@Override
@@ -1499,6 +1544,7 @@ public String toString() {
sb.append(" votes: ").append(toIndentedString(votes)).append("\n");
sb.append(" votesDown: ").append(toIndentedString(votesDown)).append("\n");
sb.append(" votesUp: ").append(toIndentedString(votesUp)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -1536,14 +1582,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APICommentBase.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APICommentBase` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APICommentBase.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -1681,6 +1719,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APICommentBase value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -1688,7 +1748,28 @@ public void write(JsonWriter out, APICommentBase value) throws IOException {
public APICommentBase read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APICommentBase instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APICommentCommonBannedUser.java b/client/src/main/java/com/fastcomments/model/APICommentCommonBannedUser.java
index 0b11dc3..f41beb2 100644
--- a/client/src/main/java/com/fastcomments/model/APICommentCommonBannedUser.java
+++ b/client/src/main/java/com/fastcomments/model/APICommentCommonBannedUser.java
@@ -245,6 +245,50 @@ public void setBanReason(@javax.annotation.Nullable String banReason) {
this.banReason = banReason;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APICommentCommonBannedUser instance itself
+ */
+ public APICommentCommonBannedUser putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -263,12 +307,13 @@ public boolean equals(Object o) {
Objects.equals(this.ipHash, apICommentCommonBannedUser.ipHash) &&
Objects.equals(this.bannedUntil, apICommentCommonBannedUser.bannedUntil) &&
Objects.equals(this.hasEmailWildcard, apICommentCommonBannedUser.hasEmailWildcard) &&
- Objects.equals(this.banReason, apICommentCommonBannedUser.banReason);
+ Objects.equals(this.banReason, apICommentCommonBannedUser.banReason)&&
+ Objects.equals(this.additionalProperties, apICommentCommonBannedUser.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, userId, banType, email, ipHash, bannedUntil, hasEmailWildcard, banReason);
+ return Objects.hash(id, userId, banType, email, ipHash, bannedUntil, hasEmailWildcard, banReason, additionalProperties);
}
@Override
@@ -283,6 +328,7 @@ public String toString() {
sb.append(" bannedUntil: ").append(toIndentedString(bannedUntil)).append("\n");
sb.append(" hasEmailWildcard: ").append(toIndentedString(hasEmailWildcard)).append("\n");
sb.append(" banReason: ").append(toIndentedString(banReason)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -320,14 +366,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APICommentCommonBannedUser.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APICommentCommonBannedUser` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APICommentCommonBannedUser.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -370,6 +408,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APICommentCommonBannedUser value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -377,7 +437,28 @@ public void write(JsonWriter out, APICommentCommonBannedUser value) throws IOExc
public APICommentCommonBannedUser read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APICommentCommonBannedUser instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APICreateUserBadgeResponse.java b/client/src/main/java/com/fastcomments/model/APICreateUserBadgeResponse.java
index cb2bcf1..ccc82be 100644
--- a/client/src/main/java/com/fastcomments/model/APICreateUserBadgeResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APICreateUserBadgeResponse.java
@@ -136,6 +136,50 @@ public void setNotes(@javax.annotation.Nullable List notes) {
this.notes = notes;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APICreateUserBadgeResponse instance itself
+ */
+ public APICreateUserBadgeResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -149,12 +193,13 @@ public boolean equals(Object o) {
APICreateUserBadgeResponse apICreateUserBadgeResponse = (APICreateUserBadgeResponse) o;
return Objects.equals(this.status, apICreateUserBadgeResponse.status) &&
Objects.equals(this.userBadge, apICreateUserBadgeResponse.userBadge) &&
- Objects.equals(this.notes, apICreateUserBadgeResponse.notes);
+ Objects.equals(this.notes, apICreateUserBadgeResponse.notes)&&
+ Objects.equals(this.additionalProperties, apICreateUserBadgeResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, userBadge, notes);
+ return Objects.hash(status, userBadge, notes, additionalProperties);
}
@Override
@@ -164,6 +209,7 @@ public String toString() {
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" userBadge: ").append(toIndentedString(userBadge)).append("\n");
sb.append(" notes: ").append(toIndentedString(notes)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -201,14 +247,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APICreateUserBadgeResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APICreateUserBadgeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APICreateUserBadgeResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -241,6 +279,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APICreateUserBadgeResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -248,7 +308,28 @@ public void write(JsonWriter out, APICreateUserBadgeResponse value) throws IOExc
public APICreateUserBadgeResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APICreateUserBadgeResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIDomainConfiguration.java b/client/src/main/java/com/fastcomments/model/APIDomainConfiguration.java
index 4697b7e..f3d7227 100644
--- a/client/src/main/java/com/fastcomments/model/APIDomainConfiguration.java
+++ b/client/src/main/java/com/fastcomments/model/APIDomainConfiguration.java
@@ -424,6 +424,50 @@ public void setDisableUnsubscribeLinks(@javax.annotation.Nullable Boolean disabl
this.disableUnsubscribeLinks = disableUnsubscribeLinks;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIDomainConfiguration instance itself
+ */
+ public APIDomainConfiguration putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -449,12 +493,13 @@ public boolean equals(Object o) {
Objects.equals(this.logoSrc, apIDomainConfiguration.logoSrc) &&
Objects.equals(this.logoSrc100px, apIDomainConfiguration.logoSrc100px) &&
Objects.equals(this.footerUnsubscribeURL, apIDomainConfiguration.footerUnsubscribeURL) &&
- Objects.equals(this.disableUnsubscribeLinks, apIDomainConfiguration.disableUnsubscribeLinks);
+ Objects.equals(this.disableUnsubscribeLinks, apIDomainConfiguration.disableUnsubscribeLinks)&&
+ Objects.equals(this.additionalProperties, apIDomainConfiguration.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, domain, emailFromName, emailFromEmail, emailHeaders, wpSyncToken, wpSynced, wpURL, createdAt, autoAddedDate, siteType, logoSrc, logoSrc100px, footerUnsubscribeURL, disableUnsubscribeLinks);
+ return Objects.hash(id, domain, emailFromName, emailFromEmail, emailHeaders, wpSyncToken, wpSynced, wpURL, createdAt, autoAddedDate, siteType, logoSrc, logoSrc100px, footerUnsubscribeURL, disableUnsubscribeLinks, additionalProperties);
}
@Override
@@ -476,6 +521,7 @@ public String toString() {
sb.append(" logoSrc100px: ").append(toIndentedString(logoSrc100px)).append("\n");
sb.append(" footerUnsubscribeURL: ").append(toIndentedString(footerUnsubscribeURL)).append("\n");
sb.append(" disableUnsubscribeLinks: ").append(toIndentedString(disableUnsubscribeLinks)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -513,14 +559,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIDomainConfiguration.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIDomainConfiguration` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIDomainConfiguration.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -576,6 +614,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIDomainConfiguration value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -583,7 +643,28 @@ public void write(JsonWriter out, APIDomainConfiguration value) throws IOExcepti
public APIDomainConfiguration read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIDomainConfiguration instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIEmptySuccessResponse.java b/client/src/main/java/com/fastcomments/model/APIEmptySuccessResponse.java
index 9ae398d..3c23c78 100644
--- a/client/src/main/java/com/fastcomments/model/APIEmptySuccessResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIEmptySuccessResponse.java
@@ -77,6 +77,50 @@ public void setStatus(@javax.annotation.Nonnull APIStatus status) {
this.status = status;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIEmptySuccessResponse instance itself
+ */
+ public APIEmptySuccessResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -88,12 +132,13 @@ public boolean equals(Object o) {
return false;
}
APIEmptySuccessResponse apIEmptySuccessResponse = (APIEmptySuccessResponse) o;
- return Objects.equals(this.status, apIEmptySuccessResponse.status);
+ return Objects.equals(this.status, apIEmptySuccessResponse.status)&&
+ Objects.equals(this.additionalProperties, apIEmptySuccessResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status);
+ return Objects.hash(status, additionalProperties);
}
@Override
@@ -101,6 +146,7 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class APIEmptySuccessResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -138,14 +184,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIEmptySuccessResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIEmptySuccessResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIEmptySuccessResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -172,6 +210,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIEmptySuccessResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -179,7 +239,28 @@ public void write(JsonWriter out, APIEmptySuccessResponse value) throws IOExcept
public APIEmptySuccessResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIEmptySuccessResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIError.java b/client/src/main/java/com/fastcomments/model/APIError.java
index 47af126..cf3d581 100644
--- a/client/src/main/java/com/fastcomments/model/APIError.java
+++ b/client/src/main/java/com/fastcomments/model/APIError.java
@@ -246,6 +246,50 @@ public void setCustomConfig(@javax.annotation.Nullable CustomConfigParameters cu
this.customConfig = customConfig;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIError instance itself
+ */
+ public APIError putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -264,12 +308,13 @@ public boolean equals(Object o) {
Objects.equals(this.bannedUntil, apIError.bannedUntil) &&
Objects.equals(this.maxCharacterLength, apIError.maxCharacterLength) &&
Objects.equals(this.translatedError, apIError.translatedError) &&
- Objects.equals(this.customConfig, apIError.customConfig);
+ Objects.equals(this.customConfig, apIError.customConfig)&&
+ Objects.equals(this.additionalProperties, apIError.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, reason, code, secondaryCode, bannedUntil, maxCharacterLength, translatedError, customConfig);
+ return Objects.hash(status, reason, code, secondaryCode, bannedUntil, maxCharacterLength, translatedError, customConfig, additionalProperties);
}
@Override
@@ -284,6 +329,7 @@ public String toString() {
sb.append(" maxCharacterLength: ").append(toIndentedString(maxCharacterLength)).append("\n");
sb.append(" translatedError: ").append(toIndentedString(translatedError)).append("\n");
sb.append(" customConfig: ").append(toIndentedString(customConfig)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -321,14 +367,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIError.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIError` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIError.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -371,6 +409,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIError value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -378,7 +438,28 @@ public void write(JsonWriter out, APIError value) throws IOException {
public APIError read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIError instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetCommentResponse.java b/client/src/main/java/com/fastcomments/model/APIGetCommentResponse.java
index d1cf051..908635c 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetCommentResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetCommentResponse.java
@@ -102,6 +102,50 @@ public void setComment(@javax.annotation.Nonnull APIComment comment) {
this.comment = comment;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetCommentResponse instance itself
+ */
+ public APIGetCommentResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -114,12 +158,13 @@ public boolean equals(Object o) {
}
APIGetCommentResponse apIGetCommentResponse = (APIGetCommentResponse) o;
return Objects.equals(this.status, apIGetCommentResponse.status) &&
- Objects.equals(this.comment, apIGetCommentResponse.comment);
+ Objects.equals(this.comment, apIGetCommentResponse.comment)&&
+ Objects.equals(this.additionalProperties, apIGetCommentResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, comment);
+ return Objects.hash(status, comment, additionalProperties);
}
@Override
@@ -128,6 +173,7 @@ public String toString() {
sb.append("class APIGetCommentResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" comment: ").append(toIndentedString(comment)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -165,14 +211,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetCommentResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetCommentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetCommentResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -201,6 +239,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetCommentResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -208,7 +268,28 @@ public void write(JsonWriter out, APIGetCommentResponse value) throws IOExceptio
public APIGetCommentResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetCommentResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetCommentsResponse.java b/client/src/main/java/com/fastcomments/model/APIGetCommentsResponse.java
index de2856c..7360d4d 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetCommentsResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetCommentsResponse.java
@@ -112,6 +112,50 @@ public void setComments(@javax.annotation.Nonnull List comments) {
this.comments = comments;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetCommentsResponse instance itself
+ */
+ public APIGetCommentsResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -124,12 +168,13 @@ public boolean equals(Object o) {
}
APIGetCommentsResponse apIGetCommentsResponse = (APIGetCommentsResponse) o;
return Objects.equals(this.status, apIGetCommentsResponse.status) &&
- Objects.equals(this.comments, apIGetCommentsResponse.comments);
+ Objects.equals(this.comments, apIGetCommentsResponse.comments)&&
+ Objects.equals(this.additionalProperties, apIGetCommentsResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, comments);
+ return Objects.hash(status, comments, additionalProperties);
}
@Override
@@ -138,6 +183,7 @@ public String toString() {
sb.append("class APIGetCommentsResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" comments: ").append(toIndentedString(comments)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -175,14 +221,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetCommentsResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetCommentsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetCommentsResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -219,6 +257,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetCommentsResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -226,7 +286,28 @@ public void write(JsonWriter out, APIGetCommentsResponse value) throws IOExcepti
public APIGetCommentsResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetCommentsResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressListResponse.java b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressListResponse.java
index b404710..2da1376 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressListResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressListResponse.java
@@ -112,6 +112,50 @@ public void setUserBadgeProgresses(@javax.annotation.Nonnull List additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetUserBadgeProgressListResponse instance itself
+ */
+ public APIGetUserBadgeProgressListResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -124,12 +168,13 @@ public boolean equals(Object o) {
}
APIGetUserBadgeProgressListResponse apIGetUserBadgeProgressListResponse = (APIGetUserBadgeProgressListResponse) o;
return Objects.equals(this.status, apIGetUserBadgeProgressListResponse.status) &&
- Objects.equals(this.userBadgeProgresses, apIGetUserBadgeProgressListResponse.userBadgeProgresses);
+ Objects.equals(this.userBadgeProgresses, apIGetUserBadgeProgressListResponse.userBadgeProgresses)&&
+ Objects.equals(this.additionalProperties, apIGetUserBadgeProgressListResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, userBadgeProgresses);
+ return Objects.hash(status, userBadgeProgresses, additionalProperties);
}
@Override
@@ -138,6 +183,7 @@ public String toString() {
sb.append("class APIGetUserBadgeProgressListResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" userBadgeProgresses: ").append(toIndentedString(userBadgeProgresses)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -175,14 +221,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetUserBadgeProgressListResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetUserBadgeProgressListResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetUserBadgeProgressListResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -219,6 +257,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetUserBadgeProgressListResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -226,7 +286,28 @@ public void write(JsonWriter out, APIGetUserBadgeProgressListResponse value) thr
public APIGetUserBadgeProgressListResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetUserBadgeProgressListResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressResponse.java b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressResponse.java
index 0461c6a..3961d64 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeProgressResponse.java
@@ -102,6 +102,50 @@ public void setUserBadgeProgress(@javax.annotation.Nonnull UserBadgeProgress use
this.userBadgeProgress = userBadgeProgress;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetUserBadgeProgressResponse instance itself
+ */
+ public APIGetUserBadgeProgressResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -114,12 +158,13 @@ public boolean equals(Object o) {
}
APIGetUserBadgeProgressResponse apIGetUserBadgeProgressResponse = (APIGetUserBadgeProgressResponse) o;
return Objects.equals(this.status, apIGetUserBadgeProgressResponse.status) &&
- Objects.equals(this.userBadgeProgress, apIGetUserBadgeProgressResponse.userBadgeProgress);
+ Objects.equals(this.userBadgeProgress, apIGetUserBadgeProgressResponse.userBadgeProgress)&&
+ Objects.equals(this.additionalProperties, apIGetUserBadgeProgressResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, userBadgeProgress);
+ return Objects.hash(status, userBadgeProgress, additionalProperties);
}
@Override
@@ -128,6 +173,7 @@ public String toString() {
sb.append("class APIGetUserBadgeProgressResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" userBadgeProgress: ").append(toIndentedString(userBadgeProgress)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -165,14 +211,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetUserBadgeProgressResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetUserBadgeProgressResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetUserBadgeProgressResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -201,6 +239,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetUserBadgeProgressResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -208,7 +268,28 @@ public void write(JsonWriter out, APIGetUserBadgeProgressResponse value) throws
public APIGetUserBadgeProgressResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetUserBadgeProgressResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeResponse.java b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeResponse.java
index 0cfd99c..45c8d7f 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetUserBadgeResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetUserBadgeResponse.java
@@ -102,6 +102,50 @@ public void setUserBadge(@javax.annotation.Nonnull UserBadge userBadge) {
this.userBadge = userBadge;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetUserBadgeResponse instance itself
+ */
+ public APIGetUserBadgeResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -114,12 +158,13 @@ public boolean equals(Object o) {
}
APIGetUserBadgeResponse apIGetUserBadgeResponse = (APIGetUserBadgeResponse) o;
return Objects.equals(this.status, apIGetUserBadgeResponse.status) &&
- Objects.equals(this.userBadge, apIGetUserBadgeResponse.userBadge);
+ Objects.equals(this.userBadge, apIGetUserBadgeResponse.userBadge)&&
+ Objects.equals(this.additionalProperties, apIGetUserBadgeResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, userBadge);
+ return Objects.hash(status, userBadge, additionalProperties);
}
@Override
@@ -128,6 +173,7 @@ public String toString() {
sb.append("class APIGetUserBadgeResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" userBadge: ").append(toIndentedString(userBadge)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -165,14 +211,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetUserBadgeResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetUserBadgeResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetUserBadgeResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -201,6 +239,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetUserBadgeResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -208,7 +268,28 @@ public void write(JsonWriter out, APIGetUserBadgeResponse value) throws IOExcept
public APIGetUserBadgeResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetUserBadgeResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIGetUserBadgesResponse.java b/client/src/main/java/com/fastcomments/model/APIGetUserBadgesResponse.java
index 147d69b..915f067 100644
--- a/client/src/main/java/com/fastcomments/model/APIGetUserBadgesResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APIGetUserBadgesResponse.java
@@ -112,6 +112,50 @@ public void setUserBadges(@javax.annotation.Nonnull List userBadges)
this.userBadges = userBadges;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIGetUserBadgesResponse instance itself
+ */
+ public APIGetUserBadgesResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -124,12 +168,13 @@ public boolean equals(Object o) {
}
APIGetUserBadgesResponse apIGetUserBadgesResponse = (APIGetUserBadgesResponse) o;
return Objects.equals(this.status, apIGetUserBadgesResponse.status) &&
- Objects.equals(this.userBadges, apIGetUserBadgesResponse.userBadges);
+ Objects.equals(this.userBadges, apIGetUserBadgesResponse.userBadges)&&
+ Objects.equals(this.additionalProperties, apIGetUserBadgesResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, userBadges);
+ return Objects.hash(status, userBadges, additionalProperties);
}
@Override
@@ -138,6 +183,7 @@ public String toString() {
sb.append("class APIGetUserBadgesResponse {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" userBadges: ").append(toIndentedString(userBadges)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -175,14 +221,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIGetUserBadgesResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIGetUserBadgesResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIGetUserBadgesResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -219,6 +257,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIGetUserBadgesResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -226,7 +286,28 @@ public void write(JsonWriter out, APIGetUserBadgesResponse value) throws IOExcep
public APIGetUserBadgesResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIGetUserBadgesResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APIModerateUserBanPreferences.java b/client/src/main/java/com/fastcomments/model/APIModerateUserBanPreferences.java
index 94bdb80..216a220 100644
--- a/client/src/main/java/com/fastcomments/model/APIModerateUserBanPreferences.java
+++ b/client/src/main/java/com/fastcomments/model/APIModerateUserBanPreferences.java
@@ -148,6 +148,50 @@ public void setLastBanDuration(@javax.annotation.Nonnull String lastBanDuration)
this.lastBanDuration = lastBanDuration;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APIModerateUserBanPreferences instance itself
+ */
+ public APIModerateUserBanPreferences putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -162,12 +206,13 @@ public boolean equals(Object o) {
return Objects.equals(this.shouldBanEmail, apIModerateUserBanPreferences.shouldBanEmail) &&
Objects.equals(this.shouldBanByIP, apIModerateUserBanPreferences.shouldBanByIP) &&
Objects.equals(this.lastBanType, apIModerateUserBanPreferences.lastBanType) &&
- Objects.equals(this.lastBanDuration, apIModerateUserBanPreferences.lastBanDuration);
+ Objects.equals(this.lastBanDuration, apIModerateUserBanPreferences.lastBanDuration)&&
+ Objects.equals(this.additionalProperties, apIModerateUserBanPreferences.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(shouldBanEmail, shouldBanByIP, lastBanType, lastBanDuration);
+ return Objects.hash(shouldBanEmail, shouldBanByIP, lastBanType, lastBanDuration, additionalProperties);
}
@Override
@@ -178,6 +223,7 @@ public String toString() {
sb.append(" shouldBanByIP: ").append(toIndentedString(shouldBanByIP)).append("\n");
sb.append(" lastBanType: ").append(toIndentedString(lastBanType)).append("\n");
sb.append(" lastBanDuration: ").append(toIndentedString(lastBanDuration)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -215,14 +261,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APIModerateUserBanPreferences.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APIModerateUserBanPreferences` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APIModerateUserBanPreferences.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -253,6 +291,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APIModerateUserBanPreferences value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -260,7 +320,28 @@ public void write(JsonWriter out, APIModerateUserBanPreferences value) throws IO
public APIModerateUserBanPreferences read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APIModerateUserBanPreferences instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APISSOUser.java b/client/src/main/java/com/fastcomments/model/APISSOUser.java
index dcdb61e..79d7b92 100644
--- a/client/src/main/java/com/fastcomments/model/APISSOUser.java
+++ b/client/src/main/java/com/fastcomments/model/APISSOUser.java
@@ -542,6 +542,50 @@ public void setGroupIds(@javax.annotation.Nullable List groupIds) {
this.groupIds = groupIds;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APISSOUser instance itself
+ */
+ public APISSOUser putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -572,12 +616,13 @@ public boolean equals(Object o) {
Objects.equals(this.isProfileCommentsPrivate, apISSOUser.isProfileCommentsPrivate) &&
Objects.equals(this.isProfileDMDisabled, apISSOUser.isProfileDMDisabled) &&
Objects.equals(this.hasBlockedUsers, apISSOUser.hasBlockedUsers) &&
- Objects.equals(this.groupIds, apISSOUser.groupIds);
+ Objects.equals(this.groupIds, apISSOUser.groupIds)&&
+ Objects.equals(this.additionalProperties, apISSOUser.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, username, websiteUrl, email, signUpDate, createdFromUrlId, loginCount, avatarSrc, optedInNotifications, optedInSubscriptionNotifications, displayLabel, displayName, isAccountOwner, isAdminAdmin, isCommentModeratorAdmin, isProfileActivityPrivate, isProfileCommentsPrivate, isProfileDMDisabled, hasBlockedUsers, groupIds);
+ return Objects.hash(id, username, websiteUrl, email, signUpDate, createdFromUrlId, loginCount, avatarSrc, optedInNotifications, optedInSubscriptionNotifications, displayLabel, displayName, isAccountOwner, isAdminAdmin, isCommentModeratorAdmin, isProfileActivityPrivate, isProfileCommentsPrivate, isProfileDMDisabled, hasBlockedUsers, groupIds, additionalProperties);
}
@Override
@@ -604,6 +649,7 @@ public String toString() {
sb.append(" isProfileDMDisabled: ").append(toIndentedString(isProfileDMDisabled)).append("\n");
sb.append(" hasBlockedUsers: ").append(toIndentedString(hasBlockedUsers)).append("\n");
sb.append(" groupIds: ").append(toIndentedString(groupIds)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -641,14 +687,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APISSOUser.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APISSOUser` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APISSOUser.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -701,6 +739,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APISSOUser value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -708,7 +768,28 @@ public void write(JsonWriter out, APISSOUser value) throws IOException {
public APISSOUser read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APISSOUser instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APISaveCommentResponse.java b/client/src/main/java/com/fastcomments/model/APISaveCommentResponse.java
index 2713014..faaf9a2 100644
--- a/client/src/main/java/com/fastcomments/model/APISaveCommentResponse.java
+++ b/client/src/main/java/com/fastcomments/model/APISaveCommentResponse.java
@@ -161,6 +161,50 @@ public void setModuleData(@javax.annotation.Nullable Map moduleD
this.moduleData = moduleData;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APISaveCommentResponse instance itself
+ */
+ public APISaveCommentResponse putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -175,12 +219,13 @@ public boolean equals(Object o) {
return Objects.equals(this.status, apISaveCommentResponse.status) &&
Objects.equals(this.comment, apISaveCommentResponse.comment) &&
Objects.equals(this.user, apISaveCommentResponse.user) &&
- Objects.equals(this.moduleData, apISaveCommentResponse.moduleData);
+ Objects.equals(this.moduleData, apISaveCommentResponse.moduleData)&&
+ Objects.equals(this.additionalProperties, apISaveCommentResponse.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(status, comment, user, moduleData);
+ return Objects.hash(status, comment, user, moduleData, additionalProperties);
}
@Override
@@ -191,6 +236,7 @@ public String toString() {
sb.append(" comment: ").append(toIndentedString(comment)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" moduleData: ").append(toIndentedString(moduleData)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -228,14 +274,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APISaveCommentResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APISaveCommentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APISaveCommentResponse.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -268,6 +306,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APISaveCommentResponse value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -275,7 +335,28 @@ public void write(JsonWriter out, APISaveCommentResponse value) throws IOExcepti
public APISaveCommentResponse read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APISaveCommentResponse instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APITenant.java b/client/src/main/java/com/fastcomments/model/APITenant.java
index f609f6c..74eec8c 100644
--- a/client/src/main/java/com/fastcomments/model/APITenant.java
+++ b/client/src/main/java/com/fastcomments/model/APITenant.java
@@ -771,6 +771,50 @@ public void setMeta(@javax.annotation.Nullable Map meta) {
this.meta = meta;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APITenant instance itself
+ */
+ public APITenant putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -810,12 +854,13 @@ public boolean equals(Object o) {
Objects.equals(this.hasDebranding, apITenant.hasDebranding) &&
Objects.equals(this.flexLastBilledAmount, apITenant.flexLastBilledAmount) &&
Objects.equals(this.deAnonIpAddr, apITenant.deAnonIpAddr) &&
- Objects.equals(this.meta, apITenant.meta);
+ Objects.equals(this.meta, apITenant.meta)&&
+ Objects.equals(this.additionalProperties, apITenant.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, lastBillingIssueReminderDate, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, hasFlexPricing, hasAuditing, hasDebranding, flexLastBilledAmount, deAnonIpAddr, meta);
+ return Objects.hash(id, name, email, signUpDate, packageId, paymentFrequency, billingInfoValid, billingHandledExternally, createdBy, isSetup, domainConfiguration, billingInfo, stripeCustomerId, stripeSubscriptionId, stripePlanId, enableProfanityFilter, enableSpamFilter, lastBillingIssueReminderDate, removeUnverifiedComments, unverifiedCommentsTTLms, commentsRequireApproval, autoApproveCommentOnVerification, sendProfaneToSpam, hasFlexPricing, hasAuditing, hasDebranding, flexLastBilledAmount, deAnonIpAddr, meta, additionalProperties);
}
@Override
@@ -851,6 +896,7 @@ public String toString() {
sb.append(" flexLastBilledAmount: ").append(toIndentedString(flexLastBilledAmount)).append("\n");
sb.append(" deAnonIpAddr: ").append(toIndentedString(deAnonIpAddr)).append("\n");
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -888,14 +934,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APITenant.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APITenant` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APITenant.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -958,6 +996,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APITenant value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -965,7 +1025,28 @@ public void write(JsonWriter out, APITenant value) throws IOException {
public APITenant read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APITenant instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APITenantDailyUsage.java b/client/src/main/java/com/fastcomments/model/APITenantDailyUsage.java
index 4cbd92e..f7ab1c2 100644
--- a/client/src/main/java/com/fastcomments/model/APITenantDailyUsage.java
+++ b/client/src/main/java/com/fastcomments/model/APITenantDailyUsage.java
@@ -509,6 +509,50 @@ public void setApiErrorCount(@javax.annotation.Nonnull Double apiErrorCount) {
this.apiErrorCount = apiErrorCount;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APITenantDailyUsage instance itself
+ */
+ public APITenantDailyUsage putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -538,12 +582,13 @@ public boolean equals(Object o) {
Objects.equals(this.createdAt, apITenantDailyUsage.createdAt) &&
Objects.equals(this.billed, apITenantDailyUsage.billed) &&
Objects.equals(this.ignored, apITenantDailyUsage.ignored) &&
- Objects.equals(this.apiErrorCount, apITenantDailyUsage.apiErrorCount);
+ Objects.equals(this.apiErrorCount, apITenantDailyUsage.apiErrorCount)&&
+ Objects.equals(this.additionalProperties, apITenantDailyUsage.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, tenantId, yearNumber, monthNumber, dayNumber, commentFetchCount, commentCreateCount, conversationCreateCount, voteCount, accountCreatedCount, userMentionSearch, hashTagSearch, gifSearchTrending, gifSearch, apiCreditsUsed, createdAt, billed, ignored, apiErrorCount);
+ return Objects.hash(id, tenantId, yearNumber, monthNumber, dayNumber, commentFetchCount, commentCreateCount, conversationCreateCount, voteCount, accountCreatedCount, userMentionSearch, hashTagSearch, gifSearchTrending, gifSearch, apiCreditsUsed, createdAt, billed, ignored, apiErrorCount, additionalProperties);
}
@Override
@@ -569,6 +614,7 @@ public String toString() {
sb.append(" billed: ").append(toIndentedString(billed)).append("\n");
sb.append(" ignored: ").append(toIndentedString(ignored)).append("\n");
sb.append(" apiErrorCount: ").append(toIndentedString(apiErrorCount)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -606,14 +652,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APITenantDailyUsage.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APITenantDailyUsage` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APITenantDailyUsage.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -644,6 +682,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APITenantDailyUsage value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -651,7 +711,28 @@ public void write(JsonWriter out, APITenantDailyUsage value) throws IOException
public APITenantDailyUsage read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APITenantDailyUsage instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APITicket.java b/client/src/main/java/com/fastcomments/model/APITicket.java
index 5d04e6f..1ad3d10 100644
--- a/client/src/main/java/com/fastcomments/model/APITicket.java
+++ b/client/src/main/java/com/fastcomments/model/APITicket.java
@@ -278,6 +278,50 @@ public void setFileCount(@javax.annotation.Nonnull Integer fileCount) {
this.fileCount = fileCount;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APITicket instance itself
+ */
+ public APITicket putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -297,12 +341,13 @@ public boolean equals(Object o) {
Objects.equals(this.subject, apITicket.subject) &&
Objects.equals(this.createdAt, apITicket.createdAt) &&
Objects.equals(this.state, apITicket.state) &&
- Objects.equals(this.fileCount, apITicket.fileCount);
+ Objects.equals(this.fileCount, apITicket.fileCount)&&
+ Objects.equals(this.additionalProperties, apITicket.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, urlId, userId, managedByTenantId, assignedUserIds, subject, createdAt, state, fileCount);
+ return Objects.hash(id, urlId, userId, managedByTenantId, assignedUserIds, subject, createdAt, state, fileCount, additionalProperties);
}
@Override
@@ -318,6 +363,7 @@ public String toString() {
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" fileCount: ").append(toIndentedString(fileCount)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -355,14 +401,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APITicket.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APITicket` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APITicket.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -411,6 +449,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APITicket value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -418,7 +478,28 @@ public void write(JsonWriter out, APITicket value) throws IOException {
public APITicket read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APITicket instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APITicketDetail.java b/client/src/main/java/com/fastcomments/model/APITicketDetail.java
index cd1f8a4..885b272 100644
--- a/client/src/main/java/com/fastcomments/model/APITicketDetail.java
+++ b/client/src/main/java/com/fastcomments/model/APITicketDetail.java
@@ -383,6 +383,50 @@ public void setAckAt(@javax.annotation.Nullable String ackAt) {
this.ackAt = ackAt;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APITicketDetail instance itself
+ */
+ public APITicketDetail putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -406,12 +450,13 @@ public boolean equals(Object o) {
Objects.equals(this.files, apITicketDetail.files) &&
Objects.equals(this.reopenedAt, apITicketDetail.reopenedAt) &&
Objects.equals(this.resolvedAt, apITicketDetail.resolvedAt) &&
- Objects.equals(this.ackAt, apITicketDetail.ackAt);
+ Objects.equals(this.ackAt, apITicketDetail.ackAt)&&
+ Objects.equals(this.additionalProperties, apITicketDetail.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, urlId, userId, managedByTenantId, assignedUserIds, subject, createdAt, state, fileCount, files, reopenedAt, resolvedAt, ackAt);
+ return Objects.hash(id, urlId, userId, managedByTenantId, assignedUserIds, subject, createdAt, state, fileCount, files, reopenedAt, resolvedAt, ackAt, additionalProperties);
}
@Override
@@ -431,6 +476,7 @@ public String toString() {
sb.append(" reopenedAt: ").append(toIndentedString(reopenedAt)).append("\n");
sb.append(" resolvedAt: ").append(toIndentedString(resolvedAt)).append("\n");
sb.append(" ackAt: ").append(toIndentedString(ackAt)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -468,14 +514,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APITicketDetail.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APITicketDetail` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APITicketDetail.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -543,6 +581,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APITicketDetail value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -550,7 +610,28 @@ public void write(JsonWriter out, APITicketDetail value) throws IOException {
public APITicketDetail read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APITicketDetail instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/APITicketFile.java b/client/src/main/java/com/fastcomments/model/APITicketFile.java
index 1d32b09..dfc71ea 100644
--- a/client/src/main/java/com/fastcomments/model/APITicketFile.java
+++ b/client/src/main/java/com/fastcomments/model/APITicketFile.java
@@ -292,6 +292,50 @@ public void setExpired(@javax.annotation.Nullable Boolean expired) {
this.expired = expired;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the APITicketFile instance itself
+ */
+ public APITicketFile putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -312,12 +356,13 @@ public boolean equals(Object o) {
Objects.equals(this.uploadedAt, apITicketFile.uploadedAt) &&
Objects.equals(this.url, apITicketFile.url) &&
Objects.equals(this.expiresAt, apITicketFile.expiresAt) &&
- Objects.equals(this.expired, apITicketFile.expired);
+ Objects.equals(this.expired, apITicketFile.expired)&&
+ Objects.equals(this.additionalProperties, apITicketFile.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(id, s3Key, originalFileName, sizeBytes, contentType, uploadedByUserId, uploadedAt, url, expiresAt, expired);
+ return Objects.hash(id, s3Key, originalFileName, sizeBytes, contentType, uploadedByUserId, uploadedAt, url, expiresAt, expired, additionalProperties);
}
@Override
@@ -334,6 +379,7 @@ public String toString() {
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" expired: ").append(toIndentedString(expired)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -371,14 +417,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set> entries = jsonElement.getAsJsonObject().entrySet();
- // check to see if the JSON string contains additional fields
- for (Map.Entry entry : entries) {
- if (!APITicketFile.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` in the JSON string is not defined in the `APITicketFile` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
- }
- }
-
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : APITicketFile.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
@@ -427,6 +465,28 @@ public TypeAdapter create(Gson gson, TypeToken type) {
@Override
public void write(JsonWriter out, APITicketFile value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
+ obj.remove("additionalProperties");
+ // serialize additional properties
+ if (value.getAdditionalProperties() != null) {
+ for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
+ if (entry.getValue() instanceof String)
+ obj.addProperty(entry.getKey(), (String) entry.getValue());
+ else if (entry.getValue() instanceof Number)
+ obj.addProperty(entry.getKey(), (Number) entry.getValue());
+ else if (entry.getValue() instanceof Boolean)
+ obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
+ else if (entry.getValue() instanceof Character)
+ obj.addProperty(entry.getKey(), (Character) entry.getValue());
+ else {
+ JsonElement jsonElement = gson.toJsonTree(entry.getValue());
+ if (jsonElement.isJsonArray()) {
+ obj.add(entry.getKey(), jsonElement.getAsJsonArray());
+ } else {
+ obj.add(entry.getKey(), jsonElement.getAsJsonObject());
+ }
+ }
+ }
+ }
elementAdapter.write(out, obj);
}
@@ -434,7 +494,28 @@ public void write(JsonWriter out, APITicketFile value) throws IOException {
public APITicketFile read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
- return thisAdapter.fromJsonTree(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ APITicketFile instance = thisAdapter.fromJsonTree(jsonObj);
+ for (Map.Entry entry : jsonObj.entrySet()) {
+ if (!openapiFields.contains(entry.getKey())) {
+ if (entry.getValue().isJsonPrimitive()) { // primitive type
+ if (entry.getValue().getAsJsonPrimitive().isString())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
+ else if (entry.getValue().getAsJsonPrimitive().isNumber())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
+ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
+ instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
+ else
+ throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
+ } else if (entry.getValue().isJsonArray()) {
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
+ } else { // JSON object
+ instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
+ }
+ }
+ }
+ return instance;
}
}.nullSafe();
diff --git a/client/src/main/java/com/fastcomments/model/AddDomainConfigParams.java b/client/src/main/java/com/fastcomments/model/AddDomainConfigParams.java
index fa8df43..61bca53 100644
--- a/client/src/main/java/com/fastcomments/model/AddDomainConfigParams.java
+++ b/client/src/main/java/com/fastcomments/model/AddDomainConfigParams.java
@@ -230,6 +230,50 @@ public void setEmailHeaders(@javax.annotation.Nullable Map email
this.emailHeaders = emailHeaders;
}
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value.
+ * If the property does not already exist, create it otherwise replace it.
+ *
+ * @param key name of the property
+ * @param value value of the property
+ * @return the AddDomainConfigParams instance itself
+ */
+ public AddDomainConfigParams putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return a map of objects
+ */
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key name of the property
+ * @return an object
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
@Override
@@ -247,12 +291,13 @@ public boolean equals(Object o) {
Objects.equals(this.logoSrc, addDomainConfigParams.logoSrc) &&
Objects.equals(this.logoSrc100px, addDomainConfigParams.logoSrc100px) &&
Objects.equals(this.footerUnsubscribeURL, addDomainConfigParams.footerUnsubscribeURL) &&
- Objects.equals(this.emailHeaders, addDomainConfigParams.emailHeaders);
+ Objects.equals(this.emailHeaders, addDomainConfigParams.emailHeaders)&&
+ Objects.equals(this.additionalProperties, addDomainConfigParams.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(domain, emailFromName, emailFromEmail, logoSrc, logoSrc100px, footerUnsubscribeURL, emailHeaders);
+ return Objects.hash(domain, emailFromName, emailFromEmail, logoSrc, logoSrc100px, footerUnsubscribeURL, emailHeaders, additionalProperties);
}
@Override
@@ -266,6 +311,7 @@ public String toString() {
sb.append(" logoSrc100px: ").append(toIndentedString(logoSrc100px)).append("\n");
sb.append(" footerUnsubscribeURL: ").append(toIndentedString(footerUnsubscribeURL)).append("\n");
sb.append(" emailHeaders: ").append(toIndentedString(emailHeaders)).append("\n");
+ sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -303,14 +349,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
- Set